]> git.evergreen-ils.org Git - Evergreen.git/blob - Open-ILS/examples/fm_IDL.xml
LP1783421 - Make Copy Alerts permission not global
[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="vst" controller="open-ils.cstore open-ils.pcrud" 
808                 oils_obj:fieldmapper="vandelay::session_tracker" 
809                 oils_persist:tablename="vandelay.session_tracker" 
810                 reporter:label="Vandelay Session Tracker">
811                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.session_tracker_id_seq">
812                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
813                         <field reporter:label="Session Key" name="session_key" reporter:datatype="text"/>
814                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
815                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
816                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
817                         <field reporter:label="Record Type" name="record_type" reporter:datatype="text"/>
818                         <!-- queue doesn't use datatype 'link' because it may refer to a bib
819                                          queue or an auth queue and there's no IDL class for vandelay.queue .
820                                          parent table.
821                         -->
822                         <field reporter:label="Source Queue" name="queue" reporter:datatype="int"/>
823                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestsamp"/>
824                         <field reporter:label="Update Time" name="update_time" reporter:datatype="timestsamp"/>
825                         <field reporter:label="State" name="state" reporter:datatype="text"/>
826                         <field reporter:label="Action Type" name="action_type" reporter:datatype="text"/>
827                         <field reporter:label="Total Actions" name="total_actions" reporter:datatype="int"/>
828                         <field reporter:label="Actions Performed" name="actions_performed" reporter:datatype="int"/>
829                 </fields>
830                 <links>
831                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
832                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
833                 </links>
834                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
835                         <actions>
836                                 <!-- created by the API -->
837                                 <retrieve global_required="true"
838                                         permission="CREATE_BIB_IMPORT_QUEUE CREATE_AUTHORITY_IMPORT_QUEUE"/>
839                                 <update global_required="true"
840                                         permission="UPDATE_BIB_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE">
841                                         <context link="workstation" field="owning_lib"/>
842                                 </update>
843                                 <delete 
844                                         permission="DELETE_BIB_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE">
845                                         <context link="workstation" field="owning_lib"/>
846                                 </delete>
847                         </actions>
848                 </permacrud>
849         </class>
850
851         <class id="auoi" controller="open-ils.cstore" oils_obj:fieldmapper="actor::usr_org_unit_opt_in" oils_persist:tablename="actor.usr_org_unit_opt_in" reporter:label="User Sharing Opt-in">
852                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_org_unit_opt_in_id_seq">
853                         <field reporter:label="Opt-in ID" name="id" reporter:datatype="id"/>
854                         <field reporter:label="Workstation" name="opt_in_ws" reporter:datatype="link"/>
855                         <field reporter:label="Staff Member" name="staff" reporter:datatype="link"/>
856                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
857                         <field reporter:label="Allowed Org Unit" name="org_unit" reporter:datatype="link"/>
858                         <field reporter:label="Opt-in Date/Time" name="opt_in_ts" reporter:datatype="timestamp"/>
859                 </fields>
860                 <links>
861                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
862                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
863                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
864                         <link field="opt_in_ws" reltype="has_a" key="id" map="" class="aws"/>
865                 </links>
866         </class>
867
868     <class id="cgf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::global_flag" oils_persist:tablename="config.global_flag" reporter:label="Global Flags and Settings" oils_persist:field_safe="true">
869         <fields oils_persist:primary="name">
870             <field reporter:label="Name" name="name" reporter:datatype="text"/>
871             <field reporter:label="Label" name="label"  reporter:datatype="text" oils_persist:i18n="true"/>
872             <field reporter:label="Value" name="value"  reporter:datatype="text"/>
873             <field reporter:label="Enabled" name="enabled"  reporter:datatype="bool"/>
874         </fields>
875         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
876             <actions>
877                 <create   permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
878                 <retrieve permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
879                 <update   permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
880                 <delete   permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
881             </actions>
882         </permacrud>
883     </class>
884
885     <class id="cin" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::index_normalizer" oils_persist:tablename="config.index_normalizer" reporter:label="Indexing Normalizer" oils_persist:field_safe="true">
886         <fields oils_persist:primary="id">
887             <field reporter:label="ID" name="id" reporter:datatype="id"/>
888             <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
889             <field reporter:label="Description" name="description"  reporter:datatype="text" oils_persist:i18n="true"/>
890             <field reporter:label="Function" name="func"  reporter:datatype="text"/>
891             <field reporter:label="Required Parameter Count" name="param_count"  reporter:datatype="int"/>
892         </fields>
893         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
894             <actions>
895                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
896                 <retrieve/>
897                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
898                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
899             </actions>
900         </permacrud>
901     </class>
902
903         <class id="cmfinm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::metabib_field_index_norm_map" oils_persist:tablename="config.metabib_field_index_norm_map" reporter:label="Metabib Field to Indexing Normalizer Map" oils_persist:field_safe="true">
904                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_index_norm_map_id_seq">
905                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
906                         <field reporter:label="Metabib Field" name="field" reporter:datatype="link"/>
907                         <field reporter:label="Normalizer" name="norm" reporter:datatype="link"/>
908                         <field reporter:label="Parameters (JSON Array)" name="params" reporter:datatype="text"/>
909                         <field reporter:label="Order of Application" name="pos" reporter:datatype="int"/>
910                 </fields>
911                 <links>
912                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
913                         <link field="norm" reltype="has_a" key="id" map="" class="cin"/>
914                 </links>
915         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
916             <actions>
917                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
918                 <retrieve/>
919                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
920                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
921             </actions>
922         </permacrud>
923         </class>
924
925         <class id="cmrcfmt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::marc_format" oils_persist:tablename="config.marc_format" reporter:label="MARC Formats" oils_persist:field_safe="true">
926                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc_format_id_seq">
927                         <field reporter:label="ID"   name="id" reporter:datatype="id" reporter:selector="name" />
928                         <field reporter:label="Code" name="code" reporter:datatype="text" oils_obj:required="true"/>
929                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true"/>
930         </fields>
931         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
932             <actions>
933                 <create permission="ADMIN_TAG_TABLE" global_required="true"/>
934                 <retrieve/>
935                 <update permission="ADMIN_TAG_TABLE" global_required="true"/>
936                 <delete permission="ADMIN_TAG_TABLE" global_required="true"/>
937             </actions>
938         </permacrud>
939         </class>
940
941         <class id="cmrcfld" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::marc_field" oils_persist:tablename="config.marc_field" reporter:label="MARC Fields" oils_persist:field_safe="true">
942                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc_field_id_seq">
943                         <field reporter:label="ID"   name="id" reporter:datatype="id"/>
944                         <field reporter:label="MARC Format" name="marc_format" reporter:datatype="link" oils_obj:required="true"/>
945                         <field reporter:label="MARC Record Type" name="marc_record_type" reporter:datatype="text" oils_obj:required="true" />
946                         <field reporter:label="MARC Tag" name="tag" reporter:datatype="text" oils_obj:required="true"/>
947                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
948                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
949                         <field reporter:label="Fixed Field?" name="fixed_field" reporter:datatype="bool"/>
950                         <field reporter:label="Repeatable?" name="repeatable" reporter:datatype="bool"/>
951                         <field reporter:label="Mandatory?" name="mandatory" reporter:datatype="bool"/>
952                         <field reporter:label="Hidden?" name="hidden" reporter:datatype="bool"/>
953                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit"/>
954         </fields>
955                 <links>
956                         <link field="marc_format" reltype="has_a" key="id" map="" class="cmrcfmt"/>
957                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
958         </links>
959         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
960             <actions>
961                 <create permission="ADMIN_TAG_TABLE" context_field="owner"/>
962                 <retrieve/>
963                 <update permission="ADMIN_TAG_TABLE" context_field="owner"/>
964                 <delete permission="ADMIN_TAG_TABLE" context_field="owner"/>
965             </actions>
966         </permacrud>
967         </class>
968
969         <class id="cmrcsubfld" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::marc_subfield" oils_persist:tablename="config.marc_subfield" reporter:label="MARC Subfields" oils_persist:subfield_safe="true">
970                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc_subfield_id_seq">
971                         <field reporter:label="ID"   name="id" reporter:datatype="id"/>
972                         <field reporter:label="MARC Format" name="marc_format" reporter:datatype="link" oils_obj:required="true"/>
973                         <field reporter:label="MARC Record Type" name="marc_record_type" reporter:datatype="text" oils_obj:required="true"/>
974                         <field reporter:label="MARC Tag" name="tag" reporter:datatype="text" oils_obj:required="true"/>
975                         <field reporter:label="MARC Subfield" name="code" reporter:datatype="text" oils_obj:required="true"/>
976                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
977                         <field reporter:label="Repeatable?" name="repeatable" reporter:datatype="bool"/>
978                         <field reporter:label="Mandatory?" name="mandatory" reporter:datatype="bool"/>
979                         <field reporter:label="Hidden?" name="hidden" reporter:datatype="bool"/>
980                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit"/>
981         </fields>
982                 <links>
983                         <link field="marc_format" reltype="has_a" key="id" map="" class="cmrcfmt"/>
984                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
985         </links>
986         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
987             <actions>
988                 <create permission="ADMIN_TAG_TABLE" context_field="owner"/>
989                 <retrieve/>
990                 <update permission="ADMIN_TAG_TABLE" context_field="owner"/>
991                 <delete permission="ADMIN_TAG_TABLE" context_field="owner"/>
992             </actions>
993         </permacrud>
994         </class>
995
996         <class id="crad" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::record_attr_definition" oils_persist:tablename="config.record_attr_definition" reporter:label="SVF Record Attribute Defintion" oils_persist:field_safe="true">
997                 <fields oils_persist:primary="name">
998                         <field reporter:label="Name" name="name" reporter:datatype="id" reporter:selector="label"  oils_obj:required="true"/>
999                         <field reporter:label="Label" name="label" reporter:datatype="text"  oils_obj:required="true" oils_persist:i18n="true"/>
1000                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
1001                         <field reporter:label="Multi-valued?" name="multi" reporter:datatype="bool"/>
1002                         <field reporter:label="Filter?" name="filter" reporter:datatype="bool"/>
1003                         <field reporter:label="Sorter?" name="sorter" reporter:datatype="bool"/>
1004                         <field reporter:label="Composite attribute?" name="composite" reporter:datatype="bool"/>
1005                         <field reporter:label="MARC Tag" name="tag" reporter:datatype="text"/>
1006                         <field reporter:label="MARC Subfields" name="sf_list" reporter:datatype="text"/>
1007                         <field reporter:label="Joiner" name="joiner" reporter:datatype="text"/>
1008                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
1009                         <field reporter:label="Format" name="format" reporter:datatype="link"/>
1010                         <field reporter:label="Starting Position" name="start_pos" reporter:datatype="int"/>
1011                         <field reporter:label="String Length" name="string_len" reporter:datatype="int"/>
1012                         <field reporter:label="Fixed Field" name="fixed_field" reporter:datatype="text"/>
1013                         <field reporter:label="Physical Characteristic" name="phys_char_sf" reporter:datatype="text"/>
1014                         <field reporter:label="Vocabulary URI" name="vocabulary" reporter:datatype="text"/>
1015                         <field reporter:label="Normalizers" name="normalizers" reporter:datatype="link" oils_persist:virtual="true"/>
1016                 </fields>
1017                 <links>
1018                         <link field="format" reltype="has_a" key="name" map="" class="cxt"/>
1019                         <link field="normalizers" reltype="has_many" key="name" map="" class="crainm"/>
1020                 </links>
1021         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1022             <actions>
1023                 <create permission="ADMIN_SVF" global_required="true"/>
1024                 <retrieve/>
1025                 <update permission="ADMIN_SVF" global_required="true"/>
1026                 <delete permission="ADMIN_SVF" global_required="true"/>
1027             </actions>
1028         </permacrud>
1029         </class>
1030
1031         <class id="csc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::sms_carrier" oils_persist:tablename="config.sms_carrier" reporter:label="SMS Carrier" oils_persist:field_safe="true">
1032                 <fields oils_persist:primary="id" oils_persist:sequence="config.sms_carrier_id_seq">
1033                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
1034                         <field reporter:label="Region" name="region" reporter:datatype="text" oils_persist:i18n="true"/>
1035                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1036             <field reporter:label="Active" name="active" reporter:datatype="bool" oils_persist:i18n="true"/>
1037                         <field reporter:label="Email Gateway" name="email_gateway" reporter:datatype="text" oils_persist:i18n="true"/>
1038                 </fields>
1039                 <links/>
1040         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1041             <actions>
1042                 <create permission="ADMIN_SMS_CARRIER" global_required="true"/>
1043                 <retrieve/>
1044                 <update permission="ADMIN_SMS_CARRIER" global_required="true"/>
1045                 <delete permission="ADMIN_SMS_CARRIER" global_required="true"/>
1046             </actions>
1047         </permacrud>
1048         </class>
1049
1050         <class id="ccraed" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::composite_attr_entry_definition" oils_persist:tablename="config.composite_attr_entry_definition" reporter:label="Composite Attribute Definitions" oils_persist:field_safe="true">
1051                 <fields oils_persist:primary="coded_value">
1052                         <field reporter:label="Coded Value" name="coded_value" reporter:datatype="id" oils_obj:required="true"/>
1053                         <field reporter:label="Defintion" name="definition" reporter:datatype="text"  oils_obj:required="true"/>
1054                 </fields>
1055                 <links>
1056                         <link field="coded_value" reltype="has_a" key="id" map="" class="ccvm"/>
1057                 </links>
1058         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1059             <actions>
1060                 <create permission="ADMIN_CODED_VALUE" global_required="true"/>
1061                 <retrieve/>
1062                 <update permission="ADMIN_CODED_VALUE" global_required="true"/>
1063                 <delete permission="ADMIN_CODED_VALUE" global_required="true"/>
1064             </actions>
1065         </permacrud>
1066         </class>
1067
1068         <class id="murav" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="metabib::uncontrolled_record_attr_value" oils_persist:tablename="metabib.uncontrolled_record_attr_value" reporter:label="Uncontrolled Record Attribute Values" oils_persist:field_safe="true">
1069                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.uncontrolled_record_attr_value_id_seq">
1070                         <field reporter:label="ID" name="id" reporter:datatype="id" oils_obj:required="true"/>
1071                         <field reporter:label="Attribute" name="attr" reporter:datatype="text"  oils_obj:required="true"/>
1072                         <field reporter:label="Value" name="value" reporter:datatype="text"  oils_obj:required="true"/>
1073                 </fields>
1074                 <links>
1075                         <link field="attr" reltype="has_a" key="name" map="" class="crad"/>
1076                 </links>
1077         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1078             <actions>
1079                 <retrieve/>
1080             </actions>
1081         </permacrud>
1082         </class>
1083
1084
1085         <class id="mrs" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="metabib::record_sorter" oils_persist:tablename="metabib.record_sorter" reporter:label="Record Sort Values" oils_persist:field_safe="true">
1086                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.record_sorter_id_seq">
1087                         <field reporter:label="ID" name="id" reporter:datatype="id" oils_obj:required="true"/>
1088                         <field reporter:label="Bib Record ID" name="source" reporter:datatype="int" oils_obj:required="true"/>
1089                         <field reporter:label="Attribute" name="attr" reporter:datatype="text"  oils_obj:required="true"/>
1090                         <field reporter:label="Value" name="value" reporter:datatype="text"  oils_obj:required="true"/>
1091                 </fields>
1092                 <links>
1093                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
1094                         <link field="attr" reltype="has_a" key="name" map="" class="crad"/>
1095                 </links>
1096         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1097             <actions>
1098                 <retrieve/>
1099             </actions>
1100         </permacrud>
1101         </class>
1102
1103
1104         <class id="mravl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="metabib::record_attr_vector_list" oils_persist:tablename="metabib.record_attr_vector_list" reporter:label="MVF Record Attribute Vectors" oils_persist:field_safe="true">
1105                 <fields oils_persist:primary="source">
1106                         <field reporter:label="Record ID" name="source" reporter:datatype="id" oils_obj:required="true"/>
1107                         <field reporter:label="Vector" name="vlist" reporter:datatype="text"  oils_obj:required="true"/> <!-- Actually an int[], but this is the best we can do in fm_IDL.xml -->
1108                 </fields>
1109                 <links>
1110                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
1111                 </links>
1112         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1113             <actions>
1114                 <retrieve/>
1115             </actions>
1116         </permacrud>
1117         </class>
1118
1119         <class id="mraf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="metabib::record_attr_flat" oils_persist:tablename="metabib.record_attr_flat" reporter:label="MVF Record Attribute Flat List" oils_persist:field_safe="true">
1120                 <fields>
1121                         <field reporter:label="Record ID" name="id" reporter:datatype="id" oils_obj:required="true"/>
1122                         <field reporter:label="Attribute" name="attr" reporter:datatype="text"  oils_obj:required="true"/>
1123                         <field reporter:label="Value" name="value" reporter:datatype="text"  oils_obj:required="true"/>
1124                 </fields>
1125                 <links>
1126                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
1127                 </links>
1128         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1129             <actions>
1130                 <retrieve/>
1131             </actions>
1132         </permacrud>
1133         </class>
1134
1135         <class id="mra" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="metabib::record_attr" oils_persist:tablename="metabib.record_attr" reporter:label="SVF Record Attribute" oils_persist:field_safe="true" oils_persist:readonly="true">
1136                 <fields oils_persist:primary="id">
1137                         <field reporter:label="Record ID" name="id" reporter:datatype="id" oils_obj:required="true"/>
1138                         <field reporter:label="Attributes" name="attrs" reporter:datatype="text"  oils_obj:required="true"/>
1139                 </fields>
1140                 <links>
1141                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
1142                 </links>
1143         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1144             <actions>
1145                 <retrieve/>
1146             </actions>
1147         </permacrud>
1148         </class>
1149
1150         <class id="crainm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::record_attr_index_norm_map" oils_persist:tablename="config.record_attr_index_norm_map" reporter:label="SVF Record Attribute to Indexing Normalizer Map" oils_persist:field_safe="true">
1151                 <fields oils_persist:primary="id" oils_persist:sequence="config.record_attr_index_norm_map_id_seq">
1152                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
1153                         <field reporter:label="SVF Attribute" name="attr" reporter:datatype="link"/>
1154                         <field reporter:label="Normalizer" name="norm" reporter:datatype="link"/>
1155                         <field reporter:label="Parameters (JSON Array)" name="params" reporter:datatype="text"/>
1156                         <field reporter:label="Order of Application" name="pos" reporter:datatype="int"/>
1157                 </fields>
1158                 <links>
1159                         <link field="attr" reltype="has_a" key="name" map="" class="crad"/>
1160                         <link field="norm" reltype="has_a" key="id" map="" class="cin"/>
1161                 </links>
1162         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1163             <actions>
1164                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
1165                 <retrieve/>
1166                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
1167                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
1168             </actions>
1169         </permacrud>
1170         </class>
1171
1172         <class id="ccvm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::coded_value_map" oils_persist:tablename="config.coded_value_map" reporter:label="SVF Record Attribute Coded Value Map" oils_persist:field_safe="true">
1173                 <fields oils_persist:primary="id" oils_persist:sequence="config.coded_value_map_id_seq">
1174                         <field reporter:label="ID" name="id" reporter:datatype="id"  oils_obj:required="true" reporter:selector="value"/>
1175                         <field reporter:label="SVF Attribute" name="ctype" reporter:datatype="link"  oils_obj:required="true"/>
1176                         <field reporter:label="Code" name="code" reporter:datatype="text"  oils_obj:required="true"/>
1177                         <field reporter:label="Value" name="value" reporter:datatype="text"  oils_obj:required="true" oils_persist:i18n="true"/>
1178                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1179                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
1180                         <field reporter:label="Search Label" name="search_label" reporter:datatype="text" oils_persist:i18n="true"/>
1181             <field reporter:label="Is Simple Selector" name="is_simple" reporter:datatype="bool"/>
1182             <field reporter:label="Concept URI" name="concept_uri" reporter:datatype="text"/>
1183             <field reporter:label="Composite Definition" name="composite_def" oils_persist:virtual="true" reporter:datatype="link"/>
1184                 </fields>
1185                 <links>
1186                         <link field="ctype" reltype="has_a" key="name" map="" class="crad"/>
1187                         <link field="composite_def" reltype="might_have" key="coded_value" map="" class="ccraed"/>
1188                 </links>
1189         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1190             <actions>
1191                 <create permission="ADMIN_CODED_VALUE" global_required="true"/>
1192                 <retrieve/>
1193                 <update permission="ADMIN_CODED_VALUE" global_required="true"/>
1194                 <delete permission="ADMIN_CODED_VALUE" global_required="true"/>
1195             </actions>
1196         </permacrud>
1197         </class>
1198
1199         <class id="cracct" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::remote_account" oils_persist:tablename="config.remote_account" reporter:label="Remote (3rd party) Account">
1200                 <fields oils_persist:primary="id" oils_persist:sequence="config.remote_account_id_seq">
1201                         <field name="id"            reporter:datatype="id"   reporter:label="ID"/>
1202                         <field name="label"         reporter:datatype="text" reporter:label="Label"/>
1203                         <field name="host"          reporter:datatype="text" reporter:label="Host"/>
1204                         <field name="username"      reporter:datatype="text" reporter:label="Username"/>
1205                         <field name="password"      reporter:datatype="text" reporter:label="Password"/>
1206                         <field name="account"       reporter:datatype="text" reporter:label="Account"/>
1207                         <field name="path"          reporter:datatype="text" reporter:label="Path"/>
1208                         <field name="owner"         reporter:datatype="link" reporter:label="Owner"/>
1209                         <field name="last_activity" reporter:datatype="timestamp" reporter:label="Last Activity"/>
1210                 </fields>
1211                 <links>
1212                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
1213                 </links>
1214         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1215             <actions>
1216                 <create   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
1217                 <retrieve permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
1218                 <update   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
1219                 <delete   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
1220             </actions>
1221         </permacrud>
1222         </class>
1223
1224     <class id="czs" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::z3950_source" oils_persist:tablename="config.z3950_source" reporter:label="Z39.50 Source">
1225         <fields oils_persist:primary="name">
1226             <field reporter:label="Z39.50 Source" name="name" reporter:datatype="id"/>
1227             <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1228             <field reporter:label="Host" name="host"  reporter:datatype="text"/>
1229             <field reporter:label="Port" name="port"  reporter:datatype="int"/>
1230             <field reporter:label="DB" name="db"  reporter:datatype="text"/>
1231             <field reporter:label="Record Format" name="record_format"  reporter:datatype="text"/>
1232             <field reporter:label="Transmission Format" name="transmission_format"  reporter:datatype="text"/>
1233             <field reporter:label="Auth" name="auth"  reporter:datatype="bool"/>
1234             <field reporter:label="Attrs" name="attrs" oils_persist:virtual="true"  reporter:datatype="link"/>
1235             <field reporter:label="Use Permission" name="use_perm"  reporter:datatype="link"/>
1236         </fields>
1237         <links>
1238             <link field="attrs" reltype="has_many" key="source" map="" class="cza"/>
1239             <link field="use_perm" reltype="has_a" key="id" map="" class="ppl"/>
1240         </links>
1241         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1242             <actions>
1243                 <create permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1244                 <retrieve/>
1245                 <update permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1246                 <delete permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1247             </actions>
1248         </permacrud>
1249     </class>
1250
1251     <class id="cza" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::z3950_attr" oils_persist:tablename="config.z3950_attr" reporter:label="Z39.50 Attribute">
1252         <fields oils_persist:primary="id" oils_persist:sequence="config.z3950_attr_id_seq">
1253             <field reporter:label="Z39.50 Attribute ID" name="id" reporter:datatype="id" reporter:selector="label"/>
1254             <field reporter:label="Z39.50 Source" name="source" reporter:datatype="link"/>
1255             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1256             <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1257             <field reporter:label="Code" name="code"  reporter:datatype="int"/>
1258             <field reporter:label="Format" name="format"  reporter:datatype="int"/>
1259             <field reporter:label="Truncation" name="truncation"  reporter:datatype="int"/>
1260         </fields>
1261         <links>
1262             <link field="source" reltype="has_a" key="name" map="" class="czs"/>
1263         </links>
1264         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1265             <actions>
1266                 <create permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1267                 <retrieve/>
1268                 <update permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1269                 <delete permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1270             </actions>
1271         </permacrud>
1272     </class>
1273
1274     <class id="czifm" controller="open-ils.cstore open-ils.pcrud" 
1275                         oils_obj:fieldmapper="config::z3950_index_field_map" 
1276                         oils_persist:tablename="config.z3950_index_field_map" 
1277                         reporter:label="Z39.50 Index Field Map">
1278         <fields oils_persist:primary="id" oils_persist:sequence="config.z3950_index_field_map_id_seq">
1279             <field reporter:label="Map ID" name="id" reporter:datatype="id"/>
1280             <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1281             <field reporter:label="Metabib Field" name="metabib_field" reporter:datatype="link"/>
1282             <field reporter:label="Record Attribute" name="record_attr" reporter:datatype="link"/>
1283             <field reporter:label="Z39.50 Attribute" name="z3950_attr"  reporter:datatype="link"/>
1284             <field reporter:label="Z39.50 Attribute Type" name="z3950_attr_type" reporter:datatype="text"/>
1285         </fields>
1286         <links>
1287             <link field="metabib_field" reltype="has_a" key="id" map="" class="cmf"/>
1288             <link field="record_attr" reltype="has_a" key="name" map="" class="crad"/>
1289             <link field="z3950_attr" reltype="has_a" key="id" map="" class="cza"/>
1290         </links>
1291         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1292             <actions>
1293                 <create permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1294                 <retrieve/>
1295                 <update permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1296                 <delete permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1297             </actions>
1298         </permacrud>
1299     </class>
1300
1301
1302         <class id="ateo" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action_trigger::event_output" oils_persist:tablename="action_trigger.event_output" reporter:label="Event Output">
1303                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_output_id_seq">
1304                         <field reporter:label="Output ID" name="id" reporter:datatype="id"/>
1305                         <field reporter:label="Create Date/Time" name="create_time" reporter:datatype="timestamp"/>
1306                         <field reporter:label="Data" name="data" reporter:datatype="text"/>
1307                         <field reporter:label="Is Error" name="is_error" reporter:datatype="bool"/>
1308                         <field reporter:label="Events" name="events" oils_persist:virtual="true"  reporter:datatype="link"/>
1309                         <field reporter:label="Error Events" name="error_events" oils_persist:virtual="true"  reporter:datatype="link"/>
1310                 </fields>
1311                 <links>
1312             <link field="events" reltype="has_many" key="template_output" map="" class="atev"/>
1313             <link field="error_events" reltype="has_many" key="error_output" map="" class="atev"/>
1314                 </links>
1315                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1316                         <actions>
1317                                 <retrieve/>
1318                                 <delete permission="ADMIN_TRIGGER_TEMPLATE_OUTPUT DELETE_TRIGGER_TEMPLATE_OUTPUT" global_required="true"/>
1319                         </actions>
1320                 </permacrud>
1321         </class>
1322
1323         <class id="ath" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action_trigger::hook" oils_persist:tablename="action_trigger.hook" reporter:label="Trigger Hook Point">
1324                 <fields oils_persist:primary="key">
1325                         <field reporter:label="Hook Key" name="key" reporter:datatype="text"/>
1326                         <field reporter:label="Core Type" name="core_type" reporter:datatype="text"/>
1327                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1328                         <field reporter:label="Passive" name="passive"  reporter:datatype="bool"/>
1329                 </fields>
1330                 <links/>
1331                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1332                         <actions>
1333                                 <create permission="ADMIN_TRIGGER_HOOK CREATE_TRIGGER_HOOK" global_required="true"/>
1334                                 <retrieve/>
1335                                 <update permission="ADMIN_TRIGGER_HOOK UPDATE_TRIGGER_HOOK" global_required="true"/>
1336                                 <delete permission="ADMIN_TRIGGER_HOOK DELETE_TRIGGER_HOOK" global_required="true"/>
1337                         </actions>
1338                 </permacrud>
1339         </class>
1340
1341         <class id="atcol" controller="open-ils.cstore" oils_obj:fieldmapper="action_trigger::collector" oils_persist:tablename="action_trigger.collector" reporter:label="Trigger Environment Collector">
1342                 <fields oils_persist:primary="module">
1343                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
1344                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1345                 </fields>
1346                 <links/>
1347         </class>
1348
1349         <class id="atval" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action_trigger::validator" oils_persist:tablename="action_trigger.validator" reporter:label="Trigger Condition Validator">
1350                 <fields oils_persist:primary="module">
1351                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
1352                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1353                 </fields>
1354                 <links/>
1355                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1356                         <actions>
1357                                 <create permission="ADMIN_TRIGGER_VALIDATOR CREATE_TRIGGER_VALIDATOR" global_required="true"/>
1358                                 <retrieve/>
1359                                 <update permission="ADMIN_TRIGGER_VALIDATOR UPDATE_TRIGGER_VALIDATOR" global_required="true"/>
1360                                 <delete permission="ADMIN_TRIGGER_VALIDATOR DELETE_TRIGGER_VALIDATOR" global_required="true"/>
1361                         </actions>
1362                 </permacrud>
1363         </class>
1364
1365         <class id="atreact" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action_trigger::reactor" oils_persist:tablename="action_trigger.reactor" reporter:label="Trigger Event Reactor">
1366                 <fields oils_persist:primary="module">
1367                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
1368                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1369                 </fields>
1370                 <links/>
1371                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1372                         <actions>
1373                                 <create permission="ADMIN_TRIGGER_REACTOR CREATE_TRIGGER_REACTOR" global_required="true"/>
1374                                 <retrieve/>
1375                                 <update permission="ADMIN_TRIGGER_REACTOR UPDATE_TRIGGER_REACTOR" global_required="true"/>
1376                                 <delete permission="ADMIN_TRIGGER_REACTOR DELETE_TRIGGER_REACTOR" global_required="true"/>
1377                         </actions>
1378                 </permacrud>
1379         </class>
1380
1381         <class id="atclean" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action_trigger::cleanup" oils_persist:tablename="action_trigger.cleanup" reporter:label="Trigger Event Cleanup">
1382                 <fields oils_persist:primary="module">
1383                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
1384                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1385                 </fields>
1386                 <links/>
1387                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1388                         <actions>
1389                                 <create permission="ADMIN_TRIGGER_CLEANUP CREATE_TRIGGER_CLEANUP" global_required="true"/>
1390                                 <retrieve/>
1391                                 <update permission="ADMIN_TRIGGER_CLEANUP UPDATE_TRIGGER_CLEANUP" global_required="true"/>
1392                                 <delete permission="ADMIN_TRIGGER_CLEANUP DELETE_TRIGGER_CLEANUP" global_required="true"/>
1393                         </actions>
1394                 </permacrud>
1395         </class>
1396
1397         <class id="atenv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action_trigger::environment" oils_persist:tablename="action_trigger.environment" reporter:label="Trigger Event Environment Entry">
1398                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.environment_id_seq">
1399                         <field reporter:label="Environment ID" name="id" reporter:datatype="id"/>
1400                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
1401                         <field reporter:label="Field Path" name="path" reporter:datatype="text"/>
1402                         <field reporter:label="Collector" name="collector" reporter:datatype="link"/>
1403                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
1404                 </fields>
1405                 <links>
1406                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
1407                         <link field="collector" reltype="has_a" key="id" map="" class="atcol"/>
1408                 </links>
1409                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1410                         <actions>
1411                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF">
1412                     <context link="event_def" field="owner"/>
1413                 </create>
1414                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF">
1415                     <context link="event_def" field="owner"/>
1416                 </retrieve>
1417                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF">
1418                     <context link="event_def" field="owner"/>
1419                 </update>
1420                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF">
1421                     <context link="event_def" field="owner"/>
1422                 </delete>
1423                         </actions>
1424                 </permacrud>
1425         </class>
1426
1427         <class id="atevdef" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action_trigger::event_definition" oils_persist:tablename="action_trigger.event_definition" reporter:label="Trigger Event Definition">
1428                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_definition_id_seq">
1429                         <field reporter:label="Definition ID" name="id" reporter:datatype="id"/>
1430                         <field reporter:label="Enabled" name="active" reporter:datatype="bool"/>
1431                         <field reporter:label="Owning Library" name="owner"  reporter:datatype="org_unit"/>
1432                         <field reporter:label="Hook" name="hook"  reporter:datatype="link"/>
1433                         <field reporter:label="Validator" name="validator"  reporter:datatype="link"/>
1434                         <field reporter:label="Reactor" name="reactor"  reporter:datatype="link"/>
1435                         <field reporter:label="Success Cleanup" name="cleanup_success"  reporter:datatype="link"/>
1436                         <field reporter:label="Failure Cleanup" name="cleanup_failure"  reporter:datatype="link"/>
1437                         <field reporter:label="Processing Delay" name="delay"  reporter:datatype="interval"/>
1438                         <field reporter:label="Max Event Validity Delay" name="max_delay"  reporter:datatype="interval"/>
1439                         <field reporter:label="Processing Delay Context Field" name="delay_field"  reporter:datatype="text"/>
1440                         <field reporter:label="Processing Group Context Field" name="group_field"  reporter:datatype="text"/>
1441                         <field reporter:label="Template" name="template"  reporter:datatype="text"/>
1442                         <field reporter:label="Name" name="name"  reporter:datatype="text"/>
1443                         <field reporter:label="Granularity" name="granularity"  reporter:datatype="text"/>
1444                         <field reporter:label="Opt-In User Field" name="usr_field"  reporter:datatype="text"/>
1445                         <field reporter:label="Opt-In Setting Type" name="opt_in_setting"  reporter:datatype="link"/>
1446                         <field reporter:label="Event Repeatability Delay" name="repeat_delay"  reporter:datatype="interval"/>
1447                         <field reporter:label="Message Template" name="message_template" reporter:datatype="text"/>
1448                         <field reporter:label="Message Title" name="message_title" reporter:datatype="text"/>
1449                         <field reporter:label="Message User Path" name="message_usr_path" reporter:datatype="text"/>
1450                         <field reporter:label="Message Library Path" name="message_library_path" reporter:datatype="text"/>
1451                         <field reporter:label="Environment Entries" name="env" oils_persist:virtual="true"  reporter:datatype="link"/>
1452                         <field reporter:label="Parameters" name="params" oils_persist:virtual="true"  reporter:datatype="link"/>
1453                         <field reporter:label="Retention Interval" name="retention_interval" reporter:datatype="interval"/>
1454                 </fields>
1455                 <links>
1456                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
1457                         <link field="hook" reltype="has_a" key="key" map="" class="ath"/>
1458                         <link field="validator" reltype="has_a" key="module" map="" class="atval"/>
1459                         <link field="reactor" reltype="has_a" key="module" map="" class="atreact"/>
1460                         <link field="cleanup_success" reltype="has_a" key="module" map="" class="atclean"/>
1461                         <link field="cleanup_failure" reltype="has_a" key="module" map="" class="atclean"/>
1462                         <link field="env" reltype="has_many" key="event_def" map="" class="atenv"/>
1463                         <link field="params" reltype="has_many" key="event_def" map="" class="atevparam"/>
1464                         <link field="opt_in_setting" reltype="has_a" key="name" map="" class="cust"/>
1465                 </links>
1466                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1467                         <actions>
1468                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF" context_field="owner"/>
1469                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF" context_field="owner"/>
1470                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF" context_field="owner"/>
1471                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF" context_field="owner"/>
1472                         </actions>
1473                 </permacrud>
1474         </class>
1475
1476         <class id="atev" controller="open-ils.cstore" oils_obj:fieldmapper="action_trigger::event" oils_persist:tablename="action_trigger.event" reporter:label="Trigger Event Entry">
1477                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_id_seq">
1478                         <field reporter:label="Event ID" name="id" reporter:datatype="id"/>
1479                         <field reporter:label="Target ID" name="target" reporter:datatype="int"/>
1480                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
1481                         <field reporter:label="Add Time" name="add_time" reporter:datatype="timestamp"/>
1482                         <field reporter:label="Run Time" name="run_time" reporter:datatype="timestamp"/>
1483                         <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
1484                         <field reporter:label="Update Time" name="update_time" reporter:datatype="timestamp"/>
1485                         <field reporter:label="Complete Time" name="complete_time" reporter:datatype="timestamp"/>
1486                         <field reporter:label="State" name="state" reporter:datatype="text"/>
1487                         <field reporter:label="User Data" name="user_data" reporter:datatype="text"/>
1488                         <field reporter:label="Template Output" name="template_output" reporter:datatype="link"/>
1489                         <field reporter:label="Error Output" name="error_output" reporter:datatype="text"/>
1490                         <field reporter:label="Asynchronous Output" name="async_output" reporter:datatype="link"/>
1491                         <field reporter:label="Update Process" name="update_process" reporter:datatype="int"/>
1492                 </fields>
1493                 <links>
1494                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
1495                         <link field="template_output" reltype="has_a" key="id" map="" class="ateo"/>
1496                         <link field="error_output" reltype="has_a" key="id" map="" class="ateo"/>
1497                         <link field="async_output" reltype="has_a" key="id" map="" class="ateo"/>
1498                 </links>
1499         </class>
1500
1501         <class id="atevparam" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action_trigger::event_param" oils_persist:tablename="action_trigger.event_params" reporter:label="Trigger Event Parameter">
1502                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_params_id_seq">
1503                         <field reporter:label="Parameter ID" name="id" reporter:datatype="id"/>
1504                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
1505                         <field reporter:label="Parameter Name" name="param" reporter:datatype="text"/>
1506                         <field reporter:label="Parameter Value" name="value" reporter:datatype="text"/>
1507                 </fields>
1508                 <links>
1509                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
1510                 </links>
1511                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1512                         <actions>
1513                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF">
1514                     <context link="event_def" field="owner"/>
1515                 </create>
1516                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF">
1517                     <context link="event_def" field="owner"/>
1518                 </retrieve>
1519                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF">
1520                     <context link="event_def" field="owner"/>
1521                 </update>
1522                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF">
1523                     <context link="event_def" field="owner"/>
1524                 </delete>
1525                         </actions>
1526                 </permacrud>
1527         </class>
1528
1529         <class id="atul" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action_trigger::user_log" reporter:label="Action Trigger User Log" oils_persist:readonly="true">
1530                 <oils_persist:source_definition><![CDATA[
1531                 SELECT  atevdef.hook,
1532                         atevdef.name,
1533                         atevdef.reactor,
1534                         atev.id,
1535                         atev.event_def,
1536                         atev.add_time,
1537                         atev.run_time,
1538                         atev.start_time,
1539                         atev.update_time,
1540                         atev.complete_time,
1541                         atev.update_process,
1542                         atev.state,
1543                         atev.user_data,
1544                         atev.template_output,
1545                         atev.error_output,
1546                         atev.async_output,
1547                         targ_circ.id AS target_circ,
1548                         targ_ahr.id AS target_hold,
1549                         COALESCE(
1550                                 targ_circ.circ_lib,
1551                                 targ_ahr.pickup_lib
1552                         ) AS perm_lib
1553                 FROM action_trigger.event atev
1554                 JOIN action_trigger.event_definition atevdef ON
1555                         (atevdef.id = atev.event_def)
1556                 JOIN action_trigger.hook ath ON
1557                         (ath.key = atevdef.hook)
1558                 LEFT JOIN action.circulation targ_circ ON
1559                         (ath.core_type = 'circ' AND targ_circ.id = atev.target)
1560                 LEFT JOIN action.hold_request targ_ahr ON
1561                         (ath.core_type = 'ahr' AND targ_ahr.id = atev.target)
1562                 WHERE atev.add_time > NOW() - (SELECT MIN(value) FROM (
1563                         SELECT value::INTERVAL FROM actor.org_unit_ancestor_setting(
1564                                 'circ.staff.max_visible_event_age',
1565                                 COALESCE(targ_circ.circ_lib, targ_ahr.pickup_lib)
1566                         ) UNION
1567                         SELECT '1000 YEARS'::INTERVAL AS value
1568                 ) ous)
1569                 ]]></oils_persist:source_definition>
1570                 <fields oils_persist:primary="id">
1571                         <field reporter:label="Hook" name="hook" reporter:datatype="link" />
1572                         <field reporter:label="Name" name="name" reporter:datatype="text" />
1573                         <field reporter:label="Reactor" name="reactor" reporter:datatype="text" />
1574                         <field reporter:label="Event ID" name="id" reporter:datatype="id" />
1575                         <field reporter:label="Event Definition ID" name="event_def" reporter:datatype="int" />
1576                         <field reporter:label="Event Add Time" name="add_time" reporter:datatype="timestamp" />
1577                         <field reporter:label="Event Run Time" name="run_time" reporter:datatype="timestamp" />
1578                         <field reporter:label="Event Start Time" name="start_time" reporter:datatype="timestamp" />
1579                         <field reporter:label="Event Update Time" name="update_time" reporter:datatype="timestamp" />
1580                         <field reporter:label="Event Complete Time" name="complete_time" reporter:datatype="timestamp" />
1581                         <field reporter:label="Event Update PID" name="update_process" reporter:datatype="int" />
1582                         <field reporter:label="Event State" name="state" reporter:datatype="text" />
1583                         <field reporter:label="Event User Data" name="user_data" reporter:datatype="text" />
1584                         <field reporter:label="Event Template Output" name="template_output" reporter:datatype="link" />
1585                         <field reporter:label="Event Error Output" name="error_output" reporter:datatype="link" />
1586                         <field reporter:label="Event Async Output" name="async_output" reporter:datatype="link" />
1587                         <field reporter:label="Target Circulation" name="target_circ" reporter:datatype="link" />
1588                         <field reporter:label="Target Hold" name="target_hold" reporter:datatype="link" />
1589                         <field reporter:label="Permission Context" name="perm_lib" reporter:datatype="org_unit" />
1590                 </fields>
1591                 <links>
1592                         <link field="hook" reltype="has_a" key="key" map="" class="ath" />
1593                         <link field="template_output" reltype="has_a" key="id" map="" class="ateo" />
1594                         <link field="error_output" reltype="has_a" key="id" map="" class="ateo" />
1595                         <link field="async_output" reltype="has_a" key="id" map="" class="ateo" />
1596                         <link field="target_circ" reltype="has_a" key="id" map="" class="circ" />
1597                         <link field="target_hold" reltype="has_a" key="id" map="" class="ahr" />
1598                         <link field="perm_lib" reltype="has_a" key="id" map="" class="aou" />
1599                 </links>
1600                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1601                         <actions>
1602                                 <retrieve permission="VIEW_TRIGGER_EVENT" context_field="perm_lib" />
1603                         </actions>
1604                 </permacrud>
1605         </class>
1606
1607         <class id="aws" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::workstation" oils_persist:tablename="actor.workstation" reporter:label="Workstation">
1608                 <fields oils_persist:primary="id" oils_persist:sequence="actor.workstation_id_seq">
1609                         <field reporter:label="Workstation ID" name="id" reporter:datatype="id"/>
1610                         <field reporter:label="Workstation Name" name="name" reporter:datatype="text"/>
1611                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
1612                         <field reporter:label="Toolbars" name="toolbars" oils_persist:virtual="true" reporter:datatype="link"/>
1613                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
1614                 </fields>
1615                 <links>
1616                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
1617                         <link field="toolbars" reltype="has_many" key="ws" map="" class="atb"/>
1618                         <link field="circulations" reltype="has_many" key="workstation" map="" class="circ"/>
1619                 </links>
1620                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1621                         <actions>
1622                                 <retrieve permission="STAFF_LOGIN" context_field="owning_lib" />
1623                         </actions>
1624                 </permacrud>
1625         </class>
1626
1627         <class id="ccm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::circ_modifier" oils_persist:tablename="config.circ_modifier" reporter:label="Circulation Modifier">
1628                 <fields oils_persist:primary="code">
1629                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1630                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1631                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1632                         <field reporter:label="SIP2 Media Type" name="sip2_media_type" reporter:datatype="text" oils_persist:i18n="true"/>
1633                         <field reporter:label="Magnetic Media" name="magnetic_media" reporter:datatype="bool"/>
1634                         <field reporter:label="Average Wait Time" name="avg_wait_time" reporter:datatype="interval"/>
1635                 </fields>
1636                 <links/>
1637         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1638             <actions>
1639                 <create permission="ADMIN_CIRC_MOD" global_required="true"/>
1640                 <retrieve/>
1641                 <update permission="ADMIN_CIRC_MOD" global_required="true"/>
1642                 <delete permission="ADMIN_CIRC_MOD" global_required="true"/>
1643             </actions>
1644         </permacrud>
1645         </class>
1646
1647         <class id="aiit" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::invoice_item_type" oils_persist:tablename="acq.invoice_item_type" reporter:label="Non-bibliographic Invoice Item Type" oils_persist:field_safe="true">
1648                 <fields oils_persist:primary="code">
1649                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1650                         <field reporter:label="Label" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1651                         <field reporter:label="Prorate?" name="prorate" reporter:datatype="bool"/>
1652                         <field reporter:label="Blanket?" name="blanket" reporter:datatype="bool"/>
1653                 </fields>
1654                 <links/>
1655         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1656             <actions>
1657                 <create permission="CREATE_INVOICE_ITEM_TYPE" global_required="true"/>
1658                 <retrieve/>
1659                 <update permission="UPDATE_INVOICE_ITEM_TYPE" global_required="true"/>
1660                 <delete permission="DELETE_INVOICE_ITEM_TYPE" global_required="true"/>
1661             </actions>
1662         </permacrud>
1663         </class>
1664
1665         <class id="acqim" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::invoice_method" oils_persist:tablename="acq.invoice_method" reporter:label="Invoice Method used by Vendor" oils_persist:field_safe="true">
1666                 <fields oils_persist:primary="code">
1667                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1668                         <field reporter:label="Label" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1669                 </fields>
1670                 <links/>
1671         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1672             <actions>
1673                 <create permission="ADMIN_INVOICE_METHOD CREATE_INVOICE_METHOD" global_required="true"/>
1674                 <retrieve/>
1675                 <update permission="ADMIN_INVOICE_METHOD UPDATE_INVOICE_METHOD" global_required="true"/>
1676                 <delete permission="ADMIN_INVOICE_METHOD DELETE_INVOICE_METHOD" global_required="true"/>
1677             </actions>
1678         </permacrud>
1679         </class>
1680
1681         <class id="ccpbt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="container::copy_bucket_type" oils_persist:tablename="container.copy_bucket_type" reporter:label="Copy Bucket Type" oils_persist:field_safe="true">
1682                 <fields oils_persist:primary="code">
1683                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1684                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1685                 </fields>
1686                 <links/>
1687         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1688             <actions>
1689                 <create permission="CREATE_COPY_BTYPE" global_required="true"/>
1690                 <retrieve/>
1691                 <update permission="UPDATE_COPY_BTYPE" global_required="true"/>
1692                 <delete permission="DELETE_COPY_BTYPE" global_required="true"/>
1693             </actions>
1694         </permacrud>
1695         </class>
1696
1697         <class id="ccnbt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="container::call_number_bucket_type" oils_persist:tablename="container.call_number_bucket_type" reporter:label="Call Number Bucket Type" oils_persist:field_safe="true">
1698                 <fields oils_persist:primary="code">
1699                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1700                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1701                 </fields>
1702                 <links/>
1703         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1704             <actions>
1705                 <create permission="CREATE_CN_BTYPE" global_required="true"/>
1706                 <retrieve/>
1707                 <update permission="UPDATE_CN_BTYPE" global_required="true"/>
1708                 <delete permission="DELETE_CN_BTYPE" global_required="true"/>
1709             </actions>
1710         </permacrud>
1711         </class>
1712
1713         <class id="bpt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="biblio::peer_type" oils_persist:tablename="biblio.peer_type" reporter:label="Bibliographic Record Peer Type" oils_persist:field_safe="true">
1714                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.peer_type_id_seq">
1715                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
1716                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1717                 </fields>
1718                 <links/>
1719         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1720             <actions>
1721                 <create permission="CREATE_BIB_PTYPE" global_required="true"/>
1722                 <retrieve/>
1723                 <update permission="UPDATE_BIB_PTYPE" global_required="true"/>
1724                 <delete permission="DELETE_BIB_PTYPE" global_required="true"/>
1725             </actions>
1726         </permacrud>
1727         </class>
1728
1729         <class id="bpbcm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="biblio::peer_bib_copy_map" oils_persist:tablename="biblio.peer_bib_copy_map" reporter:label="Bibliographic Record Peer Copy Map">
1730                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.peer_bib_copy_map_id_seq">
1731                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
1732                         <field reporter:label="Peer Type" name="peer_type" reporter:datatype="link"/>
1733                         <field reporter:label="Peer Record" name="peer_record" reporter:datatype="link"/>
1734                         <field reporter:label="Target Copy" name="target_copy" reporter:datatype="link"/>
1735                 </fields>
1736         <links>
1737             <link field="peer_type" reltype="has_a" key="id" map="" class="bpt"/>
1738             <link field="peer_record" reltype="has_a" key="id" map="" class="bre"/>
1739             <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
1740         </links>
1741         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1742             <actions>
1743                 <create permission="UPDATE_COPY">
1744                     <context link="target_copy" field="circ_lib"/>
1745                 </create>
1746                 <retrieve/>
1747                 <update permission="UPDATE_COPY">
1748                     <context link="target_copy" field="circ_lib"/>
1749                 </update>
1750                 <delete permission="UPDATE_COPY">
1751                     <context link="target_copy" field="circ_lib"/>
1752                 </delete>
1753             </actions>
1754         </permacrud>
1755         </class>
1756
1757         <class id="cbrebt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="container::biblio_record_entry_bucket_type" oils_persist:tablename="container.biblio_record_entry_bucket_type" reporter:label="Bibliographic Record Bucket Type" oils_persist:field_safe="true">
1758                 <fields oils_persist:primary="code">
1759                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1760                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1761                 </fields>
1762                 <links/>
1763         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1764             <actions>
1765                 <create permission="CREATE_BIB_BTYPE" global_required="true"/>
1766                 <retrieve/>
1767                 <update permission="UPDATE_BIB_BTYPE" global_required="true"/>
1768                 <delete permission="DELETE_BIB_BTYPE" global_required="true"/>
1769             </actions>
1770         </permacrud>
1771         </class>
1772
1773         <class id="cubt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="container::user_bucket_type" oils_persist:tablename="container.user_bucket_type" reporter:label="User Bucket Type" oils_persist:field_safe="true">
1774                 <fields oils_persist:primary="code">
1775                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1776                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1777                 </fields>
1778                 <links/>
1779         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1780             <actions>
1781                 <create permission="CREATE_USER_BTYPE" global_required="true"/>
1782                 <retrieve/>
1783                 <update permission="UPDATE_USER_BTYPE" global_required="true"/>
1784                 <delete permission="DELETE_USER_BTYPE" global_required="true"/>
1785             </actions>
1786         </permacrud>
1787         </class>
1788
1789         <class id="cvrfm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::videorecording_format_map" oils_persist:tablename="config.videorecording_format_map" reporter:label="Videorecording Format" oils_persist:field_safe="true">
1790                 <fields oils_persist:primary="code">
1791                         <field reporter:label="Code" name="code" reporter:selector="value" reporter:datatype="id"/>
1792                         <field reporter:label="Format" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
1793                 </fields>
1794                 <links/>
1795         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1796             <actions>
1797                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
1798                 <retrieve/>
1799                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
1800                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
1801             </actions>
1802         </permacrud>
1803         </class>
1804
1805     <class id="chmw" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::hold_matrix_weights" oils_persist:tablename="config.hold_matrix_weights" reporter:label="Hold Matrix Weights">
1806         <fields oils_persist:primary="id" oils_persist:sequence="config.hold_matrix_weights_id_seq">
1807             <field reporter:label="Hold Weights ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1808             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1809             <field reporter:label="User Home Library" name="user_home_ou" reporter:datatype="float"/>
1810             <field reporter:label="Request Library" name="request_ou" reporter:datatype="float"/>
1811             <field reporter:label="Pickup Library" name="pickup_ou" reporter:datatype="float"/>
1812             <field reporter:label="Owning Library" name="item_owning_ou" reporter:datatype="float"/>
1813             <field reporter:label="Item Circ Library" name="item_circ_ou" reporter:datatype="float"/>
1814             <field reporter:label="User Permission Group" name="usr_grp" reporter:datatype="float"/>
1815             <field reporter:label="Requestor Permission Group" name="requestor_grp" reporter:datatype="float"/>
1816             <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="float"/>
1817             <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="float"/>
1818             <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="float"/>
1819             <field reporter:label="MARC Bib Level" name="marc_bib_level" oils_persist:primitive="string" reporter:datatype="float"/>
1820             <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="float"/>
1821             <field reporter:label="Juvenile?" name="juvenile_flag" oils_persist:primitive="string" reporter:datatype="float"/>
1822             <field reporter:label="Reference?" name="ref_flag" reporter:datatype="float"/>
1823             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="float"/>
1824         </fields>
1825         <links/>
1826         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1827             <actions>
1828                 <create permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1829                 <retrieve/>
1830                 <update permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1831                 <delete permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1832             </actions>
1833         </permacrud>
1834     </class>
1835
1836     <class id="ccmw" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::circ_matrix_weights" oils_persist:tablename="config.circ_matrix_weights" reporter:label="Circ Matrix Weights">
1837         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_weights_id_seq">
1838             <field reporter:label="Circ Weights ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1839             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1840             <field reporter:label="Renewal?" name="is_renewal" reporter:datatype="float"/>
1841             <field reporter:label="Org Unit" name="org_unit" reporter:datatype="float"/>
1842             <field reporter:label="Copy Circ Lib" name="copy_circ_lib" reporter:datatype="float"/>
1843             <field reporter:label="Copy Owning Lib" name="copy_owning_lib" reporter:datatype="float"/>
1844             <field reporter:label="User Home Lib" name="user_home_ou" reporter:datatype="float"/>
1845             <field reporter:label="Permission Group" name="grp" reporter:datatype="float"/>
1846             <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="float"/>
1847             <field reporter:label="Copy Location" name="copy_location" reporter:datatype="float"/>
1848             <field reporter:label="MARC Type" name="marc_type" reporter:datatype="float"/>
1849             <field reporter:label="MARC Form" name="marc_form" reporter:datatype="float"/>
1850             <field reporter:label="MARC Bib Level" name="marc_bib_level" reporter:datatype="float"/>
1851             <field reporter:label="Videorecording Format" name="marc_vr_format" reporter:datatype="float"/>
1852             <field reporter:label="Reference?" name="ref_flag" reporter:datatype="float"/>
1853             <field reporter:label="Juvenile?" name="juvenile_flag" reporter:datatype="float"/>
1854             <field reporter:label="User Age: Lower Bound" name="usr_age_lower_bound" reporter:datatype="float"/>
1855             <field reporter:label="User Age: Upper Bound" name="usr_age_upper_bound" reporter:datatype="float"/>
1856             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="float"/>
1857         </fields>
1858         <links/>
1859         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1860             <actions>
1861                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1862                 <retrieve/>
1863                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1864                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1865             </actions>
1866         </permacrud>
1867     </class>
1868
1869     <class id="cwa" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::weight_assoc" oils_persist:tablename="config.weight_assoc" reporter:label="Matrix Weight Association">
1870         <fields oils_persist:primary="id" oils_persist:sequence="config.weight_assoc_id_seq">
1871             <field reporter:label="Assoc ID" name="id" reporter:datatype="id"/>
1872             <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
1873             <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
1874             <field reporter:label="Circ Weights" name="circ_weights" reporter:datatype="link"/>
1875             <field reporter:label="Hold Weights" name="hold_weights" reporter:datatype="link"/>
1876         </fields>
1877         <links>
1878             <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1879             <link field="circ_weights" reltype="has_a" key="id" map="" class="ccmw"/>
1880             <link field="hold_weights" reltype="has_a" key="id" map="" class="chmw"/>
1881         </links>
1882         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1883             <actions>
1884                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1885                 <retrieve permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT VIEW_CIRC_MATRIX_MATCHPOINT VIEW_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1886                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1887                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1888             </actions>
1889         </permacrud>
1890     </class>
1891
1892         <class id="chmm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::hold_matrix_matchpoint" oils_persist:tablename="config.hold_matrix_matchpoint" reporter:label="Hold Matrix Matchpoint">
1893                 <fields oils_persist:primary="id" oils_persist:sequence="config.hold_matrix_matchpoint_id_seq">
1894                         <field reporter:label="Matchpoint ID" name="id" reporter:datatype="id"/>
1895                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
1896                         <field reporter:label="Strict OU matches?" name="strict_ou_match" reporter:datatype="bool"/>
1897                         <field reporter:label="User Home Library" name="user_home_ou" reporter:datatype="org_unit"/>
1898                         <field reporter:label="Request Library" name="request_ou" reporter:datatype="org_unit"/>
1899                         <field reporter:label="Pickup Library" name="pickup_ou" reporter:datatype="org_unit"/>
1900                         <field reporter:label="Owning Library" name="item_owning_ou" reporter:datatype="org_unit"/>
1901                         <field reporter:label="Item Circ Library" name="item_circ_ou" reporter:datatype="org_unit"/>
1902                         <field reporter:label="User Permission Group" name="usr_grp" reporter:datatype="link"/>
1903                         <field reporter:label="Requestor Permission Group" name="requestor_grp" reporter:datatype="link"/>
1904                         <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="link"/>
1905                         <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="link"/>
1906                         <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="link"/>
1907                         <field reporter:label="MARC Bib Level" name="marc_bib_level" oils_persist:primitive="string" reporter:datatype="link"/>
1908                         <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="link"/>
1909                         <field reporter:label="Reference?" name="ref_flag" reporter:datatype="bool"/>
1910             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="text"/>
1911                         <field reporter:label="Holdable?" name="holdable" reporter:datatype="bool"/>
1912                         <field reporter:label="Range is from Owning Lib?" name="distance_is_from_owner" reporter:datatype="bool"/>
1913                         <field reporter:label="Transit Range" name="transit_range" reporter:datatype="link"/>
1914                         <field reporter:label="Max Holds" name="max_holds" reporter:datatype="int"/>
1915                         <field reporter:label="Max includes Frozen" name="include_frozen_holds" reporter:datatype="bool"/>
1916                         <field reporter:label="Copy Age Hold Protection Rule" name="age_hold_protect_rule" reporter:datatype="link"/>
1917                         <field name="description" reporter:datatype="text" reporter:label="Description"/>
1918                 </fields>
1919                 <links>
1920                         <link field="user_home_ou" reltype="has_a" key="id" map="" class="aou"/>
1921                         <link field="request_ou" reltype="has_a" key="id" map="" class="aou"/>
1922                         <link field="pickup_ou" reltype="has_a" key="id" map="" class="aou"/>
1923                         <link field="item_owning_ou" reltype="has_a" key="id" map="" class="aou"/>
1924                         <link field="item_circ_ou" reltype="has_a" key="id" map="" class="aou"/>
1925                         <link field="usr_grp" reltype="has_a" key="id" map="" class="pgt"/>
1926                         <link field="requestor_grp" reltype="has_a" key="id" map="" class="pgt"/>
1927                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
1928                         <link field="marc_type" reltype="has_a" key="code" map="" class="citm"/>
1929                         <link field="marc_form" reltype="has_a" key="code" map="" class="cifm"/>
1930                         <link field="marc_bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
1931                         <link field="marc_vr_format" reltype="has_a" key="code" map="" class="cvrfm"/>
1932                         <link field="age_hold_protect_rule" reltype="has_a" key="id" map="" class="crahp"/>
1933             <link field="transit_range" reltype="has_a" key="id" map="" class="aout"/>
1934                 </links>
1935         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1936             <actions>
1937                 <create permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1938                 <retrieve permission="ADMIN_HOLD_MATRIX_MATCHPOINT VIEW_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1939                 <update permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1940                 <delete permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1941             </actions>
1942         </permacrud>
1943         </class>
1944
1945         <class id="ccmm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::circ_matrix_matchpoint" oils_persist:tablename="config.circ_matrix_matchpoint" reporter:label="Circulation Matrix Matchpoint">
1946                 <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_matchpoint_id_seq">
1947                         <field reporter:label="Matchpoint ID" name="id" reporter:datatype="id"/>
1948                         <field reporter:label="Renewal?" name="is_renewal" reporter:datatype="bool"/>
1949                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
1950                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit" oils_obj:required="true"/>
1951                         <field reporter:label="Copy Circ Lib" name="copy_circ_lib" reporter:datatype="org_unit"/>
1952                         <field reporter:label="Copy Owning Lib" name="copy_owning_lib" reporter:datatype="org_unit"/>
1953                         <field reporter:label="User Home Lib" name="user_home_ou" reporter:datatype="org_unit"/>
1954                         <field reporter:label="Permission Group" name="grp" reporter:datatype="link" oils_obj:required="true"/>
1955                         <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="link"/>
1956                         <field reporter:label="Copy Location" name="copy_location" reporter:datatype="link"/>
1957                         <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="link"/>
1958                         <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="link"/>
1959                         <field reporter:label="MARC Bib Level" name="marc_bib_level" oils_persist:primitive="string" reporter:datatype="link"/>
1960                         <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="link"/>
1961                         <field reporter:label="Reference?" name="ref_flag" reporter:datatype="bool"/>
1962             <field reporter:label="Juvenile?" name="juvenile_flag" reporter:datatype="bool"/>
1963                         <field reporter:label="User Age: Lower Bound" name="usr_age_lower_bound" reporter:datatype="text"/>
1964                         <field reporter:label="User Age: Upper Bound" name="usr_age_upper_bound" reporter:datatype="text"/>
1965             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="text"/>
1966                         <field reporter:label="Circulate?" name="circulate" reporter:datatype="bool"/>
1967                         <field reporter:label="Duration Rule" name="duration_rule" reporter:datatype="link"/>
1968                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
1969                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
1970             <field reporter:label="Hard Due Date" name="hard_due_date" reporter:datatype="link"/>
1971             <field reporter:label="Renewals Override" name="renewals" reporter:datatype="int"/>
1972             <field reporter:label="Grace Period Override" name="grace_period" reporter:datatype="interval"/>
1973                         <field reporter:label="Script Test" name="script_test" reporter:datatype="text"/>
1974                         <field name="total_copy_hold_ratio" reporter:datatype="float" reporter:label="Minimum Total Copy/Hold Ratio"/>
1975                         <field name="available_copy_hold_ratio" reporter:datatype="float" reporter:label="Minimum Available Copy/Hold Ratio"/>
1976                         <field name="description" reporter:datatype="text" reporter:label="Description"/>
1977                 </fields>
1978                 <links>
1979                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1980                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
1981                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
1982                         <link field="user_home_ou" reltype="has_a" key="id" map="" class="aou"/>
1983                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
1984                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
1985                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
1986                         <link field="marc_type" reltype="has_a" key="code" map="" class="citm"/>
1987                         <link field="marc_form" reltype="has_a" key="code" map="" class="cifm"/>
1988                         <link field="marc_bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
1989                         <link field="marc_vr_format" reltype="has_a" key="code" map="" class="cvrfm"/>
1990                         <link field="duration_rule" reltype="has_a" key="id" map="" class="crcd"/>
1991                         <link field="max_fine_rule" reltype="has_a" key="id" map="" class="crmf"/>
1992                         <link field="recurring_fine_rule" reltype="has_a" key="id" map="" class="crrf"/>
1993             <link field="hard_due_date" reltype="has_a" key="id" map="" class="chdd"/>
1994                 </links>
1995         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1996             <actions>
1997                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1998                 <retrieve permission="ADMIN_CIRC_MATRIX_MATCHPOINT VIEW_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1999                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
2000                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
2001             </actions>
2002         </permacrud>
2003         </class>
2004
2005     <class id="cclg" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::circ_limit_group" oils_persist:tablename="config.circ_limit_group" reporter:label="Circulation Limit Group">
2006         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_group_id_seq">
2007             <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2008             <field reporter:label="Name" name="name" reporter:datatype="text"/>
2009             <field reporter:label="Description" name="description" reporter:datatype="text"/>
2010         </fields>
2011         <links/>
2012         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2013             <actions>
2014                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
2015                 <retrieve/>
2016                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
2017                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
2018             </actions>
2019         </permacrud>
2020     </class>
2021
2022     <class id="ccls" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::circ_limit_set" oils_persist:tablename="config.circ_limit_set" reporter:label="Circulation Limit Set">
2023         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_id_seq">
2024             <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2025             <field reporter:label="Name" name="name" reporter:datatype="text"/>
2026             <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
2027             <field reporter:label="Items Out" name="items_out" reporter:datatype="int"/>
2028             <field reporter:label="Min Depth" name="depth" reporter:datatype="int"/>
2029             <field reporter:label="Global" name="global" reporter:datatype="bool"/>
2030             <field reporter:label="Description" name="description" reporter:datatype="text"/>
2031         </fields>
2032         <links>
2033             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2034         </links>
2035         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2036             <actions>
2037                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field="owning_lib"/>
2038                 <retrieve/>
2039                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field="owning_lib"/>
2040                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field="owning_lib"/>
2041             </actions>
2042         </permacrud>
2043     </class>
2044
2045     <class id="ccmlsm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::circ_matrix_limit_set_map" oils_persist:tablename="config.circ_matrix_limit_set_map" reporter:label="Circulation Matrix Limit Set Map">
2046         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_limit_set_map_id_seq">
2047             <field reporter:label="ID" name="id" reporter:datatype="id"/>
2048             <field reporter:label="Matchpoint" name="matchpoint" reporter:datatype="link"/>
2049             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
2050             <field reporter:label="Fallthrough" name="fallthrough" reporter:datatype="bool"/>
2051             <field reporter:label="Active" name="active" reporter:datatype="bool"/>
2052         </fields>
2053         <links>
2054             <link field="matchpoint" reltype="has_a" key="id" map="" class="ccmm"/>
2055             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
2056         </links>
2057         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2058             <actions>
2059                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2060                     <context link="matchpoint" field="org_unit"/>
2061                 </create>
2062                 <retrieve/>
2063                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2064                     <context link="matchpoint" field="org_unit"/>
2065                 </update>
2066                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2067                     <context link="matchpoint" field="org_unit"/>
2068                 </delete>
2069             </actions>
2070         </permacrud>
2071     </class>
2072
2073     <class id="cclscmm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::circ_limit_set_circ_mod_map" oils_persist:tablename="config.circ_limit_set_circ_mod_map" reporter:label="Circulation Limit Set Circ Mod Map">
2074         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_circ_mod_map_id_seq">
2075             <field reporter:label="ID" name="id" reporter:datatype="id"/>
2076             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
2077             <field reporter:label="Circulation Modifier" name="circ_mod" reporter:datatype="link"/>
2078         </fields>
2079         <links>
2080             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
2081             <link field="circ_mod" reltype="has_a" key="code" map="" class="ccm"/>
2082         </links>
2083         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2084             <actions>
2085                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2086                     <context link="limit_set" field="owning_lib"/>
2087                 </create>
2088                 <retrieve/>
2089                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2090                     <context link="limit_set" field="owning_lib"/>
2091                 </update>
2092                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2093                     <context link="limit_set" field="owning_lib"/>
2094                 </delete>
2095             </actions>
2096         </permacrud>
2097     </class>
2098     <class id="cclsacpl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::circ_limit_set_copy_loc_map" oils_persist:tablename="config.circ_limit_set_copy_loc_map" reporter:label="Circulation Limit Set Copy Location Map">
2099         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_copy_loc_map_id_seq">
2100             <field reporter:label="ID" name="id" reporter:datatype="id"/>
2101             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
2102             <field reporter:label="Copy Location" name="copy_loc" reporter:datatype="link"/>
2103         </fields>
2104         <links>
2105             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
2106             <link field="copy_loc" reltype="has_a" key="id" map="" class="acpl"/>
2107         </links>
2108         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2109             <actions>
2110                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2111                     <context link="limit_set" field="owning_lib"/>
2112                 </create>
2113                 <retrieve/>
2114                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2115                     <context link="limit_set" field="owning_lib"/>
2116                 </update>
2117                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2118                     <context link="limit_set" field="owning_lib"/>
2119                 </delete>
2120             </actions>
2121         </permacrud>
2122     </class>
2123
2124     <class id="cclsgm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::circ_limit_set_group_map" oils_persist:tablename="config.circ_limit_set_group_map" reporter:label="Circulation Limit Set Group Map">
2125         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_group_map_id_seq">
2126             <field reporter:label="ID" name="id" reporter:datatype="id"/>
2127             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
2128             <field reporter:label="Limit Group" name="limit_group" reporter:datatype="link"/>
2129             <field reporter:label="Check Only" name="check_only" reporter:datatype="bool"/>
2130         </fields>
2131         <links>
2132             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
2133             <link field="limit_group" reltype="has_a" key="id" map="" class="cclg"/>
2134         </links>
2135         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2136             <actions>
2137                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2138                     <context link="limit_set" field="owning_lib"/>
2139                 </create>
2140                 <retrieve/>
2141                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2142                     <context link="limit_set" field="owning_lib"/>
2143                 </update>
2144                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2145                     <context link="limit_set" field="owning_lib"/>
2146                 </delete>
2147             </actions>
2148         </permacrud>
2149     </class>
2150
2151         <class id="cit" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::identification_type" oils_persist:tablename="config.identification_type" reporter:label="Identification Type">
2152                 <fields oils_persist:primary="id" oils_persist:sequence="config.identification_type_id_seq">
2153                         <field reporter:label="Identification ID" name="id" reporter:selector="name" reporter:datatype="id"/>
2154                         <field reporter:label="Identification Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
2155                 </fields>
2156                 <links/>
2157         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2158             <actions>
2159                 <create permission="ADMIN_IDENT_TYPE" global_required="true"/>
2160                 <retrieve/>
2161                 <update permission="ADMIN_IDENT_TYPE" global_required="true"/>
2162                 <delete permission="ADMIN_IDENT_TYPE" global_required="true"/>
2163             </actions>
2164         </permacrud>
2165         </class>
2166
2167         <class id="asvq" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::survey_question" oils_persist:tablename="action.survey_question" reporter:label="User Survey Question">
2168                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_question_id_seq">
2169                         <field reporter:label="Answers" name="answers" oils_persist:virtual="true" reporter:datatype="link"/>
2170                         <field reporter:label="Responses" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
2171                         <field reporter:label="Question ID" name="id" reporter:datatype="id" />
2172                         <field reporter:label="Question" name="question" reporter:datatype="text"/>
2173                         <field reporter:label="Survey" name="survey" reporter:datatype="link"/>
2174                 </fields>
2175                 <links>
2176                         <link field="survey" reltype="has_a" key="id" map="" class="asv"/>
2177                         <link field="responses" reltype="has_many" key="question" map="" class="asvr"/>
2178                         <link field="answers" reltype="has_many" key="question" map="" class="asva"/>
2179                 </links>
2180         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2181             <actions>
2182                 <create permission="ADMIN_SURVEY">
2183                     <context link="survey" field="owner"/>
2184                 </create>
2185                 <retrieve/>
2186                 <update permission="ADMIN_SURVEY">
2187                     <context link="survey" field="owner"/>
2188                 </update>
2189                 <delete permission="ADMIN_SURVEY">
2190                     <context link="survey" field="owner"/>
2191                 </delete>
2192             </actions>
2193         </permacrud>
2194         </class>
2195         <class id="mbts" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::billable_transaction_summary" oils_persist:tablename="money.materialized_billable_xact_summary" reporter:label="Billable Transaction Summary" oils_persist:readonly="true">
2196                 <fields oils_persist:primary="id" oils_persist:sequence="">
2197                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
2198                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id"/>
2199                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
2200                         <field reporter:label="Last Billing Timestamp" name="last_billing_ts" reporter:datatype="timestamp"/>
2201                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
2202                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
2203                         <field reporter:label="Last Payment Timestamp" name="last_payment_ts" reporter:datatype="timestamp"/>
2204                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
2205                         <field reporter:label="Total Owed" name="total_owed" reporter:datatype="money"/>
2206                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
2207                         <field reporter:label="Billed User" name="usr" reporter:datatype="link"/>
2208                         <field reporter:label="Transaction Finish Time" name="xact_finish" reporter:datatype="timestamp" />
2209                         <field reporter:label="Transaction Start Time" name="xact_start" reporter:datatype="timestamp" />
2210                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
2211                 </fields>
2212                 <links>
2213                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2214                 </links>
2215                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2216                         <actions>
2217                                 <retrieve permission="VIEW_USER_TRANSACTIONS">
2218                                         <context link="usr" field="home_ou" />
2219                                 </retrieve>
2220                         </actions>
2221                 </permacrud>
2222         </class>
2223         <class id="mbtslv" controller="open-ils.cstore" oils_obj:fieldmapper="money::billable_transaction_summary_location_view" oils_persist:tablename="money.billable_xact_summary_location_view" reporter:label="Billable Transaction Summary with Billing Location" oils_persist:readonly="true" reporter:core="true">
2224                 <fields oils_persist:primary="id" oils_persist:sequence="">
2225                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
2226                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id"/>
2227                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
2228                         <field reporter:label="Last Billing Timestamp" name="last_billing_ts" reporter:datatype="timestamp"/>
2229                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
2230                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
2231                         <field reporter:label="Last Payment Timestamp" name="last_payment_ts" reporter:datatype="timestamp"/>
2232                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
2233                         <field reporter:label="Total Owed" name="total_owed" reporter:datatype="money"/>
2234                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
2235                         <field reporter:label="Billed User" name="usr" reporter:datatype="link"/>
2236                         <field reporter:label="Transaction Finish Time" name="xact_finish" reporter:datatype="timestamp" />
2237                         <field reporter:label="Transaction Start Time" name="xact_start" reporter:datatype="timestamp" />
2238                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
2239                         <field reporter:label="Billing Location" name="billing_location" reporter:datatype="link"/>
2240                 </fields>
2241                 <links>
2242                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2243                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
2244                 </links>
2245         </class>
2246         <class id="aum" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::usr_message" oils_persist:tablename="actor.usr_message" reporter:label="User Message">
2247                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_message_id_seq">
2248                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2249                         <field reporter:label="Read Date/Time" name="read_date" reporter:datatype="timestamp"/>
2250                         <field reporter:label="Creating Library" name="sending_lib" reporter:datatype="link"/>
2251                         <field reporter:label="Message ID" name="id" reporter:datatype="id" />
2252                         <field reporter:label="Deleted?" name="deleted" reporter:datatype="bool"/>
2253                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
2254                         <field reporter:label="User" name="usr" reporter:datatype="link" />
2255                         <field reporter:label="Message" name="message" reporter:datatype="text"/>
2256                 </fields>
2257                 <links>
2258                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2259                         <link field="sending_lib" reltype="has_a" key="id" map="" class="aou"/>
2260                 </links>
2261                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2262                         <actions> <!-- created magically, so no create action -->
2263                                 <retrieve permission="VIEW_USER" context_field="sending_lib" />
2264                                 <update permission="UPDATE_USER" context_field="sending_lib" />
2265                                 <delete permission="UPDATE_USER" context_field="sending_lib" />
2266                         </actions>
2267                 </permacrud>
2268         </class>
2269         <class id="auml" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::usr_message_limited" oils_persist:tablename="actor.usr_message_limited" reporter:label="User Message (Limited Access)">
2270                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_message_id_seq">
2271                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2272                         <field reporter:label="Read Date/Time" name="read_date" reporter:datatype="timestamp"/>
2273                         <field reporter:label="Creating Library" name="sending_lib" reporter:datatype="link"/>
2274                         <field reporter:label="Message ID" name="id" reporter:datatype="id" />
2275                         <field reporter:label="Deleted?" name="deleted" reporter:datatype="bool"/>
2276                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
2277                         <field reporter:label="User" name="usr" reporter:datatype="link" />
2278                         <field reporter:label="Message" name="message" reporter:datatype="text"/>
2279                 </fields>
2280                 <links>
2281                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2282                         <link field="sending_lib" reltype="has_a" key="id" map="" class="aou"/>
2283                 </links>
2284                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2285                         <actions> <!-- created magically, so no create action -->
2286                                 <retrieve permission="UPDATE_USER" context_field="sending_lib" owning_user="usr"/>
2287                                 <update   permission="UPDATE_USER" context_field="sending_lib" owning_user="usr"/>
2288                         </actions>
2289                 </permacrud>
2290         </class>
2291         <class id="aun" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::usr_note" oils_persist:tablename="actor.usr_note" reporter:label="User Note">
2292                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_note_id_seq">
2293                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2294                         <field reporter:label="Creating Staff" name="creator" reporter:datatype="link"/>
2295                         <field reporter:label="Note ID" name="id" reporter:datatype="id" />
2296                         <field reporter:label="Is OPAC Visible?" name="pub" reporter:datatype="bool"/>
2297                         <field reporter:label="Note Title" name="title" reporter:datatype="text"/>
2298                         <field reporter:label="User" name="usr" reporter:datatype="link" />
2299                         <field reporter:label="Note Content" name="value" reporter:datatype="text"/>
2300                 </fields>
2301                 <links>
2302                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2303                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2304                 </links>
2305         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2306             <actions>
2307                 <create permission="UPDATE_USER" context_field="owner">
2308                     <context link="usr" field="home_ou"/>
2309                 </create>
2310                                 <!-- note: public notes are still accessible via API -->
2311                 <retrieve permission="UPDATE_USER">
2312                     <context link="usr" field="home_ou"/>
2313                                 </retrieve>
2314                 <update permission="UPDATE_USER">
2315                     <context link="usr" field="home_ou"/>
2316                                 </update>
2317                 <delete permission="UPDATE_USER">
2318                     <context link="usr" field="home_ou"/>
2319                                 </delete>
2320             </actions>
2321         </permacrud>
2322         </class>
2323         <class id="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">
2324                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_password_reset_id_seq">
2325                         <field reporter:label="Request ID" name="id" reporter:datatype="id"/>
2326                         <field reporter:label="UUID" name="uuid" reporter:datatype="text"/>
2327                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
2328                         <field reporter:label="Request Time" name="request_time" reporter:datatype="timestamp"/>
2329                         <field reporter:label="Was Reset?" name="has_been_reset" reporter:datatype="bool"/>
2330                 </fields>
2331                 <links>
2332                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2333                 </links>
2334         </class>
2335         <class id="aus" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::user_setting" oils_persist:tablename="actor.usr_setting" reporter:label="User Setting">
2336                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_setting_id_seq">
2337                         <field reporter:label="Setting ID" name="id" reporter:datatype="id" />
2338                         <field reporter:label="Name" name="name" reporter:datatype="link"/>
2339                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
2340                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
2341                 </fields>
2342                 <links>
2343                         <link field="name" reltype="has_a" key="name" map="" class="cust"/>
2344                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2345                 </links>
2346                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2347                         <actions>
2348                                 <retrieve permission="VIEW_USER">
2349                                         <context link="usr" field="home_ou" />
2350                                 </retrieve>
2351                         </actions>
2352                 </permacrud>
2353         </class>
2354         <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">
2355                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.author_field_entry_id_seq">
2356                         <field name="field" reporter:datatype="link"/>
2357                         <field name="id" reporter:datatype="id" />
2358                         <field name="source" reporter:datatype="link"/>
2359                         <field name="value" reporter:datatype="text"/>
2360                 </fields>
2361                 <links>
2362                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
2363                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
2364                 </links>
2365         </class>
2366         <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">
2367                 <fields oils_persist:primary="id" oils_persist:sequence="action.in_house_use_id_seq">
2368                         <field reporter:label="Use ID" name="id" reporter:datatype="id" />
2369                         <field reporter:label="Item" name="item" reporter:datatype="int" />
2370                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
2371                         <field reporter:label="Recording Staff" name="staff" reporter:datatype="link"/>
2372                         <field reporter:label="Use Date/Time" name="use_time" reporter:datatype="timestamp"/>
2373                 </fields>
2374                 <links>
2375                         <link field="item" reltype="has_a" key="id" map="" class="acp"/>
2376                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
2377                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
2378                 </links>
2379                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2380                         <actions>
2381                                 <retrieve/>
2382                         </actions>
2383                 </permacrud>
2384         </class>
2385         <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">
2386                 <fields oils_persist:primary="id" oils_persist:sequence="action.non_cat_in_house_use_id_seq">
2387                         <field reporter:label="Use ID" name="id" reporter:datatype="id" />
2388                         <field reporter:label="Item Type" name="item_type" reporter:datatype="link"/>
2389                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
2390                         <field reporter:label="Recording Staff" name="staff" reporter:datatype="link"/>
2391                         <field reporter:label="Use Date/Time" name="use_time" reporter:datatype="timestamp"/>
2392                 </fields>
2393                 <links>
2394                         <link field="item_type" reltype="has_a" key="id" map="" class="cnct"/>
2395                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
2396                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
2397                 </links>
2398                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2399                         <actions>
2400                                 <retrieve/>
2401                         </actions>
2402                 </permacrud>
2403         </class>
2404         <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">
2405                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
2406                         <field reporter:label="Pretransit Copy Status" name="copy_status" reporter:datatype="bool"/>
2407                         <field reporter:label="Destination" name="dest" reporter:datatype="link"/>
2408                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
2409                         <field reporter:label="Transit ID" name="id" reporter:datatype="id"/>
2410                         <field reporter:label="Is Persistent? (unused)" name="persistant_transfer" reporter:datatype="bool"/>
2411                         <field reporter:label="Previous Hop (unused)" name="prev_hop" reporter:datatype="link"/>
2412                         <field reporter:label="Source" name="source" reporter:datatype="link"/>
2413                         <field reporter:label="Prev Destination" name="prev_dest" reporter:datatype="org_unit"/>
2414                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
2415                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
2416                         <field reporter:label="Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
2417                         <field reporter:label="Hold Transit" name="hold_transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
2418                 </fields>
2419                 <links>
2420                         <link field="hold_transit_copy" reltype="might_have" key="id" map="" class="ahtc"/>
2421                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
2422                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
2423                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
2424                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
2425                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
2426                 </links>
2427         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2428             <actions>
2429                 <create permission="TRANSIT_COPY" context_field="owner">
2430                     <context link="target_copy" field="circ_lib"/>
2431                 </create>
2432                 <retrieve/>
2433                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
2434                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
2435             </actions>
2436         </permacrud>
2437         </class>
2438         <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">
2439                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_response_id_seq">
2440                         <field reporter:label="Answer" name="answer" reporter:datatype="link"/>
2441                         <field reporter:label="Answer Date/Time" name="answer_date" reporter:datatype="timestamp"/>
2442                         <field reporter:label="Effective Answer Date/Time" name="effective_date" reporter:datatype="timestamp"/>
2443                         <field reporter:label="Answer ID" name="id" reporter:datatype="id" />
2444                         <field reporter:label="Question" name="question" reporter:datatype="link"/>
2445                         <field reporter:label="Response Group ID" name="response_group_id" reporter:datatype="int" />
2446                         <field reporter:label="Survey" name="survey" reporter:datatype="link"/>
2447                         <field reporter:label="Responding User" name="usr" reporter:datatype="link"/>
2448                 </fields>
2449                 <links>
2450                         <link field="question" reltype="has_a" key="id" map="" class="asvq"/>
2451                         <link field="survey" reltype="has_a" key="id" map="" class="asv"/>
2452                         <link field="answer" reltype="has_a" key="id" map="" class="asva"/>
2453                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2454                 </links>
2455         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2456             <actions>
2457                 <create permission="ADMIN_SURVEY">
2458                     <context link="survey" field="owner"/>
2459                 </create>
2460                 <retrieve permission="VIEW_USER">
2461                     <context link="usr" field="home_ou"/>
2462                 </retrieve>
2463                 <update permission="ADMIN_SURVEY">
2464                     <context link="survey" field="owner"/>
2465                 </update>
2466                 <delete permission="ADMIN_SURVEY">
2467                     <context link="survey" field="owner"/>
2468                 </delete>
2469             </actions>
2470         </permacrud>
2471         </class>
2472         <class id="ccbi" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="container::copy_bucket_item" oils_persist:tablename="container.copy_bucket_item" reporter:label="Copy Bucket Item">
2473                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_item_id_seq">
2474                         <field name="bucket" />
2475                         <field name="id" reporter:datatype="id" />
2476                         <field name="target_copy" reporter:datatype="link"/>
2477                         <field name="create_time" reporter:datatype="timestamp" />
2478                         <field name="pos" reporter:datatype="int" />
2479                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
2480                 </fields>
2481                 <links>
2482                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
2483                         <link field="bucket" reltype="has_a" key="id" map="" class="ccb"/>
2484             <link field="notes" reltype="has_many" map="" key="item" class="ccbin"/>
2485                 </links>
2486                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2487                         <actions>
2488                                 <retrieve permission="ADMIN_COPY_BUCKET">
2489                     <context link="bucket" owning_lib="owning_lib"/>
2490                 </retrieve>
2491             </actions>
2492         </permacrud>
2493         </class>
2494         <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">
2495                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_item_note_id_seq">
2496                         <field name="id" reporter:datatype="id" />
2497                         <field name="item" reporter:datatype="link"/>
2498                         <field name="note" reporter:datatype="text" />
2499                 </fields>
2500                 <links>
2501                         <link field="item" reltype="has_a" key="id" map="" class="ccbi"/>
2502                 </links>
2503         </class>
2504
2505         <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">
2506                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_id_seq">
2507                         <field reporter:label="Control Set ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2508                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
2509                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2510                         <field reporter:label="Controlling Authority Fields" name="authority_fields" reporter:datatype="link" oils_persist:virtual="true"/>
2511                         <field reporter:label="Thesauri" name="thesauri" reporter:datatype="link" oils_persist:virtual="true"/>
2512                 </fields>
2513                 <links>
2514                         <link field="authority_fields" reltype="has_many" key="control_set" map="" class="acsaf"/>
2515                         <link field="thesauri" reltype="has_many" key="control_set" map="" class="at"/>
2516                 </links>
2517                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2518                         <actions>
2519                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2520                                 <retrieve/>
2521                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2522                                 <delete permission="DELETE_AUTHORITY_CONTROL_SET" global_required="true"/>
2523                         </actions>
2524                 </permacrud>
2525         </class>
2526
2527         <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">
2528                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_authority_field_id_seq">
2529                         <field reporter:label="Control Set Authority Field ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2530                         <field reporter:label="Main Entry" name="main_entry" reporter:datatype="link"/>
2531                         <field reporter:label="Control Set" name="control_set" reporter:datatype="link"/>
2532                         <field reporter:label="Tag" name="tag" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.{3}$"/>
2533                         <field reporter:label="Subfield List" name="sf_list" reporter:datatype="text" />
2534                         <field reporter:label="Subfield List for Display" name="display_sf_list" reporter:datatype="text" />
2535                         <field reporter:label="Non-filing Indicator" name="nfi" reporter:datatype="text" />
2536                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
2537                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2538                         <field reporter:label="Linking Subfield" name="linking_subfield" reporter:datatype="text" />
2539                         <field reporter:label="Subordinate Entries" name="sub_entries" reporter:datatype="link" oils_persist:virtual="true"/>
2540                         <field reporter:label="Controlled Bib Fields" name="bib_fields" reporter:datatype="link" oils_persist:virtual="true"/>
2541                         <field reporter:label="Thesauri" name="thesauri" reporter:datatype="link" oils_persist:virtual="true"/>
2542                         <field reporter:label="Browse Axis Maps" name="axis_maps" reporter:datatype="link" oils_persist:virtual="true"/>
2543                         <field reporter:label="Joiner" name="joiner" reporter:datatype="text" />
2544                         <field reporter:label="Heading Field" name="heading_field" reporter:datatype="link" />
2545                 </fields>
2546                 <links>
2547                         <link field="axis_maps" reltype="has_many" key="field" map="" class="abaafm"/>
2548                         <link field="control_set" reltype="has_a" key="id" map="" class="acs"/>
2549                         <link field="bib_fields" reltype="has_many" key="authority_field" map="" class="acsbf"/>
2550                         <link field="thesauri" reltype="has_many" key="control_set" map="" class="at"/>
2551                         <link field="main_entry" reltype="has_a" key="id" map="" class="acsaf"/>
2552                         <link field="sub_entries" reltype="has_many" key="main_entry" map="" class="acsaf"/>
2553                         <link field="heading" reltype="has_a" key="id" map="" class="ahf"/>
2554                 </links>
2555                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2556                         <actions>
2557                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2558                                 <retrieve/>
2559                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2560                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2561                         </actions>
2562                 </permacrud>
2563         </class>
2564
2565         <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">
2566                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_bib_field_id_seq">
2567                         <field reporter:label="Controlled Bib Field ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2568                         <field reporter:label="Controlling Authority Field" name="authority_field" reporter:datatype="link"/>
2569                         <field reporter:label="Tag" name="tag" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.{3}$"/>
2570                 </fields>
2571                 <links>
2572                         <link field="authority_field" reltype="has_a" key="id" map="" class="acsaf"/>
2573                 </links>
2574                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2575                         <actions>
2576                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2577                                 <retrieve/>
2578                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2579                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2580                         </actions>
2581                 </permacrud>
2582         </class>
2583
2584         <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">
2585                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_bib_field_metabib_field_map_id_seq">
2586                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2587                         <field reporter:label="Bib Field" name="bib_field" reporter:datatype="link"/>
2588                         <field reporter:label="Metabib Field" name="metabib_field" reporter:datatype="link"/>
2589                 </fields>
2590                 <links>
2591                         <link field="bib_field" reltype="has_a" key="id" map="" class="acsbf"/>
2592                         <link field="metabib_field" reltype="has_a" key="id" map="" class="cmf"/>
2593                 </links>
2594                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2595                         <actions>
2596                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2597                                 <retrieve/>
2598                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2599                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2600                         </actions>
2601                 </permacrud>
2602         </class>
2603
2604         <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">
2605                 <fields oils_persist:primary="code">
2606                         <field reporter:label="Thesaurus Code" name="code" reporter:datatype="id" reporter:selector="name"/>
2607                         <field reporter:label="Control Set" name="control_set" reporter:datatype="link"/>
2608                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
2609                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2610                         <field reporter:label="Short Code" name="short_code" reporter:datatype="text" />
2611                         <field reporter:label="URI" name="uri" reporter:datatype="text" />
2612                 </fields>
2613                 <links>
2614                         <link field="control_set" reltype="has_a" key="id" map="" class="acs"/>
2615                 </links>
2616                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2617                         <actions>
2618                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2619                                 <retrieve/>
2620                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2621                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2622                         </actions>
2623                 </permacrud>
2624         </class>
2625
2626         <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">
2627                 <fields oils_persist:primary="code">
2628                         <field reporter:label="Code" name="code" reporter:datatype="id" reporter:selector="name" oils_obj:validate="^\S+$"/>
2629                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true"/>
2630                         <field reporter:label="Sorter Attribute" name="sorter" reporter:datatype="link"/>
2631                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
2632                         <field reporter:label="Authority Fields" name="fields" reporter:datatype="link" oils_persist:virtual="true"/>
2633                         <field reporter:label="Authority Field Maps" name="maps" reporter:datatype="link" oils_persist:virtual="true"/>
2634                 </fields>
2635                 <links>
2636                         <link field="sorter" reltype="has_a" key="name" map="" class="crad"/>
2637                         <link field="fields" reltype="has_many" key="axis" map="field" class="abaafm"/>
2638                         <link field="maps" reltype="has_many" key="axis" map="" class="abaafm"/>
2639                 </links>
2640                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2641                         <actions>
2642                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2643                                 <retrieve/>
2644                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2645                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2646                         </actions>
2647                 </permacrud>
2648         </class>
2649
2650     <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">
2651         <fields oils_persist:primary="id" oils_persist:sequence="authority.browse_axis_authority_field_map_id_seq">
2652             <field reporter:label="Axis Authority Field Map ID" name="id" reporter:datatype="id"/>
2653             <field reporter:label="Authority Field" name="field" oils_obj:required="true" reporter:datatype="link"/>
2654             <field reporter:label="Axis" name="axis" reporter:datatype="link" oils_obj:required="true"/>
2655         </fields>
2656         <links>
2657             <link field="field" reltype="has_a" key="id" map="" class="acsaf"/>
2658             <link field="axis" reltype="has_a" key="code" map="" class="aba"/>
2659         </links>
2660         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2661             <actions>
2662                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2663                 <retrieve/>
2664                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2665                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2666             </actions>
2667         </permacrud>
2668     </class>
2669
2670         <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">
2671                 <fields oils_persist:primary="id" oils_persist:sequence="authority.record_entry_id_seq">
2672                         <field name="active" reporter:datatype="bool"/>
2673                         <field name="create_date" reporter:datatype="timestamp"/>
2674                         <field name="creator" />
2675                         <field name="deleted" reporter:datatype="bool"/>
2676                         <field name="edit_date" reporter:datatype="timestamp"/>
2677                         <field name="editor" />
2678                         <field name="id" reporter:datatype="id" />
2679                         <field name="last_xact_id" />
2680                         <field name="marc" />
2681                         <field name="source" />
2682                         <field reporter:label="Control Set" name="control_set" reporter:datatype="link"/>
2683                         <field reporter:label="Owner" name="owner"  reporter:datatype="org_unit"/>
2684                         <field name="heading" />
2685                         <field name="simple_heading" />
2686                         <field name="fixed_fields" oils_persist:virtual="true" reporter:datatype="link"/>
2687                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
2688                         <field name="bib_links" oils_persist:virtual="true" reporter:datatype="link"/>
2689                 </fields>
2690                 <links>
2691                         <link field="control_set" reltype="has_a" key="id" map="" class="acs"/>
2692                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
2693                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
2694                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2695                         <link field="notes" reltype="has_many" key="record" map="" class="arn"/>
2696                         <link field="bib_links" reltype="has_many" key="authority" map="" class="abl"/>
2697                         <link field="fixed_fields" reltype="might_have" key="record" map="" class="ard"/>
2698                 </links>
2699                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2700                         <actions>
2701                                 <create permission="CREATE_AUTHORITY_RECORD IMPORT_MARC" global_required="true"/>
2702                                 <retrieve/>
2703                                 <update permission="UPDATE_AUTHORITY_RECORD" global_required="true"/>
2704                                 <delete permission="DELETE_AUTHORITY_RECORD" global_required="true"/>
2705                         </actions>
2706                 </permacrud>
2707         </class>
2708         <class id="ard" controller="open-ils.cstore" oils_obj:fieldmapper="authority::record_descriptor" oils_persist:tablename="authority.rec_descriptor" reporter:label="Authority Record Descriptor">
2709                 <fields oils_persist:primary="id" oils_persist:sequence="authority.rec_descriptor_id_seq">
2710                         <field name="char_encoding" />
2711                         <field name="id" />
2712                         <field name="record" />
2713                         <field name="record_status" />
2714                         <field name="thesaurus" />
2715                 </fields>
2716                 <links>
2717                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
2718                         <link field="thesaurus" reltype="might_have" key="code" map="" class="at"/>
2719                 </links>
2720         </class>
2721         <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">
2722                 <fields oils_persist:primary="id" oils_persist:sequence="authority.bib_linking_id_seq">
2723                         <field name="id" reporter:datatype="id" />
2724                         <field name="bib" reporter:datatype="link" />
2725                         <field name="authority" reporter:datatype="link" />
2726                 </fields>
2727                 <links>
2728                         <link field="bib" reltype="has_a" key="id" map="" class="bre"/>
2729                         <link field="authority" reltype="has_a" key="id" map="" class="are"/>
2730                 </links>
2731         </class>
2732         <class id="ash" controller="open-ils.cstore" oils_obj:fieldmapper="authority::simple_heading" oils_persist:tablename="authority.simple_heading" reporter:label="Authority Simple Heading">
2733                 <fields oils_persist:primary="id" oils_persist:sequence="authority.simple_heading_id_seq">
2734                         <field name="id" reporter:datatype="id" />
2735                         <field name="record" reporter:datatype="link" />
2736                         <field name="atag" reporter:datatype="link" />
2737                         <field name="value" reporter:datatype="text" />
2738                 </fields>
2739                 <links>
2740                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
2741                         <link field="atag" reltype="has_a" key="id" map="" class="acsaf"/>
2742                 </links>
2743         </class>
2744
2745         <class id="ahf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="authority::heading_field" oils_persist:tablename="authority.heading_field" reporter:label="Authority Heading Fields">
2746                 <fields oils_persist:primary="id" oils_persist:sequence="authority.heading_fields_id_seq">
2747                         <field name="id" reporter:datatype="id" />
2748                         <field name="heading_type" reporter:datatype="text" reporter:label="Heading Type" />
2749                         <field name="heading_purpose" reporter:datatype="text" reporter:label="Heading Purpose" />
2750                         <field name="label" reporter:datatype="text" reporter:label="Heading Field Label" />
2751                         <field name="format" reporter:datatype="text" reporter:label="Heading XSLT Format" />
2752                         <field name="heading_xpath" reporter:datatype="text" reporter:label="Heading XPath" />
2753                         <field name="component_xpath" reporter:datatype="text" reporter:label="Heading Component XPath" />
2754                         <field name="type_xpath" reporter:datatype="text" reporter:label="Related/Variant Type XPath" />
2755                         <field name="thesaurus_xpath" reporter:datatype="text" reporter:label="Thesaurus XPath" />
2756                         <field name="thesaurus_override_xpath" reporter:datatype="text" reporter:label="Thesaurus Override XPath" />
2757                         <field name="joiner" reporter:datatype="text" reporter:label="Joiner string" />
2758                 </fields>
2759                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2760                         <actions>
2761                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2762                                 <retrieve/>
2763                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2764                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2765                         </actions>
2766                 </permacrud>
2767         </class>
2768
2769         <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">
2770                 <fields oils_persist:primary="code" oils_persist:sequence="">
2771                         <field reporter:label="Language Code" name="code" reporter:selector="value" reporter:datatype="text"/>
2772                         <field reporter:label="Language" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
2773                 </fields>
2774                 <links/>
2775         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2776             <actions>
2777                 <create permission="CREATE_MARC_CODE" global_required="true"/>
2778                 <retrieve/>
2779                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
2780                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
2781             </actions>
2782         </permacrud>
2783         </class>
2784         <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">
2785                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
2786                         <field name="accepting_usr" />
2787                         <field name="amount" reporter:datatype="money" />
2788                         <field name="amount_collected" reporter:datatype="money" />
2789                         <field name="approval_code" reporter:datatype="text"/>
2790                         <field name="cash_drawer" reporter:datatype="link"/>
2791                         <field name="cc_number" reporter:datatype="text"/>
2792                         <field name="cc_order_number" reporter:datatype="text"/>
2793                         <field name="cc_processor" reporter:datatype="text"/>
2794                         <field name="id" reporter:datatype="id" />
2795                         <field name="note" reporter:datatype="text"/>
2796                         <field name="payment_ts" reporter:datatype="timestamp"/>
2797                         <field name="xact" reporter:datatype="link"/>
2798                         <field name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
2799                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
2800                 </fields>
2801                 <links>
2802                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
2803                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
2804                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
2805                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
2806                 </links>
2807         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2808             <actions>
2809                 <retrieve permission="VIEW_USER_TRANSACTIONS">
2810                     <context link="xact" jump="usr" field="home_ou"/>
2811                 </retrieve>
2812                         </actions>
2813                 </permacrud>
2814         </class>
2815         <class id="cxt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::xml_transform" oils_persist:tablename="config.xml_transform" reporter:label="XML/XSLT Transform Definition" oils_persist:field_safe="true">
2816                 <fields oils_persist:primary="name">
2817                         <field reporter:label="Name" name="name" reporter:datatype="text" />
2818                         <field reporter:label="Namespace URI" name="namespace_uri" reporter:datatype="text"/>
2819                         <field reporter:label="Namespace Prefix" name="prefix" reporter:datatype="text"/>
2820                         <field reporter:label="XSLT" name="xslt" reporter:datatype="text" />
2821                 </fields>
2822                 <links/>
2823         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2824             <actions>
2825                 <create permission="CREATE_XML_TRANSFORM" global_required="true"/>
2826                 <retrieve/>
2827                 <update permission="UPDATE_XML_TRANSFORM" global_required="true"/>
2828                 <delete permission="DELETE_XML_TRANSFORM" global_required="true"/>
2829             </actions>
2830         </permacrud>
2831         </class>
2832
2833         <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">
2834                 <fields oils_persist:primary="alias">
2835                         <field reporter:label="Alias (RegExp)" name="alias" reporter:datatype="text"/>
2836                         <field reporter:label="Class" name="field_class" reporter:datatype="link"/>
2837                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
2838                 </fields>
2839                 <links>
2840                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
2841                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
2842                 </links>
2843         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2844             <actions>
2845                 <create permission="CREATE_METABIB_SEARCH_ALIAS" global_required="true"/>
2846                 <retrieve/>
2847                 <update permission="UPDATE_METABIB_SEARCH_ALIAS" global_required="true"/>
2848                 <delete permission="DELETE_METABIB_SEARCH_ALIAS" global_required="true"/>
2849             </actions>
2850         </permacrud>
2851         </class>
2852
2853         <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">
2854                 <fields oils_persist:primary="name">
2855                         <field reporter:label="Name" name="name" reporter:datatype="text" reporter:selector="label"/>
2856                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
2857                         <field reporter:label="Buoyant?" name="buoyant" reporter:datatype="bool" />
2858                         <field reporter:label="Restrict?" name="restrict" reporter:datatype="bool" />
2859                         <field reporter:label="Combined?" name="combined" reporter:datatype="bool" />
2860                         <field reporter:label="A Weight" name="a_weight" reporter:datatype="float" />
2861                         <field reporter:label="B Weight" name="b_weight" reporter:datatype="float" />
2862                         <field reporter:label="C Weight" name="c_weight" reporter:datatype="float" />
2863                         <field reporter:label="D Weight" name="d_weight" reporter:datatype="float" />
2864                         <field reporter:label="Fields" name="fields" reporter:datatype="link" oils_persist:virtual="true"/>
2865                 </fields>
2866                 <links>
2867                         <link field="fields" reltype="has_many" key="name" map="" class="cmf"/>
2868                 </links>
2869         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2870             <actions>
2871                 <create permission="CREATE_METABIB_CLASS" global_required="true"/>
2872                 <retrieve/>
2873                 <update permission="UPDATE_METABIB_CLASS" global_required="true"/>
2874                 <delete permission="DELETE_METABIB_CLASS" global_required="true"/>
2875             </actions>
2876         </permacrud>
2877         </class>
2878
2879         <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">
2880                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_id_seq">
2881                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="label"/>
2882                         <field reporter:label="Class" name="field_class" reporter:datatype="link"/>
2883                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
2884                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2885                         <field reporter:label="Weight" name="weight" reporter:datatype="int" />
2886                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
2887                         <field reporter:label="Joiner" name="joiner" reporter:datatype="text"/>
2888                         <field reporter:label="Format" name="format" reporter:datatype="link"/>
2889                         <field reporter:label="Search Field" name="search_field" reporter:datatype="bool" />
2890                         <field reporter:label="Facet Field" name="facet_field" reporter:datatype="bool" />
2891                         <field reporter:label="Facet XPath" name="facet_xpath" reporter:datatype="text" />
2892                         <field reporter:label="Display Field?" name="display_field" reporter:datatype="bool" />
2893                         <field reporter:label="Display XPath" name="display_xpath" reporter:datatype="text" />
2894                         <field reporter:label="Browse Field" name="browse_field" reporter:datatype="bool" />
2895                         <field reporter:label="Browse XPath" name="browse_xpath" reporter:datatype="text" />
2896                         <field reporter:label="Browse Sort XPath" name="browse_sort_xpath" reporter:datatype="text" />
2897                         <field reporter:label="Authority XPath" name="authority_xpath" reporter:datatype="text" />
2898                         <field reporter:label="Restrict?" name="restrict" reporter:datatype="bool" />
2899                         <field reporter:label="Display Field Map" name="display_field_map" oils_persist:virtual="true" reporter:datatype="link"/>
2900                         <field reporter:label="Virtual Field Data Suppliers" name="data_sources" oils_persist:virtual="true" reporter:datatype="link"/>
2901                 </fields>
2902                 <links>
2903                         <link field="format" reltype="has_a" key="name" map="" class="cxt"/>
2904                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
2905                         <link field="display_field_map" reltype="might_have" key="field" map="" class="cdfm"/>
2906                         <link field="data_sources" reltype="has_many" key="virtual" map="" class="cmfvm"/>
2907                 </links>
2908         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2909             <actions>
2910                 <create permission="CREATE_METABIB_FIELD" global_required="true"/>
2911                 <retrieve/>
2912                 <update permission="UPDATE_METABIB_FIELD" global_required="true"/>
2913                 <delete permission="DELETE_METABIB_FIELD" global_required="true"/>
2914             </actions>
2915         </permacrud>
2916         </class>
2917
2918         <class id="cmfvm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::metabib_field_virtual_map" oils_persist:tablename="config.metabib_field_virtual_map" reporter:label="Metabib Field Virtual Map" oils_persist:field_safe="true">
2919                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_virtual_map_id_seq">
2920                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
2921                         <field reporter:label="Real" name="real" reporter:datatype="link"/>
2922                         <field reporter:label="Virtual" name="virtual" reporter:datatype="link"/>
2923                         <field reporter:label="Weight" name="weight" reporter:datatype="int"/>
2924                 </fields>
2925                 <links>
2926                         <link field="real" reltype="has_a" key="id" map="" class="cmf"/>
2927                         <link field="virtual" reltype="has_a" key="id" map="" class="cmf"/>
2928                 </links>
2929         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2930             <actions>
2931                 <create permission="CREATE_METABIB_FIELD ADMIN_METABIB_FIELD" global_required="true"/>
2932                 <retrieve/>
2933                 <update permission="UPDATE_METABIB_FIELD ADMIN_METABIB_FIELD" global_required="true"/>
2934                 <delete permission="DELETE_METABIB_FIELD ADMIN_METABIB_FIELD" global_required="true"/>
2935             </actions>
2936         </permacrud>
2937         </class>
2938
2939         <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">
2940                 <fields oils_persist:primary="id" oils_persist:sequence="config.best_hold_order_id_seq">
2941                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name" />
2942                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2943                         <field reporter:label="Capture Lib to Pickup Lib Proximity" name="pprox" reporter:datatype="int" />
2944                         <field reporter:label="Circ Lib to Request Lib Proximity" name="hprox" reporter:datatype="int" />
2945                         <field reporter:label="Adjusted Circ Lib to Pickup Lib Proximity" name="aprox" reporter:datatype="int" />
2946                         <field reporter:label="Adjusted Capture Location to Pickup Lib Proximity" name="approx" reporter:datatype="int" />
2947                         <field reporter:label="Hold Priority" name="priority" reporter:datatype="int" />
2948                         <field reporter:label="Hold Cut-in-line State" name="cut" reporter:datatype="int" />
2949                         <field reporter:label="Hold Selection Depth" name="depth" reporter:datatype="int" />
2950                         <field reporter:label="Copy Has Circulated From Home Lately" name="htime" reporter:datatype="int" />
2951                         <field reporter:label="Hold Request Time" name="rtime" reporter:datatype="int" />
2952                         <field reporter:label="Copy Has Been Home At All Lately" name="shtime" reporter:datatype="int" />
2953                 </fields>
2954                 <links>
2955                 </links>
2956                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2957                         <actions>
2958                                 <create permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
2959                                 <retrieve permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
2960                                 <update permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
2961                                 <delete permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
2962                         </actions>
2963                 </permacrud>
2964         </class>
2965         <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">
2966                 <fields oils_persist:primary="id" oils_persist:sequence="config.biblio_fingerprint_id_seq">
2967                         <field name="id" reporter:datatype="id" />
2968                         <field name="name" reporter:datatype="text"/>
2969                         <field name="xpath" reporter:datatype="text"/>
2970                         <field name="format" reporter:datatype="link"/>
2971                         <field name="first_word" reporter:datatype="bool" />
2972                 </fields>
2973                 <links/>
2974         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2975             <actions>
2976                 <create permission="CREATE_BIBLIO_FINGERPRINT" global_required="true"/>
2977                 <retrieve/>
2978                 <update permission="UPDATE_BIBLIO_FINGERPRINT" global_required="true"/>
2979                 <delete permission="DELETE_BIBLIO_FINGERPRINT" global_required="true"/>
2980             </actions>
2981         </permacrud>
2982         </class>
2983         <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">
2984                 <fields oils_persist:primary="code" oils_persist:sequence="">
2985                         <field reporter:label="Audience Code" name="code" reporter:selector="value" reporter:datatype="text"/>
2986                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2987                         <field reporter:label="Audience" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
2988                 </fields>
2989                 <links/>
2990         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2991             <actions>
2992                 <create permission="CREATE_MARC_CODE" global_required="true"/>
2993                 <retrieve/>
2994                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
2995                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
2996             </actions>
2997         </permacrud>
2998         </class>
2999         <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">
3000                 <fields oils_persist:primary="code" oils_persist:sequence="">
3001                         <field reporter:label="Item Form Code" name="code" reporter:selector="value" reporter:datatype="text"/>
3002                         <field reporter:label="Item Form" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
3003                 </fields>
3004                 <links/>
3005         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3006             <actions>
3007                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
3008                 <retrieve/>
3009                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
3010                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
3011             </actions>
3012         </permacrud>
3013         </class>
3014     <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">
3015         <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_class_id_seq">
3016             <field reporter:label="Call number class ID" name="id" reporter:datatype="id"/>
3017             <field reporter:label="Name" name="name" reporter:datatype="text"/>
3018             <field reporter:label="Normalizer function" name="normalizer" reporter:datatype="text"/>
3019             <field reporter:label="Call number fields" name="field" reporter:datatype="text"/>
3020         </fields>
3021         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3022             <actions>
3023                 <retrieve/>
3024             </actions>
3025         </permacrud>
3026     </class>
3027         <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">
3028                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_suffix_id_seq">
3029                         <field reporter:label="ID" name="id" reporter:datatype="id" />
3030                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
3031                         <field reporter:label="Label Sort Key" name="label_sortkey" reporter:datatype="text"/>
3032                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
3033                 </fields>
3034                 <links>
3035                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
3036                 </links>
3037         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3038             <actions>
3039                 <create permission="CREATE_VOLUME_SUFFIX" context_field="owning_lib"/>
3040                 <retrieve/>
3041                 <update permission="UPDATE_VOLUME_SUFFIX" context_field="owning_lib"/>
3042                 <delete permission="DELETE_VOLUME_SUFFIX" context_field="owning_lib"/>
3043             </actions>
3044         </permacrud>
3045         </class>
3046         <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">
3047                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_prefix_id_seq">
3048                         <field reporter:label="ID" name="id" reporter:datatype="id" />
3049                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
3050                         <field reporter:label="Label Sort Key" name="label_sortkey" reporter:datatype="text"/>
3051                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
3052                 </fields>
3053                 <links>
3054                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
3055                 </links>
3056         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3057             <actions>
3058                 <create permission="CREATE_VOLUME_PREFIX" context_field="owning_lib"/>
3059                 <retrieve/>
3060                 <update permission="UPDATE_VOLUME_PREFIX" context_field="owning_lib"/>
3061                 <delete permission="DELETE_VOLUME_PREFIX" context_field="owning_lib"/>
3062             </actions>
3063         </permacrud>
3064         </class>
3065         <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">
3066                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_id_seq">
3067                         <field reporter:label="Copies" name="copies" oils_persist:virtual="true" reporter:datatype="link"/>
3068                         <field reporter:label="Create Date/Time" name="create_date" reporter:datatype="timestamp"/>
3069                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
3070                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
3071                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
3072                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
3073                         <field reporter:label="Call Number/Volume ID" name="id" reporter:datatype="id" />
3074                         <field reporter:label="Call Number Label" name="label" reporter:datatype="text"/>
3075                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
3076                         <field reporter:label="Bib Record" name="record" reporter:datatype="link"/>
3077                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
3078                         <field reporter:label="URI Maps" name="uri_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3079                         <field reporter:label="URIs" name="uris" oils_persist:virtual="true" reporter:datatype="link"/>
3080                         <field reporter:label="Call Number Sort Key" name="label_sortkey" reporter:datatype="text"/>
3081                         <field reporter:label="Classification Scheme" name="label_class" reporter:datatype="link"/>
3082                         <field reporter:label="Prefix" name="prefix" reporter:datatype="link"/>
3083                         <field reporter:label="Suffix" name="suffix" reporter:datatype="link"/>
3084                 </fields>
3085                 <links>
3086                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
3087                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3088                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3089                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
3090                         <link field="notes" reltype="has_many" key="call_number" map="" class="acnn"/>
3091                         <link field="copies" reltype="has_many" key="call_number" map="" class="acp"/>
3092                         <link field="uris" reltype="has_many" key="call_number" map="uri" class="auricnm"/>
3093                         <link field="uri_maps" reltype="has_many" key="call_number" map="" class="auricnm"/>
3094                         <link field="label_class" reltype="has_a" key="id" map="" class="acnc"/>
3095                         <link field="prefix" reltype="has_a" key="id" map="" class="acnp"/>
3096                         <link field="suffix" reltype="has_a" key="id" map="" class="acns"/>
3097                 </links>
3098         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3099             <actions>
3100                 <create permission="CREATE_VOLUME" context_field="owning_lib"/>
3101                 <retrieve/>
3102                 <update permission="UPDATE_VOLUME" context_field="owning_lib"/>
3103                 <delete permission="DELETE_VOLUME" context_field="owning_lib"/>
3104             </actions>
3105         </permacrud>
3106         </class>
3107         <class id="auri" controller="open-ils.cstore" oils_obj:fieldmapper="asset::uri" oils_persist:tablename="asset.uri" reporter:label="Electronic Access URI">
3108                 <fields oils_persist:primary="id" oils_persist:sequence="asset.uri_id_seq">
3109                         <field reporter:label="URI ID" name="id" reporter:datatype="id"/>
3110                         <field reporter:label="URI" name="href" reporter:datatype="text"/>
3111                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
3112                         <field reporter:label="Use Information" name="use_restriction" reporter:datatype="text"/>
3113                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
3114                         <field reporter:label="Call Number Maps" name="call_number_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3115                         <field reporter:label="Call Numbers" name="call_numbers" oils_persist:virtual="true" reporter:datatype="link"/>
3116                 </fields>
3117                 <links>
3118                         <link field="call_numbers" reltype="has_many" key="uri" map="call_number" class="auricnm"/>
3119                         <link field="call_number_maps" reltype="has_many" key="uri" map="" class="auricnm"/>
3120         </links>
3121         </class>
3122         <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">
3123                 <fields oils_persist:primary="id" oils_persist:sequence="asset.uri_call_number_map_id_seq">
3124                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3125                         <field reporter:label="URI" name="uri" reporter:datatype="int"/>
3126                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
3127                 </fields>
3128                 <links>
3129                         <link field="uri" reltype="has_a" key="id" map="" class="auri"/>
3130                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
3131                 </links>
3132         </class>
3133         <class id="cst" controller="open-ils.cstore" oils_obj:fieldmapper="config::standing" oils_persist:tablename="config.standing" reporter:label="Standing Penalty">
3134                 <fields oils_persist:primary="id" oils_persist:sequence="config.standing_id_seq">
3135                         <field name="id" reporter:datatype="id" />
3136                         <field name="value" oils_persist:i18n="true" />
3137                 </fields>
3138                 <links/>
3139         </class>
3140         <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">
3141                 <fields oils_persist:primary="usr" oils_persist:sequence="">
3142                         <field name="balance_owed" reporter:datatype="money" />
3143                         <field name="total_owed" reporter:datatype="money" />
3144                         <field name="total_paid" reporter:datatype="money" />
3145                         <field name="usr" reporter:datatype="link"/>
3146                 </fields>
3147                 <links>
3148                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3149         </links>
3150         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3151             <actions>
3152                 <retrieve permission="VIEW_USER">
3153                     <context link="usr" field="home_ou"/>
3154                 </retrieve>
3155             </actions>
3156         </permacrud>
3157         </class>
3158         <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">
3159                 <fields oils_persist:primary="id" oils_persist:sequence="money.collections_tracker_id_seq">
3160                         <field name="collector" />
3161                         <field name="enter_time" reporter:datatype="timestamp"/>
3162                         <field name="id" reporter:datatype="id" />
3163                         <field name="location" reporter:datatype="link"/>
3164                         <field name="usr" reporter:datatype="link"/>
3165                 </fields>
3166                 <links>
3167                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3168                         <link field="collector" reltype="has_a" key="id" map="" class="au"/>
3169                         <link field="location" reltype="has_a" key="id" map="" class="aou"/>
3170                 </links>
3171         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3172             <actions>
3173                 <create permission="money.collections_tracker.create" context_field="location"/>
3174                 <retrieve permission="money.collections_tracker.create" context_field="location"/> 
3175                 <delete permission="money.collections_tracker.create" context_field="location"/>
3176             </actions>
3177         </permacrud>
3178         </class>
3179         <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">
3180                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry_id_seq">
3181                         <field reporter:label="Call Numbers" name="call_numbers" oils_persist:virtual="true" reporter:datatype="link"/>
3182                         <field reporter:label="Fixed Field Entry" name="fixed_fields" oils_persist:virtual="true" reporter:datatype="link"/>
3183                         <field reporter:label="Is Active?" name="active" reporter:datatype="bool"/>
3184                         <field reporter:label="Record Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
3185                         <field reporter:label="Record Creator" name="creator" reporter:datatype="link"/>
3186                         <field reporter:label="Is Deleted?" name="deleted" reporter:datatype="bool"/>
3187                         <field reporter:label="Last Edit Data/Time" name="edit_date" reporter:datatype="timestamp"/>
3188                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
3189                         <field reporter:label="Fingerprint" name="fingerprint"  reporter:datatype="text"/>
3190                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
3191                         <field reporter:label="Last Transaction ID" name="last_xact_id"  reporter:datatype="text"/>
3192                         <field reporter:label="MARC21Slim" name="marc"  reporter:datatype="text"/>
3193                         <field reporter:label="Overall Quality" name="quality" reporter:datatype="int" />
3194                         <field reporter:label="Record Source" name="source" reporter:datatype="link"/>
3195                         <field reporter:label="TCN Source" name="tcn_source"  reporter:datatype="text"/>
3196                         <field reporter:label="TCN Value" name="tcn_value"  reporter:datatype="text"/>
3197                         <field reporter:label="Owner" name="owner"  reporter:datatype="org_unit"/>
3198                         <field reporter:label="Share Depth" name="share_depth"  reporter:datatype="int"/>
3199                         <field reporter:label="Metarecord" name="metarecord" oils_persist:virtual="true" reporter:datatype="link"/>
3200                         <field reporter:label="Language Code" name="language" oils_persist:virtual="true" reporter:datatype="link"/>
3201                         <field reporter:label="Non-MARC Record Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
3202                         <field reporter:label="Indexed Keyword Field Entries" name="keyword_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3203                         <field reporter:label="Indexed Subject Field Entries" name="subject_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3204                         <field reporter:label="Indexed Title Field Entries" name="title_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3205                         <field reporter:label="Indexed Identifier Field Entries" name="identifier_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3206                         <field reporter:label="Indexed Author Field Entries" name="author_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3207                         <field reporter:label="Indexed Series Field Entries" name="series_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3208                         <field reporter:label="Flattened MARC Fields " name="full_record_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3209                         <field reporter:label="Simple Record Extracts " name="simple_record" oils_persist:virtual="true" reporter:datatype="link"/>
3210                         <field reporter:label="Authority Links" name="authority_links" oils_persist:virtual="true" reporter:datatype="link"/>
3211                         <field reporter:label="Subscriptions" name="subscriptions" oils_persist:virtual="true" reporter:datatype="link"/>
3212                         <field reporter:label="SVF Attributes" name="attrs" oils_persist:virtual="true" reporter:datatype="link"/>
3213                         <field reporter:label="MVF Attributes" name="mattrs" oils_persist:virtual="true" reporter:datatype="link"/>
3214                         <field reporter:label="Display Fields" name="display_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3215                         <field reporter:label="Flat Display Entries" name="flat_display_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3216                         <field reporter:label="Compressed Display Entries" name="compressed_display_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3217                         <field reporter:label="Wide Display Entries" name="wide_display_entry" oils_persist:virtual="true" reporter:datatype="link"/>
3218                         <field reporter:label="Merge Date" name="merge_date" reporter:datatype="timestamp"/>
3219                         <field reporter:label="Merged To" name="merged_to" reporter:datatype="link"/>
3220                 </fields>
3221                 <links>
3222                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3223                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
3224                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3225                         <link field="simple_record" reltype="might_have" key="id" map="" class="rmsr"/>
3226                         <link field="metarecord" reltype="might_have" key="source" map="metarecord" class="mmrsm"/>
3227                         <link field="call_numbers" reltype="has_many" key="record" map="" class="acn"/>
3228                         <link field="keyword_field_entries" reltype="has_many" key="source" map="" class="mkfe"/>
3229                         <link field="fixed_fields" reltype="might_have" key="record" map="" class="mrd"/>
3230                         <link field="language" reltype="might_have" key="record" map="item_lang" class="mrd"/>
3231                         <link field="subject_field_entries" reltype="has_many" key="source" map="" class="msfe"/>
3232                         <link field="title_field_entries" reltype="has_many" key="source" map="" class="mtfe"/>
3233                         <link field="identifier_field_entries" reltype="has_many" key="source" map="" class="mife"/>
3234                         <link field="notes" reltype="has_many" key="record" map="" class="bren"/>
3235                         <link field="author_field_entries" reltype="has_many" key="source" map="" class="mafe"/>
3236                         <link field="series_field_entries" reltype="has_many" key="source" map="" class="msefe"/>
3237                         <link field="full_record_entries" reltype="has_many" key="record" map="" class="mfr"/>
3238                         <link field="authority_links" reltype="has_many" key="bib" map="" class="abl"/>
3239                         <link field="subscriptions" reltype="has_many" key="record_entry" map="" class="ssub"/>
3240                         <link field="attrs" reltype="might_have" key="id" map="" class="mra"/>
3241                         <link field="mattrs" reltype="has_many" key="id" map="" class="mraf"/>
3242                         <link field="source" reltype="has_a" key="id" map="" class="cbs"/>
3243                         <link field="display_entries" reltype="has_many" key="source" map="" class="mde"/>
3244                         <link field="flat_display_entries" reltype="has_many" key="source" map="" class="mfde"/>
3245                         <link field="compressed_display_entries" reltype="has_many" key="source" map="" class="mcde"/>
3246                         <link field="wide_display_entry" reltype="might_have" key="source" map="" class="mwde"/>
3247                         <link field="merged_to" reltype="has_a" key="id" map="" class="bre"/>
3248                 </links>
3249         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3250             <actions>
3251                 <create permission="CREATE_MARC IMPORT_MARC" global_required="true"/>
3252                 <retrieve/>
3253                 <update permission="UPDATE_MARC" global_required="true"/>
3254                 <!-- 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. -->
3255                 <delete permission="DELETE_RECORD" global_required="true"/>
3256             </actions>
3257         </permacrud>
3258         </class>
3259         <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">
3260                 <fields oils_persist:primary="id">
3261                         <field name="dow_0_close" />
3262                         <field name="dow_0_open" />
3263                         <field name="dow_1_close" />
3264                         <field name="dow_1_open" />
3265                         <field name="dow_2_close" />
3266                         <field name="dow_2_open" />
3267                         <field name="dow_3_close" />
3268                         <field name="dow_3_open" />
3269                         <field name="dow_4_close" />
3270                         <field name="dow_4_open" />
3271                         <field name="dow_5_close" />
3272                         <field name="dow_5_open" />
3273                         <field name="dow_6_close" />
3274                         <field name="dow_6_open" />
3275                         <field name="id" reporter:datatype="id" />
3276                         <field name="org_unit" oils_persist:virtual="true" reporter:datatype="org_unit"/>
3277                 </fields>
3278                 <links>
3279                         <link field="id" reltype="might_have" key="id" map="" class="aou"/>
3280                 </links>
3281         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3282             <actions>
3283                 <create permission="CREATE_HOURS_OF_OPERATION" context_field="id"/>
3284                 <retrieve/>
3285                 <update permission="UPDATE_HOURS_OF_OPERATION" context_field="id"/>
3286                 <delete permission="DELETE_HOURS_OF_OPERATION" context_field="id"/>
3287             </actions>
3288         </permacrud>
3289         </class>
3290         <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">
3291                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.monograph_part_id_seq">
3292                         <field name="id" reporter:datatype="id" />
3293                         <field name="record" reporter:datatype="link"/>
3294                         <field name="label" reporter:datatype="text"/>
3295                         <field name="label_sortkey" reporter:datatype="text"/>
3296                         <field name="deleted" reporter:datatype="bool"/>
3297                 </fields>
3298                 <links>
3299                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3300                 </links>
3301         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3302             <actions>
3303                 <create permission="CREATE_MONOGRAPH_PART" global_required="true"/>
3304                 <retrieve/>
3305                 <update permission="UPDATE_MONOGRAPH_PART" global_required="true"/>
3306                 <delete permission="DELETE_MONOGRAPH_PART" global_required="true"/>
3307             </actions>
3308         </permacrud>
3309         </class>
3310         <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">
3311                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_part_map_id_seq">
3312                         <field name="id" reporter:datatype="id" />
3313                         <field name="target_copy" reporter:datatype="link" />
3314                         <field name="part" reporter:datatype="link"/>
3315                 </fields>
3316                 <links>
3317                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
3318                         <link field="part" reltype="has_a" key="id" map="" class="bmp"/>
3319                 </links>
3320         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3321             <actions>
3322                 <create permission="MAP_MONOGRAPH_PART" global_required="true"/>
3323                 <retrieve/>
3324                 <update permission="MAP_MONOGRAPH_PART" global_required="true"/>
3325                 <delete permission="MAP_MONOGRAPH_PART" global_required="true"/>
3326             </actions>
3327         </permacrud>
3328         </class>
3329     <class  id="aecc"
3330             controller="open-ils.cstore open-ils.pcrud"
3331             oils_obj:fieldmapper="action::emergency_closing_circulation"
3332             oils_persist:tablename="action.emergency_closing_circulation"
3333             reporter:label="Emergency Closing Circulation Entry"
3334             oils_persist:readonly="true"
3335     > <!-- This is not a view, but is managed via functions, so it's readonly. -->
3336         <fields oils_persist:primary="id">
3337             <field name="id" reporter:datatype="id" />
3338             <field name="circulation" reporter:datatype="link" />
3339                         <field name="emergency_closing" reporter:datatype="link"/>
3340             <field name="original_due_date" reporter:datatype="timestamp" />
3341             <field name="process_time" reporter:datatype="timestamp" />
3342         </fields>
3343         <links>
3344             <link field="circulation" reltype="has_a" key="id" map="" class="circ"/>
3345             <link field="emergency_closing" reltype="has_a" key="id" map="" class="aec"/>
3346         </links>
3347         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3348             <actions>
3349                 <retrieve/>
3350             </actions>
3351         </permacrud>
3352     </class>
3353     <class  id="aecr"
3354             controller="open-ils.cstore open-ils.pcrud"
3355             oils_obj:fieldmapper="action::emergency_closing_reservation"
3356             oils_persist:tablename="action.emergency_closing_reservation"
3357             reporter:label="Emergency Closing Reservation Entry"
3358             oils_persist:readonly="true"
3359     > <!-- This is not a view, but is managed via functions, so it's readonly. -->
3360         <fields oils_persist:primary="id">
3361             <field name="id" reporter:datatype="id" />
3362             <field name="reservation" reporter:datatype="link" />
3363                         <field name="emergency_closing" reporter:datatype="link"/>
3364             <field name="original_end_time" reporter:datatype="timestamp" />
3365             <field name="process_time" reporter:datatype="timestamp" />
3366         </fields>
3367         <links>
3368             <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
3369             <link field="emergency_closing" reltype="has_a" key="id" map="" class="aec"/>
3370         </links>
3371         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3372             <actions>
3373                 <retrieve/>
3374             </actions>
3375         </permacrud>
3376     </class>
3377     <class  id="aech"
3378             controller="open-ils.cstore open-ils.pcrud"
3379             oils_obj:fieldmapper="action::emergency_closing_hold"
3380             oils_persist:tablename="action.emergency_closing_hold"
3381             reporter:label="Emergency Closing Hold Entry"
3382             oils_persist:readonly="true"
3383     > <!-- This is not a view, but is managed via functions, so it's readonly. -->
3384         <fields oils_persist:primary="id">
3385             <field name="id" reporter:datatype="id" />
3386             <field name="hold" reporter:datatype="link" />
3387                         <field name="emergency_closing" reporter:datatype="link"/>
3388             <field name="original_shelf_expire_time" reporter:datatype="timestamp" />
3389             <field name="process_time" reporter:datatype="timestamp" />
3390         </fields>
3391         <links>
3392             <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
3393             <link field="emergency_closing" reltype="has_a" key="id" map="" class="aec"/>
3394         </links>
3395         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3396             <actions>
3397                 <retrieve/>
3398             </actions>
3399         </permacrud>
3400     </class>
3401     <class  id="aecs"
3402             controller="open-ils.cstore open-ils.pcrud"
3403             oils_obj:fieldmapper="action::emergency_closing_status"
3404             oils_persist:tablename="action.emergency_closing_status"
3405             reporter:label="Emergency Closing Status"
3406             oils_persist:readonly="true"
3407     >
3408         <fields oils_persist:primary="id">
3409             <field name="id" reporter:datatype="id" />
3410             <field name="creator" reporter:datatype="link" />
3411             <field name="create_time" reporter:datatype="timestamp" />
3412             <field name="process_start_time" reporter:datatype="timestamp" />
3413             <field name="process_end_time" reporter:datatype="timestamp" />
3414             <field name="last_update_time" reporter:datatype="timestamp" />
3415             <field name="circulations" reporter:datatype="int" />
3416             <field name="circulations_complete" reporter:datatype="int" />
3417             <field name="reservations" reporter:datatype="int" />
3418             <field name="reservations_complete" reporter:datatype="int" />
3419             <field name="holds" reporter:datatype="int" />
3420             <field name="holds_complete" reporter:datatype="int" />
3421         </fields>
3422         <links>
3423             <link field="id" reltype="has_a" key="id" map="" class="aec"/>
3424         </links>
3425         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3426             <actions>
3427                 <retrieve/>
3428             </actions>
3429         </permacrud>
3430     </class>
3431     <class id="aec" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::emergency_closing" oils_persist:tablename="action.emergency_closing" reporter:label="Emergency Closing">
3432         <fields oils_persist:primary="id" oils_persist:sequence="action.emergency_closing_id_seq">
3433             <field name="id" reporter:datatype="id" />
3434             <field name="creator" reporter:datatype="link" />
3435             <field name="create_time" reporter:datatype="timestamp" />
3436             <field name="process_start_time" reporter:datatype="timestamp" />
3437             <field name="process_end_time" reporter:datatype="timestamp" />
3438             <field name="last_update_time" reporter:datatype="timestamp" />
3439             <field name="closing" oils_persist:virtual="true" reporter:datatype="link"/>
3440             <field name="status" oils_persist:virtual="true" reporter:datatype="link"/>
3441             <field name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
3442             <field name="reservations" oils_persist:virtual="true" reporter:datatype="link"/>
3443             <field name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
3444         </fields>
3445         <links>
3446             <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3447             <link field="closing" reltype="might_have" key="emergency_closing" map="" class="aoucd"/>
3448             <link field="status" reltype="might_have" key="id" map="" class="aecs"/>
3449             <link field="circulations" reltype="has_many" key="emergency_closing" map="" class="aecc"/>
3450             <link field="reservations" reltype="has_many" key="emergency_closing" map="" class="aecr"/>
3451             <link field="holds" reltype="has_many" key="emergency_closing" map="" class="aech"/>
3452         </links>
3453         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3454             <actions>
3455                 <create permission="EMERGENCY_CLOSING">
3456                     <context link="closing" field="org_unit" />
3457                 </create>
3458                 <retrieve/>
3459                 <update permission="EMERGENCY_CLOSING">
3460                     <context link="closing" field="org_unit" />
3461                 </update>
3462                 <delete permission="EMERGENCY_CLOSING">
3463                     <context link="closing" field="org_unit" />
3464                 </delete>
3465             </actions>
3466         </permacrud>
3467     </class>
3468         <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">
3469                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_closed_id_seq">
3470                         <field name="close_end" reporter:datatype="timestamp" />
3471                         <field name="close_start" reporter:datatype="timestamp" />
3472                         <field name="id" reporter:datatype="id" />
3473                         <field name="org_unit" reporter:datatype="org_unit"/>
3474                         <field name="reason" reporter:datatype="text"/>
3475                         <field name="full_day" reporter:datatype="bool"/>
3476                         <field name="multi_day" reporter:datatype="bool"/>
3477                         <field name="emergency_closing" reporter:datatype="link"/>
3478                 </fields>
3479                 <links>
3480                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3481                         <link field="emergency_closing" reltype="has_a" key="id" map="" class="aec"/>
3482                 </links>
3483         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3484             <actions>
3485                 <create permission="CREATE_ORG_UNIT_CLOSING" context_field="org_unit"/>
3486                 <retrieve/>
3487                 <update permission="UPDATE_ORG_UNIT_CLOSING" context_field="org_unit"/>
3488                 <delete permission="DELETE_ORG_UNIT_CLOSING" context_field="org_unit"/>
3489             </actions>
3490         </permacrud>
3491         </class>
3492         <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">
3493                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_circ_duration_id_seq">
3494                         <field name="extended" reporter:datatype="interval"/>
3495                         <field name="id" reporter:datatype="id" reporter:selector="name"/>
3496                         <field name="max_renewals" reporter:datatype="int" />
3497                         <field name="name" reporter:datatype="text"/>
3498                         <field name="normal" reporter:datatype="interval"/>
3499                         <field name="shrt" reporter:datatype="interval"/>
3500                         <field name="max_auto_renewals" reporter:datatype="int" />
3501                 </fields>
3502                 <links>
3503                 </links>
3504         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3505             <actions>
3506                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
3507                 <retrieve/>
3508                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
3509                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
3510             </actions>
3511         </permacrud>
3512         </class>
3513
3514         <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">
3515                 <fields oils_persist:primary="id" oils_persist:sequence="config.hard_due_date_id_seq">
3516                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
3517                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
3518             <field reporter:label="Always Use?" name="forceto" reporter:datatype="bool"/>
3519                         <field reporter:label="Current Ceiling Date" name="ceiling_date" reporter:datatype="timestamp"/>
3520             <field reporter:label="Owner" name="owner" reporter:datatype="org_unit"/>
3521                 </fields>
3522                 <links>
3523             <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3524                 </links>
3525                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3526             <actions>
3527                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
3528                 <retrieve/>
3529                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
3530                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
3531             </actions>
3532                 </permacrud>
3533         </class>
3534
3535         <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">
3536                 <fields oils_persist:primary="id" oils_persist:sequence="config.hard_due_date_values_id_seq">
3537                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3538                         <field reporter:label="Hard Due Date" name="hard_due_date" reporter:datatype="link"/>
3539                         <field reporter:label="Ceiling Date" name="ceiling_date" reporter:datatype="timestamp"/>
3540             <field reporter:label="Active Date" name="active_date" reporter:datatype="timestamp"/>
3541                 </fields>
3542                 <links>
3543                         <link field="hard_due_date" reltype="has_a" key="id" map="" class="chdd"/>
3544                 </links>
3545                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3546             <actions>
3547                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
3548                 <retrieve/>
3549                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
3550                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
3551             </actions>
3552                 </permacrud>
3553         </class>
3554
3555         <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">
3556                 <fields oils_persist:primary="id" oils_persist:sequence="">
3557                         <field name="balance_owed" reporter:datatype="money"/>
3558                         <field name="id" reporter:datatype="id" />
3559                         <field name="last_billing_note" reporter:datatype="text"/>
3560                         <field name="last_billing_ts" reporter:datatype="timestamp"/>
3561                         <field name="last_billing_type" reporter:datatype="text"/>
3562                         <field name="last_payment_note" reporter:datatype="text"/>
3563                         <field name="last_payment_ts" reporter:datatype="timestamp"/>
3564                         <field name="last_payment_type" reporter:datatype="text"/>
3565                         <field name="total_owed" reporter:datatype="money"/>
3566                         <field name="total_paid" reporter:datatype="money"/>
3567                         <field name="usr" reporter:datatype="link"/>
3568                         <field name="xact_finish" reporter:datatype="timestamp" />
3569                         <field name="xact_start" reporter:datatype="timestamp" />
3570                         <field name="xact_type" reporter:datatype="text"/>
3571                         <field name="xact" oils_persist:virtual="true" reporter:datatype="link"/>
3572                         <field name="grocery" oils_persist:virtual="true" reporter:datatype="link"/>
3573                         <field name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
3574                         <field name="reservation" oils_persist:virtual="true" reporter:datatype="link"/>
3575                         <field name="billing_location" reporter:datatype="link"/>
3576                 </fields>
3577                 <links>
3578                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3579                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
3580                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
3581                         <link field="grocery" reltype="might_have" key="id" map="" class="mg"/>
3582                         <link field="reservation" reltype="might_have" key="id" map="" class="bresv"/>
3583                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
3584                 </links>
3585                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3586                         <actions>
3587                                 <retrieve permission="VIEW_USER_TRANSACTIONS">
3588                                         <context link="usr" field="home_ou" />
3589                                 </retrieve>
3590                         </actions>
3591                 </permacrud>
3592         </class>
3593         <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">
3594                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_id_seq">
3595                         <field reporter:label="All Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>
3596                         <field reporter:label="All Library Cards" name="cards" oils_persist:virtual="true" reporter:datatype="link"/>
3597                         <field reporter:label="All Circulations" name="checkouts" oils_persist:virtual="true" reporter:datatype="link"/>
3598                         <field reporter:label="All Hold Requests" name="hold_requests" oils_persist:virtual="true" reporter:datatype="link"/>
3599                         <field reporter:label="All Permissions" name="permissions" oils_persist:virtual="true" reporter:datatype="link"/>
3600                         <field reporter:label="All User Settings" name="settings" oils_persist:virtual="true" reporter:datatype="link"/>
3601                         <field reporter:label="Standing Penalties" name="standing_penalties" oils_persist:virtual="true" reporter:datatype="link"/>
3602                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3603                         <field reporter:label="Survey Responses" name="survey_responses" oils_persist:virtual="true" reporter:datatype="link"/>
3604                         <field reporter:label="Workstation Org Unit" name="ws_ou" oils_persist:virtual="true" reporter:datatype="link"/>
3605                         <field reporter:label="Workstation ID" name="wsid" oils_persist:virtual="true" reporter:datatype="link"/>
3606                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
3607                         <field reporter:label="Alert Message" name="alert_message"  reporter:datatype="text"/>
3608                         <field reporter:label="Barred" name="barred" reporter:datatype="bool"/>
3609                         <field reporter:label="Physical Address" name="billing_address" reporter:datatype="link"/>
3610                         <field reporter:label="Current Library Card" name="card" reporter:datatype="link"/>
3611                         <field reporter:label="Claims-returned Count" name="claims_returned_count" reporter:datatype="int" />
3612                         <field reporter:label="Claims Never Checked Out Count" name="claims_never_checked_out_count" reporter:datatype="int" />
3613                         <field reporter:label="Record Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
3614                         <field reporter:label="User Credit Balance" name="credit_forward_balance" reporter:datatype="money" />
3615                         <field reporter:label="Daytime Phone" name="day_phone"  reporter:datatype="text"/>
3616                         <field reporter:label="Date of Birth" name="dob" reporter:datatype="timestamp"/>
3617                         <field reporter:label="Email Address" name="email"  reporter:datatype="text"/>
3618                         <field reporter:label="Evening Phone" name="evening_phone"  reporter:datatype="text"/>
3619                         <field reporter:label="Privilege Expiration Date" name="expire_date" reporter:datatype="timestamp"/>
3620                         <field reporter:label="Last Name" name="family_name"  reporter:datatype="text"/>
3621                         <field reporter:label="First Name" name="first_given_name"  reporter:datatype="text"/>
3622                         <field reporter:label="Home Library" name="home_ou" reporter:datatype="org_unit"/>
3623                         <field reporter:label="User ID" name="id" reporter:datatype="id" />
3624                         <field reporter:label="Primary Identification Type" name="ident_type" reporter:datatype="link"/>
3625                         <field reporter:label="Secondary Identification Type" name="ident_type2" reporter:datatype="link"/>
3626                         <field reporter:label="Primary Identification" name="ident_value"  reporter:datatype="text"/>
3627                         <field reporter:label="Secondary Identification" name="ident_value2"  reporter:datatype="text"/>
3628                         <field reporter:label="Last Transaction ID" name="last_xact_id" reporter:datatype="text"/>
3629                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="link"/>
3630                         <field reporter:label="Is Group Lead Account" name="master_account" reporter:datatype="bool"/>
3631                         <field reporter:label="Internet Access Level" name="net_access_level" reporter:datatype="link"/>
3632                         <field reporter:label="Other Phone" name="other_phone"  reporter:datatype="text"/>
3633                         <field reporter:label="Password" name="passwd" suppress_controller="open-ils.pcrud open-ils.reporter-store" reporter:datatype="text"/>
3634                         <field reporter:label="Photo URL" name="photo_url"  reporter:datatype="text"/>
3635                         <field reporter:label="Prefix/Title" name="prefix"  reporter:datatype="text"/>
3636                         <field reporter:label="Main (Profile) Permission Group" name="profile" reporter:datatype="link"/>
3637                         <field reporter:label="Middle Name" name="second_given_name"  reporter:datatype="text"/>
3638                         <field reporter:label="Standing (unused)" name="standing" reporter:datatype="link"/>
3639                         <field reporter:label="Suffix" name="suffix"  reporter:datatype="text"/>
3640                         <field reporter:label="Is Super User" name="super_user" reporter:datatype="bool"/>
3641                         <field reporter:label="Family Linkage or other Group" name="usrgroup" reporter:datatype="int"/>
3642                         <field reporter:label="OPAC/Staff Client User Name" name="usrname"  reporter:datatype="text"/>
3643                         <field reporter:label="OPAC/Staff Client Holds Alias" name="alias"  reporter:datatype="text"/>
3644                         <field reporter:label="Juvenile" name="juvenile"  reporter:datatype="bool"/>
3645                         <field reporter:label="Record Last Update Time" name="last_update_time" reporter:datatype="timestamp"/>
3646                         <field reporter:label="Preferred Prefix" name="pref_prefix" reporter:datatype="text"/>
3647                         <field reporter:label="Preferred First Name" name="pref_first_given_name" reporter:datatype="text"/>
3648                         <field reporter:label="Preferred Middle Name" name="pref_second_given_name" reporter:datatype="text"/>
3649                         <field reporter:label="Preferred Last Name" name="pref_family_name"  reporter:datatype="text"/>
3650                         <field reporter:label="Preferred Suffix" name="pref_suffix" reporter:datatype="text"/>
3651                         <field reporter:label="Name Keywords" name="name_keywords" reporter:datatype="text"/>
3652                         <field reporter:label="Additional Permission Groups" name="groups" oils_persist:virtual="true" reporter:datatype="link"/>
3653                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
3654                         <field reporter:label="User Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
3655                         <field reporter:label="Demographic Info" name="demographic" oils_persist:virtual="true" reporter:datatype="link"/>
3656                         <field reporter:label="Billable Transactions" name="billable_transactions" oils_persist:virtual="true" reporter:datatype="link"/>
3657                         <field reporter:label="Money Summary" name="money_summary" oils_persist:virtual="true" reporter:datatype="link"/>
3658                         <field reporter:label="Open Billable Transactions" name="open_billable_transactions_summary" oils_persist:virtual="true" reporter:datatype="link"/>
3659                         <field reporter:label="Checkins" name="checkins" oils_persist:virtual="true" reporter:datatype="link"/>
3660                         <field reporter:label="Circulations Performed as Staff" name="performed_circulations" oils_persist:virtual="true" reporter:datatype="link"/>
3661                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
3662                         <field reporter:label="Reservations" name="reservations" oils_persist:virtual="true" reporter:datatype="link"/>
3663                         <field reporter:label="User Activity Entries" name="usr_activity" oils_persist:virtual="true" reporter:datatype="link"/>
3664                         <field reporter:label="User/Working Location Map" name="usr_work_ou_map" oils_persist:virtual="true" reporter:datatype="link"/>
3665                 </fields>
3666                 <links>
3667                         <link field="demographic" reltype="might_have" key="id" map="" class="rud"/>
3668                         <link field="net_access_level" reltype="has_a" key="id" map="" class="cnal"/>
3669                         <link field="profile" reltype="has_a" key="id" map="" class="pgt"/>
3670                         <link field="ident_type" reltype="has_a" key="id" map="" class="cit"/>
3671                         <link field="billing_address" reltype="has_a" key="id" map="" class="aua"/>
3672                         <link field="mailing_address" reltype="has_a" key="id" map="" class="aua"/>
3673                         <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
3674                         <link field="standing" reltype="has_a" key="id" map="" class="cst"/>
3675                         <link field="card" reltype="has_a" key="id" map="" class="ac"/>
3676                         <link field="ident_type2" reltype="has_a" key="id" map="" class="cit"/>
3677                         <link field="stat_cat_entries" reltype="has_many" key="target_usr" map="" class="actscecm"/>
3678                         <link field="groups" reltype="has_many" key="usr" map="grp" class="pugm"/>
3679                         <link field="usrgroup" reltype="has_many" key="usrgroup" map="" class="au"/>
3680                         <link field="checkouts" reltype="has_many" key="usr" map="" class="circ"/>
3681                         <link field="hold_requests" reltype="has_many" key="usr" map="" class="ahr"/>
3682                         <link field="permissions" reltype="has_many" key="usr" map="perm" class="pupm"/>
3683                         <link field="settings" reltype="has_many" key="usr" map="" class="aus"/>
3684                         <link field="billable_transactions" reltype="has_many" key="usr" map="" class="mbt"/>
3685                         <link field="open_billable_transactions_summary" reltype="has_many" key="usr" map="" class="mobts"/>
3686                         <link field="money_summary" reltype="might_have" key="usr" map="" class="mus"/>
3687                         <link field="standing_penalties" reltype="has_many" key="usr" map="" class="ausp"/>
3688                         <link field="addresses" reltype="has_many" key="usr" map="" class="aua"/>
3689                         <link field="survey_responses" reltype="has_many" key="usr" map="" class="asvr"/>
3690                         <link field="notes" reltype="has_many" key="usr" map="" class="aun"/>
3691                         <link field="checkins" reltype="has_many" key="checkin_staff" map="" class="circ"/>
3692                         <link field="cards" reltype="has_many" key="usr" map="" class="ac"/>
3693                         <link field="performed_circulations" reltype="has_many" key="circ_staff" map="" class="circ"/>
3694                         <link field="fund_alloc_pcts" reltype="has_many" key="allocator" map="" class="acqfap"/>
3695                         <link field="reservations" reltype="has_many" key="usr" map="" class="bresv"/>
3696                         <link field="usr_activity" reltype="has_many" key="usr" map="" class="auact"/>
3697                         <link field="usr_work_ou_map" reltype="has_many" key="usr" map="" class="puwoum"/>
3698                 </links>
3699                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3700                         <actions>
3701                                 <retrieve permission="VIEW_USER user_request.view" context_field="home_ou" />
3702                         </actions>
3703                 </permacrud>
3704         </class>
3705         <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">
3706                 <fields oils_persist:primary="id" oils_persist:sequence="config.usr_activity_type_id_seq">
3707                         <field name="id" reporter:label="ID" reporter:datatype="id" />
3708                         <field name="ewho" reporter:label="Event Caller" reporter:datatype="text"/>
3709                         <field name="ewhat" reporter:label="Event Type" reporter:datatype="text"/>
3710                         <field name="ehow" reporter:label="Event Mechanism" reporter:datatype="text"/>
3711                         <field name="label" reporter:label="Label" reporter:datatype="text"/>
3712                         <field name="egroup" reporter:label="Activity Group" reporter:datatype="text"/>
3713                         <field name="enabled" reporter:label="Enabled" reporter:datatype="bool"/>
3714                         <field name="transient" reporter:label="Transient" reporter:datatype="bool"/>
3715         </fields>
3716                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3717                         <actions>
3718                                 <create permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>
3719                                 <retrieve/>
3720                                 <update permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>
3721                                 <delete permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>
3722                         </actions>
3723                 </permacrud>
3724         </class>
3725         <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">
3726                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_activity_id_seq">
3727                         <field name="id" reporter:label="ID" reporter:datatype="id" />
3728                         <field name="usr" reporter:label="User" reporter:datatype="link" />
3729                         <field name="etype" reporter:label="Activity Type" reporter:datatype="link" />
3730                         <field name="event_time" reporter:label="Event Time" reporter:datatype="timestamp" />
3731         </fields>
3732         <links>
3733                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3734                         <link field="etype" reltype="has_a" key="id" map="" class="cuat"/>
3735                 </links>
3736                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3737                         <actions>
3738                                 <retrieve permission="RUN_REPORTS">
3739                                         <context link="usr" field="home_ou" />
3740                                 </retrieve>
3741                         </actions>
3742                 </permacrud>
3743         </class>
3744         <class id="atb" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::toolbar" oils_persist:tablename="actor.toolbar" reporter:label="Custom Toolbar">
3745                 <fields oils_persist:primary="id" oils_persist:sequence="actor.toolbar_id_seq">
3746                         <field name="id" reporter:label="ID" reporter:datatype="id" />
3747                         <field name="usr" reporter:label="Owning User" reporter:datatype="link" />
3748                         <field name="org" reporter:label="Owning Org Unit" reporter:datatype="link" />
3749                         <field name="ws" reporter:label="Owning Workstation" reporter:datatype="link" />
3750                         <field name="label" reporter:label="Label" reporter:datatype="text" oils_persist:i18n="true" />
3751                         <field name="layout" reporter:label="Layout" reporter:datatype="text" />
3752         </fields>
3753         <links>
3754                         <link field="usr" reltype="might_have" key="id" map="" class="au"/>
3755                         <link field="org" reltype="might_have" key="id" map="" class="aou"/>
3756                         <link field="ws" reltype="might_have" key="id" map="" class="aws"/>
3757                 </links>
3758                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3759                         <actions>
3760                                 <retrieve permission="ADMIN_TOOLBAR STAFF_LOGIN" context_field="org">
3761                                         <context link="usr" field="home_ou" />
3762                                         <context link="ws" field="owning_lib" />
3763                                 </retrieve>
3764                                 <create permission="ADMIN_TOOLBAR" context_field="org">
3765                                         <context link="usr" field="home_ou" />
3766                                         <context link="ws" field="owning_lib" />
3767                                 </create>
3768                                 <update permission="ADMIN_TOOLBAR" context_field="org">
3769                                         <context link="usr" field="home_ou" />
3770                                         <context link="ws" field="owning_lib" />
3771                                 </update>
3772                                 <delete permission="ADMIN_TOOLBAR" context_field="org">
3773                                         <context link="usr" field="home_ou" />
3774                                         <context link="ws" field="owning_lib" />
3775                                 </delete>
3776                         </actions>
3777                 </permacrud>
3778         </class>
3779         <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">
3780                 <fields oils_persist:primary="name">
3781                         <field name="name" reporter:datatype="text"/>
3782                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
3783                 </fields>
3784                 <links/>
3785                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3786                         <actions>
3787                                 <create permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
3788                                 <retrieve/>
3789                                 <update permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
3790                                 <delete permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
3791                         </actions>
3792                 </permacrud>
3793         </class>
3794         <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">
3795                 <fields oils_persist:primary="name">
3796                         <field name="name" reporter:label="Name" reporter:datatype="text"/>
3797                         <field name="label" reporter:label="Label" reporter:datatype="text" oils_persist:i18n="true"/>
3798                         <field name="description" reporter:label="Description" reporter:datatype="text" oils_persist:i18n="true"/>
3799                         <field name="datatype" reporter:label="Datatype" reporter:datatype="text"/>
3800                         <field name="fm_class" reporter:label="Fieldmapper Class" reporter:datatype="text"/>
3801                         <field name="grp" reporter:label="Settings Group" reporter:datatype="link"/>
3802                         <field name="opac_visible" reporter:label="OPAC/Patron Visible" reporter:datatype="bool"/>
3803                         <field name="reg_default" reporter:label="Registration Default" reporter:datatype="text"/>
3804                 </fields>
3805                 <links>
3806                         <link field="name" reltype="has_many" key="name" map="" class="aus"/>
3807                         <link field="grp" reltype="has_a" key="name" map="" class="csg"/>
3808                 </links>
3809                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3810                         <actions>
3811                                 <create permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
3812                                 <retrieve/>
3813                                 <update permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
3814                                 <delete permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
3815                         </actions>
3816                 </permacrud>
3817         </class>
3818         <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">
3819                 <fields oils_persist:primary="name">
3820                         <field name="name" reporter:datatype="text"/>
3821                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
3822                         <field name="description" reporter:datatype="text" oils_persist:i18n="true"/>
3823                         <field name="datatype" reporter:datatype="text"/>
3824                         <field name="view_perm" reporter:datatype="link"/>
3825                         <field name="update_perm" reporter:datatype="link"/>
3826                         <field name="fm_class" reporter:datatype="text"/>
3827                         <field name="grp" reporter:datatype="link"/>
3828                 </fields>
3829                 <links>
3830                         <link field="name" reltype="has_many" key="name" map="" class="aous"/>
3831                         <link field="view_perm" reltype="has_a" key="id" map="" class="ppl"/>
3832                         <link field="update_perm" reltype="has_a" key="id" map="" class="ppl"/>
3833                         <link field="grp" reltype="has_a" key="name" map="" class="csg"/>
3834                 </links>
3835                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3836                         <actions>
3837                                 <create permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
3838                                 <retrieve/>
3839                                 <update permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
3840                                 <delete permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
3841                         </actions>
3842                 </permacrud>
3843         </class>
3844         <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">
3845                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_setting_id_seq">
3846                         <field name="id" />
3847                         <field name="name"  reporter:datatype="text"/>
3848                         <field name="org_unit" reporter:datatype="org_unit"/>
3849                         <field name="value"  reporter:datatype="text"/>
3850                 </fields>
3851                 <links>
3852                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3853                         <link field="name" reltype="has_a" key="name" map="" class="coust"/>
3854                 </links>
3855         </class>
3856         <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">
3857                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_note_id_seq">
3858                         <field reporter:label="Note Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
3859                         <field reporter:label="Note Creator" name="creator" reporter:datatype="link"/>
3860                         <field reporter:label="Note ID" name="id" reporter:datatype="id" />
3861                         <field reporter:label="Copy" name="owning_copy" reporter:datatype="link"/>
3862                         <field reporter:label="Is OPAC Visible?" name="pub" reporter:datatype="bool"/>
3863                         <field reporter:label="Note Title" name="title"  reporter:datatype="text"/>
3864                         <field reporter:label="Note Content" name="value"  reporter:datatype="text"/>
3865                 </fields>
3866                 <links>
3867                         <link field="owning_copy" reltype="has_a" key="id" map="" class="acp"/>
3868                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3869                 </links>
3870         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3871             <actions>
3872                 <create permission="CREATE_COPY_NOTE">
3873                     <context link="owning_copy" field="circ_lib"/>
3874                 </create>
3875                 <retrieve permission="VIEW_COPY_NOTES">
3876                     <context link="owning_copy" field="circ_lib"/>
3877                 </retrieve>
3878                 <update permission="UPDATE_COPY_NOTE">
3879                     <context link="owning_copy" field="circ_lib"/>
3880                 </update>
3881                 <delete permission="DELETE_COPY_NOTE">
3882                     <context link="owning_copy" field="circ_lib"/>
3883                 </delete>
3884             </actions>
3885         </permacrud>
3886         </class>
3887         <class id="mfr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::full_rec" oils_persist:tablename="metabib.full_rec" reporter:label="Flattened MARC Fields">
3888                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.full_rec_id_seq">
3889                         <field reporter:label="Field ID" name="id" reporter:datatype="id" />
3890                         <field reporter:label="Indicator 1" name="ind1" oils_persist:primitive="string"  reporter:datatype="text"/>
3891                         <field reporter:label="Indicator 2" name="ind2" oils_persist:primitive="string"  reporter:datatype="text"/>
3892                         <field reporter:label="Bib Record Entry" name="record" reporter:datatype="link"/>
3893                         <field reporter:label="Subfield" name="subfield" oils_persist:primitive="string"  reporter:datatype="text"/>
3894                         <field reporter:label="Tag" name="tag"  reporter:datatype="text"/>
3895                         <field reporter:label="Normalized Value" name="value"  reporter:datatype="text"/>
3896                 </fields>
3897                 <links>
3898                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3899                 </links>
3900         </class>
3901         <class id="mmr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::metarecord" oils_persist:tablename="metabib.metarecord" reporter:label="Metarecord">
3902                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.metarecord_id_seq">
3903                         <field name="fingerprint"  reporter:datatype="text"/>
3904                         <field name="id" reporter:datatype="id" />
3905                         <field name="master_record" reporter:datatype="link"/>
3906                         <field name="mods"  reporter:datatype="text"/>
3907                         <field name="source_records" oils_persist:virtual="true" reporter:datatype="link"/>
3908                 </fields>
3909                 <links>
3910                         <link field="master_record" reltype="has_a" key="id" map="" class="bre"/>
3911                         <link field="source_records" reltype="has_many" key="metarecord" map="source" class="mmrsm"/>
3912                 </links>
3913         </class>
3914         <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">
3915                 <fields oils_persist:primary="id" oils_persist:sequence="config.net_access_level_id_seq">
3916                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
3917                         <field name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
3918                 </fields>
3919                 <links/>
3920         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3921             <actions>
3922                 <create permission="CREATE_NET_ACCESS_LEVEL" global_required="true"/>
3923                 <retrieve/>
3924                 <update permission="UPDATE_NET_ACCESS_LEVEL" global_required="true"/>
3925                 <delete permission="DELETE_NET_ACCESS_LEVEL" global_required="true"/>
3926             </actions>
3927         </permacrud>
3928         </class>
3929         <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">
3930                 <fields oils_persist:primary="id" oils_persist:sequence="permission.perm_list_id_seq">
3931                         <field name="code"  reporter:datatype="text"/>
3932                         <field name="description"  reporter:datatype="text" oils_persist:i18n="true"/>
3933                         <field name="id" reporter:selector="code" reporter:datatype="id"/>
3934                 </fields>
3935                 <links/>
3936         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3937             <actions>
3938                 <create permission="CREATE_PERM" global_required="true"/>
3939                 <retrieve permission="CREATE_PERM UPDATE_PERM DELETE_PERM" global_required="true"/>
3940                 <update permission="UPDATE_PERM" global_required="true"/>
3941                 <delete permission="DELETE_PERM" global_required="true"/>
3942             </actions>
3943         </permacrud>
3944         </class>
3945         <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">
3946                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.metarecord_source_map_id_seq">
3947                         <field name="id" reporter:datatype="id" />
3948                         <field name="metarecord" reporter:datatype="link"/>
3949                         <field name="source" reporter:datatype="link"/>
3950                 </fields>
3951                 <links>
3952                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3953                         <link field="metarecord" reltype="has_a" key="id" map="" class="mmr"/>
3954                 </links>
3955         </class>
3956         <class id="mde" controller="open-ils.cstore open-ils.pcrud" 
3957                         oils_obj:fieldmapper="metabib::display_entry" 
3958                         oils_persist:tablename="metabib.display_entry" 
3959                         oils_persist:field_safe="true"
3960                         reporter:label="Display Field Entry" oils_persist:readonly="true">
3961                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.display_entry_id_seq">
3962                         <field name="id" reporter:datatype="id" />
3963                         <field name="field" reporter:datatype="link"/>
3964                         <field name="source" reporter:datatype="link"/>
3965                         <field name="value"  reporter:datatype="text"/>
3966                         <field name="highlight" oils_persist:virtual="true"  reporter:datatype="text"/>
3967                 </fields>
3968                 <links>
3969                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3970                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3971                 </links>
3972                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3973                         <actions>
3974                                 <retrieve/>
3975                         </actions>
3976                 </permacrud>
3977         </class>
3978         <class id="mfde" controller="open-ils.cstore open-ils.pcrud" 
3979                 oils_persist:tablename="metabib.flat_display_entry"
3980                 oils_obj:fieldmapper="metabib::flat_display_entry" 
3981                 oils_persist:field_safe="true"
3982                 reporter:label="Flat Display Entry" 
3983                 oils_persist:readonly="true">
3984                 <fields>
3985                         <field name="source" reporter:datatype="id" />
3986                         <field name="name" reporter:datatype="text"/>
3987                         <field name="multi" reporter:datatype="bool"/>
3988                         <field name="label" reporter:datatype="text"/>
3989                         <field name="field" reporter:datatype="link"/>
3990                         <field name="value" reporter:datatype="text"/>
3991                 </fields>
3992                 <links>
3993                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3994                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3995                         <link field="name" reltype="has_a" key="name" map="" class="cdfm"/>
3996                 </links>
3997                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3998                         <actions>
3999                                 <retrieve/>
4000                         </actions>
4001                 </permacrud>
4002         </class>
4003         <class id="mcde" controller="open-ils.cstore open-ils.pcrud" 
4004                 oils_persist:tablename="metabib.compressed_display_entry"
4005                 oils_obj:fieldmapper="metabib::compressed_display_entry" 
4006                 oils_persist:field_safe="true"
4007                 reporter:label="Compressed Display Entry" 
4008                 oils_persist:readonly="true">
4009                 <fields>
4010                         <field name="source" reporter:datatype="id" />
4011                         <field name="name" reporter:datatype="text"/>
4012                         <field name="multi" reporter:datatype="bool"/>
4013                         <field name="label" reporter:datatype="text"/>
4014                         <field name="field" reporter:datatype="link"/>
4015                         <field name="value" reporter:datatype="text"/>
4016                 </fields>
4017                 <links>
4018                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
4019                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
4020                         <link field="name" reltype="has_a" key="name" map="" class="cdfm"/>
4021                 </links>
4022                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4023                         <actions>
4024                                 <retrieve/>
4025                         </actions>
4026                 </permacrud>
4027         </class>
4028         <class id="mwde" controller="open-ils.cstore open-ils.pcrud" 
4029                 oils_persist:tablename="metabib.wide_display_entry"
4030                 oils_obj:fieldmapper="metabib::wide_display_entry" 
4031                 oils_persist:field_safe="true"
4032                 reporter:label="Wide Display Entry" 
4033                 oils_persist:readonly="true">
4034                 <fields oils_persist:primary="source">
4035                         <field name="source" reporter:label="Record ID" reporter:datatype="id" />
4036                         <field name="title" reporter:label="Title" reporter:datatype="text"/>
4037                         <field name="author" reporter:label="Author" reporter:datatype="text"/>
4038                         <field name="creators" reporter:label="Creators" reporter:datatype="text"/>
4039                         <field name="isbn" reporter:label="ISBN" reporter:datatype="text"/>
4040                         <field name="issn" reporter:label="ISSN" reporter:datatype="text"/>
4041                         <field name="upc" reporter:label="UPC" reporter:datatype="text"/>
4042                         <field name="tcn" reporter:label="TCN" reporter:datatype="text"/>
4043                         <field name="edition" reporter:label="Edition" reporter:datatype="text"/>
4044                         <field name="physical_description" reporter:label="Physical Description" reporter:datatype="text"/>
4045                         <field name="publisher" reporter:label="Publisher" reporter:datatype="text"/>
4046                         <field name="series_title" reporter:label="Series Title" reporter:datatype="text"/>
4047                         <field name="subject_geographic" reporter:label="Geographic Subject" reporter:datatype="text"/>
4048                         <field name="subject_name" reporter:label="Name Subject" reporter:datatype="text"/>
4049                         <field name="subject_temporal" reporter:label="Temporal Subject" reporter:datatype="text"/>
4050                         <field name="subject_topic" reporter:label="Topic Subject" reporter:datatype="text"/>
4051                         <field name="abstract" reporter:label="Abstract" reporter:datatype="text"/>
4052                         <field name="toc" reporter:label="Table of Contents" reporter:datatype="text"/>
4053                         <field name="pubdate" reporter:label="Publication Date" reporter:datatype="text"/>
4054                         <field name="type_of_resource" reporter:label="Type of Resource" reporter:datatype="text"/>
4055                 </fields>
4056                 <links>
4057                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
4058                 </links>
4059                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4060                         <actions>
4061                                 <retrieve/>
4062                         </actions>
4063                 </permacrud>
4064         </class>
4065
4066         <class id="cdfm" controller="open-ils.cstore open-ils.pcrud" 
4067                 oils_persist:tablename="config.display_field_map"
4068                 oils_obj:fieldmapper="config::display_field_map"
4069                 oils_persist:field_safe="true"
4070                 reporter:label="Display Field Map">
4071                 <fields oils_persist:primary="name">
4072                         <field name="name" reporter:datatype="text"/>
4073                         <field name="field" reporter:datatype="link"/>
4074                         <field name="multi" reporter:datatype="bool"/>
4075                 </fields>
4076                 <links>
4077                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
4078                 </links>
4079                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4080                         <actions>
4081                                 <retrieve/>
4082                                 <create permission="CREATE_METABIB_FIELD" global_required="true"/>
4083                                 <update permission="UPDATE_METABIB_FIELD" global_required="true"/>
4084                                 <delete permission="DELETE_METABIB_FIELD" global_required="true"/>
4085                         </actions>
4086                 </permacrud>
4087         </class>
4088
4089         <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">
4090                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.facet_entry_id_seq">
4091                         <field name="id" reporter:datatype="id" />
4092                         <field name="field" reporter:datatype="link"/>
4093                         <field name="source" reporter:datatype="link"/>
4094                         <field name="value"  reporter:datatype="text"/>
4095                 </fields>
4096                 <links>
4097                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
4098                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
4099                 </links>
4100         </class>
4101         <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">
4102                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.browse_entry_id_seq">
4103                         <field name="id" reporter:datatype="id" />
4104                         <field name="value" reporter:datatype="text"/>
4105                         <field name="def_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4106                 </fields>
4107                 <links>
4108                         <link field="def_maps" reltype="has_many" key="entry" map="" class="mbedm"/>
4109                 </links>
4110         </class>
4111         <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">
4112                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.browse_entry_def_map_id_seq">
4113                         <field name="id" reporter:datatype="id" />
4114                         <field name="entry" reporter:datatype="link"/>
4115                         <field name="def" reporter:datatype="link"/>
4116                         <field name="source" reporter:datatype="link"/>
4117                 </fields>
4118                 <links>
4119                         <link field="entry" reltype="has_a" key="id" map="" class="mbe"/>
4120                         <link field="def" reltype="has_a" key="id" map="" class="cmf"/>
4121                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
4122                 </links>
4123         </class>
4124         <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">
4125                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.browse_entry_simple_heading_map_id_seq">
4126                         <field name="id" reporter:datatype="id" />
4127                         <field name="entry" reporter:datatype="link"/>
4128                         <field name="simple_heading" reporter:datatype="link"/>
4129                 </fields>
4130                 <links>
4131                         <link field="entry" reltype="has_a" key="id" map="" class="mbe"/>
4132                         <link field="simple_heading" reltype="has_a" key="id" map="" class="ash"/>
4133                 </links>
4134         </class>
4135         <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">
4136                 <oils_persist:source_definition><![CDATA[
4137                         SELECT * FROM metabib.author_field_entry
4138                                                 UNION ALL
4139                         SELECT * FROM metabib.keyword_field_entry
4140                                                 UNION ALL
4141                         SELECT * FROM metabib.identifier_field_entry
4142                                                 UNION ALL
4143                         SELECT * FROM metabib.title_field_entry
4144                                                 UNION ALL
4145                         SELECT * FROM metabib.subject_field_entry
4146                                                 UNION ALL
4147                         SELECT * FROM metabib.series_field_entry
4148                 ]]></oils_persist:source_definition>
4149                 <fields>
4150                         <field name="field" reporter:datatype="link"/>
4151                         <field name="id" reporter:datatype="id" />
4152                         <field name="source" reporter:datatype="link"/>
4153                         <field name="value"  reporter:datatype="text"/>
4154                 </fields>
4155                 <links>
4156                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
4157                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
4158                 </links>
4159         </class>
4160         <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">
4161                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.keyword_field_entry_id_seq">
4162                         <field name="field" reporter:datatype="link"/>
4163                         <field name="id" reporter:datatype="id" />
4164                         <field name="source" reporter:datatype="link"/>
4165                         <field name="value"  reporter:datatype="text"/>
4166                 </fields>
4167                 <links>
4168                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
4169                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
4170                 </links>
4171         </class>
4172         <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">
4173                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
4174                         <field name="accepting_usr" reporter:datatype="link"/>
4175                         <field name="amount" reporter:datatype="money" />
4176                         <field name="amount_collected" reporter:datatype="money" />
4177                         <field name="cash_drawer" reporter:datatype="link"/>
4178                         <field name="id" reporter:datatype="id" />
4179                         <field name="note"  reporter:datatype="text"/>
4180                         <field name="payment_ts" reporter:datatype="timestamp"/>
4181                         <field name="xact" reporter:datatype="link"/>
4182                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
4183                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
4184                 </fields>
4185                 <links>
4186                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
4187                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
4188                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
4189                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
4190                 </links>
4191         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4192             <actions>
4193                 <retrieve permission="VIEW_USER_TRANSACTIONS">
4194                     <context link="xact" jump="usr" field="home_ou"/>
4195                 </retrieve>
4196                         </actions>
4197                 </permacrud>
4198         </class>
4199         <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">
4200                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
4201                         <field name="accepting_usr" reporter:datatype="link"/>
4202                         <field name="amount" reporter:datatype="money" />
4203                         <field name="amount_collected" reporter:datatype="money" />
4204                         <field name="id" reporter:datatype="id" />
4205                         <field name="note"  reporter:datatype="text"/>
4206                         <field name="payment_ts" reporter:datatype="timestamp"/>
4207                         <field name="xact" reporter:datatype="link"/>
4208                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
4209                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
4210                 </fields>
4211                 <links>
4212                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
4213                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
4214                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
4215                 </links>
4216         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4217             <actions>
4218                 <retrieve permission="VIEW_USER_TRANSACTIONS">
4219                     <context link="xact" jump="usr" field="home_ou"/>
4220                 </retrieve>
4221                         </actions>
4222                 </permacrud>
4223         </class>
4224         <class id="maa" controller="open-ils.cstore" oils_obj:fieldmapper="money::account_adjustment" oils_persist:tablename="money.account_adjustment" reporter:label="Account Adjustment">
4225                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
4226                         <field name="accepting_usr" reporter:datatype="link"/>
4227                         <field name="amount" reporter:datatype="money" />
4228                         <field name="amount_collected" reporter:datatype="money" />
4229                         <field name="id" reporter:datatype="id" />
4230                         <field name="note"  reporter:datatype="text"/>
4231                         <field name="payment_ts" reporter:datatype="timestamp"/>
4232                         <field name="xact" reporter:datatype="link"/>
4233                         <field name="billing" reporter:datatype="link"/>
4234                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
4235                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
4236                 </fields>
4237                 <links>
4238                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
4239                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
4240                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
4241                         <link field="billing" reltype="might_have" key="id" class="mb"/>
4242                 </links>
4243         </class>
4244         <class id="mrd" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::record_descriptor" oils_persist:tablename="metabib.rec_descriptor" reporter:label="Basic Record Descriptor">
4245                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.rec_descriptor_id_seq">
4246                         <field reporter:label="Audn" name="audience" oils_persist:primitive="string"  reporter:datatype="text"/>
4247                         <field reporter:label="BLvl" name="bib_level" oils_persist:primitive="string"  reporter:datatype="text"/>
4248                         <field reporter:label="Cat Form" name="cat_form" oils_persist:primitive="string"  reporter:datatype="text"/>
4249                         <field reporter:label="Character Encoding" name="char_encoding" oils_persist:primitive="string"  reporter:datatype="text"/>
4250                         <field reporter:label="Ctrl" name="control_type" oils_persist:primitive="string"  reporter:datatype="text"/>
4251                         <field reporter:label="ELvl" name="enc_level" oils_persist:primitive="string"  reporter:datatype="text"/>
4252                         <field reporter:label="Descriptor ID" name="id" reporter:datatype="id" />
4253                         <field reporter:label="Form" name="item_form" oils_persist:primitive="string"  reporter:datatype="text"/>
4254                         <field reporter:label="Lang" name="item_lang" oils_persist:primitive="string"  reporter:datatype="text"/>
4255                         <field reporter:label="Type" name="item_type" oils_persist:primitive="string"  reporter:datatype="text"/>
4256                         <field reporter:label="LitF" name="lit_form" oils_persist:primitive="string"  reporter:datatype="text"/>
4257                         <field reporter:label="Pub Status" name="pub_status" oils_persist:primitive="string"  reporter:datatype="text"/>
4258                         <field reporter:label="Bib Record Entry" name="record" reporter:datatype="link"/>
4259                         <field reporter:label="TMat" name="type_mat" oils_persist:primitive="string"  reporter:datatype="text"/>
4260                         <field reporter:label="Video Recording Format" name="vr_format" oils_persist:primitive="string"  reporter:datatype="text"/>
4261                         <field reporter:label="Date1" name="date1" oils_persist:primitive="string"  reporter:datatype="text"/>
4262                         <field reporter:label="Date2" name="date2" oils_persist:primitive="string"  reporter:datatype="text"/>
4263                 </fields>
4264                 <links>
4265                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
4266                         <link field="item_lang" reltype="has_a" key="code" map="" class="clm"/>
4267                         <link field="item_type" reltype="has_a" key="code" map="" class="citm"/>
4268                         <link field="bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
4269                         <link field="item_form" reltype="has_a" key="code" map="" class="cifm"/>
4270                         <link field="audience" reltype="has_a" key="code" map="" class="cam"/>
4271                         <link field="lit_form" reltype="has_a" key="code" map="" class="clfm"/>
4272                 </links>
4273         </class>
4274
4275         <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">
4276                 <fields oils_persist:primary="id" oils_persist:sequence="config.standing_penalty_id_seq">
4277                         <field reporter:label="Penalty ID" name="id" reporter:selector="name" reporter:datatype="id"/>
4278                         <field reporter:label="Name" name="name"  reporter:datatype="text"/>
4279                         <field reporter:label="Label" name="label"  reporter:datatype="text" oils_persist:i18n="true"/>
4280                         <field reporter:label="Block List" name="block_list" reporter:datatype="text"/>
4281                         <field reporter:label="Staff Alert" name="staff_alert" reporter:datatype="bool"/>
4282                         <field reporter:label="Org Depth" name="org_depth" reporter:datatype="int"/>
4283                         <field reporter:label="Ignore Proximity" name="ignore_proximity" reporter:datatype="int"/>
4284                 </fields>
4285                 <links/>
4286         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4287             <actions>
4288                 <create permission="ADMIN_STANDING_PENALTY" global_required="true"/>
4289                 <retrieve permission="ADMIN_STANDING_PENALTY VIEW_STANDING_PENALTY" global_required="true"/>
4290                 <update permission="ADMIN_STANDING_PENALTY" global_required="true"/>
4291                 <delete permission="ADMIN_STANDING_PENALTY" global_required="true"/>
4292             </actions>
4293         </permacrud>
4294         </class>
4295         <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">
4296                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_penalty_threshold_id_seq">
4297                         <field name="id" reporter:selector="name" reporter:datatype="id" reporter:label="ID"/>
4298                         <field name="grp"  reporter:datatype="link" reporter:label="Group"/>
4299                         <field name="penalty"  reporter:datatype="link" reporter:label="Penalty"/>
4300                         <field name="threshold" reporter:datatype="float" reporter:label="Threshold"/>
4301                         <field name="org_unit" reporter:datatype="org_unit" reporter:label="Org Unit"/>
4302                 </fields>
4303                 <links>
4304                         <link field="penalty" reltype="has_a" key="id" map="" class="csp"/>
4305                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
4306                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
4307         </links>
4308         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4309             <actions>
4310                 <create permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
4311                 <retrieve permission="VIEW_GROUP_PENALTY_THRESHOLD ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
4312                 <update permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
4313                 <delete permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
4314             </actions>
4315         </permacrud>
4316         </class>
4317         <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">
4318                 <fields oils_persist:primary="id" oils_persist:sequence="config.copy_status_id_seq">
4319                         <field name="holdable" reporter:datatype="bool"/>
4320                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
4321                         <field name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
4322                         <field name="opac_visible" reporter:datatype="bool"/>
4323             <field name="copy_active" reporter:datatype="bool"/>
4324             <field name="restrict_copy_delete" reporter:datatype="bool"/>
4325             <field name="is_available" reporter:datatype="bool"/>
4326                 </fields>
4327                 <links/>
4328         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4329             <actions>
4330                 <create permission="CREATE_COPY_STATUS" global_required="true"/>
4331                 <retrieve/>
4332                 <update permission="UPDATE_COPY_STATUS" global_required="true"/>
4333                 <delete permission="DELETE_COPY_STATUS" global_required="true"/>
4334             </actions>
4335         </permacrud>
4336         </class>
4337         <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">
4338                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_standing_penalty_id_seq">
4339                         <field name="id" reporter:datatype="id" reporter:label="ID" />
4340                         <field name="set_date" reporter:datatype="timestamp" reporter:label="Set Date"/>
4341                         <field name="usr" reporter:datatype="link" reporter:label="User"/>
4342                         <field name="staff" reporter:datatype="link" reporter:label="Staff"/>
4343                         <field name="standing_penalty" reporter:datatype="link" reporter:label="Standing Penalty"/>
4344                         <field name="org_unit" reporter:datatype="link" reporter:label="Org Unit"/>
4345                         <field name="stop_date" reporter:datatype="timestamp" reporter:label="Stop Date"/>
4346                         <field name="note" reporter:datatype="text" reporter:label="Note"/>
4347                 </fields>
4348                 <links>
4349                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4350                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
4351                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
4352                         <link field="standing_penalty" reltype="has_a" key="id" map="" class="csp"/>
4353                 </links>
4354                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4355                         <actions>
4356                                 <create permission="UPDATE_USER"><context link="usr" field="home_ou"/></create>
4357                                 <retrieve permission="VIEW_USER"><context link="usr" field="home_ou"/></retrieve>
4358                                 <update permission="UPDATE_USER"><context link="usr" field="home_ou"/></update>
4359                                 <delete permission="UPDATE_USER"><context link="usr" field="home_ou"/></delete>
4360                         </actions>
4361                 </permacrud>
4362         </class>
4363         <class id="aua" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::user_address" oils_persist:tablename="actor.usr_address" reporter:label="User Address">
4364                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_address_id_seq">
4365                         <field reporter:label="Type" name="address_type"  reporter:datatype="text"/>
4366                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
4367                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
4368                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
4369                         <field reporter:label="Address ID" name="id" reporter:datatype="id" />
4370                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
4371                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
4372                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
4373                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
4374                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
4375                         <field reporter:label="Valid Address?" name="valid" reporter:datatype="bool"/>
4376                         <field reporter:label="Within City Limits?" name="within_city_limits" reporter:datatype="bool"/>
4377                         <field reporter:label="Replaces" name="replaces" reporter:datatype="link"/>
4378                         <field reporter:label="Pending" name="pending" reporter:datatype="bool"/>
4379                 </fields>
4380                 <links>
4381                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4382                         <link field="replaces" reltype="has_a" key="id" map="" class="aua"/>
4383                 </links>
4384                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4385                         <actions>
4386                                 <create permission="UPDATE_USER"><context link="usr" field="home_ou"/></create>
4387                                 <retrieve permission="VIEW_USER"><context link="usr" field="home_ou"/></retrieve>
4388                                 <update permission="UPDATE_USER"><context link="usr" field="home_ou"/></update>
4389                                 <delete permission="UPDATE_USER"><context link="usr" field="home_ou"/></delete>
4390                         </actions>
4391                 </permacrud>
4392         </class>
4393         <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">
4394                 <fields oils_persist:primary="id" oils_persist:sequence="actor.address_alert_id_seq">
4395                         <field reporter:label="Address Alert ID" name="id" reporter:datatype="id" />
4396                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" oils_obj:required="true"/>
4397                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
4398                         <field reporter:label="Match All Fields" name="match_all" reporter:datatype="bool" />
4399                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text" oils_obj:required="true"/>
4400                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
4401                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
4402                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
4403                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
4404                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
4405                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
4406                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
4407                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="bool"/>
4408                         <field reporter:label="Billing Address" name="billing_address" reporter:datatype="bool"/>
4409                 </fields>
4410                 <links>
4411                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4412                 </links>
4413                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4414                         <actions>
4415                                 <create   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
4416                                 <retrieve context_field='owner' permission="ADMIN_ADDRESS_ALERT VIEW_ADDRESS_ALERT CREATE_USER"/>
4417                                 <update   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
4418                                 <delete   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
4419                         </actions>
4420                 </permacrud>
4421         </class>
4422
4423
4424         <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">
4425                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_saved_search_id_seq">
4426                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4427                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
4428                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
4429                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4430                         <field reporter:label="Query Text" name="query_text" reporter:datatype="text"/>
4431                         <field reporter:label="Query Type" name="query_type" reporter:datatype="text"/>
4432                         <field reporter:label="Target" name="target" reporter:datatype="text"/>
4433                 </fields>
4434                 <links>
4435                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
4436                 </links>
4437         </class>
4438
4439         <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">
4440                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_note_id_seq">
4441                         <field name="call_number" />
4442                         <field name="create_date" reporter:datatype="timestamp"/>
4443                         <field name="creator" reporter:datatype="link"/>
4444                         <field name="id" reporter:datatype="id" />
4445                         <field name="pub" reporter:datatype="bool"/>
4446                         <field name="title"  reporter:datatype="text"/>
4447                         <field name="value"  reporter:datatype="text"/>
4448                 </fields>
4449                 <links>
4450                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
4451                 </links>
4452         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4453             <actions>
4454                 <create permission="CREATE_VOLUME_NOTE">
4455                     <context link="call_number" field="owning_lib"/>
4456                 </create>
4457                 <retrieve permission="VIEW_VOLUME_NOTES">
4458                     <context link="call_number" field="owning_lib"/>
4459                 </retrieve>
4460                 <update permission="UPDATE_VOLUME_NOTE">
4461                     <context link="call_number" field="owning_lib"/>
4462                 </update>
4463                 <delete permission="DELETE_VOLUME_NOTE">
4464                     <context link="call_number" field="owning_lib"/>
4465                 </delete>
4466             </actions>
4467         </permacrud>
4468         </class>
4469         <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">
4470                 <fields oils_persist:primary="id" oils_persist:sequence="authority.record_note_id_seq">
4471                         <field name="create_date" reporter:datatype="timestamp"/>
4472                         <field name="creator" reporter:datatype="link"/>
4473                         <field name="edit_date" reporter:datatype="timestamp"/>
4474                         <field name="editor" reporter:datatype="link"/>
4475                         <field name="id" reporter:datatype="id" />
4476                         <field name="record" reporter:datatype="link"/>
4477                         <field name="value" reporter:datatype="text"/>
4478                 </fields>
4479                 <links>
4480                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
4481                 </links>
4482         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4483             <actions>
4484                 <create permission="CREATE_AUTHORITY_RECORD_NOTE" global_required='true'/>
4485                 <retrieve/>
4486                 <update permission="UPDATE_AUTHORITY_RECORD_NOTE" global_required='true'/>
4487                 <delete permission="DELETE_AUTHORITY_RECORD_NOTE" global_required='true'/>
4488             </actions>
4489         </permacrud>
4490         </class>
4491         <class id="ocirccount" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circ_count" reporter:label="Open Circulation Count" oils_persist:readonly="true">
4492         <oils_persist:source_definition><![CDATA[
4493 SELECT  usr,
4494         SUM(
4495             CASE
4496                 WHEN (
4497                     ((fine_interval >= '1 day' AND due_date >= 'today') OR (fine_interval < '1 day'  AND due_date > 'now'))
4498                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
4499                 ) THEN 1
4500                 ELSE 0
4501             END
4502         ) AS out,
4503
4504         SUM(
4505             CASE
4506                 WHEN (
4507                     ((fine_interval >= '1 day' AND due_date < 'today') OR (fine_interval < '1 day'  AND due_date < 'now'))
4508                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
4509                 ) THEN 1
4510                 ELSE 0
4511             END
4512         ) AS overdue,
4513
4514         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LOST') THEN 1 ELSE 0 END) AS lost,
4515         SUM( CASE WHEN stop_fines = 'CLAIMSRETURNED' THEN 1 ELSE 0 END) AS claims_returned,
4516         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LONGOVERDUE') THEN 1 ELSE 0 END) AS long_overdue
4517   FROM  action.circulation
4518   WHERE checkin_time IS NULL
4519   GROUP BY 1
4520         ]]></oils_persist:source_definition>
4521         <fields oils_persist:primary="usr">
4522             <field reporter:label="User ID" name="usr" reporter:datatype="link"/>
4523             <field reporter:label="Out" name="out" reporter:datatype="text"/>
4524             <field reporter:label="Overdue" name="overdue" reporter:datatype="text"/>
4525             <field reporter:label="Lost" name="lost" reporter:datatype="text"/>
4526             <field reporter:label="Claims Returned" name="claims_returned" reporter:datatype="text"/>
4527             <field reporter:label="Long Overdue" name="long_overdue" reporter:datatype="text"/>
4528         </fields>
4529         <links>
4530             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4531         </links>
4532         </class>
4533         <class id="ocirclist" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circ_list" reporter:label="Open Circulation List" oils_persist:readonly="true">
4534         <oils_persist:source_definition><![CDATA[
4535 SELECT  usr,
4536         STRING_AGG(
4537             CASE
4538                 WHEN (
4539                     ((fine_interval >= '1 day' AND due_date >= 'today') OR (fine_interval < '1 day'  AND due_date > 'now'))
4540                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
4541                 ) THEN id::TEXT
4542                 ELSE '0'
4543             END
4544         ,',') AS out,
4545
4546         STRING_AGG(
4547             CASE
4548                 WHEN (
4549                     ((fine_interval >= '1 day' AND due_date < 'today') OR (fine_interval < '1 day'  AND due_date < 'now'))
4550                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
4551                 ) THEN id::TEXT
4552                 ELSE '0'
4553             END
4554         ,',') AS overdue,
4555
4556         STRING_AGG( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LOST') THEN id::TEXT ELSE '0' END,',') AS lost,
4557         STRING_AGG( CASE WHEN stop_fines = 'CLAIMSRETURNED' THEN id::TEXT ELSE '0' END,',') AS claims_returned,
4558         STRING_AGG( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LONGOVERDUE') THEN id::TEXT ELSE '0' END,',') AS long_overdue
4559   FROM  action.circulation
4560   WHERE checkin_time IS NULL
4561   GROUP BY 1
4562         ]]></oils_persist:source_definition>
4563         <fields oils_persist:primary="usr">
4564             <field reporter:label="User ID" name="usr" reporter:datatype="link"/>
4565             <field reporter:label="Out" name="out" reporter:datatype="text"/>
4566             <field reporter:label="Overdue" name="overdue" reporter:datatype="text"/>
4567             <field reporter:label="Lost" name="lost" reporter:datatype="text"/>
4568             <field reporter:label="Claims Returned" name="claims_returned" reporter:datatype="text"/>
4569             <field reporter:label="Long Overdue" name="long_overdue" reporter:datatype="text"/>
4570         </fields>
4571         <links>
4572             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4573         </links>
4574         </class>
4575         <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">
4576                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
4577                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
4578                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
4579                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
4580                         <field reporter:label="Checkout / Renewal Library" name="circ_lib"  reporter:datatype="org_unit"/>
4581                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
4582                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
4583                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
4584                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
4585                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
4586                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4587                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
4588                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
4589                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
4590                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
4591                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
4592                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
4593                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
4594                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
4595                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
4596                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
4597                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
4598                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
4599                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
4600                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
4601                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
4602                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
4603                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
4604                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
4605                         <field reporter:label="Checkin Scan Date/Time" name="checkin_scan_time" reporter:datatype="timestamp" />
4606                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
4607                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4608                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4609                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
4610                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
4611                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4612                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4613                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
4614                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
4615                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4616                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4617                         <field reporter:label="Auto Renewal" name="auto_renewal" reporter:datatype="bool"/>
4618                         <field reporter:label="Remaining Auto Renewals" name="auto_renewal_remaining" reporter:datatype="int" />
4619                 </fields>
4620                 <links>
4621                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
4622                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
4623                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
4624                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4625                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
4626                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4627                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4628                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
4629                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
4630                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
4631                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
4632                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
4633                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
4634                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4635                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4636                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
4637                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
4638                         <link field="parent_circ" reltype="has_a" key="id" map="" class="circ"/>
4639                         <link field="renewals" reltype="has_many" key="parent_circ" map="" class="circ"/>
4640                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
4641                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
4642                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
4643                 </links>
4644                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4645                         <actions>
4646                                 <retrieve permission="VIEW_CIRCULATIONS" context_field="circ_lib" />
4647                         </actions>
4648                 </permacrud>
4649         </class>
4650         <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">
4651                 <fields>
4652                         <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
4653                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
4654                         <field reporter:label="Circ ID" name="id" reporter:datatype="int" />
4655                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
4656                         <field reporter:label="Create Date/Time" name="create_time" reporter:datatype="timestamp" />
4657                         <field reporter:label="Circulation Type" name="circ_type" reporter:datatype="text"/>
4658                         <field reporter:label="Item Type" name="item_type" reporter:datatype="text"/>
4659                 </fields>
4660                 <links>
4661                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
4662                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4663                 </links>
4664                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4665                         <actions>
4666                                 <retrieve permission="VIEW_CIRCULATIONS" context_field="circ_lib" />
4667                         </actions>
4668                 </permacrud>
4669         </class>
4670         <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">
4671                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
4672                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
4673                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
4674                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
4675                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
4676                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
4677                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
4678                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
4679                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
4680                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
4681                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4682                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
4683                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
4684                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
4685                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
4686                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
4687                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
4688                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
4689                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
4690                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
4691                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
4692                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
4693                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
4694                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
4695                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
4696                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
4697                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
4698                         <field reporter:label="Checkin Scan Time" name="checkin_scan_time" reporter:datatype="timestamp"/>
4699                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
4700                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
4701                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4702                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4703                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
4704                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
4705                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
4706                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4707                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4708                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4709                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4710                         <field reporter:label="Linked Active Circulation" name="active_circ" oils_persist:virtual="true" reporter:datatype="link"/>
4711                         <field reporter:label="Linked Aged Circulation" name="aged_circ" oils_persist:virtual="true" reporter:datatype="link"/>
4712                 </fields>
4713                 <links>
4714                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
4715                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
4716                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
4717                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4718                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
4719                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4720                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
4721                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
4722                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
4723                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
4724                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
4725                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
4726                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4727                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4728                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
4729                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
4730                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
4731                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
4732                         <link field="active_circ" reltype="might_have" key="id" map="" class="circ"/>
4733                         <link field="aged_circ" reltype="might_have" key="id" map="" class="acirc"/>
4734                         <link field="parent_circ" reltype="might_have" key="id" map="" class="acirc"/>
4735                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4736                 </links>
4737                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4738                         <actions>
4739                                 <retrieve permission="VIEW_CIRCULATIONS" context_field="circ_lib" />
4740                         </actions>
4741                 </permacrud>
4742         </class>
4743
4744         <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">
4745                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
4746                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
4747                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
4748                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
4749                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
4750                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
4751                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
4752                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
4753                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
4754                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
4755                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4756                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
4757                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
4758                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
4759                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
4760                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
4761                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
4762                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
4763                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
4764                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
4765                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
4766                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
4767                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
4768                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
4769                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
4770                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
4771                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
4772                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
4773                         <field reporter:label="Checkin Scan Time" name="checkin_scan_time" reporter:datatype="timestamp"/>
4774                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
4775                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
4776                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4777                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4778                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
4779                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
4780                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
4781                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4782                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4783                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
4784                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
4785                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
4786                         <field reporter:label="Call Number" name="copy_call_number" reporter:datatype="link"/>
4787                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
4788                         <field reporter:label="Copy Owning Library" name="copy_owning_lib" reporter:datatype="link"/>
4789                         <field reporter:label="Copy Circulating Library" name="copy_circ_lib" reporter:datatype="link"/>
4790                         <field reporter:label="Bib Record" name="copy_bib_record" reporter:datatype="link"/>
4791                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4792                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4793                         <field reporter:label="Linked Active Circulation" name="active_circ" oils_persist:virtual="true" reporter:datatype="link"/>
4794                         <field reporter:label="Linked Aged Circulation" name="aged_circ" oils_persist:virtual="true" reporter:datatype="link"/>
4795                 </fields>
4796                 <links>
4797                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
4798                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
4799                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
4800                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4801                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
4802                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4803                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
4804                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
4805                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
4806                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
4807                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
4808                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
4809                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4810                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4811                         <link field="copy_call_number" reltype="has_a" key="id" map="" class="acn"/>
4812                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
4813                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4814                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4815                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
4816                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
4817                         <link field="copy_bib_record" reltype="has_a" key="id" map="" class="bre"/>
4818                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
4819                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
4820                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
4821                         <link field="usr_profile" reltype="has_a" key="id" map="" class="pgt"/>
4822                         <link field="active_circ" reltype="might_have" key="id" map="" class="circ"/>
4823                         <link field="aged_circ" reltype="might_have" key="id" map="" class="acirc"/>
4824                         <link field="parent_circ" reltype="might_have" key="id" map="" class="acirc"/>
4825                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4826                 </links>
4827                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4828                         <actions>
4829                                 <retrieve permission="VIEW_CIRCULATIONS" context_field="circ_lib" />
4830                         </actions>
4831                 </permacrud>
4832         </class>
4833         <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">
4834                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
4835                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
4836                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
4837                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
4838                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
4839                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
4840                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
4841                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
4842                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
4843                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
4844                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4845                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
4846                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
4847                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
4848                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
4849                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
4850                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
4851                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
4852                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
4853                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
4854                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
4855                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
4856                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
4857                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
4858                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
4859                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
4860                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
4861                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
4862                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
4863                         <field reporter:label="Checkin Scan Date/Time" name="checkin_scan_time" reporter:datatype="timestamp" />
4864                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
4865                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4866                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4867                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
4868                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
4869                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4870                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4871                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
4872                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
4873                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
4874                         <field reporter:label="Call Number" name="copy_call_number" reporter:datatype="link"/>
4875                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
4876                         <field reporter:label="Copy Owning Library" name="copy_owning_lib" reporter:datatype="link"/>
4877                         <field reporter:label="Copy Circulating Library" name="copy_circ_lib" reporter:datatype="link"/>
4878                         <field reporter:label="Bib Record" name="copy_bib_record" reporter:datatype="link"/>
4879                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4880                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4881                 </fields>
4882                 <links>
4883                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
4884                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
4885                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
4886                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4887                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
4888                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4889                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
4890                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
4891                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
4892                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
4893                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
4894                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
4895                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4896                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4897                         <link field="copy_call_number" reltype="has_a" key="id" map="" class="acn"/>
4898                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
4899                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4900                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4901                         <link field="copy_bib_record" reltype="has_a" key="id" map="" class="bre"/>
4902                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
4903                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
4904                         <link field="parent_circ" reltype="might_have" key="id" map="" class="circ"/>
4905                         <link field="renewals" reltype="has_many" key="parent_circ" map="" class="circ"/>
4906                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
4907                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
4908                 </links>
4909         </class>
4910         <class id="auch" 
4911                 controller="open-ils.cstore" 
4912                 oils_obj:fieldmapper="action::user_circ_history" 
4913                 oils_persist:tablename="action.usr_circ_history" 
4914                 reporter:label="User Checkout History">
4915                 <fields oils_persist:primary="id" oils_persist:sequence="action.usr_circ_history_id_seq">
4916                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4917                         <!-- prevent reporting on the user that owns the checkout history -->
4918                         <field reporter:label="User" name="usr" reporter:datatype="link" suppress_controller="open-ils.reporter-store"/>
4919                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
4920                         <field reporter:label="Checkin Time" name="checkin_time" reporter:datatype="timestamp" />
4921                         <field reporter:label="Due Date" name="due_date" reporter:datatype="timestamp" />
4922                         <field reporter:label="Checkout Time" name="xact_start" reporter:datatype="timestamp" />
4923                         <field reporter:label="Source Circulation" name="source_circ" reporter:datatype="link" />
4924                 </fields>
4925                 <links>
4926                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4927                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4928                         <link field="source_circ" reltype="has_a" key="id" map="" class="circ"/>
4929                 </links>
4930         </class>
4931         <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">
4932                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_type_id_seq">
4933                         <field reporter:label="Resource Type ID" name="id" reporter:datatype="id" reporter:selector="name"/>
4934                         <field reporter:label="Resource Type Name" name="name" reporter:datatype="text"/>
4935                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4936                         <field reporter:label="Fine Amount" name="fine_amount" reporter:datatype="money"/>
4937                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money"/>
4938                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
4939                         <field reporter:label="Catalog Item" name="catalog_item" reporter:datatype="bool"/>
4940                         <field reporter:label="Bibliographic Record" name="record" reporter:datatype="link"/>
4941                         <field reporter:label="Transferable" name="transferable" reporter:datatype="bool"/>
4942                         <field reporter:label="Inter-booking and Inter-circulation Interval" name="elbow_room" reporter:datatype="interval"/>
4943                         <field reporter:label="Resources" name="resources" oils_persist:virtual="true" reporter:datatype="link"/>
4944                         <field reporter:label="Resource Attributes" name="resource_attrs" oils_persist:virtual="true" reporter:datatype="link"/>
4945                         <field reporter:label="Target Resource Types" name="tgt_rsrc_types" oils_persist:virtual="true" reporter:datatype="link"/>
4946                 </fields>
4947                 <links>
4948                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4949                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
4950                         <link field="resources" reltype="has_many" key="type" map="" class="brsrc"/>
4951                         <link field="resource_attrs" reltype="has_many" key="type" map="" class="bra"/>
4952                         <link field="tgt_rsrc_types" reltype="has_many" key="type" map="" class="bresv"/>
4953                 </links>
4954                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4955                         <actions>
4956                                 <create permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
4957                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
4958                                 <update permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
4959                                 <delete permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
4960                         </actions>
4961                 </permacrud>
4962         </class>
4963
4964         <class id="brsrc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::resource" oils_persist:tablename="booking.resource" reporter:label="Resource">
4965                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_id_seq">
4966                         <field reporter:label="Resource ID" name="id" reporter:datatype="id" reporter:selector="barcode" />
4967                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
4968                         <field reporter:label="Resource Type" name="type" reporter:datatype="link"/>
4969                         <field reporter:label="Overbook" name="overbook" reporter:datatype="bool"/>
4970                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
4971                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
4972                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
4973                         <field reporter:label="User Fee" name="user_fee" reporter:datatype="money"/>
4974                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4975                         <field reporter:label="Reservation Target Resources" name="tgt_rsrcs" oils_persist:virtual="true" reporter:datatype="link"/>
4976                         <field reporter:label="Reservation Current Resources" name="curr_rsrcs" oils_persist:virtual="true" reporter:datatype="link"/>
4977                         <field reporter:label="Catalog Item" name="catalog_item" oils_persist:virtual="true" reporter:datatype="link"/>
4978                 </fields>
4979                 <links>
4980                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4981                         <link field="type" reltype="has_a" key="id" map="" class="brt"/>
4982                         <link field="attr_maps" reltype="has_many" key="resource" map="" class="bram"/>
4983                         <link field="tgt_rsrcs" reltype="has_many" key="targeted_resource" map="" class="bresv"/>
4984                         <link field="curr_rsrcs" reltype="has_many" key="current_resource" map="" class="bresv"/>
4985                 </links>
4986                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4987                         <actions>
4988                                 <create permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
4989                                 <retrieve permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
4990                                 <update permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
4991                                 <delete permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
4992                         </actions>
4993                 </permacrud>
4994         </class>
4995         
4996         <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">
4997                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_id_seq">
4998                         <field reporter:label="Resource Attribute ID" name="id" reporter:datatype="id" reporter:selector="name" />
4999                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
5000                         <field reporter:label="Resource Attribute Name" name="name" reporter:datatype="text"/>
5001                         <field reporter:label="Resource Type" name="resource_type" reporter:datatype="link"/>
5002                         <field reporter:label="Is Required" name="required" reporter:datatype="bool"/>
5003                         <field reporter:label="Valid Values" name="valid_values" oils_persist:virtual="true" reporter:datatype="link"/>
5004                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
5005                 </fields>
5006                 <links>
5007                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5008                         <link field="resource_type" reltype="has_a" key="id" map="" class="brt"/>
5009                         <link field="valid_values" reltype="has_many" key="attr" map="" class="brav"/>
5010                         <link field="attr_maps" reltype="has_many" key="attr" map="" class="bram"/>
5011                 </links>
5012                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5013                         <actions>
5014                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
5015                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
5016                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
5017                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
5018                         </actions>
5019                 </permacrud>
5020         </class>
5021         
5022         <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">
5023                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_value_id_seq">
5024                         <field reporter:label="Resource Attribute Value ID" name="id" reporter:datatype="id" reporter:selector="valid_value" />
5025                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
5026                         <field reporter:label="Resource Attribute" name="attr" reporter:datatype="link"/>
5027                         <field reporter:label="Valid Value" name="valid_value" reporter:datatype="text"/>
5028                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
5029                         <field reporter:label="Resource Attribute Value Maps" name="attr_val_maps" oils_persist:virtual="true" reporter:datatype="link"/>
5030                 </fields>
5031                 <links>
5032                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5033                         <link field="attr" reltype="has_a" key="id" map="" class="bra"/>
5034                         <link field="attr_maps" reltype="has_many" key="id" map="" class="bram"/>
5035                         <link field="attr_val_maps" reltype="has_many" key="attr_value" map="" class="bravm"/>
5036                 </links>
5037                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5038                         <actions>
5039                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
5040                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
5041                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
5042                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
5043                         </actions>
5044                 </permacrud>
5045         </class>
5046         
5047         <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">
5048                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_map_id_seq">
5049                         <field reporter:label="Resource Attribute Map ID" name="id" reporter:datatype="id"/>
5050                         <field reporter:label="Resource" name="resource" reporter:datatype="link"/>
5051                         <field reporter:label="Resource Attribute" name="resource_attr" reporter:datatype="link"/>
5052                         <field reporter:label="Attribute Value" name="value" reporter:datatype="link"/>
5053                 </fields>
5054                 <links>
5055                         <link field="resource" reltype="has_a" key="id" map="" class="brsrc"/>
5056                         <link field="resource_attr" reltype="has_a" key="id" map="" class="bra"/>
5057                         <link field="value" reltype="has_a" key="id" map="" class="brav"/>
5058                 </links>
5059                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5060                         <actions>
5061                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
5062                     <context link="resource" field="owner" />
5063                 </create>
5064                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
5065                     <context link="resource" field="owner" />
5066                 </retrieve>
5067                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
5068                     <context link="resource" field="owner" />
5069                 </update>
5070                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
5071                     <context link="resource" field="owner" />
5072                 </delete>
5073                         </actions>
5074                 </permacrud>
5075         </class>
5076         
5077         <class id="bresv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::reservation" oils_persist:tablename="booking.reservation" reporter:label="Reservation">
5078                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
5079                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
5080                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
5081                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
5082                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
5083                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
5084                         <field reporter:label="Billing Line Items" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
5085                         <field reporter:label="Payment Line Items" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
5086                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
5087                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
5088                         <field reporter:label="Payment Summary" name="summary" oils_persist:virtual="true" reporter:datatype="link"/>
5089                         <field reporter:label="Request Time" name="request_time" reporter:datatype="timestamp"/>
5090                         <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
5091                         <field reporter:label="End Time" name="end_time" reporter:datatype="timestamp"/>
5092                         <field reporter:label="Capture Time" name="capture_time" reporter:datatype="timestamp"/>
5093                         <field reporter:label="Cancel Time" name="cancel_time" reporter:datatype="timestamp"/>
5094                         <field reporter:label="Pickup Time" name="pickup_time" reporter:datatype="timestamp"/>
5095                         <field reporter:label="Return Time" name="return_time" reporter:datatype="timestamp"/>
5096                         <field reporter:label="Booking Interval" name="booking_interval" reporter:datatype="interval"/>
5097                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
5098                         <field reporter:label="Fine Amount" name="fine_amount" reporter:datatype="money"/>
5099                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money"/>
5100                         <field reporter:label="Target Resource Type" name="target_resource_type" reporter:datatype="link"/>
5101                         <field reporter:label="Target Resource" name="target_resource" reporter:datatype="link"/>
5102                         <field reporter:label="Current Resource" name="current_resource" reporter:datatype="link"/>
5103                         <field reporter:label="Request Library" name="request_lib" reporter:datatype="link"/>
5104                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link"/>
5105                         <field reporter:label="Capture Staff" name="capture_staff" reporter:datatype="link"/>
5106                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
5107                         <field reporter:label="Attribute Value Maps" name="attr_val_maps" oils_persist:virtual="true" reporter:datatype="link"/>
5108                 </fields>
5109                 <links>
5110                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5111                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
5112                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
5113                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
5114                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
5115                         <link field="summary" reltype="might_have" key="id" map="" class="mbts"/>
5116                         <link field="target_resource_type" reltype="has_a" key="id" map="" class="brt"/>
5117                         <link field="target_resource" reltype="has_a" key="id" map="" class="brsrc"/>
5118                         <link field="current_resource" reltype="has_a" key="id" map="" class="brsrc"/>
5119                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
5120                         <link field="pickup_lib" reltype="might_have" key="id" map="" class="aou"/>
5121                         <link field="capture_staff" reltype="might_have" key="id" map="" class="au"/>
5122                         <link field="attr_val_maps" reltype="has_many" key="reservation" map="" class="bravm"/>
5123                 </links>
5124                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5125                         <actions>
5126                                 <create permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
5127                                 <retrieve permission="STAFF_LOGIN" global_required='true'/>
5128                                 <update permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
5129                                 <delete permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
5130                         </actions>
5131                 </permacrud>
5132         </class>
5133         
5134         <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">
5135                 <fields oils_persist:primary="id" oils_persist:sequence="booking.reservation_attr_value_map_id_seq">
5136                         <field reporter:label="Reservation Attribute Value Map" name="id" reporter:datatype="id"/>
5137                         <field reporter:label="Reservation" name="reservation" reporter:datatype="link"/>
5138                         <field reporter:label="Attribute Map" name="attr_value" reporter:datatype="link"/>
5139                 </fields>
5140                 <links>
5141                         <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
5142                         <link field="attr_value" reltype="has_a" key="id" map="" class="brav"/>
5143                 </links>
5144                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5145                         <actions>
5146                                 <create permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
5147                                 <retrieve permission="STAFF_LOGIN" global_required='true'/>
5148                                 <update permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
5149                                 <delete permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
5150                         </actions>
5151                 </permacrud>
5152         </class>
5153
5154         <class id="ccnbi" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="container::call_number_bucket_item" oils_persist:tablename="container.call_number_bucket_item" reporter:label="Call Number Bucket Item">
5155                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_item_id_seq">
5156                         <field name="bucket" reporter:datatype="link"/>
5157                         <field name="id" reporter:datatype="id" />
5158                         <field name="target_call_number" reporter:datatype="link" />
5159                         <field name="create_time" reporter:datatype="timestamp" />
5160                         <field name="pos" reporter:datatype="int" />
5161                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
5162                 </fields>
5163                 <links>
5164                         <link field="target_call_number" reltype="has_a" key="id" map="" class="acn"/>
5165                         <link field="bucket" reltype="has_a" key="id" map="" class="ccnb"/>
5166             <link field="notes" reltype="has_many" map="" key="item" class="ccnbin"/>
5167                 </links>
5168                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5169                         <actions>
5170                                 <retrieve permission="ADMIN_CALLNUMBER_BUCKET">
5171                     <context link="bucket" owning_lib="owning_lib"/>
5172                 </retrieve>
5173             </actions>
5174         </permacrud>
5175         </class>
5176         <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">
5177                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_item_note_id_seq">
5178                         <field name="id" reporter:datatype="id" />
5179                         <field name="item" reporter:datatype="link"/>
5180                         <field name="note" reporter:datatype="text" />
5181                 </fields>
5182                 <links>
5183                         <link field="item" reltype="has_a" key="id" map="" class="ccnbi"/>
5184                 </links>
5185         </class>
5186         <class id="cbreb" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="container::biblio_record_entry_bucket" oils_persist:tablename="container.biblio_record_entry_bucket" reporter:label="Bibliographic Record Entry Bucket">
5187                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_id_seq">
5188                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
5189                         <field name="btype" reporter:datatype="text"/>
5190                         <field name="id" reporter:datatype="id" />
5191                         <field name="name" reporter:datatype="text"/>
5192                         <field name="description" reporter:datatype="text"/>
5193                         <field name="owner" reporter:datatype="link"/>
5194                         <field name="pub" reporter:datatype="bool"/>
5195                         <field name="create_time" reporter:datatype="timestamp" />
5196                         <field name="owning_lib" reporter:datatype="org_unit" />
5197                 </fields>
5198                 <links>
5199                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5200                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
5201                         <link field="items" reltype="has_many" key="bucket" map="" class="cbrebi"/>
5202                 </links>
5203                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5204                         <actions>
5205                                 <create permission="CREATE_BIB_BUCKET ADMIN_BIB_BUCKET" context="owning_lib" owning_user="owner"/>
5206                                 <retrieve permission="CREATE_BIB_BUCKET ADMIN_BIB_BUCKET" context="owning_lib" owning_user="owner"/>
5207                                 <update permission="CREATE_BIB_BUCKET ADMIN_BIB_BUCKET" context="owning_lib" owning_user="owner"/>
5208                                 <delete permission="CREATE_BIB_BUCKET ADMIN_BIB_BUCKET" context="owning_lib" owning_user="owner"/>
5209                         </actions>
5210                 </permacrud>
5211         </class>
5212         <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">
5213                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_note_id_seq">
5214                         <field name="id" reporter:datatype="id" />
5215                         <field name="bucket" reporter:datatype="link"/>
5216                         <field name="note" reporter:datatype="text" />
5217                 </fields>
5218                 <links>
5219                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
5220                 </links>
5221         </class>
5222         <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">
5223                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_copy_map_id_seq">
5224                         <field name="hold" reporter:datatype="link"/>
5225                         <field name="id" reporter:datatype="id" />
5226                         <field name="target_copy" reporter:datatype="link"/>
5227                         <field name="proximity" reporter:datatype="number"/>
5228                 </fields>
5229                 <links>
5230                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
5231                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
5232                 </links>
5233         </class>
5234         <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">
5235                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_notification_id_seq">
5236                         <field reporter:label="Hold" name="hold" reporter:datatype="link"/>
5237                         <field reporter:label="Notification ID" name="id" reporter:datatype="id" />
5238                         <field reporter:label="Notification Method" name="method"  reporter:datatype="text"/>
5239                         <field reporter:label="Notification Note" name="note"  reporter:datatype="text"/>
5240                         <field reporter:label="Notifying Staff" name="notify_staff" reporter:datatype="link"/>
5241                         <field reporter:label="Notification Date/Time" name="notify_time" reporter:datatype="timestamp"/>
5242                 </fields>
5243                 <links>
5244                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
5245                         <link field="notify_staff" reltype="has_a" key="id" map="" class="au"/>
5246                 </links>
5247         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5248             <actions>
5249                 <create permission="CREATE_HOLD_NOTIFICATION">
5250                                         <context link="hold" jump="usr" field="home_ou" />
5251                                 </create>
5252                 <retrieve permission="VIEW_HOLD_NOTIFICATION">
5253                                         <context link="hold" jump="usr" field="home_ou" />
5254                                 </retrieve>
5255                 <update permission="CREATE_HOLD_NOTIFICATION">
5256                                         <context link="hold" jump="usr" field="home_ou" />
5257                                 </update>
5258                 <delete permission="CREATE_HOLD_NOTIFICATION">
5259                                         <context link="hold" jump="usr" field="home_ou" />
5260                                 </delete>
5261             </actions>
5262         </permacrud>
5263         </class>
5264         <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">
5265                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_id_seq">
5266                         <field reporter:label="Can Circulate?" name="circulate"  reporter:datatype="bool"/>
5267                         <field reporter:label="Is Holdable?" name="holdable" reporter:datatype="bool"/>
5268                         <field reporter:label="Hold Capture Requires Verification" name="hold_verify" reporter:datatype="bool"/>
5269                         <field reporter:label="Location ID" name="id" reporter:selector="name" reporter:datatype="id"/>
5270                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
5271                         <field reporter:label="Is OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
5272                         <field reporter:label="Owning Org Unit" name="owning_lib"  reporter:datatype="org_unit"/>
5273                         <field reporter:label="Copy Location Orders" name="orders" oils_persist:virtual="true" reporter:datatype="link"/>
5274                         <field reporter:label="Copies" name="copies" oils_persist:virtual="true" reporter:datatype="link"/>
5275                         <field reporter:label="Label Prefix" name="label_prefix"  reporter:datatype="text" oils_persist:i18n="true"/>
5276                         <field reporter:label="Label Suffix" name="label_suffix"  reporter:datatype="text" oils_persist:i18n="true"/>
5277                         <field reporter:label="Checkin Alert" name="checkin_alert" reporter:datatype="bool" />
5278                         <field reporter:label="Is Deleted?" name="deleted" reporter:datatype="bool" />
5279                         <field reporter:label="URL" name="url" reporter:datatype="text" />
5280                 </fields>
5281                 <links>
5282                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5283                         <link field="distribution_formula_entries" reltype="has_many" key="location" map="" class="acqdfe"/>
5284                         <link field="orders" reltype="has_many" key="location" map="" class="acplo"/>
5285                         <link field="copies" reltype="has_many" key="location" map="" class="acp"/>
5286                 </links>
5287         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5288             <actions>
5289                 <create permission="CREATE_COPY_LOCATION" context_field="owning_lib"/>
5290                 <retrieve/>
5291                 <update permission="UPDATE_COPY_LOCATION" context_field="owning_lib"/>
5292                 <delete permission="DELETE_COPY_LOCATION" context_field="owning_lib"/>
5293             </actions>
5294         </permacrud>
5295         </class>
5296         <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">
5297                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_group_id_seq">
5298                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
5299                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
5300                         <field reporter:label="Is OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
5301                         <field reporter:label="Owning Org Unit" name="owner"  reporter:datatype="org_unit"/>
5302             <field reporter:label="Position" name="pos" reporter:datatype="int"/>
5303             <field reporter:label="Display Above Orgs" name="top" reporter:datatype="bool"/>
5304             <field reporter:label="Copy Location Mappings" name="location_maps" oils_persist:virtual="true" reporter:datatype="link"/>
5305                 </fields>
5306                 <links>
5307                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5308                         <link field="location_maps" reltype="has_many" key="lgroup" map="" class="acplgm"/>
5309                 </links>
5310         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5311             <actions>
5312                 <create permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
5313                 <retrieve/>
5314                 <update permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
5315                 <delete permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
5316             </actions>
5317         </permacrud>
5318         </class>
5319         <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">
5320                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_group_map_id_seq">
5321                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
5322             <field reporter:label="Group" name="lgroup" reporter:datatype="link"/>
5323             <field reporter:label="Copy Location" name="location" reporter:datatype="link"/>
5324                 </fields>
5325                 <links>
5326                         <link field="lgroup" reltype="has_a" key="id" map="" class="acplg"/>
5327                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
5328                 </links>
5329         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5330             <actions>
5331                 <create permission="ADMIN_COPY_LOCATION_GROUP">
5332                                         <context link="lgroup" field="owner" />
5333                 </create>
5334                 <retrieve/>
5335                 <update permission="ADMIN_COPY_LOCATION_GROUP">
5336                                         <context link="lgroup" field="owner" />
5337                 </update>
5338                 <delete permission="ADMIN_COPY_LOCATION_GROUP">
5339                                         <context link="lgroup" field="owner" />
5340                 </delete>
5341             </actions>
5342         </permacrud>
5343         </class>
5344
5345     <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">
5346         <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_order_id_seq">
5347             <field reporter:label="Location Order ID" name="id" reporter:datatype="id"/>
5348             <field reporter:label="Location ID" name="location" reporter:datatype="link"/>
5349             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit"/>
5350             <field reporter:label="Position" name="position" reporter:datatype="int"/>
5351         </fields>
5352         <links>
5353             <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
5354             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
5355         </links>
5356         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5357             <actions>
5358                                 <create permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
5359                 <retrieve/>
5360                                 <update permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
5361                                 <delete permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
5362             </actions>
5363         </permacrud>
5364     </class>
5365
5366         <class id="svr" controller="open-ils.cstore" oils_obj:fieldmapper="serial::virtual_record" oils_persist:virtual="true" reporter:label="Serial Virtual Record">
5367                 <fields>
5368                         <field name="sre_id" oils_persist:virtual="true" />
5369                         <field name="location" oils_persist:virtual="true" />
5370                         <field name="owning_lib" oils_persist:virtual="true" />
5371                         <field name="basic_holdings" oils_persist:virtual="true" />
5372                         <field name="basic_holdings_add" oils_persist:virtual="true" />
5373                         <field name="supplement_holdings" oils_persist:virtual="true" />
5374                         <field name="supplement_holdings_add" oils_persist:virtual="true" />
5375                         <field name="index_holdings" oils_persist:virtual="true" />
5376                         <field name="index_holdings_add" oils_persist:virtual="true" />
5377                         <field name="online" oils_persist:virtual="true" />
5378                         <field name="missing" oils_persist:virtual="true" />
5379                         <field name="incomplete" oils_persist:virtual="true" />
5380                 </fields>
5381         </class>
5382
5383         <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">
5384                 <fields oils_persist:primary="id" oils_persist:sequence="serial.record_entry_id_seq">
5385                         <field reporter:label="Is Active" name="active" reporter:datatype="bool"/>
5386                         <field reporter:label="Bib Record" name="record" reporter:datatype="link"/>
5387                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5388                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5389                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
5390                         <field reporter:label="Edit date" name="edit_date" reporter:datatype="timestamp"/>
5391                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
5392                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5393                         <field reporter:label="Last Transaction ID" name="last_xact_id" reporter:datatype="text"/>
5394                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
5395                         <field reporter:label="Source" name="source" reporter:datatype="int"/>
5396                         <field reporter:label="Owning Org Unit" name="owning_lib" reporter:datatype="org_unit"/>
5397                 </fields>
5398                 <links>
5399                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
5400                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5401                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5402                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5403                 </links>
5404                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5405                         <actions>
5406                                 <create permission="CREATE_MFHD_RECORD" context_field="owning_lib"/>
5407                                 <retrieve/>
5408                                 <update permission="UPDATE_MFHD_RECORD" context_field="owning_lib"/>
5409                                 <delete permission="DELETE_MFHD_RECORD" context_field="owning_lib"/>
5410                         </actions>
5411                 </permacrud>
5412         </class>
5413
5414         <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">
5415                 <fields oils_persist:primary="id" oils_persist:sequence="serial.caption_and_pattern_id_seq">
5416                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5417                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
5418                         <field reporter:label="Type" name="type" reporter:datatype="text"/>
5419                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5420                         <field reporter:label="Start Date" name="start_date" reporter:datatype="timestamp"/>
5421                         <field reporter:label="End Date" name="end_date" reporter:datatype="timestamp"/>
5422                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
5423                         <field reporter:label="Pattern Code" name="pattern_code" reporter:datatype="text"/>
5424                         <field reporter:label="Enum 1" name="enum_1" reporter:datatype="text"/>
5425                         <field reporter:label="Enum 2" name="enum_2" reporter:datatype="text"/>
5426                         <field reporter:label="Enum 3" name="enum_3" reporter:datatype="text"/>
5427                         <field reporter:label="Enum 4" name="enum_4" reporter:datatype="text"/>
5428                         <field reporter:label="Enum 5" name="enum_5" reporter:datatype="text"/>
5429                         <field reporter:label="Enum 6" name="enum_6" reporter:datatype="text"/>
5430                         <field reporter:label="Chron 1" name="chron_1" reporter:datatype="text"/>
5431                         <field reporter:label="Chron 2" name="chron_2" reporter:datatype="text"/>
5432                         <field reporter:label="Chron 3" name="chron_3" reporter:datatype="text"/>
5433                         <field reporter:label="Chron 4" name="chron_4" reporter:datatype="text"/>
5434                         <field reporter:label="Chron 5" name="chron_5" reporter:datatype="text"/>
5435                 </fields>
5436                 <links>
5437                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
5438                 </links>
5439                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5440                         <actions>
5441                                 <create permission="ADMIN_SERIAL_CAPTION_PATTERN">
5442                                         <context link="subscription" field="owning_lib" />
5443                                 </create>
5444                                 <retrieve />
5445                                 <update permission="ADMIN_SERIAL_CAPTION_PATTERN">
5446                                         <context link="subscription" field="owning_lib" />
5447                                 </update>
5448                                 <delete permission="ADMIN_SERIAL_CAPTION_PATTERN">
5449                                         <context link="subscription" field="owning_lib" />
5450                                 </delete>
5451                         </actions>
5452                 </permacrud>
5453         </class>
5454
5455         <class id="ssub" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::subscription" oils_persist:tablename="serial.subscription" reporter:label="Subscription">
5456                 <fields oils_persist:primary="id" oils_persist:sequence="serial.subscription_id_seq">
5457                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5458                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
5459                         <field reporter:label="Start Date" name="start_date" reporter:datatype="timestamp"/>
5460                         <field reporter:label="End Date" name="end_date" reporter:datatype="timestamp"/>
5461                         <field reporter:label="Bibliographic Record Entry" name="record_entry" reporter:datatype="link"/>
5462                         <field reporter:label="Expected Date Offset" name="expected_date_offset" reporter:datatype="interval"/>
5463                         <field reporter:label="Distributions" name="distributions" oils_persist:virtual="true" reporter:datatype="link"/>
5464                         <field reporter:label="Issuances" name="issuances" oils_persist:virtual="true" reporter:datatype="link"/>
5465                         <field reporter:label="Captions and Patterns" name="scaps" oils_persist:virtual="true" reporter:datatype="link"/>
5466                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
5467                 </fields>
5468                 <links>
5469                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5470                         <link field="record_entry" reltype="has_a" key="id" map="" class="bre"/>
5471                         <link field="distributions" reltype="has_many" key="subscription" map="" class="sdist"/>
5472                         <link field="issuances" reltype="has_many" key="subscription" map="" class="siss"/>
5473                         <link field="scaps" reltype="has_many" key="subscription" map="" class="scap"/>
5474                         <link field="notes" reltype="has_many" key="subscription" map="" class="ssubn"/>
5475                 </links>
5476                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5477                         <actions>
5478                                 <create permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
5479                                 <retrieve />
5480                                 <update permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
5481                                 <delete permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
5482                         </actions>
5483                 </permacrud>
5484         </class>
5485
5486         <class id="ssubn" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::subscription_note" oils_persist:tablename="serial.subscription_note" reporter:label="Subscription Note">
5487                 <fields oils_persist:primary="id" oils_persist:sequence="serial.subscription_note_id_seq">
5488                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5489                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
5490                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5491                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5492                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
5493                         <field reporter:label="Alert?" name="alert" reporter:datatype="bool"/>
5494                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
5495                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
5496                 </fields>
5497                 <links>
5498                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
5499                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5500                 </links>
5501                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5502                         <actions>
5503                                 <create permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib">
5504                     <context link="subscription" field="owning_lib"/>
5505                 </create>
5506                                 <retrieve />
5507                                 <update permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib">
5508                     <context link="subscription" field="owning_lib"/>
5509                 </update>
5510                                 <delete permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib">
5511                     <context link="subscription" field="owning_lib"/>
5512                 </delete>
5513                         </actions>
5514                 </permacrud>
5515         </class>
5516
5517         <class id="sdist" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::distribution" oils_persist:tablename="serial.distribution" reporter:label="Distribution">
5518                 <fields oils_persist:primary="id" oils_persist:sequence="serial.distribution_id_seq">
5519                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5520                         <field reporter:label="Legacy Record Entry" name="record_entry" reporter:datatype="link"/>
5521                         <field reporter:label="Summary Method" name="summary_method" reporter:datatype="text"/>
5522                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
5523                         <field reporter:label="Holding Lib" name="holding_lib" reporter:datatype="org_unit"/>
5524                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
5525                         <field reporter:label="Receive Call Number" name="receive_call_number" reporter:datatype="link"/>
5526                         <field reporter:label="Receive Unit Template" name="receive_unit_template" reporter:datatype="link"/>
5527                         <field reporter:label="Bind Call Number" name="bind_call_number" reporter:datatype="link"/>
5528                         <field reporter:label="Bind Unit Template" name="bind_unit_template" reporter:datatype="link"/>
5529                         <field reporter:label="Unit Label Prefix" name="unit_label_prefix" reporter:datatype="text"/>
5530                         <field reporter:label="Unit Label Suffix" name="unit_label_suffix" reporter:datatype="text"/>
5531                         <field reporter:label="Display Grouping" name="display_grouping" reporter:datatype="text"/>
5532                         <field reporter:label="Streams" name="streams" oils_persist:virtual="true" reporter:datatype="link"/>
5533                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
5534                         <field reporter:label="Basic Issue Summary" name="basic_summary" oils_persist:virtual="true" reporter:datatype="link"/>
5535                         <field reporter:label="Supplemental Issue Summary" name="supplement_summary" oils_persist:virtual="true" reporter:datatype="link"/>
5536                         <field reporter:label="Index Issue Summary" name="index_summary" oils_persist:virtual="true" reporter:datatype="link"/>
5537                 </fields>
5538                 <links>
5539                         <link field="record_entry" reltype="has_a" key="id" map="" class="sre"/>
5540                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
5541                         <link field="holding_lib" reltype="has_a" key="id" map="" class="aou"/>
5542                         <link field="receive_call_number" reltype="has_a" key="id" map="" class="acn"/>
5543                         <link field="receive_unit_template" reltype="has_a" key="id" map="" class="act"/>
5544                         <link field="bind_call_number" reltype="has_a" key="id" map="" class="acn"/>
5545                         <link field="bind_unit_template" reltype="has_a" key="id" map="" class="act"/>
5546                         <link field="streams" reltype="has_many" key="distribution" map="" class="sstr"/>
5547                         <link field="notes" reltype="has_many" key="distribution" map="" class="sdistn"/>
5548                         <link field="basic_summary" reltype="might_have" key="distribution" map="" class="sbsum"/>
5549                         <link field="supplement_summary" reltype="might_have" key="distribution" map="" class="sssum"/>
5550                         <link field="index_summary" reltype="might_have" key="distribution" map="" class="sisum"/>
5551                 </links>
5552                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5553                         <actions>
5554                                 <create permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
5555                                 <retrieve />
5556                                 <update permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
5557                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
5558                         </actions>
5559                 </permacrud>
5560         </class>
5561
5562         <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">
5563                 <fields oils_persist:primary="id" oils_persist:sequence="serial.distribution_note_id_seq">
5564                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5565                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
5566                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5567                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5568                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
5569                         <field reporter:label="Alert?" name="alert" reporter:datatype="bool"/>
5570                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
5571                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
5572                 </fields>
5573                 <links>
5574                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
5575                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5576                 </links>
5577                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5578                         <actions>
5579                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
5580                                         <context link="distribution" field="holding_lib" />
5581                                 </create>
5582                                 <retrieve permission="ADMIN_SERIAL_DISTRIBUTION">
5583                                         <context link="distribution" field="holding_lib" />
5584                                 </retrieve>
5585                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
5586                                         <context link="distribution" field="holding_lib" />
5587                                 </update>
5588                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
5589                                         <context link="distribution" field="holding_lib" />
5590                                 </delete>
5591                         </actions>
5592                 </permacrud>
5593         </class>
5594
5595         <class id="sstr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::stream" oils_persist:tablename="serial.stream" reporter:label="Stream">
5596                 <fields oils_persist:primary="id" oils_persist:sequence="serial.stream_id_seq">
5597                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5598                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
5599                         <field reporter:label="Routing Label" name="routing_label" reporter:datatype="text"/>
5600                         <field reporter:label="Items" name="items" oils_persist:virtual="true" reporter:datatype="link" />
5601                         <field reporter:label="Routing List Users" name="routing_list_users" oils_persist:virtual="true" reporter:datatype="link"/>
5602                 </fields>
5603                 <links>
5604                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
5605                         <link field="items" reltype="has_many" key="stream" map="" class="sitem"/>
5606                         <link field="routing_list_users" reltype="has_many" key="stream" map="" class="srlu"/>
5607                 </links>
5608                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5609                         <actions>
5610                                 <create permission="ADMIN_SERIAL_STREAM">
5611                                         <context link="distribution" field="holding_lib" />
5612                                 </create>
5613                                 <retrieve />
5614                                 <update permission="ADMIN_SERIAL_STREAM">
5615                                         <context link="distribution" field="holding_lib" />
5616                                 </update>
5617                                 <delete permission="ADMIN_SERIAL_STREAM">
5618                                         <context link="distribution" field="holding_lib" />
5619                                 </delete>
5620                         </actions>
5621                 </permacrud>
5622         </class>
5623
5624         <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">
5625                 <fields oils_persist:primary="id" oils_persist:sequence="serial.routing_list_user_id_seq">
5626                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5627                         <field reporter:label="Stream" name="stream" reporter:datatype="link"/>
5628                         <field reporter:label="Position" name="pos" reporter:datatype="int"/>
5629                         <field reporter:label="Reader" name="reader" reporter:datatype="link"/>
5630                         <field reporter:label="Department" name="department" reporter:datatype="text"/>
5631                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5632                 </fields>
5633                 <links>
5634                         <link field="stream" reltype="has_a" key="id" map="" class="sstr"/>
5635                         <link field="reader" reltype="has_a" key="id" map="" class="au"/>
5636                 </links>
5637                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5638                         <actions>
5639                                 <create permission="ADMIN_SERIAL_STREAM">
5640                                         <context link="stream" jump="distribution" field="holding_lib" />
5641                                 </create>
5642                                 <retrieve permission="RECEIVE_SERIAL">
5643                                         <context link="stream" jump="distribution" field="holding_lib" />
5644                                 </retrieve>
5645                                 <update permission="ADMIN_SERIAL_STREAM">
5646                                         <context link="stream" jump="distribution" field="holding_lib" />
5647                                 </update>
5648                                 <delete permission="ADMIN_SERIAL_STREAM">
5649                                         <context link="stream" jump="distribution" field="holding_lib" />
5650                                 </delete>
5651                         </actions>
5652                 </permacrud>
5653         </class>
5654
5655         <class id="siss" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::issuance" oils_persist:tablename="serial.issuance" reporter:label="Issuance">
5656                 <fields oils_persist:primary="id" oils_persist:sequence="serial.issuance_id_seq">
5657                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5658                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5659                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
5660                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5661                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
5662                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
5663                         <field reporter:label="Caption/Pattern" name="caption_and_pattern" reporter:datatype="link"/>
5664                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
5665                         <field reporter:label="Date Published" name="date_published" reporter:datatype="timestamp"/>
5666                         <field reporter:label="Holding Code" name="holding_code" reporter:datatype="text"/>
5667                         <field reporter:label="Holding Type" name="holding_type" reporter:datatype="text"/>
5668                         <field reporter:label="Holding Link ID" name="holding_link_id" reporter:datatype="int"/>
5669                         <field reporter:label="Items" name="items" oils_persist:virtual="true" reporter:datatype="link" />
5670                 </fields>
5671                 <links>
5672                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5673                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5674                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
5675                         <link field="caption_and_pattern" reltype="has_a" key="id" map="" class="scap"/>
5676                         <link field="items" reltype="has_many" key="issuance" map="" class="sitem"/>
5677                 </links>
5678                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5679                         <actions>
5680                                 <create permission="ADMIN_SERIAL_SUBSCRIPTION">
5681                                         <context link="subscription" field="owning_lib" />
5682                                 </create>
5683                                 <retrieve/>
5684                                 <update permission="ADMIN_SERIAL_SUBSCRIPTION">
5685                                         <context link="subscription" field="owning_lib" />
5686                                 </update>
5687                                 <delete permission="ADMIN_SERIAL_SUBSCRIPTION">
5688                                         <context link="subscription" field="owning_lib" />
5689                                 </delete>
5690                         </actions>
5691                 </permacrud>
5692         </class>
5693
5694         <class id="sunit" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::unit" oils_persist:tablename="serial.unit" reporter:label="Unit">
5695                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_id_seq">
5696                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5697                         <field reporter:label="Age Hold Protection" name="age_protect" reporter:datatype="link"/>
5698                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
5699                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
5700                         <field reporter:label="Call Number/Volume" name="call_number" reporter:datatype="link"/>
5701                         <field reporter:label="Circulation Type (MARC)" name="circ_as_type" reporter:datatype="text"/>
5702                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
5703                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
5704                         <field reporter:label="Can Circulate" name="circulate" reporter:datatype="bool"/>
5705                         <field reporter:label="Copy Number on Volume" name="copy_number" reporter:datatype="text"/>
5706                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
5707                         <field reporter:label="Active Date/Time" name="active_date" reporter:datatype="timestamp"/>
5708                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
5709                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
5710                         <field reporter:label="Dummy ISBN" name="dummy_isbn" reporter:datatype="text"/>
5711                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
5712                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money" />
5713                         <field reporter:label="Precat Dummy Author" name="dummy_author" reporter:datatype="text"/>
5714                         <field reporter:label="Precat Dummy Title" name="dummy_title" reporter:datatype="text"/>
5715                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
5716                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
5717                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
5718                         <field reporter:label="Is Holdable" name="holdable" reporter:datatype="bool" />
5719                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
5720                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link"/>
5721                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool" />
5722                         <field reporter:label="Price" name="price" reporter:datatype="money" />
5723                         <field reporter:label="Is Reference" name="ref" reporter:datatype="bool"/>
5724                         <field reporter:label="Copy Status" name="status" reporter:datatype="link"/>
5725                         <field reporter:label="Copy Status Changed Time" name="status_changed_time" reporter:datatype="timestamp"/>
5726                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool"/>
5727                         <field reporter:label="Floating Group" name="floating" reporter:datatype="link"/>
5728                         <field reporter:label="Cost" name="cost" reporter:datatype="money"/>
5729                         <field reporter:label="Sort Key" name="sort_key" reporter:datatype="text"/>
5730                         <field reporter:label="Summary Contents" name="summary_contents" reporter:datatype="text"/>
5731                         <field reporter:label="Detailed Contents" name="detailed_contents" reporter:datatype="text"/>
5732                         <field reporter:label="Copy Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
5733                         <field reporter:label="Stat-Cat entry maps" name="stat_cat_entry_copy_maps" oils_persist:virtual="true" reporter:datatype="link"/>
5734                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
5735                         <field reporter:label="Total Circulations" name="total_circ_count" oils_persist:virtual="true" reporter:datatype="link"/>
5736                         <field reporter:label="Holds" name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
5737                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
5738                 </fields>
5739                 <links>
5740                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
5741                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
5742                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
5743                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5744                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5745                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
5746                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5747                         <link field="holds" reltype="has_many" key="target_copy" map="hold" class="ahcm"/>
5748                         <link field="stat_cat_entry_copy_maps" reltype="has_many" key="owning_copy" map="" class="ascecm"/>
5749                         <link field="notes" reltype="has_many" key="owning_copy" map="" class="acpn"/>
5750                         <link field="stat_cat_entries" reltype="has_many" key="owning_copy" map="stat_cat_entry" class="ascecm"/>
5751                         <link field="circulations" reltype="has_many" key="target_copy" map="" class="circ"/>
5752                         <link field="total_circ_count" reltype="might_have" key="id" map="" class="erfcc"/>
5753                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
5754                         <link field="floating" reltype="has_a" key="id" map="" class="cfg"/>
5755                 </links>
5756                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5757                         <actions>
5758                                 <create permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
5759                                 <retrieve/>
5760                                 <update permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
5761                                 <delete permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
5762                         </actions>
5763                 </permacrud>
5764         </class>
5765
5766         <class id="sitem" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::item" oils_persist:tablename="serial.item" reporter:label="Item">
5767                 <fields oils_persist:primary="id" oils_persist:sequence="serial.item_id_seq">
5768                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5769                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5770                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
5771                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5772                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
5773                         <field reporter:label="Issuance" name="issuance" reporter:datatype="link"/>
5774                         <field reporter:label="Stream" name="stream" reporter:datatype="link"/>
5775                         <field reporter:label="Unit" name="unit" reporter:datatype="link"/>
5776                         <field reporter:label="URI" name="uri" reporter:datatype="link"/>
5777                         <field reporter:label="Date Expected" name="date_expected" reporter:datatype="timestamp"/>
5778                         <field reporter:label="Date Received" name="date_received" reporter:datatype="timestamp"/>
5779                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
5780                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
5781                         <field reporter:label="Shadowed?" name="shadowed" reporter:datatype="bool"/>
5782                 </fields>
5783                 <links>
5784                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5785                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5786                         <link field="issuance" reltype="has_a" key="id" map="" class="siss"/>
5787                         <link field="stream" reltype="has_a" key="id" map="" class="sstr"/>
5788                         <link field="unit" reltype="has_a" key="id" map="" class="sunit"/>
5789                         <link field="uri" reltype="has_a" key="id" map="" class="auri"/>
5790                         <link field="notes" reltype="has_many" key="item" map="" class="sin"/>
5791                 </links>
5792                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5793                         <actions>
5794                                 <create permission="ADMIN_SERIAL_ITEM">
5795                                         <context link="stream" jump="distribution" field="holding_lib" />
5796                                 </create>
5797                                 <retrieve permission="ADMIN_SERIAL_ITEM">
5798                                         <context link="stream" jump="distribution" field="holding_lib" />
5799                                 </retrieve>
5800                                 <update permission="ADMIN_SERIAL_ITEM">
5801                                         <context link="stream" jump="distribution" field="holding_lib" />
5802                                 </update>
5803                                 <delete permission="ADMIN_SERIAL_ITEM">
5804                                         <context link="stream" jump="distribution" field="holding_lib" />
5805                                 </delete>
5806                         </actions>
5807                 </permacrud>
5808         </class>
5809
5810         <class id="sin" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::item_note" oils_persist:tablename="serial.item_note" reporter:label="Item Note">
5811                 <fields oils_persist:primary="id" oils_persist:sequence="serial.item_note_id_seq">
5812                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5813                         <field reporter:label="Item" name="item" reporter:datatype="link"/>
5814                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5815                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5816                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
5817                         <field reporter:label="Alert?" name="alert" reporter:datatype="bool"/>
5818                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
5819                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
5820                 </fields>
5821                 <links>
5822                         <link field="item" reltype="has_a" key="id" map="" class="sitem"/>
5823                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5824                 </links>
5825                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5826                         <actions>
5827                                 <create permission="ADMIN_SERIAL_ITEM">
5828                                         <context link="item" jump="stream.distribution" field="holding_lib" />
5829                                 </create>
5830                                 <retrieve permission="ADMIN_SERIAL_ITEM">
5831                                         <context link="item" jump="stream.distribution" field="holding_lib" />
5832                                 </retrieve>
5833                                 <update permission="ADMIN_SERIAL_ITEM">
5834                                         <context link="item" jump="stream.distribution" field="holding_lib" />
5835                                 </update>
5836                                 <delete permission="ADMIN_SERIAL_ITEM">
5837                                         <context link="item" jump="stream.distribution" field="holding_lib" />
5838                                 </delete>
5839                         </actions>
5840                 </permacrud>
5841         </class>
5842         <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">
5843                 <fields>
5844                         <field name="summary_type" reporter:label="Summary Type" reporter:datatype="text" />
5845                         <field name="id" reporter:label="Native ID" reporter:datatype="int" /><!-- not datatype="id", because id is not unique in this view -->
5846                         <field name="distribution" reporter:label="Distribution" reporter:datatype="link" />
5847                         <field name="generated_coverage" reporter:label="Generated Coverage" reporter:datatype="text" />
5848                         <field name="show_generated" reporter:label="Show Generated?" reporter:datatype="bool" />
5849                 </fields>
5850                 <links>
5851                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
5852                 </links>
5853         </class>
5854         <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">
5855                 <fields oils_persist:primary="id" oils_persist:sequence="serial.materialized_holding_code_id_seq">
5856                         <field name="id" reporter:label="ID" reporter:datatype="id" />
5857                         <field name="issuance" reporter:label="Issuance" reporter:datatype="link" />
5858                         <field name="holding_type" reporter:label="Holding Type" reporter:datatype="text" />
5859                         <field name="ind1" reporter:label="First Indicator" reporter:datatype="text" />
5860                         <field name="ind2" reporter:label="Second Indicator" reporter:datatype="text" />
5861                         <field name="subfield" reporter:label="Subfield" reporter:datatype="text" />
5862                         <field name="value" reporter:label="Value" reporter:datatype="text" oils_obj:validate="^\w$" />
5863                 </fields>
5864                 <links>
5865                         <link field="issuance" reltype="has_a" key="id" map="" class="siss"/>
5866                 </links>
5867         </class>
5868         <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">
5869                 <fields oils_persist:primary="id" oils_persist:sequence="serial.basic_summary_id_seq">
5870                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5871                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
5872                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
5873                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
5874                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
5875                 </fields>
5876                 <links>
5877                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
5878                 </links>
5879                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5880                         <actions>
5881                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
5882                                         <context link="distribution" field="holding_lib" />
5883                                 </create>
5884                                 <retrieve/>
5885                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
5886                                         <context link="distribution" field="holding_lib" />
5887                                 </update>
5888                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
5889                                         <context link="distribution" field="holding_lib" />
5890                                 </delete>
5891                         </actions>
5892                 </permacrud>
5893         </class>
5894
5895         <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">
5896                 <fields oils_persist:primary="id" oils_persist:sequence="serial.supplement_summary_id_seq">
5897                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5898                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
5899                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
5900                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
5901                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
5902                 </fields>
5903                 <links>
5904                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
5905                 </links>
5906                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5907                         <actions>
5908                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
5909                                         <context link="distribution" field="holding_lib" />
5910                                 </create>
5911                                 <retrieve/>
5912                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
5913                                         <context link="distribution" field="holding_lib" />
5914                                 </update>
5915                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
5916                                         <context link="distribution" field="holding_lib" />
5917                                 </delete>
5918                         </actions>
5919                 </permacrud>
5920         </class>
5921
5922         <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">
5923                 <fields oils_persist:primary="id" oils_persist:sequence="serial.index_summary_id_seq">
5924                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5925                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
5926                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
5927                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
5928                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
5929                 </fields>
5930                 <links>
5931                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
5932                 </links>
5933                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5934                         <actions>
5935                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
5936                                         <context link="distribution" field="holding_lib" />
5937                                 </create>
5938                                 <retrieve/>
5939                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
5940                                         <context link="distribution" field="holding_lib" />
5941                                 </update>
5942                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
5943                                         <context link="distribution" field="holding_lib" />
5944                                 </delete>
5945                         </actions>
5946                 </permacrud>
5947         </class>
5948
5949         <class id="spt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::pattern_template" oils_persist:tablename="serial.pattern_template" reporter:label="Prediction Pattern Template">
5950                 <fields oils_persist:primary="id" oils_persist:sequence="serial.pattern_template_id_seq">
5951                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5952                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_obj:required="true"/>
5953                         <field reporter:label="Pattern Code" name="pattern_code" reporter:datatype="text" oils_obj:required="true"/>
5954                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" oils_obj:required="true"/>
5955                         <field reporter:label="Share Depth" name="share_depth"  reporter:datatype="int"/>
5956                 </fields>
5957                 <links>
5958                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5959                 </links>
5960                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5961                         <actions>
5962                                 <create permission="ADMIN_SERIAL_PATTERN_TEMPLATE" context_field="owning_lib"/>
5963                                 <retrieve/>
5964                                 <update permission="ADMIN_SERIAL_PATTERN_TEMPLATE" context_field="owning_lib"/>
5965                                 <delete permission="ADMIN_SERIAL_PATTERN_TEMPLATE" context_field="owning_lib"/>
5966                         </actions>
5967                 </permacrud>
5968         </class>
5969
5970         <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">
5971                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_entry_copy_map_id_seq">
5972                         <field name="id" reporter:datatype="id" />
5973                         <field name="owning_copy" reporter:datatype="link"/>
5974                         <field name="stat_cat" reporter:datatype="link"/>
5975                         <field name="stat_cat_entry" reporter:datatype="link"/>
5976                 </fields>
5977                 <links>
5978                         <link field="owning_copy" reltype="has_a" key="id" map="" class="acp"/>
5979                         <link field="stat_cat_entry" reltype="has_a" key="id" map="" class="asce"/>
5980                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
5981                 </links>
5982                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5983                         <actions>
5984                                 <retrieve/>
5985                         </actions>
5986                 </permacrud>
5987         </class>
5988         <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">
5989                 <fields oils_persist:primary="code">
5990                         <field reporter:label="Item Type Code" name="code" reporter:selector="value" reporter:datatype="text"/>
5991                         <field reporter:label="Item Type" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
5992                 </fields>
5993                 <links/>
5994         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5995             <actions>
5996                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
5997                 <retrieve/>
5998                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
5999                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
6000             </actions>
6001         </permacrud>
6002         </class>
6003         <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">
6004                 <fields oils_persist:primary="code">
6005                         <field reporter:label="Bib Level Code" name="code"  reporter:datatype="text"/>
6006                         <field reporter:label="Bib Level" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
6007                 </fields>
6008                 <links/>
6009         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6010             <actions>
6011                 <create permission="CREATE_MARC_CODE" global_required="true"/>
6012                 <retrieve/>
6013                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
6014                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
6015             </actions>
6016         </permacrud>
6017         </class>
6018         <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">
6019                 <fields oils_persist:primary="id" oils_persist:sequence="search.relevance_adjustment_id_seq">
6020                         <field reporter:label="ID" name="id"  reporter:datatype="id"/>
6021                         <field reporter:label="Active" name="active"  reporter:datatype="bool"/>
6022                         <field reporter:label="Index Field" name="field"  reporter:datatype="link"/>
6023                         <field reporter:label="Bump Type" name="bump_type"  reporter:datatype="text"/>
6024                         <field reporter:label="Multiplier" name="multiplier"  reporter:datatype="number"/>
6025                 </fields>
6026                 <links>
6027             <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
6028         </links>
6029         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6030             <actions>
6031                 <create permission="CREATE_RELEVANCE_ADJUSTMENT" global_required="true"/>
6032                 <retrieve permission="CREATE_RELEVANCE_ADJUSTMENT UPDATE_RELEVANCE_ADJUSTMENT DELETE_RELEVANCE_ADJUSTMENT" global_required="true"/>
6033                 <update permission="UPDATE_RELEVANCE_ADJUSTMENT" global_required="true"/>
6034                 <delete permission="DELETE_RELEVANCE_ADJUSTMENT" global_required="true"/>
6035             </actions>
6036         </permacrud>
6037         </class>
6038         <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">
6039                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_lasso_id_seq">
6040                         <field name="id" reporter:datatype="id" />
6041                         <field name="name" reporter:datatype="text"/>
6042                 </fields>
6043                 <links/>
6044         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6045             <actions>
6046                 <create permission="CREATE_LASSO" global_required="true"/>
6047                 <retrieve permission="CREATE_LASSO UPDATE_LASSO DELETE_LASSO" global_required="true"/>
6048                 <update permission="UPDATE_LASSO" global_required="true"/>
6049                 <delete permission="DELETE_LASSO" global_required="true"/>
6050             </actions>
6051         </permacrud>
6052         </class>
6053         <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">
6054                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_lasso_map_id_seq">
6055                         <field name="id" reporter:datatype="id" />
6056                         <field name="lasso" reporter:datatype="link"/>
6057                         <field name="org_unit" reporter:datatype="org_unit"/>
6058                 </fields>
6059                 <links>
6060                         <link field="lasso" reltype="has_a" key="id" map="" class="lasso"/>
6061                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
6062                 </links>
6063         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6064             <actions>
6065                 <create permission="CREATE_LASSO_MAP" global_required="true"/>
6066                 <retrieve permission="CREATE_LASSO_MAP UPDATE_LASSO_MAP DELETE_LASSO_MAP" global_required="true"/>
6067                 <update permission="UPDATE_LASSO_MAP" global_required="true"/>
6068                 <delete permission="DELETE_LASSO_MAP" global_required="true"/>
6069             </actions>
6070         </permacrud>
6071         </class>
6072         <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">
6073                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_adjustment_id_seq">
6074                         <field name="id" reporter:label="ID" reporter:datatype="id" />
6075                         <field name="item_circ_lib" reporter:label="Item Circ Lib" reporter:datatype="org_unit"/>
6076                         <field name="item_owning_lib" reporter:label="Item Owning Lib" reporter:datatype="org_unit"/>
6077                         <field name="hold_pickup_lib" reporter:label="Hold Pickup Lib" reporter:datatype="org_unit"/>
6078                         <field name="hold_request_lib" reporter:label="Hold Request Lib" reporter:datatype="org_unit"/>
6079                         <field name="copy_location" reporter:label="Copy Location" reporter:datatype="link"/>
6080                         <field name="circ_mod" reporter:label="Circ Modifier" reporter:datatype="link"/>
6081                         <field name="pos" reporter:label="Position" reporter:datatype="int" />
6082                         <field name="absolute_adjustment" reporter:label="Absolute adjustment?" reporter:datatype="bool" />
6083                         <field name="prox_adjustment" reporter:label="Proximity Adjustment" reporter:datatype="number" />
6084                 </fields>
6085                 <links>
6086                         <link field="item_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
6087                         <link field="item_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
6088                         <link field="hold_pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
6089                         <link field="hold_request_lib" reltype="has_a" key="id" map="" class="aou"/>
6090                         <link field="circ_mod" reltype="has_a" key="code" map="" class="ccm"/>
6091                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
6092                 </links>
6093         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6094             <actions>
6095                 <create permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
6096                 <retrieve permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
6097                 <update permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
6098                 <delete permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
6099             </actions>
6100         </permacrud>
6101         </class>
6102         <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">
6103                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_id_seq">
6104                         <field name="id" reporter:datatype="id" />
6105                         <field name="from_org" reporter:datatype="org_unit"/>
6106                         <field name="to_org" reporter:datatype="org_unit"/>
6107                         <field name="prox" reporter:datatype="int" />
6108                 </fields>
6109                 <links>
6110                         <link field="from_org" reltype="has_a" key="id" map="" class="aou"/>
6111                         <link field="to_org" reltype="has_a" key="id" map="" class="aou"/>
6112                 </links>
6113         </class>
6114         <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">
6115                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_id_seq">
6116                         <field reporter:label="ID" name="id" reporter:datatype="id" />
6117                         <field reporter:label="Relevance" name="rel" reporter:datatype="float"/>
6118                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
6119                         <field reporter:label="Total Results" name="total" reporter:datatype="int" />
6120                         <field reporter:label="Checked" name="checked" reporter:datatype="int"/>
6121                         <field reporter:label="Visible" name="visible" reporter:datatype="int"/>
6122                         <field reporter:label="Deleted" name="deleted" reporter:datatype="int"/>
6123                         <field reporter:label="Excluded" name="excluded" reporter:datatype="int"/>
6124                 </fields>
6125                 <links/>
6126         </class>
6127         <class id="asv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::survey" oils_persist:tablename="action.survey" reporter:label="Survey">
6128                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_id_seq">
6129                         <field reporter:label="Questions" name="questions" oils_persist:virtual="true" reporter:datatype="link"/>
6130                         <field reporter:label="Responses" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
6131                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
6132                         <field reporter:label="Survey End Date/Time" name="end_date" reporter:datatype="timestamp"/>
6133                         <field reporter:label="Survey ID" name="id" reporter:datatype="id"/>
6134                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
6135                         <field reporter:label="OPAC Survey?" name="opac" reporter:datatype="bool"/>
6136                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
6137                         <field reporter:label="Poll Style?" name="poll" reporter:datatype="bool"/>
6138                         <field reporter:label="Is Required?" name="required" reporter:datatype="bool"/>
6139                         <field reporter:label="Survey Start Date/Time" name="start_date" reporter:datatype="timestamp"/>
6140                         <field reporter:label="Display in User Summary" name="usr_summary" reporter:datatype="bool"/>
6141                 </fields>
6142                 <links>
6143                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6144                         <link field="responses" reltype="has_many" key="survey" map="" class="asvr"/>
6145                         <link field="questions" reltype="has_many" key="survey" map="" class="asvq"/>
6146                 </links>
6147         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6148             <actions>
6149                 <create permission="ADMIN_SURVEY" context_field="owner"/>
6150                 <retrieve/>
6151                 <update permission="ADMIN_SURVEY" context_field="owner"/>
6152                 <delete permission="ADMIN_SURVEY" context_field="owner"/>
6153             </actions>
6154         </permacrud>
6155         </class>
6156         <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">
6157                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_address_id_seq">
6158                         <field name="address_type"  reporter:datatype="text"/>
6159                         <field name="city"  reporter:datatype="text"/>
6160                         <field name="country"  reporter:datatype="text"/>
6161                         <field name="county"  reporter:datatype="text"/>
6162                         <field name="id" reporter:datatype="id" />
6163                         <field name="org_unit" reporter:datatype="org_unit"/>
6164                         <field name="post_code"  reporter:datatype="text"/>
6165                         <field name="state"  reporter:datatype="text"/>
6166                         <field name="street1"  reporter:datatype="text"/>
6167                         <field name="street2"  reporter:datatype="text"/>
6168                         <field name="valid" reporter:datatype="bool"/>
6169                         <field name="san" reporter:datatype="text" reporter:label="SAN"/>
6170                 </fields>
6171                 <links>
6172                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
6173                 </links>
6174         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6175             <actions>
6176                 <create permission="CREATE_ORG_ADDRESS" context_field="org_unit"/>
6177                 <retrieve/>
6178                 <update permission="UPDATE_ORG_ADDRESS" context_field="org_unit"/>
6179                 <delete permission="DELETE_ORG_ADDRESS" context_field="org_unit"/>
6180             </actions>
6181         </permacrud>
6182         </class>
6183         <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">
6184                 <fields oils_persist:primary="id" oils_persist:sequence="actor.search_query_id_seq">
6185                         <field name="id" reporter:datatype="id" reporter:selector="label"/>
6186                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
6187                         <field name="query_text" reporter:datatype="text"/>
6188                 </fields>
6189         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6190             <actions>
6191                 <retrieve/>
6192             </actions>
6193         </permacrud>
6194         </class>
6195
6196         <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">
6197                 <fields oils_persist:primary="id" oils_persist:sequence="actor.search_filter_group_id_seq">
6198                         <field name="id" reporter:datatype="id" reporter:selector="label"/>
6199                         <field name="owner" reporter:datatype="org_unit"/>
6200                         <field name="code" reporter:datatype="text"/>
6201                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
6202                         <field name="create_date" reporter:datatype="timestamp"/>
6203                         <field name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
6204                 </fields>
6205                 <links>
6206                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6207                         <link field="entries" reltype="has_many" key="grp" map="" class="asfge"/>
6208                 </links>
6209         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6210             <actions>
6211                 <create permission="ADMIN_SEARCH_FILTER_GROUP" context_field="owner"/>
6212                 <retrieve/>
6213                 <update permission="ADMIN_SEARCH_FILTER_GROUP" context_field="owner"/>
6214                 <delete permission="ADMIN_SEARCH_FILTER_GROUP" context_field="owner"/>
6215             </actions>
6216         </permacrud>
6217         </class>
6218         <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">
6219                 <fields oils_persist:primary="id" oils_persist:sequence="actor.search_filter_group_entry_id_seq">
6220                         <field name="id" reporter:datatype="id"/>
6221                         <field name="grp" reporter:datatype="link"/>
6222                         <field name="pos" reporter:datatype="int"/>
6223                         <field name="query" reporter:datatype="link"/>
6224                 </fields>
6225                 <links>
6226                         <link field="grp" reltype="has_a" key="id" map="" class="asfg"/>
6227                         <link field="query" reltype="has_a" key="id" map="" class="asq"/>
6228                 </links>
6229         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6230             <actions>
6231                 <create permission="ADMIN_SEARCH_FILTER_GROUP">
6232                     <context link="grp" field="owner"/>
6233                 </create>
6234                 <retrieve/>
6235                 <update permission="ADMIN_SEARCH_FILTER_GROUP">
6236                     <context link="grp" field="owner"/>
6237                 </update>
6238                 <delete permission="ADMIN_SEARCH_FILTER_GROUP">
6239                     <context link="grp" field="owner"/>
6240                 </delete>
6241             </actions>
6242         </permacrud>
6243         </class>
6244
6245         <!-- A note: Please update alhr and ahopl when updating ahr -->
6246         <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">
6247                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
6248                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
6249                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
6250                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
6251                         <field reporter:label="Currently Targeted Copy" name="current_copy" reporter:datatype="link"/>
6252                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
6253                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
6254                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
6255                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
6256                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
6257                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
6258                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
6259                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
6260                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
6261                         <field reporter:label="Notifications SMS Number" name="sms_notify" reporter:datatype="text"/>
6262                         <field reporter:label="Notifications SMS Carrier" name="sms_carrier" reporter:datatype="link"/>
6263                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
6264                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
6265                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
6266                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
6267                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
6268                         <field reporter:label="Item Selection Depth" name="selection_depth" />
6269                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
6270                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
6271                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
6272                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
6273                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
6274                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
6275                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
6276                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
6277                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
6278                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
6279                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
6280                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
6281                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
6282                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
6283                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
6284                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
6285                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
6286                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
6287                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
6288                         <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>
6289                         <field reporter:label="Acquisition Request" name="acq_request" reporter:datatype="link" />
6290                 </fields>
6291                 <links>
6292                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
6293                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
6294                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
6295                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
6296                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
6297                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
6298                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6299                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
6300                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
6301                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
6302                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
6303                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
6304                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
6305                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
6306                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
6307                         <link field="sms_carrier" reltype="has_a" key="id" map="" class="csc"/>
6308                         <link field="acq_request" reltype="has_a" key="id" map="" class="aur"/>
6309                 </links>
6310                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6311                         <actions>
6312                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
6313                         </actions>
6314                 </permacrud>
6315         </class>
6316         <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">
6317                 <oils_persist:source_definition><![CDATA[
6318                 SELECT
6319                         ahr.*,
6320                         COALESCE(acplo.position, acpl_ordered.fallback_position) AS
6321                                 copy_location_order_position,
6322                         CASE WHEN au.alias IS NOT NULL THEN
6323                                 au.alias
6324                         ELSE
6325                                 au.first_given_name
6326                         END AS usr_alias_or_first_given_name,
6327                         au.first_given_name AS usr_first_given_name,
6328                         au.second_given_name AS usr_second_given_name,
6329                         au.family_name AS usr_family_name,
6330                         au.prefix AS usr_prefix,
6331                         au.suffix AS usr_suffix,
6332                         au.alias AS usr_alias,
6333                         CASE WHEN au.alias IS NOT NULL THEN
6334                                 au.alias
6335                         ELSE
6336                                 REGEXP_REPLACE(ARRAY_TO_STRING(ARRAY[
6337                                         COALESCE(au.family_name, ''),
6338                                         COALESCE(au.suffix, ''),
6339                                         ', ',
6340                                         COALESCE(au.prefix, ''),
6341                                         COALESCE(au.first_given_name, ''),
6342                                         COALESCE(au.second_given_name, '')
6343                                 ], ' '), E'\\s+,', ',')
6344                         END AS usr_alias_or_display_name,
6345                         REGEXP_REPLACE(ARRAY_TO_STRING(ARRAY[
6346                                 COALESCE(au.family_name, ''),
6347                                 COALESCE(au.suffix, ''),
6348                                 ', ',
6349                                 COALESCE(au.prefix, ''),
6350                                 COALESCE(au.first_given_name, ''),
6351                                 COALESCE(au.second_given_name, '')
6352                         ], ' '), E'\\s+,', ',') AS usr_display_name,
6353                         TRIM(acnp.label || ' ' || acn.label || ' ' || acns.label)
6354                                 AS call_number_label,
6355                         siss.label AS issuance_label,
6356                         (ahr.usr <> ahr.requestor) AS is_staff_hold,
6357                         ahcm_1.copy_count AS potential_copies
6358                 FROM action.hold_request ahr
6359                 JOIN asset.copy acp ON (acp.id = ahr.current_copy)
6360                 JOIN asset.call_number acn ON (acp.call_number = acn.id)
6361                 JOIN asset.call_number_prefix acnp ON (acn.prefix = acnp.id)
6362                 JOIN asset.call_number_suffix acns ON (acn.suffix = acns.id)
6363                 JOIN actor.usr au ON (au.id = ahr.usr)
6364                 JOIN (
6365                         SELECT *, (ROW_NUMBER() OVER (ORDER BY name) + 1000000) AS fallback_position
6366                         FROM asset.copy_location
6367                 ) acpl_ordered ON (acpl_ordered.id = acp.location)
6368                 LEFT JOIN actor.usr_standing_penalty ausp 
6369                         ON (ahr.usr = ausp.usr AND (ausp.stop_date IS NULL OR ausp.stop_date > NOW()))
6370                 LEFT JOIN config.standing_penalty csp
6371                         ON (
6372                                 csp.id = ausp.standing_penalty AND 
6373                                 csp.block_list LIKE '%CAPTURE%' AND (
6374                                         (csp.org_depth IS NULL AND ahr.pickup_lib = ausp.org_unit) OR
6375                                         (csp.org_depth IS NOT NULL AND ahr.pickup_lib IN (
6376                                                 SELECT id FROM actor.org_unit_descendants(ausp.org_unit, csp.org_depth))
6377                                         )
6378                                 )
6379                         )
6380                 JOIN (
6381                         SELECT COUNT(target_copy) AS copy_count, hold
6382                         FROM action.hold_copy_map
6383                         GROUP BY 2
6384                 ) ahcm_1 ON (ahcm_1.hold = ahr.id)
6385                 LEFT JOIN serial.issuance siss
6386                         ON (ahr.hold_type = 'I' AND siss.id = ahr.target)
6387                 LEFT JOIN asset.copy_location_order acplo
6388                         ON (acp.location = acplo.location AND
6389                                 acp.circ_lib = acplo.org)
6390                 WHERE
6391                         ahr.capture_time IS NULL AND
6392                         ahr.cancel_time IS NULL AND
6393                         csp.id IS NULL AND
6394                         (ahr.expire_time is NULL OR ahr.expire_time > NOW()) AND
6395                         acp.status IN (0,7)
6396                 ]]></oils_persist:source_definition>
6397                 <fields oils_persist:primary="id">
6398                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
6399                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
6400                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
6401                         <field reporter:label="Currently Targeted Copy" name="current_copy" reporter:datatype="link"/>
6402                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
6403                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
6404                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
6405                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
6406                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
6407                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
6408                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
6409                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
6410                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
6411                         <field reporter:label="Notifications SMS Number" name="sms_notify" reporter:datatype="text"/>
6412                         <field reporter:label="Notifications SMS Carrier" name="sms_carrier" reporter:datatype="link"/>
6413                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
6414                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
6415                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
6416                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
6417                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
6418                         <field reporter:label="Item Selection Depth" name="selection_depth" />
6419                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
6420                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
6421                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
6422                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
6423                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
6424                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
6425                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
6426                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
6427                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
6428                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
6429                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
6430                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
6431                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
6432                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
6433                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
6434                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
6435                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
6436                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
6437                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
6438                         <field reporter:label="Acquisition Request" name="acq_request" reporter:datatype="link" />
6439                         <field reporter:label="Copy Location Sort Order" name="copy_location_order_position" reporter:datatype="int" />
6440                         <field reporter:label="User First Given Name" name="usr_first_given_name" reporter:datatype="text" />
6441                         <field reporter:label="User Second Given Name" name="usr_second_given_name" reporter:datatype="text" />
6442                         <field reporter:label="User Family Name" name="usr_family_name" reporter:datatype="text" />
6443                         <field reporter:label="User Prefix" name="usr_prefix" reporter:datatype="text" />
6444                         <field reporter:label="User Suffix" name="usr_suffix" reporter:datatype="text" />
6445                         <field reporter:label="User Alias or First Given Name" name="usr_alias_or_first_given_name" reporter:datatype="text" />
6446                         <field reporter:label="User Display Name" name="usr_display_name" reporter:datatype="text" />
6447                         <field reporter:label="User Alias or Display Name" name="usr_alias_or_display_name" reporter:datatype="text" />
6448                         <field reporter:label="User Alias" name="usr_alias" reporter:datatype="text" />
6449                         <field reporter:label="Call Number Label" name="call_number_label" reporter:datatype="text" />
6450                         <field reporter:label="Issuance Label" name="issuance_label" reporter:datatype="text" />
6451                         <field reporter:label="Is Staff Hold?" name="is_staff_hold" reporter:datatype="bool" />
6452                         <field reporter:label="Potential Copies" name="potential_copies" reporter:datatype="int" />
6453                         <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>
6454                 </fields>
6455                 <links>
6456                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
6457                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
6458                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
6459                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
6460                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
6461                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
6462                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6463                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
6464                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
6465                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
6466                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
6467                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
6468                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
6469                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
6470                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
6471                         <link field="sms_carrier" reltype="has_a" key="id" map="" class="csc"/>
6472                         <link field="acq_request" reltype="has_a" key="id" map="" class="aur"/>
6473                 </links>
6474                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6475                         <actions>
6476                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
6477                         </actions>
6478                 </permacrud>
6479         </class>
6480         <class id="alhr" controller="open-ils.cstore" oils_obj:fieldmapper="action::last_hold_request" reporter:label="Last Captured Hold Request" oils_persist:readonly="true">
6481                 <oils_persist:source_definition><![CDATA[
6482                         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)
6483                 ]]></oils_persist:source_definition>
6484                 <fields oils_persist:primary="id">
6485                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
6486                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
6487                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
6488                         <field reporter:label="Currently Targeted Copy" name="current_copy" reporter:datatype="link"/>
6489                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
6490                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
6491                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
6492                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
6493                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
6494                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
6495                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
6496                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
6497                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
6498                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
6499                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
6500                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
6501                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
6502                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
6503                         <field reporter:label="Item Selection Depth" name="selection_depth" />
6504                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
6505                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
6506                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
6507                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
6508                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
6509                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
6510                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
6511                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
6512                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
6513                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
6514                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
6515                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
6516                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
6517                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
6518                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
6519                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
6520                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
6521                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
6522                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
6523                         <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>
6524                         <field reporter:label="Acquisition Request" name="acq_request" reporter:datatype="link" />
6525                 </fields>
6526                 <links>
6527                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
6528                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
6529                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
6530                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
6531                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
6532                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
6533                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6534                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
6535                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
6536                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
6537                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
6538                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
6539                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
6540                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
6541                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
6542                         <link field="acq_request" reltype="has_a" key="id" map="" class="aur"/>
6543                 </links>
6544         </class>
6545
6546         <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">
6547                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_note_id_seq">
6548                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6549                         <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
6550                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
6551                         <field reporter:label="Body" name="body" reporter:datatype="text"/>
6552                         <field reporter:label="Slip?" name="slip" reporter:datatype="bool"/>
6553                         <field reporter:label="Pub?" name="pub" reporter:datatype="bool"/>
6554                         <field reporter:label="Staff?" name="staff" reporter:datatype="bool"/>
6555                 </fields>
6556                 <links>
6557                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
6558                 </links>
6559                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6560                         <actions>
6561                                 <create permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></create>
6562                                 <retrieve permission="VIEW_USER"><context link="hold" field="request_lib"/></retrieve>
6563                                 <update permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></update>
6564                                 <delete permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></delete>
6565                         </actions>
6566                 </permacrud>
6567         </class>
6568         <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">
6569                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
6570                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
6571                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
6572                         <field reporter:label="Currently Targeted Copy" name="current_copy" reporter:datatype="link"/>
6573                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
6574                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
6575                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
6576                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
6577                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
6578                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
6579                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
6580                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
6581                         <field reporter:label="Notify by Phone?" name="phone_notify" reporter:datatype="bool"/>
6582                         <field reporter:label="Notify by SMS?" name="sms_notify" reporter:datatype="bool"/>
6583                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
6584                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
6585                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
6586                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
6587                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
6588                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
6589                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
6590                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
6591                         <field reporter:label="Staff Placed?" name="staff_placed" reporter:datatype="bool"/>
6592                         <field reporter:label="Item Selection Depth" name="selection_depth" />
6593                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
6594                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
6595                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
6596                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
6597                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
6598                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
6599                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
6600                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
6601                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
6602                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
6603                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
6604                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
6605                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
6606                         <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>
6607                 </fields>
6608                 <links>
6609                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
6610                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
6611                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
6612                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
6613                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
6614                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
6615                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
6616                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
6617                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
6618                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
6619                         <link field="usr_profile" reltype="has_a" key="id" map="" class="pgt"/>
6620                 </links>
6621                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6622                         <actions>
6623                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
6624                         </actions>
6625                 </permacrud>
6626         </class>
6627         <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">
6628                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
6629                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
6630                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
6631                         <field reporter:label="Currently Targeted Copy" name="current_copy" reporter:datatype="link"/>
6632                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
6633                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
6634                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
6635                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
6636                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
6637                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
6638                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
6639                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
6640                         <field reporter:label="Notify by Phone?" name="phone_notify" reporter:datatype="bool"/>
6641                         <field reporter:label="Notify by SMS?" name="sms_notify" reporter:datatype="bool"/>
6642                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
6643                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
6644                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
6645                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
6646                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
6647                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
6648                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
6649                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
6650                         <field reporter:label="Staff Placed?" name="staff_placed" reporter:datatype="bool"/>
6651                         <field reporter:label="Item Selection Depth" name="selection_depth" />
6652                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
6653                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
6654                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
6655                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
6656                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
6657                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
6658                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
6659                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
6660                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
6661                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
6662                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
6663                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
6664                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
6665                 </fields>
6666                 <links>
6667                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
6668                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
6669                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
6670                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
6671                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
6672                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
6673                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
6674                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
6675                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
6676                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
6677                         <link field="usr_profile" reltype="has_a" key="id" map="" class="pgt"/>
6678                 </links>
6679                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6680                         <actions>
6681                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
6682                         </actions>
6683                 </permacrud>
6684         </class>
6685
6686         <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">
6687                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_id_seq">
6688                         <field reporter:label="Subordinate Organizational Units" name="children" oils_persist:virtual="true" reporter:datatype="org_unit"/>
6689                         <field reporter:label="Billing Address" name="billing_address" reporter:datatype="link"/>
6690                         <field reporter:label="Holds Receiving Address" name="holds_address" reporter:datatype="link"/>
6691                         <field reporter:label="Organizational Unit ID" name="id" reporter:datatype="org_unit" reporter:selector="shortname"/>
6692                         <field reporter:label="ILL Receiving Address" name="ill_address" reporter:datatype="link"/>
6693                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="link"/>
6694                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
6695                         <field reporter:label="Organizational Unit Type" name="ou_type" reporter:datatype="link"/>
6696                         <field reporter:label="Parent Organizational Unit" name="parent_ou" reporter:datatype="link"/>
6697                         <field reporter:label="Short (Policy) Name" name="shortname" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.+$"/>
6698                         <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
6699                         <field reporter:label="Phone Number" name="phone" reporter:datatype="text"/>
6700                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
6701                         <field reporter:label="Fiscal Calendar" name="fiscal_calendar" reporter:datatype="link"/>
6702                         <field reporter:label="Users" name="users" oils_persist:virtual="true" reporter:datatype="link"/>
6703                         <field reporter:label="Closed Dates" name="closed_dates" oils_persist:virtual="true" reporter:datatype="link"/>
6704                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
6705                         <field reporter:label="Settings" name="settings" oils_persist:virtual="true" reporter:datatype="link"/>
6706                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>
6707                         <field reporter:label="Checkins" name="checkins" oils_persist:virtual="true" reporter:datatype="link"/>
6708                         <field reporter:label="Workstations" name="workstations" oils_persist:virtual="true" reporter:datatype="link"/>
6709                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
6710                         <field reporter:label="Copy Location Orders" name="copy_location_orders" oils_persist:virtual="true" reporter:datatype="link"/>
6711                         <field reporter:label="Transit Copy Prev Destinations" name="atc_prev_dests" oils_persist:virtual="true" reporter:datatype="link"/>
6712                         <field reporter:label="Reservation Requests" name="resv_requests" oils_persist:virtual="true" reporter:datatype="link"/>
6713                         <field reporter:label="Reservation Pickups" name="resv_pickups" oils_persist:virtual="true" reporter:datatype="link"/>
6714                         <field reporter:label="Resource Types" name="rsrc_types" oils_persist:virtual="true" reporter:datatype="link"/>
6715                         <field reporter:label="Resources" name="resources" oils_persist:virtual="true" reporter:datatype="link"/>
6716                         <field reporter:label="Resource Attributes" name="rsrc_attrs" oils_persist:virtual="true" reporter:datatype="link"/>
6717                         <field reporter:label="Attribute Values" name="attr_vals" oils_persist:virtual="true" reporter:datatype="link"/>
6718                         <field reporter:label="Hours of Operation" name="hours_of_operation" oils_persist:virtual="true" reporter:datatype="link"/>
6719                 </fields>
6720                 <links>
6721                         <link field="billing_address" reltype="has_a" key="id" map="" class="aoa"/>
6722                         <link field="holds_address" reltype="has_a" key="id" map="" class="aoa"/>
6723                         <link field="ou_type" reltype="has_a" key="id" map="" class="aout"/>
6724                         <link field="mailing_address" reltype="has_a" key="id" map="" class="aoa"/>
6725                         <link field="parent_ou" reltype="has_a" key="id" map="" class="aou"/>
6726                         <link field="ill_address" reltype="has_a" key="id" map="" class="aoa"/>
6727                         <link field="fiscal_calendar" reltype="has_a" key="id" map="" class="acqfc"/>
6728                         <link field="users" reltype="has_many" key="home_ou" map="" class="au"/>
6729                         <link field="closed_dates" reltype="has_many" key="org_unit" map="" class="aoucd"/>
6730                         <link field="children" reltype="has_many" key="parent_ou" map="" class="aou"/>
6731                         <link field="circulations" reltype="has_many" key="circ_lib" map="" class="circ"/>
6732                         <link field="settings" reltype="has_many" key="org_unit" map="" class="aous"/>
6733                         <link field="addresses" reltype="has_many" key="org_unit" map="" class="aoa"/>
6734                         <link field="checkins" reltype="has_many" key="checkin_lib" map="" class="circ"/>
6735                         <link field="workstations" reltype="has_many" key="owning_lib" map="" class="aws"/>
6736                         <link field="fund_alloc_pcts" reltype="has_many" key="org" map="" class="acqfap"/>
6737                         <link field="copy_location_orders" reltype="has_many" key="org" map="" class="acplo"/>
6738                         <link field="atc_prev_dests" reltype="has_many" key="prev_dest" map="" class="atc"/>
6739                         <link field="resv_requests" reltype="has_many" key="request_lib" map="" class="bresv"/>
6740                         <link field="resv_pickups" reltype="has_many" key="pickup_lib" map="" class="bresv"/>
6741                         <link field="rsrc_types" reltype="has_many" key="owner" map="" class="brt"/>
6742                         <link field="resources" reltype="has_many" key="owner" map="" class="brsrc"/>
6743                         <link field="rsrc_attrs" reltype="has_many" key="owner" map="" class="bra"/>
6744                         <link field="attr_vals" reltype="has_many" key="owner" map="" class="brav"/>
6745                         <link field="hours_of_operation" reltype="might_have" key="id" map="" class="aouhoo"/>
6746                 </links>
6747         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6748             <actions>
6749                 <create permission="CREATE_ORG_UNIT" context_field="parent_ou"/>
6750                 <retrieve />
6751                 <update permission="UPDATE_ORG_UNIT" context_field="id"/>
6752                 <delete permission="DELETE_ORG_UNIT" context_field="parent_ou"/>
6753             </actions>
6754         </permacrud>
6755         </class>
6756         <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">
6757                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_custom_tree_id_seq">
6758                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6759                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
6760                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
6761                 </fields>
6762                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6763                         <actions>
6764                                 <create permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
6765                                 <retrieve/>
6766                                 <update permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
6767                                 <delete permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
6768                         </actions>
6769                 </permacrud>
6770         </class>
6771         <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">
6772                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_custom_tree_node_id_seq">
6773                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6774                         <field reporter:label="Tree" name="tree" reporter:datatype="link"/>
6775                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="link"/>
6776                         <field reporter:label="Parent" name="parent_node" reporter:datatype="link"/>
6777                         <field reporter:label="Sibling Sort Order" name="sibling_order" reporter:datatype="int"/>
6778                         <field reporter:label="Children" name="children" reporter:datatype="link" oils_persist:virtual="true" />
6779                 </fields>
6780                 <links>
6781                         <link field="tree" reltype="has_a" key="id" map="" class="aouct"/>
6782                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
6783                         <link field="parent_node" reltype="has_a" key="id" map="" class="aouctn"/>
6784                         <link field="children" reltype="has_many" key="parent_node" map="" class="aouctn"/>
6785                 </links>
6786                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6787                         <actions>
6788                                 <create permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
6789                                 <retrieve/>
6790                                 <update permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
6791                                 <delete permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
6792                         </actions>
6793                 </permacrud>
6794         </class>
6795         <class id="ccnb" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="container::call_number_bucket" oils_persist:tablename="container.call_number_bucket" reporter:label="Call Number Bucket">
6796                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_id_seq">
6797                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
6798                         <field name="btype" reporter:datatype="text"/>
6799                         <field name="id" reporter:datatype="id" />
6800                         <field name="name"  reporter:datatype="text"/>
6801                         <field name="description" reporter:datatype="text"/>
6802                         <field name="owner" reporter:datatype="link"/>
6803                         <field name="pub" reporter:datatype="bool"/>
6804                         <field name="create_time" reporter:datatype="timestamp" />
6805                         <field name="owning_lib" reporter:datatype="org_unit" />
6806                 </fields>
6807                 <links>
6808                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
6809                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
6810                         <link field="items" reltype="has_many" key="bucket" map="" class="ccnbi"/>
6811                 </links>
6812                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6813                         <actions>
6814                                 <create permission="CREATE_CALLNUMBER_BUCKET ADMIN_CALLNUMBER_BUCKET" context="owning_lib" owning_user="owner"/>
6815                                 <retrieve permission="CREATE_CALLNUMBER_BUCKET ADMIN_CALLNUMBER_BUCKET" context="owning_lib" owning_user="owner"/>
6816                                 <update permission="CREATE_CALLNUMBER_BUCKET ADMIN_CALLNUMBER_BUCKET" context="owning_lib" owning_user="owner"/>
6817                                 <delete permission="CREATE_CALLNUMBER_BUCKET ADMIN_CALLNUMBER_BUCKET" context="owning_lib" owning_user="owner"/>
6818                         </actions>
6819                 </permacrud>
6820         </class>
6821         <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">
6822                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_note_id_seq">
6823                         <field name="id" reporter:datatype="id" />
6824                         <field name="bucket" reporter:datatype="link"/>
6825                         <field name="note" reporter:datatype="text" />
6826                 </fields>
6827                 <links>
6828                         <link field="bucket" reltype="has_a" key="id" map="" class="ccnb"/>
6829                 </links>
6830         </class>
6831         <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">
6832                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_id_seq">
6833                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
6834                         <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>
6835                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
6836                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
6837                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
6838                         <field reporter:label="SIP Field" name="sip_field" reporter:datatype="link"/>
6839                         <field reporter:label="SIP Format" name="sip_format" reporter:datatype="text"/>
6840                         <field reporter:label="Required" name="required" reporter:datatype="bool"/>
6841                         <field reporter:label="Checkout Archive" name="checkout_archive" reporter:datatype="bool"/>
6842                 </fields>
6843                 <links>
6844                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6845                         <link field="sip_field" reltype="has_a" key="field" map="" class="ascsf"/>
6846                         <link field="entries" reltype="has_many" key="stat_cat" map="" class="asce"/>
6847                 </links>
6848                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6849                         <actions>
6850                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
6851                         </actions>
6852                 </permacrud>
6853         </class>
6854         <class id="ac" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::card" oils_persist:tablename="actor.card" reporter:label="Library Card">
6855                 <fields oils_persist:primary="id" oils_persist:sequence="actor.card_id_seq">
6856                         <field reporter:label="IsActive?" name="active" reporter:datatype="bool"/>
6857                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
6858                         <field reporter:label="Card ID" name="id" reporter:datatype="id" />
6859                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
6860                 </fields>
6861                 <links>
6862                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6863                 </links>
6864                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6865                         <actions>
6866                                 <retrieve permission="VIEW_USER user_request.view">
6867                                         <context link="usr" field="home_ou" />
6868                                 </retrieve>
6869                         </actions>
6870                 </permacrud>
6871         </class>
6872     <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">
6873         <fields oils_persist:primary="field">
6874             <field reporter:label="Field Identifier" name="field" reporter:datatype="text" reporter:selector="name"/>
6875             <field reporter:label="Field Name" name="name" reporter:datatype="text"/>
6876             <field reporter:label="Exclusive?" name="one_only" reporter:datatype="bool"/>
6877         </fields>
6878         <links/>
6879         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6880             <actions>
6881                 <create permission="CREATE_PATRON_STAT_CAT" global_required="true"/>
6882                 <retrieve />
6883                 <update permission="UPDATE_PATRON_STAT_CAT" global_required="true"/>
6884                 <delete permission="DELETE_PATRON_STAT_CAT" global_required="true"/>
6885             </actions>
6886         </permacrud>
6887     </class>
6888         <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">
6889                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_id_seq">
6890                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
6891                         <field reporter:label="Default Entries" name="default_entries" oils_persist:virtual="true" reporter:datatype="link"/>
6892                         <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>
6893                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
6894                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
6895                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
6896                         <field reporter:label="User Summary" name="usr_summary" reporter:datatype="bool"/>
6897                         <field reporter:label="SIP Field" name="sip_field" reporter:datatype="link"/>
6898                         <field reporter:label="SIP Format" name="sip_format" reporter:datatype="text"/>
6899                         <field reporter:label="Checkout Archive" name="checkout_archive" reporter:datatype="bool"/>
6900                         <field reporter:label="Required" name="required" reporter:datatype="bool"/>
6901                         <field reporter:label="Free Text" name="allow_freetext" reporter:datatype="bool"/>
6902                 </fields>
6903                 <links>
6904                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6905                         <link field="sip_field" reltype="has_a" key="field" map="" class="actscsf"/>
6906                         <link field="entries" reltype="has_many" key="stat_cat" map="" class="actsce"/>
6907                         <link field="default_entries" reltype="has_many" key="stat_cat" map="" class="actsced"/>
6908                 </links>
6909         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6910             <actions>
6911                 <create permission="CREATE_PATRON_STAT_CAT" context_field="owner"/>
6912                 <retrieve />
6913                 <update permission="UPDATE_PATRON_STAT_CAT" context_field="owner"/>
6914                 <delete permission="DELETE_PATRON_STAT_CAT" context_field="owner"/>
6915             </actions>
6916         </permacrud>
6917         </class>
6918         <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">
6919                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.series_field_entry_id_seq">
6920                         <field name="field" reporter:datatype="link"/>
6921                         <field name="id" reporter:datatype="id" />
6922                         <field name="source" reporter:datatype="link"/>
6923                         <field name="value"  reporter:datatype="text"/>
6924                 </fields>
6925                 <links>
6926                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
6927                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
6928                 </links>
6929         </class>
6930         <class id="cub" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="container::user_bucket" oils_persist:tablename="container.user_bucket" reporter:label="User Bucket">
6931                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_id_seq">
6932                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
6933                         <field name="btype" reporter:datatype="text"/>
6934                         <field name="id" reporter:datatype="id" />
6935                         <field name="name"  reporter:datatype="text"/>
6936                         <field name="description" reporter:datatype="text"/>
6937                         <field name="owner" reporter:datatype="link"/>
6938                         <field name="pub" reporter:datatype="bool"/>
6939                         <field name="create_time" reporter:datatype="timestamp" />
6940                         <field name="owning_lib" reporter:datatype="org_unit" />
6941                 </fields>
6942                 <links>
6943                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
6944                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
6945                         <link field="items" reltype="has_many" key="bucket" map="" class="cubi"/>
6946                 </links>
6947                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6948                         <actions>
6949                                 <create permission="CREATE_USER_BUCKET ADMIN_USER_BUCKET" context="owning_lib" owning_user="owner"/>
6950                                 <retrieve permission="CREATE_USER_BUCKET ADMIN_USER_BUCKET" context="owning_lib" owning_user="owner"/>
6951                                 <update permission="CREATE_USER_BUCKET ADMIN_USER_BUCKET" context="owning_lib" owning_user="owner"/>
6952                                 <delete permission="CREATE_USER_BUCKET ADMIN_USER_BUCKET" context="owning_lib" owning_user="owner"/>
6953                         </actions>
6954                 </permacrud>
6955         </class>
6956         <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">
6957                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_note_id_seq">
6958                         <field name="id" reporter:datatype="id" />
6959                         <field name="bucket" reporter:datatype="link"/>
6960                         <field name="note" reporter:datatype="text" />
6961                 </fields>
6962                 <links>
6963                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
6964                 </links>
6965         </class>
6966         <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">
6967                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
6968                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
6969                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6970                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
6971                         <field reporter:label="Pyament ID" name="id" reporter:datatype="id" />
6972                         <field reporter:label="Payment Note" name="note"  reporter:datatype="text"/>
6973                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
6974                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
6975                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
6976                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
6977                 </fields>
6978                 <links>
6979                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
6980                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
6981                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6982                 </links>
6983         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6984             <actions>
6985                 <retrieve permission="VIEW_USER_TRANSACTIONS">
6986                     <context link="xact" jump="usr" field="home_ou"/>
6987                 </retrieve>
6988                         </actions>
6989                 </permacrud>
6990         </class>
6991         <class id="afr" controller="open-ils.cstore" oils_obj:fieldmapper="authority::full_rec" oils_persist:tablename="authority.full_rec" reporter:label="Full Authority Record">
6992                 <fields oils_persist:primary="id" oils_persist:sequence="authority.full_rec_id_seq">
6993                         <field name="id" reporter:datatype="id" />
6994                         <field name="ind1" />
6995                         <field name="ind2" />
6996                         <field name="record" />
6997                         <field name="subfield" />
6998                         <field name="tag" />
6999                         <field name="value" />
7000                 </fields>
7001                 <links>
7002                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
7003                 </links>
7004         </class>
7005         <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">
7006                 <fields oils_persist:primary="id" oils_persist:sequence="authority.authority_linking_id_seq">
7007                         <field name="id" reporter:label="ID" reporter:datatype="id" />
7008                         <field name="source" reporter:label="Source Record" reporter:datatype="link" />
7009                         <field name="target" reporter:label="Target Record" reporter:datatype="link" />
7010                         <field name="field" reporter:label="Authority Field" reporter:datatype="link" />
7011                 </fields>
7012                 <links>
7013                         <link field="source" reltype="has_a" key="id" map="" class="are"/>
7014                         <link field="target" reltype="has_a" key="id" map="" class="are"/>
7015                         <link field="field" reltype="has_a" key="id" map="" class="acsaf"/>
7016                 </links>
7017         </class>
7018         <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">
7019                 <fields oils_persist:primary="id" oils_persist:sequence="config.non_cataloged_type_id_seq">
7020                         <field reporter:label="Circulation Duration" name="circ_duration" reporter:datatype="interval"/>
7021                         <field reporter:label="Non-cat Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>
7022                         <field reporter:label="In House?" name="in_house" reporter:datatype="bool"/>
7023                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
7024                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
7025                 </fields>
7026                 <links>
7027                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
7028                 </links>
7029         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7030             <actions>
7031                 <create permission="CREATE_NON_CAT_TYPE" context_field="owning_lib"/>
7032                 <retrieve/>
7033                 <update permission="CREATE_NON_CAT_TYPE" context_field="owning_lib"/>
7034                 <delete permission="CREATE_NON_CAT_TYPE" context_field="owning_lib"/>
7035             </actions>
7036         </permacrud>
7037
7038         </class>
7039         <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">
7040                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_type_id_seq">
7041                         <field reporter:label="Subordinate Types" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
7042                         <field reporter:label="Can Have Users?" name="can_have_users" reporter:datatype="bool"/>
7043                         <field reporter:label="Can Have Volumes?" name="can_have_vols" reporter:datatype="bool"/>
7044                         <field reporter:label="Type Depth" name="depth" reporter:datatype="int" />
7045                         <field reporter:label="Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>
7046                         <field reporter:label="Type Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
7047                         <field reporter:label="OPAC Label" name="opac_label"  reporter:datatype="text" oils_persist:i18n="true"/>
7048                         <field reporter:label="Parent Type" name="parent" reporter:datatype="link"/>
7049                         <field reporter:label="Org Units" name="org_units" oils_persist:virtual="true"  reporter:datatype="org_unit"/>
7050                 </fields>
7051                 <links>
7052                         <link field="parent" reltype="has_a" key="id" map="" class="aout"/>
7053                         <link field="children" reltype="has_many" key="parent" map="" class="aout"/>
7054                         <link field="org_units" reltype="has_many" key="ou_type" map="" class="aou"/>
7055                 </links>
7056         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7057             <actions>
7058                 <create permission="CREATE_ORG_TYPE" global_required="true"/>
7059                 <retrieve/>
7060                 <update permission="UPDATE_ORG_TYPE" global_required="true"/>
7061                 <delete permission="DELETE_ORG_TYPE" global_required="true"/>
7062             </actions>
7063         </permacrud>
7064         </class>
7065         <class id="bren" controller="open-ils.cstore" oils_obj:fieldmapper="biblio::record_note" oils_persist:tablename="biblio.record_note" reporter:label="Bib Record Note">
7066                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_note_id_seq">
7067                         <field name="create_date" reporter:datatype="timestamp"/>
7068                         <field name="creator" reporter:datatype="link"/>
7069                         <field name="edit_date" reporter:datatype="timestamp"/>
7070                         <field name="editor" reporter:datatype="link"/>
7071                         <field name="id" reporter:datatype="id" />
7072                         <field name="pub" reporter:datatype="bool"/>
7073                         <field name="record" reporter:datatype="link"/>
7074                         <field name="value"  reporter:datatype="text"/>
7075                 </fields>
7076                 <links>
7077                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7078                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7079                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
7080                 </links>
7081         </class>
7082         <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">
7083                 <fields oils_persist:primary="usr" oils_persist:sequence="">
7084                         <field name="balance_owed" reporter:datatype="money" />
7085                         <field name="total_owed" reporter:datatype="money" />
7086                         <field name="total_paid" reporter:datatype="money" />
7087                         <field name="usr" reporter:datatype="link"/>
7088                 </fields>
7089                 <links>
7090                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7091                 </links>
7092         </class>
7093     <class id="mg" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::grocery" oils_persist:tablename="money.grocery" reporter:label="Grocery Transaction">
7094                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
7095                         <field reporter:label="Billing Location" name="billing_location" reporter:datatype="link"/>
7096                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
7097                         <field reporter:label="Note" name="note"  reporter:datatype="text"/>
7098                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
7099                         <field reporter:label="Transaction Finish Timestamp" name="xact_finish" reporter:datatype="timestamp" />
7100                         <field reporter:label="Transaction Start Timestamp" name="xact_start" reporter:datatype="timestamp" />
7101                         <field reporter:label="Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
7102                         <field reporter:label="Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
7103                         <field reporter:label="Billable Transaction link" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
7104                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
7105                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
7106                 </fields>
7107                 <links>
7108                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7109                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
7110                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
7111                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
7112                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
7113                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
7114                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
7115                 </links>
7116         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7117             <actions>
7118                 <retrieve permission="VIEW_USER_TRANSACTIONS" context_field="billing_location"/>
7119             </actions>
7120         </permacrud>
7121         </class>
7122         <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">
7123                 <fields oils_persist:primary="id" oils_persist:sequence="config.bib_source_id_seq">
7124                         <field name="id" reporter:selector="source" reporter:datatype="id"/>
7125                         <field name="quality" reporter:datatype="int" />
7126                         <field name="source" reporter:datatype="text"/>
7127                         <field name="transcendant" reporter:datatype="bool"/>
7128                         <field name="can_have_copies" reporter:datatype="bool"/>
7129                 </fields>
7130                 <links/>
7131         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7132             <actions>
7133                 <create permission="CREATE_BIB_SOURCE" global_required="true"/>
7134                 <retrieve/>
7135                 <update permission="UPDATE_BIB_SOURCE" global_required="true"/>
7136                 <delete permission="DELETE_BIB_SOURCE" global_required="true"/>
7137             </actions>
7138         </permacrud>
7139         </class>
7140         <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">
7141                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
7142                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
7143                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
7144                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
7145                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
7146                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
7147                         <field reporter:label="Grocery Billing link" name="grocery" oils_persist:virtual="true" reporter:datatype="link"/>
7148                         <field reporter:label="Circulation Billing link" name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
7149                         <field reporter:label="Billing Line Items" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
7150                         <field reporter:label="Payment Line Items" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
7151                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
7152                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
7153                         <field reporter:label="Payment Summary" name="summary" oils_persist:virtual="true" reporter:datatype="link"/>
7154                 </fields>
7155                 <links>
7156                         <link field="grocery" reltype="might_have" key="id" map="" class="mg"/>
7157                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
7158                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7159                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
7160                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
7161                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
7162                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
7163                         <link field="summary" reltype="might_have" key="id" map="" class="mbts"/>
7164                 </links>
7165                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7166                         <actions>
7167                                 <retrieve permission="VIEW_USER_TRANSACTIONS">
7168                                         <context link="usr" field="home_ou" />
7169                                 </retrieve>
7170                         </actions>
7171                 </permacrud>
7172         </class>
7173         <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">
7174                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_id_seq">
7175                         <field reporter:label="Entry ID" name="id" reporter:datatype="id" />
7176                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
7177                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
7178                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
7179                         <field reporter:label="Default Entries" name="default_entries" oils_persist:virtual="true" reporter:datatype="link"/>
7180                 </fields>
7181                 <links>
7182                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
7183                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7184                         <link field="default_entries" reltype="has_many" key="stat_cat_entry" map="" class="actsced"/>
7185                 </links>
7186         </class>
7187         <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">
7188                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_default_id_seq">
7189                         <field reporter:label="Default Entry ID" name="id" reporter:datatype="id" />
7190                         <field reporter:label="Default Entry Value" name="stat_cat_entry" reporter:datatype="link"/>
7191                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
7192                         <field reporter:label="Default for Owner" name="owner" reporter:datatype="link"/>
7193                 </fields>
7194                 <links>
7195                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
7196                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7197                         <link field="stat_cat_entry" reltype="has_a" key="id" map="" class="actsce"/>
7198                 </links>
7199         </class>
7200         <class id="cubi" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="container::user_bucket_item" oils_persist:tablename="container.user_bucket_item" reporter:label="User Bucket Item">
7201                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_id_seq">
7202                         <field name="bucket" reporter:datatype="link"/>
7203                         <field name="id" reporter:datatype="id" />
7204                         <field name="target_user" reporter:datatype="link"/>
7205                         <field name="create_time" reporter:datatype="timestamp" />
7206                         <field name="pos" reporter:datatype="int" />
7207                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
7208                 </fields>
7209                 <links>
7210                         <link field="target_user" reltype="has_a" key="id" map="" class="au"/>
7211                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
7212             <link field="notes" reltype="has_many" map="" key="item" class="cubin"/>
7213                 </links>
7214                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7215                         <actions>
7216                                 <retrieve permission="ADMIN_USER_BUCKET">
7217                     <context link="bucket" owning_lib="owning_lib"/>
7218                 </retrieve>
7219             </actions>
7220         </permacrud>
7221         </class>
7222         <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">
7223                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_note_id_seq">
7224                         <field name="id" reporter:datatype="id" />
7225                         <field name="item" reporter:datatype="link"/>
7226                         <field name="note" reporter:datatype="text" />
7227                 </fields>
7228                 <links>
7229                         <link field="item" reltype="has_a" key="id" map="" class="cubi"/>
7230                 </links>
7231         </class>
7232         <class id="mus" controller="open-ils.cstore" oils_obj:fieldmapper="money::user_summary" oils_persist:tablename="money.usr_summary" reporter:label="User Summary">
7233                 <fields oils_persist:primary="usr" oils_persist:sequence="">
7234                         <field name="balance_owed" reporter:datatype="money" />
7235                         <field name="total_owed" reporter:datatype="money" />
7236                         <field name="total_paid" reporter:datatype="money" />
7237                         <field name="usr" reporter:datatype="link"/>
7238                 </fields>
7239                 <links>
7240                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7241                 </links>
7242         </class>
7243         <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">
7244                 <fields oils_persist:primary="code" oils_persist:sequence="">
7245                         <field reporter:label="LitF Code" name="code" reporter:datatype="text"/>
7246                         <field reporter:label="LitF Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
7247                         <field reporter:label="LitF Name" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
7248                 </fields>
7249                 <links/>
7250         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7251             <actions>
7252                 <create permission="CREATE_MARC_CODE" global_required="true"/>
7253                 <retrieve/>
7254                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
7255                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
7256             </actions>
7257         </permacrud>
7258         </class>
7259         <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">
7260                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
7261                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
7262                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7263                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
7264                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
7265                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7266                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
7267                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>
7268                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
7269                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
7270                 </fields>
7271                 <links>
7272                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
7273                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
7274                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7275                 </links>
7276         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7277             <actions>
7278                 <retrieve permission="VIEW_USER_TRANSACTIONS">
7279                     <context link="xact" jump="usr" field="home_ou"/>
7280                 </retrieve>
7281                         </actions>
7282                 </permacrud>
7283         </class>
7284         <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">
7285                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
7286                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
7287                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7288                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
7289                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
7290                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7291                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
7292                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>
7293                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
7294                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
7295                 </fields>
7296                 <links>
7297                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
7298                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
7299                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7300                 </links>
7301         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7302             <actions>
7303                 <retrieve permission="VIEW_USER_TRANSACTIONS">
7304                     <context link="xact" jump="usr" field="home_ou"/>
7305                 </retrieve>
7306                         </actions>
7307                 </permacrud>
7308         </class>
7309         <class id="aoc" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circulation" oils_persist:tablename="action.open_circulation" reporter:label="Open Circulation">
7310                 <fields oils_persist:primary="id" oils_persist:sequence="">
7311                         <field name="checkin_lib" reporter:datatype="link"/>
7312                         <field name="checkin_staff" reporter:datatype="link"/>
7313                         <field name="checkin_time" reporter:datatype="timestamp"/>
7314                         <field name="circ_lib"  reporter:datatype="org_unit"/>
7315                         <field name="circ_staff" reporter:datatype="link"/>
7316                         <field name="desk_renewal" reporter:datatype="bool"/>
7317                         <field name="due_date" reporter:datatype="timestamp"/>
7318                         <field name="duration" reporter:datatype="interval"/>
7319                         <field name="duration_rule" reporter:datatype="link"/>
7320                         <field name="fine_interval" reporter:datatype="interval"/>
7321                         <field name="id" reporter:datatype="id" />
7322                         <field name="max_fine" reporter:datatype="money" />
7323                         <field name="max_fine_rule" reporter:datatype="link"/>
7324                         <field name="opac_renewal" reporter:datatype="bool"/>
7325                         <field name="phone_renewal" reporter:datatype="bool"/>
7326                         <field name="recurring_fine" reporter:datatype="money" />
7327                         <field name="recurring_fine_rule" reporter:datatype="link"/>
7328                         <field name="renewal_remaining" reporter:datatype="int" />
7329             <field name="grace_period" reporter:datatype="interval" />
7330                         <field name="stop_fines" reporter:datatype="text"/>
7331                         <field name="stop_fines_time" reporter:datatype="timestamp"/>
7332                         <field name="target_copy" reporter:datatype="link"/>
7333                         <field name="usr" reporter:datatype="link"/>
7334                         <field name="xact_finish" reporter:datatype="timestamp" />
7335                         <field name="xact_start" reporter:datatype="timestamp" />
7336                         <field name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
7337                 </fields>
7338                 <links>
7339                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
7340                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
7341                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
7342                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
7343                 </links>
7344         </class>
7345         <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">
7346                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.subject_field_entry_id_seq">
7347                         <field name="field" reporter:datatype="link"/>
7348                         <field name="id" reporter:datatype="id" />
7349                         <field name="source" reporter:datatype="link"/>
7350                         <field name="value" reporter:datatype="text"/>
7351                 </fields>
7352                 <links>
7353                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
7354                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
7355                 </links>
7356         </class>
7357         <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">
7358                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_recurring_fine_id_seq">
7359                         <field name="high" reporter:datatype="money" />
7360                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
7361                         <field name="low" reporter:datatype="money" />
7362                         <field name="name" reporter:datatype="text"/>
7363                         <field name="normal" reporter:datatype="money" />
7364                         <field name="recurrence_interval" reporter:datatype="interval"/>
7365             <field name="grace_period" reporter:datatype="interval" />
7366                 </fields>
7367                 <links/>
7368         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7369             <actions>
7370                 <create permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
7371                 <retrieve/>
7372                 <update permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
7373                 <delete permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
7374             </actions>
7375         </permacrud>
7376         </class>
7377         <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">
7378                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
7379                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
7380                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7381                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
7382                         <field reporter:label="Workstation link" name="cash_drawer" reporter:datatype="link"/>
7383                         <field reporter:label="Check Number" name="check_number" reporter:datatype="int" />
7384                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
7385                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7386                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
7387                         <field reporter:label="Transaction link" name="xact" reporter:datatype="link"/>
7388                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
7389                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
7390                 </fields>
7391                 <links>
7392                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
7393                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
7394                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
7395                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7396                 </links>
7397         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7398             <actions>
7399                 <retrieve permission="VIEW_USER_TRANSACTIONS">
7400                     <context link="xact" jump="usr" field="home_ou"/>
7401                 </retrieve>
7402                         </actions>
7403                 </permacrud>
7404         </class>
7405         <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">
7406                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_id_seq">
7407                         <field reporter:label="Age Hold Protection" name="age_protect" reporter:datatype="link"/>
7408                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
7409                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
7410                         <field reporter:label="Call Number/Volume" name="call_number" reporter:datatype="link"/>
7411                         <field reporter:label="Circulation Type (MARC)" name="circ_as_type" reporter:datatype="link"/>
7412                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
7413                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
7414                         <field reporter:label="Can Circulate" name="circulate" reporter:datatype="bool"/>
7415                         <field reporter:label="Copy Number on Volume" name="copy_number" reporter:datatype="text"/>
7416                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
7417                         <field reporter:label="Active Date/Time" name="active_date" reporter:datatype="timestamp"/>
7418                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
7419                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
7420                         <field reporter:label="Dummy ISBN" name="dummy_isbn" reporter:datatype="text"/>
7421                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
7422                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money" />
7423                         <field reporter:label="Precat Dummy Author" name="dummy_author" reporter:datatype="text"/>
7424                         <field reporter:label="Precat Dummy Title" name="dummy_title" reporter:datatype="text"/>
7425                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
7426                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
7427                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
7428                         <field reporter:label="Is Holdable" name="holdable" reporter:datatype="bool" />
7429                         <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
7430                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
7431                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link"/>
7432                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool" />
7433                         <field reporter:label="Price" name="price" reporter:datatype="money" />
7434                         <field reporter:label="Is Reference" name="ref" reporter:datatype="bool"/>
7435                         <field reporter:label="Copy Status" name="status" reporter:datatype="link"/>
7436                         <field reporter:label="Copy Status Changed Time" name="status_changed_time" reporter:datatype="timestamp"/>
7437                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool"/>
7438                         <field reporter:label="Floating Group" name="floating" reporter:datatype="link"/>
7439                         <field reporter:label="Cost" name="cost" reporter:datatype="money"/>
7440                         <field reporter:label="Copy Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
7441                         <field reporter:label="Stat-Cat entry maps" name="stat_cat_entry_copy_maps" oils_persist:virtual="true" reporter:datatype="link"/>
7442                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
7443                         <field reporter:label="Aged (patronless) Circulations" name="aged_circulations" oils_persist:virtual="true" reporter:datatype="link"/>
7444                         <field reporter:label="Combined Aged and Active Circulations" name="all_circulations" oils_persist:virtual="true" reporter:datatype="link"/>
7445                         <field reporter:label="Total Circulations" name="total_circ_count" oils_persist:virtual="true" reporter:datatype="link"/>
7446                         <field reporter:label="Last Circulation Date" name="last_circ" oils_persist:virtual="true" reporter:datatype="link"/>
7447                         <field reporter:label="Holds" name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
7448                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
7449                         <field reporter:label="Monograph Parts" name="parts" oils_persist:virtual="true" reporter:datatype="link"/>
7450                         <field reporter:label="Peer Record Maps" name="peer_record_maps" oils_persist:virtual="true" reporter:datatype="link"/>
7451                         <field reporter:label="Peer Records" name="peer_records" oils_persist:virtual="true" reporter:datatype="link"/>
7452                         <field reporter:label="Last Captured Hold" name="last_captured_hold" oils_persist:virtual="true" reporter:datatype="link"/>
7453                         <field reporter:label="Latest Inventory" name="latest_inventory" oils_persist:virtual="true" reporter:datatype="link"/>
7454                         <field reporter:label="Has Holds" name="holds_count" oils_persist:virtual="true" reporter:datatype="link"/>
7455                         <field reporter:label="Copy Tags" name="tags" oils_persist:virtual="true" reporter:datatype="link"/>
7456                         <field reporter:label="Copy Alerts" name="copy_alerts" oils_persist:virtual="true" reporter:datatype="link"/>
7457                 </fields>
7458                 <links>
7459                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
7460                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
7461                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
7462                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7463                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7464                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
7465                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
7466                         <link field="holds" reltype="has_many" key="target_copy" map="hold" class="ahcm"/>
7467                         <link field="stat_cat_entry_copy_maps" reltype="has_many" key="owning_copy" map="" class="ascecm"/>
7468                         <link field="notes" reltype="has_many" key="owning_copy" map="" class="acpn"/>
7469                         <link field="stat_cat_entries" reltype="has_many" key="owning_copy" map="stat_cat_entry" class="ascecm"/>
7470                         <link field="circulations" reltype="has_many" key="target_copy" map="" class="circ"/>
7471                         <link field="aged_circulations" reltype="has_many" key="target_copy" map="" class="acirc"/>
7472                         <link field="all_circulations" reltype="has_many" key="target_copy" map="" class="combcirc"/>
7473                         <link field="total_circ_count" reltype="might_have" key="id" map="" class="erfcc"/>
7474                         <link field="last_circ" reltype="might_have" key="id" map="" class="rlc"/>
7475                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
7476                         <link field="parts" reltype="has_many" key="target_copy" map="part" class="acpm"/>
7477                         <link field="peer_record_maps" reltype="has_many" key="target_copy" map="" class="bpbcm"/>
7478                         <link field="peer_records" reltype="has_many" key="target_copy" map="peer_record" class="bpbcm"/>
7479                         <link field="last_captured_hold" reltype="has_a" key="current_copy" map="" class="alhr"/>
7480                         <link field="latest_inventory" reltype="might_have" key="copy" map="" class="alci"/>
7481                         <link field="floating" reltype="has_a" key="id" map="" class="cfg"/>
7482                         <link field="holds_count" reltype="might_have" key="id" map="" class="hasholdscount"/>
7483                         <link field="tags" reltype="has_many" key="copy" map="" class="acptcm"/>
7484                         <link field="copy_alerts" reltype="has_many" key="copy" map="" class="aca"/>
7485                         <link field="circ_as_type" reltype="has_a" key="code" map="" class="citm"/>
7486                 </links>
7487         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7488             <actions>
7489                 <create permission="CREATE_COPY">
7490                     <context link="call_number" field="owning_lib"/>
7491                 </create>
7492                 <retrieve/>
7493                 <update permission="UPDATE_COPY">
7494                     <context link="call_number" field="owning_lib"/>
7495                 </update>
7496                 <delete permission="DELETE_COPY">
7497                     <context link="call_number" field="owning_lib"/>
7498                 </delete>
7499             </actions>
7500         </permacrud>
7501         </class>
7502
7503         <class id="alci" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::latest_inventory" oils_persist:tablename="asset.latest_inventory" reporter:core="true" reporter:label="Latest Inventory">
7504                 <fields oils_persist:primary="id" oils_persist:sequence="asset.latest_inventory_id_seq">
7505             <field reporter:label="Latest Inventory ID" name="id" reporter:datatype="id"/>
7506                         <field reporter:label="Latest Inventory Date" name="inventory_date" reporter:datatype="timestamp"/>
7507                         <field reporter:label="Latest Inventory Workstation" name="inventory_workstation" reporter:datatype="link"/>
7508                         <field reporter:label="Copy" name="copy" reporter:datatype="link"/>
7509                 </fields>
7510                 <links>
7511                         <link field="inventory_workstation" reltype="has_a" key="id" map="" class="aws"/>
7512                         <link field="copy" reltype="has_a" key="id" map="" class="acp"/>
7513                 </links>
7514         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7515             <actions>
7516                                 <create/>
7517                                 <retrieve/>
7518                                 <update/>
7519                                 <delete/>
7520             </actions>
7521         </permacrud>
7522         </class>
7523
7524         <class id="ccat" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::copy_alert_type" oils_persist:tablename="config.copy_alert_type" reporter:label="Copy Alert Type" oils_persist:restrict_primary="100">
7525                 <fields oils_persist:primary="id" oils_persist:sequence="config.copy_alert_type_id_seq">
7526                         <field reporter:label="Id" name="id" reporter:selector="name" reporter:datatype="id"/>
7527                         <field reporter:label="Scope Org Unit" name="scope_org"  reporter:datatype="org_unit"/>
7528                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
7529                         <field reporter:label="Name" name="name" reporter:datatype="text" />
7530                         <field reporter:label="State" name="state" reporter:datatype="text"/>
7531                         <field reporter:label="Event" name="event" reporter:datatype="text" />
7532                         <field reporter:label="During Renewal" name="in_renew" reporter:datatype="bool" />
7533                         <field reporter:label="Allow At Copy Circ Lib" name="at_circ" reporter:datatype="bool"/>
7534                         <field reporter:label="Allow At Copy Owning Lib" name="at_owning" reporter:datatype="bool"/>
7535                         <field reporter:label="Invert allowed locations" name="invert_location" reporter:datatype="bool"/>
7536                         <field reporter:label="Next Statuses" name="next_status" reporter:datatype="text"/>
7537                 </fields>
7538                 <links>
7539                         <link field="scope_org" reltype="has_a" key="id" map="" class="aou"/>
7540                 </links>
7541         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7542             <actions>
7543                 <create permission="ADMIN_COPY_ALERT_TYPE CREATE_COPY_ALERT_TYPE" context_field="scope_org"/>
7544                 <retrieve/>
7545                 <update permission="ADMIN_COPY_ALERT_TYPE UPDATE_COPY_ALERT_TYPE" context_field="scope_org"/>
7546                 <delete permission="ADMIN_COPY_ALERT_TYPE DELETE_COPY_ALERT_TYPE" context_field="scope_org"/>
7547             </actions>
7548         </permacrud>
7549         </class>
7550
7551         <class id="acas" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::copy_alert_suppress" oils_persist:tablename="actor.copy_alert_suppress" reporter:label="Copy Alert Suppression">
7552                 <fields oils_persist:primary="id" oils_persist:sequence="actor.copy_alert_suppress_id_seq">
7553                         <field reporter:label="Id" name="id" reporter:datatype="id"/>
7554                         <field reporter:label="Org Unit" name="org"  reporter:datatype="org_unit"/>
7555                         <field reporter:label="Alert Type" name="alert_type" reporter:datatype="link" />
7556                 </fields>
7557                 <links>
7558                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
7559                         <link field="alert_type" reltype="has_a" key="id" map="" class="ccat"/>
7560                 </links>
7561         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7562             <actions>
7563                 <create permission="ADMIN_COPY_ALERT_SUPPRESS CREATE_COPY_ALERT_SUPPRESS" context_field="org"/>
7564                 <retrieve/>
7565                 <update permission="ADMIN_COPY_ALERT_SUPPRESS UPDATE_COPY_ALERT_SUPPRESS" context_field="org"/>
7566                 <delete permission="ADMIN_COPY_ALERT_SUPPRESS DELETE_COPY_ALERT_SUPPRESS" context_field="org"/>
7567             </actions>
7568         </permacrud>
7569         </class>
7570
7571         <class id="aca" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::copy_alert" oils_persist:tablename="asset.copy_alert" reporter:label="Copy Alert">
7572                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_alert_id_seq">
7573                         <field reporter:label="Id" name="id" reporter:datatype="id"/>
7574                         <field reporter:label="Alert Type" name="alert_type" reporter:datatype="link" />
7575                         <field reporter:label="Copy" name="copy"  reporter:datatype="link"/>
7576                         <field reporter:label="Temporary" name="temp" reporter:datatype="bool" />
7577                         <field reporter:label="Create Date/Time" name="create_time" reporter:datatype="timestamp" />
7578                         <field reporter:label="Creator" name="create_staff" reporter:datatype="link"/>
7579                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7580                         <field reporter:label="Acknowledge Date/Time" name="ack_time" reporter:datatype="timestamp" />
7581                         <field reporter:label="Acknowledger" name="ack_staff" reporter:datatype="link"/>
7582                 </fields>
7583                 <links>
7584                         <link field="alert_type" reltype="has_a" key="id" map="" class="ccat"/>
7585                         <link field="copy" reltype="has_a" key="id" map="" class="acp"/>
7586                         <link field="create_staff" reltype="has_a" key="id" map="" class="au"/>
7587                         <link field="ack_staff" reltype="has_a" key="id" map="" class="au"/>
7588                 </links>
7589         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7590             <actions>
7591                 <create permission="ADMIN_COPY_ALERT CREATE_COPY_ALERT">
7592                     <context link="copy" field="circ_lib"/>
7593                 </create>
7594                 <retrieve permission="ADMIN_COPY_ALERT VIEW_COPY_ALERT">
7595                     <context link="copy" field="circ_lib"/>
7596                                 </retrieve>
7597                 <update permission="ADMIN_COPY_ALERT UPDATE_COPY_ALERT">
7598                     <context link="copy" field="circ_lib"/>
7599                                 </update>
7600                 <delete permission="ADMIN_COPY_ALERT DELETE_COPY_ALERT">
7601                     <context link="copy" field="circ_lib"/>
7602                                 </delete>
7603             </actions>
7604         </permacrud>
7605         </class>
7606
7607         <class id="aaca" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::active_copy_alert" oils_persist:tablename="asset.active_copy_alert" reporter:label="Active Copy Alert" oils_persist:readonly="true">
7608                 <fields oils_persist:primary="id">
7609                         <field reporter:label="Id" name="id" reporter:datatype="id"/>
7610                         <field reporter:label="Alert Type" name="alert_type" reporter:datatype="link" />
7611                         <field reporter:label="Copy" name="copy"  reporter:datatype="link"/>
7612                         <field reporter:label="Temporary" name="temp" reporter:datatype="bool" />
7613                         <field reporter:label="Create Date/Time" name="create_time" reporter:datatype="timestamp" />
7614                         <field reporter:label="Creator" name="create_staff" reporter:datatype="link"/>
7615                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7616                         <field reporter:label="Acknowledge Date/Time" name="ack_time" reporter:datatype="timestamp" />
7617                         <field reporter:label="Acknowledger" name="ack_staff" reporter:datatype="link"/>
7618                 </fields>
7619                 <links>
7620                         <link field="alert_type" reltype="has_a" key="id" map="" class="ccat"/>
7621                         <link field="copy" reltype="has_a" key="id" map="" class="acp"/>
7622                         <link field="create_staff" reltype="has_a" key="id" map="" class="au"/>
7623                         <link field="ack_staff" reltype="has_a" key="id" map="" class="au"/>
7624                 </links>
7625         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7626             <actions>
7627                 <create permission="ADMIN_COPY_ALERT CREATE_COPY_ALERT">
7628                     <context link="copy" field="circ_lib"/>
7629                 </create>
7630                 <retrieve permission="ADMIN_COPY_ALERT VIEW_COPY_ALERT">
7631                     <context link="copy" field="circ_lib"/>
7632                                 </retrieve>
7633                 <update permission="ADMIN_COPY_ALERT UPDATE_COPY_ALERT">
7634                     <context link="copy" field="circ_lib"/>
7635                                 </update>
7636                 <delete permission="ADMIN_COPY_ALERT DELETE_COPY_ALERT">
7637                     <context link="copy" field="circ_lib"/>
7638                                 </delete>
7639             </actions>
7640         </permacrud>
7641         </class>
7642
7643         <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">
7644                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_template_id_seq">
7645                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name" />
7646                         <field reporter:label="Owning Lib" name="owning_lib" reporter:datatype="org_unit"/>
7647                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
7648                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
7649                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
7650                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
7651                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
7652                         <field reporter:label="Circ Lib" name="circ_lib" reporter:datatype="org_unit"/>
7653                         <field reporter:label="Status" name="status" reporter:datatype="link"/>
7654                         <field reporter:label="Location" name="location" reporter:datatype="link"/>
7655                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
7656                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
7657                         <field reporter:label="Age Protect" name="age_protect" reporter:datatype="link"/>
7658                         <field reporter:label="Circulate?" name="circulate" reporter:datatype="bool"/>
7659                         <field reporter:label="Deposit?" name="deposit" reporter:datatype="bool"/>
7660                         <field reporter:label="Reference?" name="ref" reporter:datatype="bool"/>
7661                         <field reporter:label="Holdable?" name="holdable" reporter:datatype="bool"/>
7662                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
7663                         <field reporter:label="Price" name="price" reporter:datatype="money"/>
7664                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="link"/>
7665                         <field reporter:label="Circ As Type" name="circ_as_type" reporter:datatype="link"/>
7666                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
7667                         <field reporter:label="OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
7668                         <field reporter:label="Floating Group" name="floating" reporter:datatype="link"/>
7669                         <field reporter:label="Mint Condition?" name="mint_condition" reporter:datatype="bool"/>
7670                 </fields>
7671                 <links>
7672                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
7673                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7674                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7675                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
7676                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
7677                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
7678                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
7679                         <link field="floating" reltype="has_a" key="id" map="" class="cfg"/>
7680                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
7681                         <link field="circ_as_type" reltype="has_a" key="code" map="" class="citm"/>
7682                 </links>
7683                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7684                         <actions>
7685                                 <create permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
7686                                 <retrieve />
7687                                 <update permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
7688                                 <delete permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
7689                         </actions>
7690                 </permacrud>
7691         </class>
7692
7693         <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">
7694                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_age_hold_protect_id_seq">
7695                         <field reporter:label="Item Age" name="age" reporter:datatype="interval"/>
7696                         <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
7697                         <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>
7698                         <field reporter:label="Allowed Proximity" name="prox" reporter:datatype="int" />
7699                 </fields>
7700                 <links/>
7701         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7702             <actions>
7703                 <create permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
7704                 <retrieve/>
7705                 <update permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
7706                 <delete permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
7707             </actions>
7708         </permacrud>
7709         </class>
7710         <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">
7711                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_max_fine_id_seq">
7712                         <field reporter:label="Max Fine Amount" name="amount" reporter:datatype="money" />
7713                         <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
7714                         <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>
7715                         <field reporter:label="Is Percent" name="is_percent" reporter:datatype="bool"/>
7716                 </fields>
7717                 <links/>
7718         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7719             <actions>
7720                 <create permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
7721                 <retrieve/>
7722                 <update permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
7723                 <delete permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
7724             </actions>
7725         </permacrud>
7726         </class>
7727         <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">
7728                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_tree_id_seq">
7729                         <field reporter:label="Child Groups" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
7730                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
7731                         <field reporter:label="Group ID" name="id" reporter:selector="name" reporter:datatype="id"/>
7732                         <field reporter:label="Group Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
7733                         <field reporter:label="Parent Group" name="parent" reporter:datatype="link"/>
7734                         <field reporter:label="User Expiration Interval" name="perm_interval" reporter:datatype="interval"/>
7735                         <field reporter:label="Required Permission" name="application_perm" reporter:datatype="text"/>
7736                         <field reporter:label="Is User Group" name="usergroup" reporter:datatype="bool"/>
7737                         <field reporter:label="Hold Priority" name="hold_priority" reporter:datatype="int"/>
7738                 </fields>
7739                 <links>
7740                         <link field="parent" reltype="has_a" key="id" map="" class="pgt"/>
7741                         <link field="children" reltype="has_many" key="parent" map="" class="pgt"/>
7742                 </links>
7743         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7744             <actions>
7745                 <create permission="CREATE_PERM" global_required="true"/>
7746                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
7747                 <update permission="UPDATE_PERM" global_required="true"/>
7748                 <delete permission="DELETE_PERM" global_required="true"/>
7749             </actions>
7750         </permacrud>
7751         </class>
7752         <class id="pgtde" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="permission::grp_tree_display_entry" oils_persist:tablename="permission.grp_tree_display_entry" reporter:label="Permission Group Tree Display Entry">
7753                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_tree_display_entry_id_seq">
7754                         <field reporter:label="Entry ID" name="id" reporter:selector="name" reporter:datatype="id"/>
7755                         <field reporter:label="Group ID" name="grp" reporter:datatype="link" oils_persist:i18n="true"/>
7756                         <field reporter:label="Parent Group" name="parent" reporter:datatype="link"/>
7757                         <field reporter:label="Org Unit" name="org" reporter:datatype="link"/>
7758                         <field reporter:label="Position" name="position" reporter:datatype="int"/>
7759                         <field reporter:label="Child Entries" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
7760                 </fields>
7761                 <links>
7762                         <link field="parent" reltype="has_a" key="id" map="" class="pgtde"/>
7763                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
7764                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
7765                         <link field="children" reltype="has_many" key="parent" map="" class="pgtde"/>
7766                 </links>
7767                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7768                         <actions>
7769                                 <create permission="MANAGE_CUSTOM_PERM_GRP_TREE" global_required="true"/>
7770                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
7771                                 <update permission="MANAGE_CUSTOM_PERM_GRP_TREE" global_required="true"/>
7772                                 <delete permission="MANAGE_CUSTOM_PERM_GRP_TREE" global_required="true"/>
7773                         </actions>
7774                 </permacrud>
7775         </class>
7776         <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">
7777                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_answer_id_seq">
7778                         <field reporter:label="Responses using this Answer" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
7779                         <field reporter:label="Answer Text" name="answer" reporter:datatype="text"/>
7780                         <field reporter:label="Answer ID" name="id" reporter:datatype="id" />
7781                         <field reporter:label="Question" name="question" reporter:datatype="link"/>
7782                 </fields>
7783                 <links>
7784                         <link field="question" reltype="has_a" key="id" map="" class="asvq"/>
7785                         <link field="responses" reltype="has_many" key="answer" map="" class="asvr"/>
7786                 </links>
7787         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7788             <actions>
7789                 <create permission="ADMIN_SURVEY">
7790                     <context link="question" jump="survey" field="owner"/>
7791                 </create>
7792                 <retrieve/>
7793                 <update permission="ADMIN_SURVEY">
7794                     <context link="question" jump="survey" field="owner"/>
7795                 </update>
7796                 <delete permission="ADMIN_SURVEY">
7797                     <context link="question" jump="survey" field="owner"/>
7798                 </delete>
7799             </actions>
7800         </permacrud>
7801         </class>
7802         <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">
7803                 <fields oils_persist:primary="id" oils_persist:sequence="action.non_cataloged_circulation_id_seq">
7804                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
7805                         <field reporter:label="Circulation Date/Time" name="circ_time" reporter:datatype="timestamp"/>
7806                         <field reporter:label="Non-cat Circulation ID" name="id" reporter:datatype="id" />
7807                         <field reporter:label="Non-cat Item Type" name="item_type" reporter:datatype="link"/>
7808                         <field reporter:label="Patron" name="patron" reporter:datatype="link"/>
7809                         <field reporter:label="Circulating Staff" name="staff" reporter:datatype="link"/>
7810                         <field reporter:label="Virtual Due Date/Time" name="duedate" reporter:datatype="timestamp" oils_persist:virtual="true"/>
7811                 </fields>
7812                 <links>
7813                         <link field="item_type" reltype="has_a" key="id" map="" class="cnct"/>
7814                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
7815                         <link field="patron" reltype="has_a" key="id" map="" class="au"/>
7816                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
7817                 </links>
7818                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7819                         <actions>
7820                                 <retrieve permission="VIEW_CIRCULATIONS" context_field="circ_lib" />
7821                         </actions>
7822                 </permacrud>
7823         </class>
7824         <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">
7825                 <fields oils_persist:primary="usr" oils_persist:sequence="">
7826                         <field name="balance_owed" reporter:datatype="money" />
7827                         <field name="total_owed" reporter:datatype="money" />
7828                         <field name="total_paid" reporter:datatype="money" />
7829                         <field name="usr" reporter:datatype="link"/>
7830                 </fields>
7831                 <links>
7832                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7833                 </links>
7834         </class>
7835         <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">
7836                 <fields oils_persist:primary="id" oils_persist:sequence="action.unfulfilled_hold_list_id_seq">
7837                         <field reporter:label="Non-fulfilling Library" name="circ_lib"  reporter:datatype="org_unit"/>
7838                         <field reporter:label="Non-fulfilling Copy" name="current_copy" reporter:datatype="link"/>
7839                         <field reporter:label="Retargeting Date/Time" name="fail_time" reporter:datatype="timestamp"/>
7840                         <field reporter:label="Hold" name="hold" reporter:datatype="link"/>
7841                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
7842                 </fields>
7843                 <links>
7844                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
7845                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
7846                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
7847                 </links>
7848         </class>
7849         <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">
7850                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.identifier_field_entry_id_seq">
7851                         <field name="field" reporter:datatype="link"/>
7852                         <field name="id" reporter:datatype="id" />
7853                         <field name="source" reporter:datatype="link"/>
7854                         <field name="value" reporter:datatype="text"/>
7855                 </fields>
7856                 <links>
7857                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
7858                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
7859                 </links>
7860         </class>
7861         <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">
7862                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.title_field_entry_id_seq">
7863                         <field name="field" reporter:datatype="link"/>
7864                         <field name="id" reporter:datatype="id" />
7865                         <field name="source" reporter:datatype="link"/>
7866                         <field name="value" reporter:datatype="text"/>
7867                 </fields>
7868                 <links>
7869                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
7870                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
7871                 </links>
7872         </class>
7873         <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">
7874                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_usr_map_id_seq">
7875                         <field reporter:label="Entry ID" name="id" reporter:datatype="id" />
7876                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
7877                         <field reporter:label="Entry Text" name="stat_cat_entry" reporter:datatype="text"/>
7878                         <field reporter:label="User" name="target_usr" reporter:datatype="link"/>
7879                 </fields>
7880                 <links>
7881                         <link field="target_usr" reltype="has_a" key="id" map="" class="au"/>
7882                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
7883                 </links>
7884         </class>
7885         <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">
7886                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_perm_map_id_seq">
7887                         <field name="depth" reporter:datatype="int" />
7888                         <field name="grantable" reporter:datatype="bool"/>
7889                         <field name="grp" reporter:datatype="link"/>
7890                         <field name="id" reporter:datatype="id" />
7891                         <field name="perm" reporter:datatype="link"/>
7892                 </fields>
7893                 <links>
7894                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
7895                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
7896                 </links>
7897         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7898             <actions>
7899                 <create permission="ASSIGN_GROUP_PERM" global_required="true"/>
7900                 <retrieve permission="ASSIGN_GROUP_PERM UPDATE_GROUP_PERM REMOVE_GROUP_PERM" global_required="true"/>
7901                 <update permission="UPDATE_GROUP_PERM" global_required="true"/>
7902                 <delete permission="REMOVE_GROUP_PERM" global_required="true"/>
7903             </actions>
7904         </permacrud>
7905         </class>
7906         <class id="ccb" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="container::copy_bucket" oils_persist:tablename="container.copy_bucket" reporter:label="Copy Bucket">
7907                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_id_seq">
7908                         <field name="items" oils_persist:virtual="true" />
7909                         <field name="btype" reporter:datatype="text"/>
7910                         <field name="id" reporter:datatype="id" />
7911                         <field name="name" reporter:datatype="text"/>
7912                         <field name="description" reporter:datatype="text"/>
7913                         <field name="owner" reporter:datatype="link"/>
7914                         <field name="pub" reporter:datatype="bool"/>
7915                         <field name="create_time" reporter:datatype="timestamp" />
7916                         <field name="owning_lib" reporter:datatype="org_unit" />
7917                 </fields>
7918                 <links>
7919                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
7920                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7921                         <link field="items" reltype="has_many" key="bucket" map="" class="ccbi"/>
7922                 </links>
7923                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7924                         <actions>
7925                                 <create permission="CREATE_COPY_BUCKET ADMIN_COPY_BUCKET" context="owning_lib" owning_user="owner"/>
7926                                 <retrieve permission="CREATE_COPY_BUCKET ADMIN_COPY_BUCKET" context="owning_lib" owning_user="owner"/>
7927                                 <update permission="CREATE_COPY_BUCKET ADMIN_COPY_BUCKET" context="owning_lib" owning_user="owner"/>
7928                                 <delete permission="CREATE_COPY_BUCKET ADMIN_COPY_BUCKET" context="owning_lib" owning_user="owner"/>
7929                         </actions>
7930                 </permacrud>
7931         </class>
7932         <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">
7933                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_note_id_seq">
7934                         <field name="id" reporter:datatype="id" />
7935                         <field name="bucket" reporter:datatype="link"/>
7936                         <field name="note" reporter:datatype="text" />
7937                 </fields>
7938                 <links>
7939                         <link field="bucket" reltype="has_a" key="id" map="" class="ccb"/>
7940                 </links>
7941         </class>
7942         <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">
7943                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_work_ou_map_id_seq">
7944                         <field reporter:label="User/Working Location Map ID" name="id" reporter:datatype="int" />
7945                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
7946                         <field reporter:label="Working Location" name="work_ou" reporter:datatype="link"/>
7947                 </fields>
7948                 <links>
7949                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7950                         <link field="work_ou" reltype="has_a" key="id" map="" class="aou"/>
7951                 </links>
7952         </class>
7953         <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">
7954                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_perm_map_id_seq">
7955                         <field name="depth" reporter:datatype="int"/>
7956                         <field name="grantable" reporter:datatype="bool"/>
7957                         <field name="id" reporter:datatype="id" />
7958                         <field name="perm" reporter:datatype="link"/>
7959                         <field name="usr" reporter:datatype="link"/>
7960                 </fields>
7961                 <links>
7962                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7963                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
7964                 </links>
7965         </class>
7966         <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">
7967                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_object_perm_map_id_seq">
7968                         <field name="object_id" reporter:datatype="text"/>
7969                         <field name="grantable" reporter:datatype="bool"/>
7970                         <field name="id" reporter:datatype="id" />
7971                         <field name="perm" reporter:datatype="link"/>
7972                         <field name="usr" reporter:datatype="link"/>
7973                         <field name="object_type" reporter:datatype="text"/>
7974                 </fields>
7975                 <links>
7976                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7977                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
7978                 </links>
7979         </class>
7980         <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">
7981                 <fields oils_persist:primary="id" oils_persist:sequence="">
7982                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7983                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
7984                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7985                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
7986                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
7987                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
7988                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
7989                         <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7990                         <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7991                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7992                         <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7993                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7994                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7995                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7996                         <field reporter:label="Account Adjustment Detail" name="account_adjustment" oils_persist:virtual="true" reporter:datatype="link"/>
7997                 </fields>
7998                 <links>
7999                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
8000                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
8001                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
8002                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
8003                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
8004                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
8005                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
8006                         <link field="account_adjustment" reltype="might_have" key="id" map="" class="maa"/>
8007                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
8008                 </links>
8009         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8010             <actions>
8011                 <retrieve permission="VIEW_USER_TRANSACTIONS">
8012                     <context link="xact" jump="usr" field="home_ou"/>
8013                 </retrieve>
8014                         </actions>
8015                 </permacrud>
8016         </class>
8017         <class id="mbp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::bnm_payment" oils_persist:tablename="money.bnm_payment_view" reporter:core="true" reporter:label="Payments: Brick-and-mortar">
8018                 <fields oils_persist:primary="id" oils_persist:sequence="">
8019                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
8020                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
8021                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8022                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
8023                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
8024                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
8025                         <field reporter:label="Accepting User" name="accepting_usr" reporter:datatype="link"/>
8026                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
8027                         <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8028                         <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8029                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8030                         <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8031                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8032                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8033                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8034                         <field reporter:label="Account Adjustment Detail" name="account_adjustment" oils_persist:virtual="true" reporter:datatype="link"/>
8035                 </fields>
8036                 <links>
8037                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
8038                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
8039                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
8040                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
8041                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
8042                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
8043                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
8044                         <link field="account_adjustment" reltype="might_have" key="id" map="" class="maa"/>
8045                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
8046                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
8047                 </links>
8048                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8049                         <actions>
8050                                 <retrieve permission="VIEW_USER_TRANSACTIONS">
8051                                         <context link="xact" jump="usr" field="home_ou"/>
8052                                 </retrieve>
8053                         </actions>
8054                 </permacrud>
8055         </class>
8056         <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">
8057                 <fields oils_persist:primary="id" oils_persist:sequence="">
8058                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
8059                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
8060                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8061                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
8062                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
8063                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
8064                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
8065                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8066                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8067                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8068                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8069                         <field reporter:label="Account Adjustment Detail" name="account_adjustment" oils_persist:virtual="true" reporter:datatype="link"/>
8070                 </fields>
8071                 <links>
8072                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
8073                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
8074                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
8075                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
8076                         <link field="account_adjustment" reltype="might_have" key="id" map="" class="maa"/>
8077                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
8078                 </links>
8079         </class>
8080         <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">
8081                 <fields oils_persist:primary="id" oils_persist:sequence="">
8082                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
8083                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
8084                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8085                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
8086                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
8087                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
8088                         <field reporter:label="Accepting User" name="accepting_usr" reporter:datatype="link"/>
8089                         <field reporter:label="Cash Drawer" name="cash_drawer" reporter:datatype="link"/>
8090                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
8091                         <field reporter:label="Cash Payment" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8092                         <field reporter:label="Credit Card Payment" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8093                         <field reporter:label="Check Payment" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8094                 </fields>
8095                 <links>
8096                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
8097                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
8098                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
8099                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
8100                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
8101                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
8102                 </links>
8103         </class>
8104         <class id="cbrebi" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="container::biblio_record_entry_bucket_item" oils_persist:tablename="container.biblio_record_entry_bucket_item" reporter:label="Biblio Record Entry Bucket Item">
8105                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_id_seq">
8106                         <field name="bucket" reporter:datatype="link"/>
8107                         <field name="id" reporter:datatype="id" />
8108                         <field name="target_biblio_record_entry" reporter:datatype="link"/>
8109                         <field name="create_time" reporter:datatype="timestamp" />
8110                         <field name="pos" reporter:datatype="int" />
8111                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
8112                 </fields>
8113                 <links>
8114                         <link field="target_biblio_record_entry" reltype="has_a" key="id" map="" class="bre"/>
8115                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
8116             <link field="notes" reltype="has_many" map="" key="item" class="cbrebin"/>
8117                 </links>
8118                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8119                         <actions>
8120                                 <retrieve permission="ADMIN_COPY_BUCKET">
8121                     <context link="bucket" owning_lib="owning_lib"/>
8122                 </retrieve>
8123             </actions>
8124         </permacrud>
8125         </class>
8126         <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">
8127                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_note_id_seq">
8128                         <field name="id" reporter:datatype="id" />
8129                         <field name="item" reporter:datatype="link"/>
8130                         <field name="note" reporter:datatype="text" />
8131                 </fields>
8132                 <links>
8133                         <link field="item" reltype="has_a" key="id" map="" class="cbrebi"/>
8134                 </links>
8135         </class>
8136         <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">
8137                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_entry_id_seq">
8138                         <field reporter:label="Entry ID" name="id" reporter:datatype="int" />
8139                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
8140                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
8141                         <field reporter:label="Value" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
8142                 </fields>
8143                 <links>
8144                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
8145                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
8146                 </links>
8147                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8148                         <actions>
8149                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
8150                         </actions>
8151                 </permacrud>
8152         </class>
8153     <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">
8154         <fields oils_persist:primary="field">
8155             <field reporter:label="Field Identifier" name="field" reporter:datatype="text" reporter:selector="name"/>
8156             <field reporter:label="Field Name" name="name" reporter:datatype="text"/>
8157             <field reporter:label="Exclusive?" name="one_only" reporter:datatype="bool"/>
8158         </fields>
8159         <links/>
8160         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8161             <actions>
8162                 <create permission="CREATE_COPY_STAT_CAT" global_required="true"/>
8163                 <retrieve />
8164                 <update permission="UPDATE_COPY_STAT_CAT" global_required="true"/>
8165                 <delete permission="DELETE_COPY_STAT_CAT" global_required="true"/>
8166             </actions>
8167         </permacrud>
8168     </class>
8169         <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">
8170                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_cancel_cause_id_seq">
8171                         <field reporter:label="Cause ID" name="id" reporter:datatype="id" />
8172                         <field reporter:label="Cause Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
8173                 </fields>
8174                 <links/>
8175         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8176             <actions>
8177                 <create permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
8178                 <retrieve/>
8179                 <update permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
8180                 <delete permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
8181             </actions>
8182         </permacrud>
8183         </class>
8184
8185
8186         <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">
8187                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
8188                         <field reporter:label="Copy Status at Transit" name="copy_status" reporter:datatype="link"/>
8189                         <field reporter:label="Destination Library" name="dest" reporter:datatype="org_unit"/>
8190                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
8191                         <field reporter:label="Reservation requiring Transit" name="reservation" reporter:datatype="link"/>
8192                         <field reporter:label="Transit ID" name="id" reporter:datatype="id" />
8193                         <field reporter:label="Is Persistent?" name="persistant_transfer" reporter:datatype="bool"/>
8194                         <field reporter:label="Previous Stop" name="prev_hop" reporter:datatype="link"/>
8195                         <field reporter:label="Sending Library" name="source" reporter:datatype="org_unit"/>
8196                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
8197                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
8198                         <field reporter:label="Base Transit" name="transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
8199                         <field reporter:label="Prev Destination Library" name="prev_dest" reporter:datatype="org_unit"/>
8200                         <field reporter:label="Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
8201                 </fields>
8202                 <links>
8203                         <link field="transit_copy" reltype="might_have" key="id" map="" class="atc"/>
8204                         <link field="target_copy" reltype="has_a" key="id" map="" class="brsrc"/>
8205                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
8206                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
8207                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
8208                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
8209                         <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
8210                 </links>
8211         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8212             <actions>
8213                 <create permission="TRANSIT_COPY">
8214                     <context link="target_copy" field="owner"/>
8215                 </create>
8216                 <retrieve/>
8217                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
8218                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
8219             </actions>
8220         </permacrud>
8221         </class>
8222         <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">
8223                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
8224                         <field reporter:label="Copy Status at Transit" name="copy_status" reporter:datatype="link"/>
8225                         <field reporter:label="Destination Library" name="dest" reporter:datatype="org_unit"/>
8226                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
8227                         <field reporter:label="Hold requiring Transit" name="hold" reporter:datatype="link"/>
8228                         <field reporter:label="Transit ID" name="id" reporter:datatype="id" />
8229                         <field reporter:label="Is Persistent?" name="persistant_transfer" reporter:datatype="bool"/>
8230                         <field reporter:label="Previous Stop" name="prev_hop" reporter:datatype="link"/>
8231                         <field reporter:label="Sending Library" name="source" reporter:datatype="org_unit"/>
8232                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
8233                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
8234                         <field reporter:label="Base Transit" name="transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
8235                         <field reporter:label="Prev Destination Library" name="prev_dest" reporter:datatype="org_unit"/>
8236                         <field reporter:label="Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
8237                 </fields>
8238                 <links>
8239                         <link field="transit_copy" reltype="might_have" key="id" map="" class="atc"/>
8240                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
8241                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
8242                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
8243                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
8244                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
8245                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
8246                 </links>
8247         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8248             <actions>
8249                 <create permission="TRANSIT_COPY" context_field="owner">
8250                     <context link="target_copy" field="circ_lib"/>
8251                 </create>
8252                 <retrieve/>
8253                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
8254                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
8255             </actions>
8256         </permacrud>
8257         </class>
8258         <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">
8259                 <fields oils_persist:primary="id" oils_persist:sequence="money.billing_id_seq">
8260                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
8261                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
8262                         <field reporter:label="Billing Period Start" name="period_start" reporter:datatype="timestamp"/>
8263                         <field reporter:label="Billing Period End" name="period_end" reporter:datatype="timestamp"/>
8264                         <field reporter:label="Legacy Billing Timestamp" name="billing_ts" reporter:datatype="timestamp"/>
8265                         <field reporter:label="Legacy Billing Type" name="billing_type" reporter:datatype="text"/>
8266                         <field reporter:label="Billing ID" name="id" reporter:datatype="id" />
8267                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8268                         <field reporter:label="Void Timestamp" name="void_time" reporter:datatype="timestamp"/>
8269                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
8270                         <field reporter:label="Voiding Staff Member" name="voider" reporter:datatype="link"/>
8271                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
8272                         <field reporter:label="Type" name="btype" reporter:datatype="link"/>
8273                         <field reporter:label="Adjustments" name="adjustments" oils_persist:virtual="true" reporter:datatype="link"/>
8274                 </fields>
8275                 <links>
8276                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
8277                         <link field="voider" reltype="has_a" key="id" map="" class="au"/>
8278                         <link field="btype" reltype="has_a" key="id" map="" class="cbt"/>
8279                         <link field="adjustments" reltype="has_many" key="billing" map="" class="maa"/>
8280                 </links>
8281         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8282             <actions>
8283                 <retrieve permission="VIEW_USER_TRANSACTIONS">
8284                     <context link="xact" jump="usr" field="home_ou"/>
8285                 </retrieve>
8286                         </actions>
8287                 </permacrud>
8288         </class>
8289         <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">
8290                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_grp_map_id_seq">
8291                         <field name="grp" />
8292                         <field name="id" reporter:datatype="id" />
8293                         <field name="usr" />
8294                 </fields>
8295                 <links>
8296                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
8297                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
8298                 </links>
8299         </class>
8300         <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">
8301                 <fields oils_persist:primary="id" oils_persist:sequence="config.i18n_core_id_seq">
8302                         <field name="id" reporter:datatype="id" />
8303                         <field name="fq_field" reporter:datatype="text"/>
8304                         <field name="identity_value" reporter:datatype="text"/>
8305                         <field name="translation" reporter:datatype="text"/>
8306                         <field name="string" reporter:datatype="text"/>
8307                 </fields>
8308                 <links>
8309                         <link field="translation" reltype="has_a" key="code" map="" class="i18n_l"/>
8310                 </links>
8311         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8312             <actions>
8313                 <create permission="CREATE_TRANSLATION" global_required="true"/>
8314                 <retrieve permission="CREATE_TRANSLATION UPDATE_TRANSLATION DELETE_TRANSLATION" global_required="true"/>
8315                 <update permission="UPDATE_TRANSLATION" global_required="true"/>
8316                 <delete permission="DELETE_TRANSLATION" global_required="true"/>
8317             </actions>
8318         </permacrud>
8319         </class>
8320         <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">
8321                 <fields oils_persist:primary="id" oils_persist:sequence="config.idl_field_doc_id_seq">
8322                         <field name="id" reporter:datatype="id" />
8323                         <field name="fm_class" reporter:datatype="text"/>
8324                         <field name="field" reporter:datatype="text"/>
8325                         <field name="owner" reporter:datatype="org_unit"/>
8326                         <field name="string" reporter:datatype="text" oils_persist:i18n="true"/>
8327                 </fields>
8328                 <links>
8329                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
8330                 </links>
8331         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8332             <actions>
8333                 <create   permission="ADMIN_FIELD_DOC" context_field="owner"/>
8334                 <retrieve/>
8335                 <update   permission="ADMIN_FIELD_DOC" context_field="owner"/>
8336                 <delete   permission="ADMIN_FIELD_DOC" context_field="owner"/>
8337             </actions>
8338         </permacrud>
8339         </class>
8340         <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">
8341                 <fields oils_persist:primary="code">
8342                         <field name="code" reporter:datatype="id" />
8343                         <field name="marc_code" reporter:datatype="text"/>
8344                         <field name="name" reporter:datatype="text" oils_persist:i18n="true"/>
8345                         <field name="description" reporter:datatype="text" oils_persist:i18n="true"/>
8346                         <field name="rtl" reporter:datatype="bool"/>
8347                 </fields>
8348                 <links/>
8349         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8350             <actions>
8351                 <create permission="CREATE_LOCALE" global_required="true"/>
8352                 <retrieve/>
8353                 <update permission="UPDATE_LOCALE" global_required="true"/>
8354                 <delete permission="DELETE_LOCALE" global_required="true"/>
8355             </actions>
8356         </permacrud>
8357         </class>
8358         <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">
8359                 <fields oils_persist:primary="id" oils_persist:sequence="config.billing_type_id_seq">
8360                         <field name="id" reporter:datatype="id" reporter:label="ID" reporter:selector="name"/>
8361                         <field name="name" reporter:datatype="text" reporter:label="Name" oils_persist:i18n="true"/>
8362                         <field name="owner" reporter:datatype="org_unit" reporter:label="Org Unit" />
8363             <field name="default_price" reporter:datatype="money" reporter:label="Default Price"/>
8364                 </fields>
8365                 <links>
8366                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
8367                 </links>
8368         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8369             <actions>
8370                 <create permission="CREATE_BILLING_TYPE" context_field="owner"/>
8371                 <retrieve permission="VIEW_BILLING_TYPE CREATE_BILLING_TYPE UPDATE_BILLING_TYPE DELETE_BILLING_TYPE" context_field="owner"/>
8372                 <update permission="UPDATE_BILLING_TYPE" context_field="owner"/>
8373                 <delete permission="DELETE_BILLING_TYPE" context_field="owner"/>
8374             </actions>
8375         </permacrud>
8376         </class>
8377
8378         <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">
8379                 <fields oils_persist:primary="id">
8380                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
8381                         <field reporter:label="Type Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
8382                 </fields>
8383                 <links/>
8384         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8385             <actions>
8386                 <create permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
8387                 <retrieve/>
8388                 <update permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
8389                 <delete permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
8390             </actions>
8391         </permacrud>
8392         </class>
8393
8394         <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">
8395                 <fields oils_persist:primary="id" oils_persist:sequence="acq.user_request_id_seq">
8396                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
8397                         <field reporter:label="User" name="usr" reporter:datatype="link" />
8398                         <field reporter:label="Request Type" name="request_type" oils_obj:required="true" reporter:datatype="link" />
8399                         <field reporter:label="Place Hold" name="hold" reporter:datatype="bool" />
8400                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link" />
8401                         <field reporter:label="Holdable Formats" name="holdable_formats" reporter:datatype="text" />
8402                         <field reporter:label="Phone Notify" name="phone_notify" reporter:datatype="text" />
8403                         <field reporter:label="Email Notify" name="email_notify" reporter:datatype="bool" />
8404                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
8405                         <field reporter:label="Bib Record" name="eg_bib" reporter:datatype="link" />
8406                         <field reporter:label="Request Date/Time" name="request_date" reporter:datatype="timestamp" />
8407                         <field reporter:label="Need Before Date/Time" name="need_before" reporter:datatype="timestamp" />
8408                         <field reporter:label="Max Acceptable Fee" name="max_fee" reporter:datatype="text" />
8409                         <field reporter:label="ISxN" name="isxn" reporter:datatype="text" />
8410                         <field reporter:label="UPC" name="upc" reporter:datatype="text" />
8411                         <field reporter:label="Title" name="title" reporter:datatype="text" />
8412                         <field reporter:label="Volume" name="volume" reporter:datatype="text" />
8413                         <field reporter:label="Author" name="author" reporter:datatype="text" />
8414                         <field reporter:label="Article Title" name="article_title" reporter:datatype="text" />
8415                         <field reporter:label="Article Pages" name="article_pages" reporter:datatype="text" />
8416                         <field reporter:label="Publisher" name="publisher" reporter:datatype="text" />
8417                         <field reporter:label="Publication Location" name="location" reporter:datatype="text" />
8418                         <field reporter:label="Publication Date" name="pubdate" reporter:datatype="text" />
8419                         <field reporter:label="Mentioned In" name="mentioned" reporter:datatype="text" />
8420                         <field reporter:label="Other Info" name="other_info" reporter:datatype="text" />
8421                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
8422                         <field reporter:label="Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp" />
8423                 </fields>
8424                 <links>
8425                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
8426                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
8427                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
8428                         <link field="eg_bib" reltype="has_a" key="id" map="" class="bre"/>
8429                         <link field="request_type" reltype="has_a" key="id" map="" class="aurt"/>
8430                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
8431                 </links>
8432         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8433             <actions>
8434                 <create permission="user_request.create">
8435                     <context link="usr" field="home_ou"/>
8436                                 </create>
8437                 <retrieve permission="user_request.view">
8438                     <context link="usr" field="home_ou"/>
8439                                 </retrieve>
8440                 <update permission="user_request.update">
8441                     <context link="usr" field="home_ou"/>
8442                                 </update>
8443                 <delete permission="user_request.delete">
8444                     <context link="usr" field="home_ou"/>
8445                                 </delete>
8446             </actions>
8447         </permacrud>
8448         </class>
8449
8450         <class id="aurs" controller="open-ils.cstore open-ils.reporter-store open-ils.pcrud" oils_obj:fieldmapper="acq::user_request_status" reporter:label="User Purchase Request with Status" oils_persist="readonly">
8451         <oils_persist:source_definition><![CDATA[
8452             SELECT r.*, CASE
8453                         WHEN r.cancel_reason IS NOT NULL THEN 7 -- Canceled
8454                         WHEN h.fulfillment_time IS NOT NULL THEN 6 -- Fulfilled
8455                         WHEN l.state = 'received' THEN 5 -- Received
8456                         WHEN p.state = 'on-order' AND h.id IS NOT NULL THEN 4 -- Ordered, Hold Placed
8457                         WHEN p.state = 'on-order' AND h.id IS NULL THEN 3 -- Ordered, Hold Not Placed
8458                         WHEN l.id IS NOT NULL THEN 2 -- Pending
8459                         WHEN l.id IS NULL THEN 1 -- New
8460                         ELSE 0 -- Error
8461                     END AS request_status
8462                     ,u.home_ou
8463             FROM      acq.user_request r
8464             JOIN actor.usr u ON (r.usr = u.id)
8465             LEFT JOIN acq.lineitem l ON (r.lineitem = l.id)
8466             LEFT JOIN acq.purchase_order p ON (l.purchase_order = p.id)
8467             LEFT JOIN action.hold_request h ON (h.acq_request = r.id)
8468         ]]></oils_persist:source_definition>
8469                 <fields oils_persist:primary="id">
8470                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
8471                         <field reporter:label="User" name="usr" reporter:datatype="link" />
8472                         <field reporter:label="Request Type" name="request_type" oils_obj:required="true" reporter:datatype="link" />
8473                         <field reporter:label="Place Hold" name="hold" reporter:datatype="bool" />
8474                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link" />
8475                         <field reporter:label="Holdable Formats" name="holdable_formats" reporter:datatype="text" />
8476                         <field reporter:label="Phone Notify" name="phone_notify" reporter:datatype="text" />
8477                         <field reporter:label="Email Notify" name="email_notify" reporter:datatype="bool" />
8478                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
8479                         <field reporter:label="Bib Record" name="eg_bib" reporter:datatype="link" />
8480                         <field reporter:label="Request Date/Time" name="request_date" reporter:datatype="timestamp" />
8481                         <field reporter:label="Need Before Date/Time" name="need_before" reporter:datatype="timestamp" />
8482                         <field reporter:label="Max Acceptable Fee" name="max_fee" reporter:datatype="text" />
8483                         <field reporter:label="ISxN" name="isxn" reporter:datatype="text" />
8484                         <field reporter:label="UPC" name="upc" reporter:datatype="text" />
8485                         <field reporter:label="Title" name="title" reporter:datatype="text" />
8486                         <field reporter:label="Volume" name="volume" reporter:datatype="text" />
8487                         <field reporter:label="Author" name="author" reporter:datatype="text" />
8488                         <field reporter:label="Article Title" name="article_title" reporter:datatype="text" />
8489                         <field reporter:label="Article Pages" name="article_pages" reporter:datatype="text" />
8490                         <field reporter:label="Publisher" name="publisher" reporter:datatype="text" />
8491                         <field reporter:label="Publication Location" name="location" reporter:datatype="text" />
8492                         <field reporter:label="Publication Date" name="pubdate" reporter:datatype="text" />
8493                         <field reporter:label="Mentioned In" name="mentioned" reporter:datatype="text" />
8494                         <field reporter:label="Other Info" name="other_info" reporter:datatype="text" />
8495                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
8496                         <field reporter:label="Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp" />
8497                         <field reporter:label="Request Status" name="request_status" reporter:datatype="link" />
8498                         <field reporter:label="Home Library" name="home_ou" reporter:datatype="link"/>
8499                 </fields>
8500                 <links>
8501                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
8502                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
8503                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
8504                         <link field="eg_bib" reltype="has_a" key="id" map="" class="bre"/>
8505                         <link field="request_type" reltype="has_a" key="id" map="" class="aurt"/>
8506                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
8507                         <link field="request_status" reltype="has_a" key="id" map="" class="aurst"/>
8508                         <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
8509                 </links>
8510         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8511             <actions>
8512                 <retrieve permission="user_request.view">
8513                     <context link="usr" field="home_ou"/>
8514                                 </retrieve>
8515             </actions>
8516         </permacrud>
8517         </class>
8518
8519         <class id="aurst" controller="open-ils.cstore open-ils.reporter-store open-ils.pcrud" oils_obj:fieldmapper="acq::user_request_status_type" oils_persist:tablename="acq.user_request_status_type" reporter:label="Acquisition Patron Request Status Type">
8520                 <fields oils_persist:primary="id">
8521                         <field reporter:label="Status ID" name="id" reporter:datatype="id" reporter:selector='label'/>
8522                         <field reporter:label="Status" name="label" reporter:datatype="text" oils_persist:i18n="true" />
8523                 </fields>
8524                 <links/>
8525         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8526             <actions>
8527                 <retrieve/>
8528             </actions>
8529         </permacrud>
8530         </class>
8531
8532         <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">
8533                 <fields oils_persist:primary="code">
8534                         <field reporter:label="Currency Code" name="code" reporter:datatype="text" reporter:selector='label'/>
8535                         <field reporter:label="Currency Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
8536                 </fields>
8537                 <links/>
8538         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8539             <actions>
8540                 <create permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
8541                 <retrieve/>
8542                 <update permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
8543                 <delete permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
8544             </actions>
8545         </permacrud>
8546         </class>
8547
8548         <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">
8549                 <fields oils_persist:primary="id" oils_persist:sequence="acq.exchange_rate_id_seq">
8550                         <field reporter:label="Exchange Rate ID" name="id" reporter:datatype="id" />
8551                         <field reporter:label="From Currency" name="from_currency" reporter:datatype="link" />
8552                         <field reporter:label="To Currency" name="to_currency" reporter:datatype="link" />
8553                         <field reporter:label="Ratio" name="ratio" />
8554                 </fields>
8555                 <links>
8556                         <link field="from_currency" reltype="has_a" key="code" map="" class="acqct"/>
8557                         <link field="to_currency" reltype="has_a" key="code" map="" class="acqct"/>
8558                 </links>
8559                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8560                         <actions>
8561                                 <create permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
8562                                 <retrieve/>
8563                                 <update permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
8564                                 <delete permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
8565                         </actions>
8566                 </permacrud>
8567         </class>
8568
8569         <class id="acqpro" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::provider" oils_persist:tablename="acq.provider" reporter:label="Provider">
8570                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_id_seq">
8571                         <field reporter:label="Provider ID" name="id" reporter:datatype="id" reporter:selector='code'/>
8572                         <field reporter:label="Provider Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
8573                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" />
8574                         <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" />
8575                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8576                         <field reporter:label="Holdings Tag" name="holding_tag" reporter:datatype="text" />
8577                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link" />
8578                         <field reporter:label="SAN" name="san" reporter:datatype="text" />
8579                         <field reporter:label="EDI Default" name="edi_default" reporter:datatype="link" />
8580                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
8581                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
8582                         <field reporter:label="URL" name="url" reporter:datatype="text" />
8583                         <field reporter:label="Email" name="email" reporter:datatype="text" />
8584                         <field reporter:label="Phone" name="phone" reporter:datatype="text" />
8585                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text" />
8586                         <field reporter:label="Default Claim Policy" name="default_claim_policy" reporter:datatype="link" />
8587                         <field reporter:label="Default # Copies" name="default_copy_count" reporter:datatype="int" />
8588                         <field reporter:label="Notes" name="provider_notes" oils_persist:virtual="true" reporter:datatype="link" />
8589                 </fields>
8590                 <links>
8591                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
8592                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
8593             <link field="addresses" reltype="has_many" map="" key="provider" class="acqpa"/>
8594             <link field="edi_default" reltype="has_a" map="" key="id" class="acqedi"/>
8595                         <link field="default_claim_policy" reltype="has_a" map="" key="id" class="acqclp"/>
8596                         <link field="provider_notes" reltype="has_many" map="" key="provider" class="acqpron"/>
8597                 </links>
8598         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8599             <actions>
8600                 <create   permission="ADMIN_PROVIDER" context_field="owner"/>
8601                 <retrieve permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER" context_field="owner"/>
8602                 <update   permission="ADMIN_PROVIDER" context_field="owner"/>
8603                 <delete   permission="ADMIN_PROVIDER" context_field="owner"/>
8604             </actions>
8605         </permacrud>
8606         </class>
8607
8608         <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">
8609                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_note_id_seq">
8610                         <field reporter:label="PO Note ID" name="id" reporter:datatype="id" />
8611                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
8612                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
8613                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
8614                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
8615                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
8616                         <field reporter:label="Note Value" name="value" reporter:datatype="text" />
8617                 </fields>
8618                 <links>
8619                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8620                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8621                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8622                 </links>
8623         </class>
8624
8625         <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">
8626                 <fields oils_persist:primary="code">
8627                         <field reporter:label="Code" name="code" reporter:datatype="id" reporter:selector="name"/>
8628                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
8629                 </fields>
8630                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8631             <actions>
8632                 <create permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
8633                 <retrieve/>
8634                 <update permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
8635                 <delete permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
8636             </actions>
8637                 </permacrud>
8638         </class>
8639
8640         <class id="acqinv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::invoice" oils_persist:tablename="acq.invoice" reporter:label="Invoice">
8641                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_id_seq">
8642                         <field reporter:label="Internal Invoice ID" name="id" reporter:datatype="id"/>
8643                         <field reporter:label="Receiver" name="receiver" reporter:datatype="org_unit" />
8644                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
8645                         <field reporter:label="Shipper" name="shipper" reporter:datatype="link"/>
8646                         <field reporter:label="Invoice Date" name="recv_date" reporter:datatype="timestamp" />
8647                         <field reporter:label="Receive Method" name="recv_method" reporter:datatype="link" />
8648                         <field reporter:label="Invoice Type" name="inv_type" reporter:datatype="text" />
8649                         <field reporter:label="Vendor Invoice ID" name="inv_ident" reporter:datatype="text" />
8650                         <field reporter:label="Payment Auth" name="payment_auth" reporter:datatype="text" />
8651                         <field reporter:label="Payment Method" name="payment_method" reporter:datatype="link" />
8652                         <field reporter:label="Note" name="note" reporter:datatype="text" />
8653                         <field reporter:label="Close Date" name="close_date" reporter:datatype="timestamp" />
8654                         <field reporter:label="Closed By" name="closed_by" reporter:datatype="link" />
8655                         <field reporter:label="Invoice Entries" name="entries" reporter:datatype="link" oils_persist:virtual="true"/>
8656                         <field reporter:label="Invoice Items" name="items" reporter:datatype="link" oils_persist:virtual="true"/>
8657                 </fields>
8658                 <links>
8659                         <link field="receiver" reltype="has_a" key="id" map="" class="aou"/>
8660                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8661                         <link field="shipper" reltype="has_a" key="id" map="" class="acqpro"/>
8662                         <link field="recv_method" reltype="has_a" key="code" map="" class="acqim"/>
8663                         <link field="payment_method" reltype="has_a" key="code" map="" class="acqipm"/>
8664                         <link field="entries" reltype="has_many" key="invoice" map="" class="acqie"/>
8665                         <link field="items" reltype="has_many" key="invoice" map="" class="acqii"/>
8666                         <link field="closed_by" reltype="has_a" key="id" map="" class="au"/>
8667                 </links>
8668         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8669             <actions>
8670                 <create   permission="CREATE_INVOICE" context_field="receiver"/>
8671                 <retrieve permission="CREATE_INVOICE VIEW_INVOICE" context_field="receiver"/>
8672                 <update   permission="CREATE_INVOICE" context_field="receiver"/>
8673                 <delete   permission="CREATE_INVOICE" context_field="receiver"/>
8674             </actions>
8675         </permacrud>
8676         </class>
8677
8678         <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">
8679                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_entry_id_seq">
8680                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
8681                         <field reporter:label="Invoice" name="invoice" reporter:datatype="link" />
8682                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
8683                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link"/>
8684                         <field reporter:label="Invoice Item Count" name="inv_item_count" reporter:datatype="int" />
8685                         <field reporter:label="Physical Item Count" name="phys_item_count" reporter:datatype="int" />
8686                         <field reporter:label="Note" name="note" reporter:datatype="text" />
8687                         <field reporter:label="Billed Cost per Item" name="billed_per_item" reporter:datatype="bool" />
8688                         <field reporter:label="Cost Billed" name="cost_billed" reporter:datatype="money" />
8689                         <field reporter:label="Actual Cost" name="actual_cost" reporter:datatype="money" />
8690                         <field reporter:label="Amount Paid" name="amount_paid" reporter:datatype="money" />
8691                 </fields>
8692                 <links>
8693                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv"/>
8694                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8695                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
8696                 </links>
8697         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8698             <actions>
8699                 <create   permission="ADMIN_INVOICE">
8700                                         <context link="invoice" field="receiver"/>
8701                                 </create>
8702                 <retrieve permission="ADMIN_INVOICE">
8703                                         <context link="invoice" field="receiver"/>
8704                                 </retrieve>
8705                 <update   permission="ADMIN_INVOICE">
8706                                         <context link="invoice" field="receiver"/>
8707                                 </update>
8708                                 <delete   permission="ADMIN_INVOICE">
8709                                         <context link="invoice" field="receiver"/>
8710                                 </delete>
8711             </actions>
8712         </permacrud>
8713         </class>
8714
8715         <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">
8716                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_item_id_seq">
8717                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
8718                         <field reporter:label="Invoice" name="invoice" reporter:datatype="link" />
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 or Item Name" 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="Cost Billed" name="cost_billed" reporter:datatype="money" />
8726                         <field reporter:label="Actual Cost" name="actual_cost" reporter:datatype="money" />
8727                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
8728                         <field reporter:label="Amount Paid" name="amount_paid" reporter:datatype="money" />
8729                         <field reporter:label="Purchase Order Item" name="po_item" reporter:datatype="link" />
8730                         <field reporter:label="Target" name="target" reporter:datatype="int" />
8731                 </fields>
8732                 <links>
8733                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv"/>
8734                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8735                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
8736                         <link field="inv_item_type" reltype="has_a" key="code" map="" class="aiit"/>
8737                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8738                         <link field="po_item" reltype="has_a" key="id" map="" class="acqpoi"/>
8739                 </links>
8740         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8741             <actions>
8742                 <create   permission="ADMIN_INVOICE">
8743                                         <context link="invoice" field="receiver"/>
8744                                 </create>
8745                 <retrieve permission="ADMIN_INVOICE">
8746                                         <context link="invoice" field="receiver"/>
8747                                 </retrieve>
8748                 <update   permission="ADMIN_INVOICE">
8749                                         <context link="invoice" field="receiver"/>
8750                                 </update>
8751                                 <delete   permission="ADMIN_INVOICE">
8752                                         <context link="invoice" field="receiver"/>
8753                                 </delete>
8754             </actions>
8755         </permacrud>
8756         </class>
8757
8758         <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">
8759                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_address_id_seq">
8760                         <field reporter:label="Address Type" name="address_type"  reporter:datatype="text"/>
8761                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
8762                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
8763                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
8764                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
8765                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
8766                         <field reporter:label="Post Code" name="post_code"  reporter:datatype="text"/>
8767                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
8768                         <field reporter:label="Street 1" name="street1"  reporter:datatype="text"/>
8769                         <field reporter:label="Street 2" name="street2"  reporter:datatype="text"/>
8770                         <field reporter:label="Is Valid?" name="valid" reporter:datatype="bool"/>
8771                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text"/>
8772                 </fields>
8773                 <links>
8774                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8775                 </links>
8776         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8777             <actions>
8778                 <create permission="ADMIN_PROVIDER">
8779                     <context link="provider" field="owner"/>
8780                 </create>
8781                 <retrieve permission="ADMIN_PROVIDER">
8782                     <context link="provider" field="owner"/>
8783                 </retrieve>
8784                 <update permission="ADMIN_PROVIDER">
8785                     <context link="provider" field="owner"/>
8786                 </update>
8787                 <delete permission="ADMIN_PROVIDER">
8788                     <context link="provider" field="owner"/>
8789                 </delete>
8790             </actions>
8791         </permacrud>
8792         </class>
8793
8794         <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">
8795                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_id_seq">
8796                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
8797                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
8798                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
8799                         <field reporter:label="Role" name="role" reporter:datatype="text"/>
8800                         <field reporter:label="Email" name="email" reporter:datatype="text"/>
8801                         <field reporter:label="Phone" name="phone" reporter:datatype="text"/>
8802         </fields>
8803                 <links>
8804                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8805                 </links>
8806         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8807             <actions>
8808                 <create permission="ADMIN_PROVIDER">
8809                     <context link="provider" field="owner"/>
8810                 </create>
8811                 <retrieve permission="ADMIN_PROVIDER">
8812                     <context link="provider" field="owner"/>
8813                 </retrieve>
8814                 <update permission="ADMIN_PROVIDER">
8815                     <context link="provider" field="owner"/>
8816                 </update>
8817                 <delete permission="ADMIN_PROVIDER">
8818                     <context link="provider" field="owner"/>
8819                 </delete>
8820             </actions>
8821         </permacrud>
8822     </class>
8823         <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">
8824                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_address_id_seq">
8825                         <field reporter:label="Type" name="address_type"  reporter:datatype="text"/>
8826                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
8827                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
8828                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
8829                         <field reporter:label="Address ID" name="id" reporter:datatype="id" />
8830                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
8831                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
8832                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
8833                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
8834                         <field reporter:label="Contact" name="contact" reporter:datatype="link"/>
8835                         <field reporter:label="Valid Address?" name="valid" reporter:datatype="bool"/>
8836                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text"/>
8837                 </fields>
8838                 <links>
8839                         <link field="contact" reltype="has_a" key="id" map="" class="acqpc"/>
8840                 </links>
8841         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8842             <actions>
8843                 <create permission="ADMIN_PROVIDER">
8844                     <context link="contact" jump='provider' field="owner"/>
8845                 </create>
8846                 <retrieve permission="ADMIN_PROVIDER">
8847                     <context link="contact" jump='provider' field="owner"/>
8848                 </retrieve>
8849                 <update permission="ADMIN_PROVIDER">
8850                     <context link="contact" jump='provider' field="owner"/>
8851                 </update>
8852                 <delete permission="ADMIN_PROVIDER">
8853                     <context link="contact" jump='provider' field="owner"/>
8854                 </delete>
8855             </actions>
8856         </permacrud>
8857         </class>
8858
8859         <class id="acqftr" controller="open-ils.cstore" oils_obj:fieldmapper="acq::fund_transfer" oils_persist:tablename="acq.fund_transfer" reporter:label="Fund Transfer">
8860                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_transfer_id_seq">
8861                         <field reporter:label="Fund Transfer ID" name="id" reporter:datatype="id"/>
8862                         <field reporter:label="Source Fund" name="src_fund" reporter:datatype="link"/>
8863                         <field reporter:label="Source Amount" name="src_amount" reporter:datatype="money"/>
8864                         <field reporter:label="Destination Fund" name="dest_fund" reporter:datatype="link"/>
8865                         <field reporter:label="Destination Amount" name="dest_amount" reporter:datatype="money"/>
8866                         <field reporter:label="Transfer Time" name="transfer_time" reporter:datatype="timestamp"/>
8867                         <field reporter:label="Transfer User" name="transfer_user" reporter:datatype="link"/>
8868                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8869                         <field reporter:label="Funding Source Credit ID" name="funding_source_credit" reporter:datatype="link"/>
8870                 </fields>
8871                 <links>
8872                         <link field="src_fund" reltype="has_a" key="id" map="" class="acqf"/>
8873                         <link field="dest_fund" reltype="has_a" key="id" map="" class="acqf"/>
8874                         <link field="transfer_user" reltype="has_a" key="id" map="" class="au"/>
8875                         <link field="funding_source_credit" reltype="has_a" key="id" map="" class="acqfscred"/>
8876                 </links>
8877         </class>
8878
8879         <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">
8880                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fiscal_calendar_id_seq">
8881                         <field reporter:label="Fiscal Calendar ID" name="id" reporter:datatype="id" reporter:selector='name'/>
8882                         <field reporter:label="Fiscal Calendar Name" name="name" reporter:datatype="text"/>
8883                         <field reporter:label="Years" name="years" oils_persist:virtual="true" reporter:datatype="link"/>
8884                 </fields>
8885                 <links>
8886             <link field="years" reltype="has_many" map="" key="calendar" class="acqfy"/>
8887                 </links>
8888                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8889                         <actions>
8890                                 <create permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
8891                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
8892                                 <update permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
8893                                 <delete permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
8894                         </actions>
8895                 </permacrud>
8896         </class>
8897
8898         <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">
8899                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fiscal_year_id_seq">
8900                         <field reporter:label="Fiscal Year ID" name="id" reporter:datatype="id" reporter:selector='year'/>
8901                         <field reporter:label="Calendar" name="calendar" reporter:datatype="link"/>
8902                         <field reporter:label="Fiscal Year" name="year" reporter:datatype="int"/>
8903                         <field reporter:label="Year Begin" name="year_begin" reporter:datatype="timestamp"/>
8904                         <field reporter:label="Year End" name="year_end" reporter:datatype="timestamp"/>
8905                 </fields>
8906                 <links>
8907                         <link field="calendar" reltype="has_a" key="id" map="" class="acqfc"/>
8908                 </links>
8909                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8910                         <actions>
8911                                 <create permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
8912                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
8913                                 <update permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
8914                                 <delete permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
8915                         </actions>
8916                 </permacrud>
8917         </class>
8918
8919         <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">
8920                 <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_id_seq">
8921                         <field reporter:label="Funding Source ID" name="id" reporter:datatype="id" reporter:selector='code'/>
8922                         <field reporter:label="Funding Source Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
8923                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" />
8924                         <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" />
8925                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8926                         <field reporter:label="Summary" name="summary" oils_persist:virtual="true"/>
8927                         <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>
8928                         <field reporter:label="Credits" name="credits" oils_persist:virtual="true" reporter:datatype="link"/>
8929                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
8930                 </fields>
8931                 <links>
8932                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
8933                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
8934             <link field="allocations" reltype="has_many" map="" key="funding_source" class="acqfa"/>
8935             <link field="credits" reltype="has_many" key="funding_source" map="" class="acqfscred"/>
8936                         <link field="fund_alloc_pcts" reltype="has_many" key="funding_source" map="" class="acqfap"/>
8937                 </links>
8938         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8939             <actions>
8940                 <create   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
8941                 <retrieve permission="ADMIN_FUNDING_SOURCE MANAGE_FUNDING_SOURCE VIEW_FUNDING_SOURCE" context_field="owner"/>
8942                 <update   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
8943                 <delete   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
8944             </actions>
8945         </permacrud>
8946         </class>
8947
8948         <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">
8949                 <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_credit_id_seq">
8950                         <field reporter:label="Credit ID" name="id" reporter:datatype="id" />
8951                         <field reporter:label="Funding Source ID" name="funding_source" reporter:datatype="link" />
8952                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
8953                         <field reporter:label="Note" name="note" reporter:datatype="text" />
8954                         <field reporter:label="Deadline Date" name="deadline_date" reporter:datatype="timestamp" />
8955                         <field reporter:label="Effective Date" name="effective_date" reporter:datatype="timestamp" />
8956                 </fields>
8957                 <links>
8958                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
8959                 </links>
8960                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8961                         <actions>
8962                                 <create permission="ADMIN_FUNDING_SOURCE">
8963                     <context link="funding_source" field="owner"/>
8964                 </create>
8965                                 <retrieve permission="ADMIN_FUNDING_SOURCE">
8966                     <context link="funding_source" field="owner"/>
8967                 </retrieve>
8968                                 <update permission="ADMIN_FUNDING_SOURCE">
8969                     <context link="funding_source" field="owner"/>
8970                 </update>
8971                                 <delete permission="ADMIN_FUNDING_SOURCE">
8972                     <context link="funding_source" field="owner"/>
8973                 </delete>
8974                         </actions>
8975                 </permacrud>
8976         </class>
8977
8978         <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">
8979                 <fields oils_persist:primary="id">
8980                         <field reporter:label="Ordered Fund Src ID" name="id" reporter:datatype="id"/>
8981                         <field reporter:label="Sort Priority" name="sort_priority" reporter:datatype="int"/>
8982                         <field reporter:label="Sort Date" name="sort_date" reporter:datatype="timestamp"/>
8983                         <field reporter:label="Funding Source ID" name="funding_source" reporter:datatype="link"/>
8984                         <field reporter:label="Amount" name="amount" reporter:datatype="money"/>
8985                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8986                 </fields>
8987                 <links>
8988                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
8989                 </links>
8990         </class>
8991
8992         <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">
8993                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_debit_id_seq">
8994                         <field reporter:label="Debit ID" name="id" reporter:datatype="id" />
8995                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8996                         <field reporter:label="Origin Amount" name="origin_amount" reporter:datatype="money" />
8997                         <field reporter:label="Origin Currency" name="origin_currency_type" reporter:datatype="link" />
8998                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
8999                         <field reporter:label="Encumbrance" name="encumbrance" reporter:datatype="bool" />
9000                         <field reporter:label="Debit Type" name="debit_type" reporter:datatype="text" />
9001                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
9002                         <field reporter:label="Invoice Entry" name="invoice_entry" reporter:datatype="link" />
9003                 </fields>
9004                 <links>
9005                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9006                         <link field="origin_currency_type" reltype="has_a" key="code" map="" class="acqct"/>
9007                         <link field="invoice_entry" reltype="has_a" key="id" map="" class="acqie"/>
9008                 </links>
9009                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9010                         <actions>
9011                                 <create permission="ADMIN_ACQ_FUND">
9012                     <context link="fund" field="org"/>
9013                 </create>
9014                                 <retrieve permission="ADMIN_ACQ_FUND">
9015                     <context link="fund" field="org"/>
9016                 </retrieve>
9017                                 <update permission="ADMIN_ACQ_FUND">
9018                     <context link="fund" field="org"/>
9019                 </update>
9020                                 <delete permission="ADMIN_ACQ_FUND">
9021                     <context link="fund" field="org"/>
9022                 </delete>
9023                         </actions>
9024                 </permacrud>
9025         </class>
9026
9027         <class id="acqf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::fund" oils_persist:tablename="acq.fund" reporter:label="Fund">
9028                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_id_seq">
9029                         <field reporter:label="Fund ID" name="id" reporter:datatype="id" reporter:selector='code'/>
9030                         <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
9031                         <field reporter:label="Name" name="name" reporter:datatype="text" />
9032                         <field reporter:label="Year" name="year" reporter:datatype="int" />
9033                         <field reporter:label="Currency Type" name="currency_type" reporter:datatype="link" />
9034                         <field reporter:label="Code" name="code" reporter:datatype="text" />
9035                         <field reporter:label="Rollover" name="rollover" reporter:datatype="bool" />
9036                         <field reporter:label="Propagate" name="propagate" reporter:datatype="bool" />
9037                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
9038                         <field reporter:label="Balance Warning Percent" name="balance_warning_percent" reporter:datatype="int" />
9039                         <field reporter:label="Balance Stop Percent" name="balance_stop_percent" reporter:datatype="int" />
9040                         <field reporter:label="Summary" name="summary" oils_persist:virtual="true"/>
9041                         <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>
9042                         <field reporter:label="Debits" name="debits" oils_persist:virtual="true" reporter:datatype="link"/>
9043                         <field reporter:label="Tags" name="tags" oils_persist:virtual="true" reporter:datatype="link"/>
9044                         <field reporter:label="Allocation Total" name="allocation_total" oils_persist:virtual="true" reporter:datatype="link"/>
9045                         <field reporter:label="Debit Total" name="debit_total" oils_persist:virtual="true" reporter:datatype="link"/>
9046                         <field reporter:label="Encumbrance Total" name="encumbrance_total" oils_persist:virtual="true" reporter:datatype="link"/>
9047                         <field reporter:label="Spent Total" name="spent_total" oils_persist:virtual="true" reporter:datatype="link"/>
9048                         <field reporter:label="Combined Balance" name="combined_balance" oils_persist:virtual="true" reporter:datatype="link"/>
9049                         <field reporter:label="Spent Balance" name="spent_balance" oils_persist:virtual="true" reporter:datatype="link"/>
9050                 </fields>
9051                 <links>
9052                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
9053                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
9054             <link field="allocations" reltype="has_many" key="fund" map="" class="acqfa"/>
9055             <link field="debits" reltype="has_many" key="fund" map="" class="acqfdeb"/>
9056             <link field="tags" reltype="has_many" key="fund" map="" class="acqftm"/>
9057             <link field="allocation_total" reltype="might_have" key="fund" map="" class="acqfat"/>
9058             <link field="debit_total" reltype="might_have" key="fund" map="" class="acqfdt"/>
9059             <link field="encumbrance_total" reltype="might_have" key="fund" map="" class="acqfet"/>
9060             <link field="spent_total" reltype="might_have" key="fund" map="" class="acqfst"/>
9061             <link field="combined_balance" reltype="might_have" key="fund" map="" class="acqfcb"/>
9062             <link field="spent_balance" reltype="might_have" key="fund" map="" class="acqfsb"/>
9063                 </links>
9064         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1" ignore_object_perms="true">
9065             <actions>
9066                 <create permission="ADMIN_ACQ_FUND" context_field="org"/>
9067                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="org"/>
9068                 <update permission="ADMIN_ACQ_FUND" context_field="org"/>
9069                 <delete permission="ADMIN_ACQ_FUND" context_field="org"/>
9070             </actions>
9071         </permacrud>
9072         </class>
9073
9074         <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">
9075                 <fields oils_persist:primary="fund">
9076                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
9077                         <field reporter:label="Total Allocation Amount" name="amount" reporter:datatype="money" />
9078                 </fields>
9079                 <links>
9080                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9081                 </links>
9082         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9083             <actions>
9084                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
9085                                         <context link="fund" field="org" />
9086                 </retrieve>
9087             </actions>
9088         </permacrud>
9089         </class>
9090
9091         <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">
9092                 <fields oils_persist:primary="fund">
9093                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
9094                         <field reporter:label="Total Debit Amount" name="amount" reporter:datatype="money" />
9095                 </fields>
9096                 <links>
9097                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9098                 </links>
9099         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9100             <actions>
9101                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
9102                                         <context link="fund" field="org" />
9103                 </retrieve>
9104             </actions>
9105         </permacrud>
9106         </class>
9107
9108         <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">
9109                 <fields oils_persist:primary="fund">
9110                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
9111                         <field reporter:label="Total Encumbrance Amount" name="amount" reporter:datatype="money" />
9112                 </fields>
9113                 <links>
9114                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9115                 </links>
9116         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9117             <actions>
9118                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
9119                                         <context link="fund" field="org" />
9120                 </retrieve>
9121             </actions>
9122         </permacrud>
9123         </class>
9124
9125         <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">
9126                 <fields oils_persist:primary="fund">
9127                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
9128                         <field reporter:label="Total Spent Amount" name="amount" reporter:datatype="money" />
9129                 </fields>
9130                 <links>
9131                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9132                 </links>
9133         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9134             <actions>
9135                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
9136                                         <context link="fund" field="org" />
9137                 </retrieve>
9138             </actions>
9139         </permacrud>
9140         </class>
9141
9142         <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">
9143                 <fields oils_persist:primary="fund">
9144                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
9145                         <field reporter:label="Balance after Spent and Encumbered" name="amount" reporter:datatype="money" />
9146                 </fields>
9147                 <links>
9148                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9149                 </links>
9150         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9151             <actions>
9152                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
9153                                         <context link="fund" field="org" />
9154                 </retrieve>
9155             </actions>
9156         </permacrud>
9157         </class>
9158
9159    <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">
9160         <fields oils_persist:primary="fund">
9161             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
9162             <field reporter:label="Total Allocation Amount" name="amount" reporter:datatype="money" />
9163         </fields>
9164         <links>
9165             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9166         </links>
9167     </class>
9168
9169    <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">
9170         <fields oils_persist:primary="fund">
9171             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
9172             <field reporter:label="Total Encumbered Amount" name="amount" reporter:datatype="money" />
9173         </fields>
9174         <links>
9175             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9176         </links>
9177     </class>
9178
9179    <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">
9180         <fields oils_persist:primary="fund">
9181             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
9182             <field reporter:label="Total Spent Amount" name="amount" reporter:datatype="money" />
9183         </fields>
9184         <links>
9185             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9186         </links>
9187     </class>
9188
9189    <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">
9190         <fields oils_persist:primary="fund">
9191             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
9192             <field reporter:label="Total Spent Balance" name="amount" reporter:datatype="money" />
9193         </fields>
9194         <links>
9195             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9196         </links>
9197     </class>
9198
9199    <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">
9200         <fields oils_persist:primary="fund">
9201             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
9202             <field reporter:label="Total Combined Balance" name="amount" reporter:datatype="money" />
9203         </fields>
9204         <links>
9205             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9206         </links>
9207     </class>
9208
9209         <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">
9210                 <fields oils_persist:primary="funding_source">
9211                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
9212                         <field reporter:label="Total Credits to Funding Source" name="amount" reporter:datatype="money" />
9213                 </fields>
9214                 <links>
9215                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
9216                 </links>
9217         </class>
9218
9219         <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">
9220                 <fields oils_persist:primary="funding_source">
9221                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
9222                         <field reporter:label="Total Allocated from Funding Source" name="amount" reporter:datatype="money" />
9223                 </fields>
9224                 <links>
9225                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
9226                 </links>
9227         </class>
9228
9229         <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">
9230                 <fields oils_persist:primary="funding_source">
9231                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
9232                         <field reporter:label="Balance Remaining" name="amount" reporter:datatype="money" />
9233                 </fields>
9234                 <links>
9235                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
9236                 </links>
9237         </class>
9238
9239         <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">
9240                 <fields oils_persist:primary="fund">
9241                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
9242                         <field reporter:label="Balance after Spent" name="amount" reporter:datatype="money" />
9243                 </fields>
9244                 <links>
9245                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9246                 </links>
9247         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9248             <actions>
9249                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
9250                                         <context link="fund" field="org" />
9251                 </retrieve>
9252             </actions>
9253         </permacrud>
9254     </class>
9255     <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">
9256         <oils_persist:source_definition><![CDATA[
9257             SELECT
9258                 acqf.*,
9259                 COALESCE(acqfat.amount, 0.00) AS allocated_total,
9260                 COALESCE(acqfst.amount, 0.00) AS spent_total,
9261                 COALESCE(acqfet.amount, 0.00) AS encumbrance_total,
9262                 COALESCE(acqfcb.amount, 0.00) AS combined_balance
9263             FROM
9264                 acq.fund acqf
9265                 LEFT JOIN acq.fund_allocation_total acqfat ON (acqfat.fund = acqf.id)
9266                 LEFT JOIN acq.fund_spent_total acqfst ON (acqfst.fund = acqf.id)
9267                 LEFT JOIN acq.fund_encumbrance_total acqfet ON (acqfet.fund = acqf.id)
9268                 LEFT JOIN acq.fund_combined_balance acqfcb ON (acqfcb.fund = acqf.id)
9269         ]]></oils_persist:source_definition>
9270         <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_id_seq">
9271             <field reporter:label="Fund ID" name="id" reporter:datatype="id" reporter:selector='code'/>
9272             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
9273             <field reporter:label="Name" name="name" reporter:datatype="text" />
9274             <field reporter:label="Year" name="year" reporter:datatype="int" />
9275             <field reporter:label="Currency Type" name="currency_type" reporter:datatype="link" />
9276             <field reporter:label="Code" name="code" reporter:datatype="text" />
9277             <field reporter:label="Rollover" name="rollover" reporter:datatype="bool" />
9278             <field reporter:label="Propagate" name="propagate" reporter:datatype="bool" />
9279             <field reporter:label="Active" name="active" reporter:datatype="bool" />
9280             <field reporter:label="Balance Warning Percent" name="balance_warning_percent" reporter:datatype="int" />
9281             <field reporter:label="Balance Stop Percent" name="balance_stop_percent" reporter:datatype="int" />
9282
9283             <!-- non fund-native fields -->
9284             <field reporter:label="Total Allocated" name="allocated_total" reporter:datatype="money"/>
9285             <field reporter:label="Total Spent" name="spent_total" reporter:datatype="money"/>
9286             <field reporter:label="Total Encumbered" name="encumbrance_total" reporter:datatype="money"/>
9287             <field reporter:label="Remaining Balance" name="combined_balance" reporter:datatype="money"/>
9288         </fields>
9289         <links>
9290             <link field="id" reltype="has_a" key="id" map="" class="acqf"/>
9291             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
9292             <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
9293         </links>
9294         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9295             <actions>
9296                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="org"/>
9297             </actions>
9298         </permacrud>
9299         </class>
9300         <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">
9301                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_allocation_id_seq">
9302                         <field reporter:label="Allocation ID" name="id" reporter:datatype="id" />
9303                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
9304                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
9305                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
9306                         <field reporter:label="Allocating User" name="allocator" reporter:datatype="link" />
9307                         <field reporter:label="Note" name="note" reporter:datatype="text" />
9308                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
9309                 </fields>
9310                 <links>
9311                         <link field="allocator" reltype="has_a" key="id" map="" class="au"/>
9312                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9313                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
9314                 </links>
9315                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9316                         <actions>
9317                                 <create permission="ADMIN_ACQ_FUND">
9318                     <context link="fund" field="org"/>
9319                 </create>
9320                                 <retrieve permission="ADMIN_ACQ_FUND">
9321                     <context link="fund" field="org"/>
9322                 </retrieve>
9323                                 <update permission="ADMIN_ACQ_FUND">
9324                     <context link="fund" field="org"/>
9325                 </update>
9326                                 <delete permission="ADMIN_ACQ_FUND">
9327                     <context link="fund" field="org"/>
9328                 </delete>
9329                         </actions>
9330                 </permacrud>
9331         </class>
9332
9333     <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">
9334         <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_allocation_percent_id_seq">
9335             <field reporter:label="Allocation ID" name="id" reporter:datatype="id" />
9336             <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
9337             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
9338             <field reporter:label="Fund Code" name="fund_code" reporter:datatype="text" />
9339             <field reporter:label="Percent" name="percent" reporter:datatype="float" />
9340             <field reporter:label="Allocating User" name="allocator" reporter:datatype="link" />
9341             <field reporter:label="Note" name="note" reporter:datatype="text" />
9342             <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
9343         </fields>
9344         <links>
9345             <link field="allocator" reltype="has_a" key="id" map="" class="au"/>
9346             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
9347             <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
9348         </links>
9349                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9350                         <actions>
9351                                 <create permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
9352                                 <retrieve permission="VIEW_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
9353                                 <update permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
9354                                 <delete permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
9355                         </actions>
9356                 </permacrud>
9357     </class>
9358
9359         <class id="acqpl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::picklist" oils_persist:tablename="acq.picklist" reporter:label="Selection List">
9360                 <fields oils_persist:primary="id" oils_persist:sequence="acq.picklist_id_seq">
9361                         <field reporter:label="Selection List ID" name="id" reporter:datatype="id" reporter:selector='name' />
9362                         <field reporter:label="Owner" name="owner" reporter:datatype="link" />
9363                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit" />
9364                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
9365                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
9366                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
9367                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link" />
9368                         <field reporter:label="Entry Count" name="entry_count" oils_persist:virtual="true"/>
9369                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
9370                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
9371                 </fields>
9372                 <links>
9373                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
9374                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9375                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
9376                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
9377                         <link field="entries" reltype="has_many" key="picklist" map="" class="jub"/>
9378                 </links>
9379                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9380                         <actions>
9381                                 <retrieve permission="CREATE_PICKLIST VIEW_PICKLIST" context_field="org_unit"/>
9382                         </actions>
9383                 </permacrud>
9384         </class>
9385
9386         <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">
9387                 <fields oils_persist:primary="id" oils_persist:sequence="acq.cancel_reason_id_seq">
9388                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
9389                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
9390                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
9391                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
9392                         <field reporter:label="Keep Debits?" name="keep_debits" reporter:datatype="bool"/>
9393                 </fields>
9394                 <links>
9395                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
9396                 </links>
9397                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9398                         <actions>
9399                                 <create permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
9400                                 <retrieve permission="STAFF_LOGIN" context_field="org_unit"/>
9401                                 <update permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
9402                                 <delete permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
9403                         </actions>
9404                 </permacrud>
9405         </class>
9406
9407         <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">
9408                 <fields oils_persist:primary="id" oils_persist:sequence="acq.purchase_order_id_seq">
9409                         <field reporter:label="Purchase Order ID" name="id" reporter:datatype="id" reporter:selector='name'/>
9410                         <field reporter:label="Owner" name="owner" reporter:datatype="link" />
9411                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
9412                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
9413                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
9414                         <field reporter:label="State" name="state" reporter:datatype="text" />
9415                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="org_unit" />
9416                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
9417                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
9418                         <field reporter:label="Order Date" name="order_date" reporter:datatype="timestamp" />
9419                         <field reporter:label="Name" name="name" reporter:datatype="text" />
9420                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
9421                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
9422                         <field reporter:label="Line Items" name="lineitems" oils_persist:virtual="true" reporter:datatype="link" />
9423                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link" />
9424                         <field reporter:label="Line Item Count" name="lineitem_count" oils_persist:virtual="true" reporter:datatype="int" />
9425                         <field reporter:label="Amount Encumbered" name="amount_encumbered" oils_persist:virtual="true" reporter:datatype="float" />
9426                         <field reporter:label="Amount Spent" name="amount_spent" oils_persist:virtual="true" reporter:datatype="float" />
9427                         <field reporter:label="Amount Estimated" name="amount_estimated" oils_persist:virtual="true" reporter:datatype="float" />
9428                         <field reporter:label="PO Items" name="po_items" oils_persist:virtual="true" reporter:datatype="link" />
9429                 </fields>
9430                 <links>
9431                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
9432                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9433                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
9434                         <link field="default_fund" reltype="has_a" key="id" map="" class="acqf"/>
9435                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
9436                         <link field="lineitems" reltype="has_many" key="purchase_order" map="" class="jub"/>
9437                         <link field="po_items" reltype="has_many" key="purchase_order" map="" class="acqpoi"/>
9438                         <link field="notes" reltype="has_many" key="purchase_order" map="" class="acqpon"/>
9439                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
9440                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
9441                 </links>
9442                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9443                         <actions>
9444                                 <create permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
9445                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER" context_field="ordering_agency"/>
9446                                 <update permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
9447                                 <delete permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
9448                         </actions>
9449                 </permacrud>
9450         </class>
9451
9452         <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">
9453                 <fields oils_persist:primary="audit_id" oils_persist:sequence="acq.acq_purchase_order_pkey_seq">
9454                         <field reporter:label="Audit ID" name="audit_id" reporter:datatype="id"/>
9455                         <field reporter:label="Audit Time" name="audit_time" reporter:datatype="timestamp"/>
9456                         <field reporter:label="Audit Action" name="audit_action" reporter:datatype="text"/>
9457                         <field reporter:label="Purchase Order ID" name="id" reporter:datatype="link"/>
9458                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
9459                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
9460                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
9461                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="link"/>
9462                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
9463                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
9464                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
9465                         <field reporter:label="State" name="state" reporter:datatype="text"/>
9466                         <field reporter:label="Order Date" name="order_date" reporter:datatype="timestamp"/>
9467                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
9468                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link"/>
9469                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
9470                 </fields>
9471                 <links>
9472                         <link field="id" reltype="has_a" key="id" map="" class="acqpo"/>
9473                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
9474                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9475                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
9476                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
9477                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
9478                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
9479                 </links>
9480                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9481             <actions>
9482                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER" context_field="ordering_agency"/>
9483             </actions>
9484                 </permacrud>
9485         </class>
9486
9487         <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">
9488                 <fields oils_persist:primary="id" oils_persist:sequence="acq.po_note_id_seq">
9489                         <field reporter:label="PO Note ID" name="id" reporter:datatype="id" />
9490                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />
9491                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
9492                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
9493                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
9494                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
9495                         <field reporter:label="Vote Value" name="value" reporter:datatype="text" />
9496                         <field reporter:label="Vendor Public" name="vendor_public" reporter:datatype="bool" />
9497                 </fields>
9498                 <links>
9499                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9500                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
9501                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
9502                 </links>
9503                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9504             <actions>
9505                 <create permission="CREATE_PURCHASE_ORDER">
9506                     <context link="purchase_order" field="ordering_agency"/>
9507                 </create>
9508                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
9509                     <context link="purchase_order" field="ordering_agency"/>
9510                 </retrieve>
9511                 <update permission="CREATE_PURCHASE_ORDER">
9512                     <context link="purchase_order" field="ordering_agency"/>
9513                 </update>
9514                 <delete permission="CREATE_PURCHASE_ORDER">
9515                     <context link="purchase_order" field="ordering_agency"/>
9516                 </delete>
9517             </actions>
9518                 </permacrud>
9519         </class>
9520
9521         <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">
9522                 <fields oils_persist:primary="id" oils_persist:sequence="acq.po_item_id_seq">
9523                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
9524                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
9525                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
9526                         <field reporter:label="Invoice Item Type" name="inv_item_type" reporter:datatype="link"/>
9527                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
9528                         <field reporter:label="Author" name="author" reporter:datatype="text"/>
9529                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
9530                         <field reporter:label="Estimated Cost" name="estimated_cost" reporter:datatype="money"/>
9531                         <field reporter:label="Fund" name="fund" reporter:datatype="link"/>
9532                         <field reporter:label="Target" name="target" reporter:datatype="int" />
9533                 </fields>
9534                 <links>
9535                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
9536                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
9537                         <link field="inv_item_type" reltype="has_a" key="code" map="" class="aiit"/>
9538                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9539                 </links>
9540                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9541             <actions>
9542                 <create permission="CREATE_PURCHASE_ORDER">
9543                     <context link="purchase_order" field="ordering_agency"/>
9544                 </create>
9545                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
9546                     <context link="purchase_order" field="ordering_agency"/>
9547                 </retrieve>
9548                 <update permission="CREATE_PURCHASE_ORDER">
9549                     <context link="purchase_order" field="ordering_agency"/>
9550                 </update>
9551                 <delete permission="CREATE_PURCHASE_ORDER">
9552                     <context link="purchase_order" field="ordering_agency"/>
9553                 </delete>
9554             </actions>
9555                 </permacrud>
9556         </class>
9557
9558         <class id="jub" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::lineitem" oils_persist:tablename="acq.lineitem" reporter:label="Line Item">
9559                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_id_seq">
9560                         <field reporter:label="Lineitem ID" name="id" reporter:datatype="id" />
9561                         <field reporter:label="Selecting User" name="selector" reporter:datatype="link" />
9562                         <field reporter:label="Selection List" name="picklist" reporter:datatype="link" />
9563                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />
9564                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
9565                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
9566                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
9567                         <field reporter:label="MARC" name="marc" reporter:datatype="text" />
9568                         <field reporter:label="Evergreen Bib ID" name="eg_bib_id" reporter:datatype="link" />
9569                         <field reporter:label="Source Label" name="source_label" reporter:datatype="text" />
9570                         <field reporter:label="Expected Receive Date" name="expected_recv_time" reporter:datatype="timestamp" />
9571                         <field reporter:label="State" name="state" reporter:datatype="text" />
9572                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
9573                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
9574                         <field reporter:label="Claim Policy" name="claim_policy" reporter:datatype="link" />
9575                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
9576                         <field reporter:label="Estimated Unit Price" name="estimated_unit_price" reporter:datatype="money" />
9577                         <field reporter:label="Queued Vandelay Record" name="queued_record" reporter:datatype="link" />
9578                         <field reporter:label="Item Count" name="item_count" oils_persist:virtual="true" reporter:datatype="int" />
9579                         <field reporter:label="Descriptive Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link" />
9580                         <field reporter:label="Line Item Details" name="lineitem_details" oils_persist:virtual="true" reporter:datatype="link" />
9581                         <field reporter:label="Line Item Notes" name="lineitem_notes" oils_persist:virtual="true" reporter:datatype="link" />
9582                         <field reporter:label="Distribution Formulas" name="distribution_formulas" oils_persist:virtual="true" reporter:datatype="link" />
9583                         <field reporter:label="Invoice Entries" name="invoice_entries" oils_persist:virtual="true" reporter:datatype="link" />
9584                         <field reporter:label="Order Summary" name="order_summary" oils_persist:virtual="true" reporter:datatype="link" />
9585                 </fields>
9586                 <links>
9587                         <link field="selector" reltype="has_a" key="id" map="" class="au"/>
9588                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
9589                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9590                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
9591                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
9592                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl"/>
9593                         <link field="eg_bib_id" reltype="has_a" key="id" map="" class="bre"/>
9594                         <link field="attributes" reltype="has_many" key="lineitem" map="" class="acqlia"/>
9595                         <link field="lineitem_details" reltype="has_many" key="lineitem" map="" class="acqlid"/>
9596                         <link field="lineitem_notes" reltype="has_many" key="lineitem" map="" class="acqlin"/>
9597                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
9598                         <link field="distribution_formulas" reltype="has_many" key="lineitem" map="" class="acqdfa"/>
9599                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
9600                         <link field="invoice_entries" reltype="has_many" key="lineitem" map="" class="acqie"/>
9601                         <link field="order_summary" reltype="might_have" key="lineitem" map="" class="acqlisum"/>
9602                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
9603                 </links>
9604                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9605                         <actions>
9606                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER CREATE_PICKLIST VIEW_PICKLIST">
9607                                         <context link="purchase_order" field="ordering_agency"/>
9608                                         <context link="picklist" field="org_unit"/>
9609                                 </retrieve>
9610                         </actions>
9611                 </permacrud>
9612         </class>
9613
9614         <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">
9615                 <fields oils_persist:primary="audit_id" oils_persist:sequence="acq.acq_lineitem_pkey_seq">
9616                         <field reporter:label="Audit ID" name="audit_id" reporter:datatype="id"/>
9617                         <field reporter:label="Audit Time" name="audit_time" reporter:datatype="timestamp"/>
9618                         <field reporter:label="Audit Action" name="audit_action" reporter:datatype="text"/>
9619                         <field reporter:label="Lineitem ID" name="id" reporter:datatype="link"/>
9620                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
9621                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
9622                         <field reporter:label="Selector" name="selector" reporter:datatype="link"/>
9623                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
9624                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
9625                         <field reporter:label="Selection List" name="picklist" reporter:datatype="link"/>
9626                         <field reporter:label="Expected Receive Time" name="expected_recv_time" reporter:datatype="timestamp"/>
9627                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
9628                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
9629                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
9630                         <field reporter:label="Evergreen Bib ID" name="eg_bib_id" reporter:datatype="link"/>
9631                         <field reporter:label="Source Label" name="source_label" reporter:datatype="text"/>
9632                         <field reporter:label="State" name="state" reporter:datatype="text"/>
9633                         <field reporter:label="Claim Policy" name="claim_policy" reporter:datatype="link"/>
9634                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link"/>
9635                         <field reporter:label="Estimated Unit Price" name="estimated_unit_price" reporter:datatype="money" />
9636                         <field reporter:label="Queued Vandelay Record" name="queued_record" reporter:datatype="link" />
9637                 </fields>
9638                 <links>
9639                         <link field="id" reltype="has_a" key="id" map="" class="jub"/>
9640                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9641                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
9642                         <link field="selector" reltype="has_a" key="id" map="" class="au"/>
9643                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
9644                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
9645                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl"/>
9646                         <link field="eg_bib_id" reltype="has_a" key="id" map="" class="bre"/>
9647                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
9648                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
9649                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
9650                 </links>
9651                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9652                         <actions>
9653                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
9654                                         <context link="purchase_order" field="ordering_agency"/>
9655                                         <context link="picklist" field="org_unit"/>
9656                                 </retrieve>
9657                         </actions>
9658                 </permacrud>
9659         </class>
9660
9661         <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">
9662                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_alert_text_id_seq">
9663                         <field reporter:label="Alert Text ID" name="id" reporter:datatype="id"/>
9664                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
9665                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
9666                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link"/>
9667                 </fields>
9668                 <links>
9669                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9670                 </links>
9671                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9672                         <actions>
9673                                 <create permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
9674                                 <retrieve permission="STAFF_LOGIN" context_field="owning_lib"/>
9675                                 <update permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
9676                                 <delete permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
9677                         </actions>
9678                 </permacrud>
9679         </class>
9680
9681         <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">
9682                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_note_id_seq">
9683                         <field reporter:label="PO Line Item Note ID" name="id" reporter:datatype="id" />
9684                         <field reporter:label="Line Item" name="lineitem" reporter:datatype="link" />
9685                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
9686                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
9687                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
9688                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
9689                         <field reporter:label="Note Value" name="value" reporter:datatype="text" />
9690                         <field reporter:label="Alert Text" name="alert_text" reporter:datatype="link" />
9691                         <field reporter:label="Vendor Public" name="vendor_public" reporter:datatype="bool" />
9692                 </fields>
9693                 <links>
9694                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9695                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
9696                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
9697                         <link field="alert_text" reltype="has_a" key="id" map="" class="acqliat"/>
9698                 </links>
9699         </class>
9700
9701         <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">
9702                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_id_seq">
9703                         <field reporter:label="Attribute Value ID" name="id" reporter:datatype="id" />
9704                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link" />
9705                         <field reporter:label="Type" name="attr_type" reporter:datatype="text" />
9706                         <field reporter:label="Name" name="attr_name" reporter:datatype="text" />
9707                         <field reporter:label="Value" name="attr_value" reporter:datatype="text" />
9708                         <field reporter:label="Definition" name="definition" reporter:datatype="text" />
9709                         <field reporter:label="Order Identifier" name="order_ident" reporter:datatype="bool" />
9710                 </fields>
9711                 <links>
9712                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
9713                         <link field="definition" reltype="has_a" key="id" map="" class="acqliad"/>
9714                 </links>
9715         </class>
9716
9717         <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">
9718                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_detail_id_seq">
9719                         <field reporter:label="Item Detail ID" name="id" reporter:datatype="id" />
9720                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
9721                         <field reporter:label="Evergreen Copy ID" name="eg_copy_id" reporter:datatype="link" />
9722                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text" />
9723                         <field reporter:label="Call Number Label" name="cn_label" reporter:datatype="text" />
9724                         <field reporter:label="Actual Receive Date" name="recv_time" reporter:datatype="timestamp" />
9725                         <field reporter:label="Receiving User" name="receiver" reporter:datatype="link" />
9726                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
9727                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link" />
9728                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" />
9729                         <field reporter:label="Copy Location" name="location" reporter:datatype="link" />
9730                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="link" />
9731                         <field reporter:label="Note" name="note" reporter:datatype="text" />
9732                         <field reporter:label="Collection Code" name="collection_code" reporter:datatype="text" />
9733                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
9734                         <field reporter:label="Claims" name="claims" reporter:datatype="link" oils_persist:virtual="true" />
9735                 </fields>
9736                 <links>
9737                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
9738                         <link field="eg_copy_id" reltype="has_a" key="id" map="" class="acp"/>
9739                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9740                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
9741                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9742                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
9743                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
9744                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
9745                         <link field="claims" reltype="has_many" key="lineitem_detail" map="" class="acqcl"/>
9746                         <link field="receiver" reltype="has_a" key="id" map="" class="au"/>
9747                 </links>
9748         </class>
9749
9750         <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">
9751                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
9752                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
9753                         <field reporter:label="Code" name="code" reporter:datatype="text" />
9754                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
9755                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
9756                 </fields>
9757                 <links/>
9758                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9759                         <actions>
9760                                 <retrieve />
9761                         </actions>
9762                 </permacrud>
9763         </class>
9764
9765         <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">
9766                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
9767                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
9768                         <field reporter:label="Code" name="code" reporter:datatype="text" />
9769                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
9770                         <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
9771                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
9772             <field reporter:label="Remove" name="remove" reporter:datatype="text" />
9773                 </fields>
9774                 <links/>
9775         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9776             <actions>
9777                 <create permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
9778                 <retrieve />
9779                 <update permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
9780                 <delete permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
9781             </actions>
9782         </permacrud>
9783         </class>
9784
9785         <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">
9786                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
9787                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
9788                         <field reporter:label="Code" name="code" reporter:datatype="text" />
9789                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
9790                         <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
9791                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
9792                 </fields>
9793                 <links/>
9794         </class>
9795         <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">
9796                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
9797                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
9798                         <field reporter:label="Code" name="code" reporter:datatype="text" />
9799                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
9800                         <field reporter:label="User" name="usr" reporter:datatype="link" />
9801                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
9802                 </fields>
9803                 <links>
9804                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
9805                 </links>
9806         </class>
9807
9808         <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">
9809             <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
9810                 <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
9811                 <field reporter:label="Code" name="code" reporter:datatype="text" />
9812                 <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
9813                 <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
9814                 <field reporter:label="Provider" name="provider" reporter:datatype="link" />
9815                 <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
9816         <field reporter:label="Remove" name="remove" reporter:datatype="text" />
9817
9818             </fields>
9819             <links>
9820                 <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
9821             </links>
9822             <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9823                 <actions>
9824                     <create permission="ADMIN_PROVIDER">
9825                         <context link="provider" field="owner"/>
9826                     </create>
9827                     <retrieve permission="ADMIN_PROVIDER">
9828                         <context link="provider" field="owner"/>
9829                     </retrieve>
9830                     <update permission="ADMIN_PROVIDER">
9831                         <context link="provider" field="owner"/>
9832                     </update>
9833                     <delete permission="ADMIN_PROVIDER">
9834                         <context link="provider" field="owner"/>
9835                     </delete>
9836                 </actions>
9837             </permacrud>
9838         </class>
9839         
9840         <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">
9841             <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_holding_subfield_map_id_seq">
9842                 <field reporter:label="ID" name="id" reporter:datatype="id" />
9843                 <field reporter:label="Provider" name="provider" reporter:datatype="link" />
9844                 <field reporter:label="Name" name="name" reporter:datatype="text" />
9845                 <field reporter:label="Subfield" name="subfield" reporter:datatype="text" />
9846             </fields>
9847             <links>
9848                 <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
9849             </links>
9850             <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9851                 <actions>
9852                     <create permission="ADMIN_PROVIDER">
9853                         <context link="provider" field="owner"/>
9854                     </create>
9855                     <retrieve permission="ADMIN_PROVIDER">
9856                         <context link="provider" field="owner"/>
9857                     </retrieve>
9858                     <update permission="ADMIN_PROVIDER">
9859                         <context link="provider" field="owner"/>
9860                     </update>
9861                     <delete permission="ADMIN_PROVIDER">
9862                         <context link="provider" field="owner"/>
9863                     </delete>
9864                 </actions>
9865             </permacrud>
9866         </class>
9867         
9868         <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">
9869             <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
9870                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
9871                         <field reporter:label="Code" name="code" reporter:datatype="text" />
9872                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
9873                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
9874                 </fields>
9875                 <links/>
9876         </class>
9877
9878         <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">
9879                 <fields oils_persist:primary="id" oils_persist:sequence="config.remote_account_id_seq"><!-- edi_account inherits from config.remote_account, hence the seq -->
9880                         <field name="id"            reporter:datatype="id"        reporter:label="EDI Account ID" reporter:selector="label"/>
9881                         <field name="label"         reporter:datatype="text"      reporter:label="Label"/>
9882                         <field name="host"          reporter:datatype="text"      reporter:label="Host"/>
9883                         <field name="username"      reporter:datatype="text"      reporter:label="Username"/>
9884                         <field name="password"      reporter:datatype="text"      reporter:label="Password"/>
9885                         <field name="account"       reporter:datatype="text"      reporter:label="Account"/>
9886                         <field name="path"          reporter:datatype="text"      reporter:label="Path"/>
9887                         <field name="owner"         reporter:datatype="link"      reporter:label="Owner"/>
9888                         <field name="last_activity" reporter:datatype="timestamp" reporter:label="Last Activity"/>
9889                         <field name="provider"      reporter:datatype="link"      reporter:label="Provider"/>
9890                         <field name="in_dir"        reporter:datatype="text"      reporter:label="Incoming Directory"/>
9891                         <field name="vendacct"      reporter:datatype="text"      reporter:label="Vendor Account Number"/>
9892                         <field name="vendcode"      reporter:datatype="text"      reporter:label="Vendor Assigned Code"/>
9893                         <field name="attr_set"      reporter:datatype="link"      reporter:label="EDI Attribute Set"/>
9894                         <field name="use_attrs"     reporter:datatype="bool"      reporter:label="Use EDI Attributes"/>
9895                 </fields>
9896                 <links>
9897                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
9898                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
9899                         <link field="attr_set" reltype="has_a" key="id" map="" class="aeas"/>
9900                 </links>
9901         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9902             <actions>
9903                 <create permission="ADMIN_PROVIDER">
9904                     <context link="provider" field="owner"/>
9905                 </create>
9906                 <retrieve permission="ADMIN_PROVIDER">
9907                     <context link="provider" field="owner"/>
9908                 </retrieve>
9909                 <update permission="ADMIN_PROVIDER">
9910                     <context link="provider" field="owner"/>
9911                 </update>
9912                 <delete permission="ADMIN_PROVIDER">
9913                     <context link="provider" field="owner"/>
9914                 </delete>
9915             </actions>
9916         </permacrud>
9917         </class>
9918
9919         <class id="aea" controller="open-ils.cstore open-ils.pcrud" 
9920                 oils_obj:fieldmapper="acq::edi_attr" 
9921                 oils_persist:tablename="acq.edi_attr" reporter:label="EDI Attribute">
9922                 <fields oils_persist:primary="key">
9923                         <field name="key"   reporter:datatype="text" reporter:label="Key" reporter:selector="label"/>
9924                         <field name="label" reporter:datatype="text" reporter:label="Label"/>
9925                 </fields>
9926         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9927             <actions>
9928                 <create permission="ADMIN_PROVIDER" global_required="true"/>
9929                 <retrieve/>
9930                 <update permission="ADMIN_PROVIDER" global_required="true"/>
9931                 <delete permission="ADMIN_PROVIDER" global_required="true"/>
9932             </actions>
9933         </permacrud>
9934         </class>
9935         <class id="aeas" controller="open-ils.cstore open-ils.pcrud" 
9936                 oils_obj:fieldmapper="acq::edi_attr_set" 
9937                 oils_persist:tablename="acq.edi_attr_set" reporter:label="EDI Attribute Set">
9938                 <fields oils_persist:primary="id" oils_persist:sequence="acq.edi_attr_set_id_seq">
9939                         <field name="id"    reporter:datatype="id"   reporter:label="ID" reporter:selector="label"/>
9940                         <field name="label" reporter:datatype="text" reporter:label="Label"/>
9941                         <field name="attr_maps" reporter:datatype="link" oils_persist:virtual="true" reporter:label="Mapped EDI Attributes"/>
9942                 </fields>
9943                 <links>
9944                         <link field="attr_maps" reltype="has_many" key="attr_set" map="" class="aeasm"/>
9945                 </links>
9946         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9947             <actions>
9948                 <create permission="ADMIN_PROVIDER" global_required="true"/>
9949                 <retrieve/>
9950                 <update permission="ADMIN_PROVIDER" global_required="true"/>
9951                 <delete permission="ADMIN_PROVIDER" global_required="true"/>
9952             </actions>
9953         </permacrud>
9954         </class>
9955         <class id="aeasm" controller="open-ils.cstore open-ils.pcrud" 
9956                 oils_obj:fieldmapper="acq::edi_attr_set_map" 
9957                 oils_persist:tablename="acq.edi_attr_set_map" reporter:label="EDI Attribute Set Map">
9958                 <fields oils_persist:primary="id" oils_persist:sequence="acq.edi_attr_set_map_id_seq">
9959                         <field name="id"       reporter:datatype="id"   reporter:label="ID" reporter:selector="label"/>
9960                         <field name="attr_set" reporter:datatype="link" reporter:label="Attribute Set"/>
9961                         <field name="attr"     reporter:datatype="link" reporter:label="Attribute"/>
9962                 </fields>
9963                 <links>
9964                         <link field="attr_set" reltype="has_a" key="id" map="" class="aeas"/>
9965                         <link field="attr" reltype="has_a" key="id" map="" class="aea"/>
9966                 </links>
9967         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9968             <actions>
9969                 <create permission="ADMIN_PROVIDER" global_required="true"/>
9970                 <retrieve/>
9971                 <update permission="ADMIN_PROVIDER" global_required="true"/>
9972                 <delete permission="ADMIN_PROVIDER" global_required="true"/>
9973             </actions>
9974         </permacrud>
9975         </class>
9976
9977
9978         <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">
9979                 <fields oils_persist:primary="id" oils_persist:sequence="acq.edi_message_id_seq">
9980                         <field name="id"               reporter:datatype="id"        reporter:label="EDI Message ID"/>
9981                         <field name="account"          reporter:datatype="link"      reporter:label="EDI Account"/>
9982                         <field name="remote_file"      reporter:datatype="text"      reporter:label="Filename"/>
9983                         <field name="create_time"      reporter:datatype="timestamp" reporter:label="Time Created"/>
9984                         <field name="translate_time"   reporter:datatype="timestamp" reporter:label="Time Translated"/>
9985                         <field name="process_time"     reporter:datatype="timestamp" reporter:label="Time Processed"/>
9986                         <field name="error_time"       reporter:datatype="timestamp" reporter:label="Time of Error"/>
9987                         <field name="status"           reporter:datatype="text"      reporter:label="Status"/>
9988                         <field name="edi"              reporter:datatype="text"      reporter:label="EDI Message Body"/>
9989                         <field name="jedi"             reporter:datatype="text"      reporter:label="JEDI Message Body"/>
9990                         <field name="error"            reporter:datatype="text"      reporter:label="Error"/>
9991                         <field name="purchase_order"   reporter:datatype="link"      reporter:label="Purchase Order"/>
9992                         <field name="message_type"     reporter:datatype="text"      reporter:label="Message Type"/>
9993                 </fields>
9994                 <links>
9995                         <link field="account" reltype="has_a" key="id" map="" class="acqedi"/>
9996                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
9997                 </links>
9998         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9999             <actions>
10000                 <retrieve permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
10001                     <context link="account" jump="provider" field="owner"/>
10002                 </retrieve>
10003                 <update   permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
10004                     <context link="account" jump="provider" field="owner"/>
10005                 </update>
10006                 <delete   permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
10007                     <context link="account" jump="provider" field="owner"/>
10008                 </delete>
10009             </actions>
10010         </permacrud>
10011         </class>
10012
10013
10014         <class id="rof" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::output_folder" oils_persist:tablename="reporter.output_folder" reporter:label="Output Folder">
10015                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.output_folder_id_seq">
10016                         <field name="id" reporter:datatype="id" />
10017                         <field name="parent" reporter:datatype="link"/>
10018                         <field name="owner" reporter:datatype="link"/>
10019                         <field name="create_time" reporter:datatype="timestamp"/>
10020                         <field name="name" reporter:datatype="text"/>
10021                         <field name="shared" reporter:datatype="bool"/>
10022                         <field name="share_with" reporter:datatype="link"/>
10023                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
10024                         <field name="outputs" oils_persist:virtual="true" reporter:datatype="link"/>
10025                 </fields>
10026                 <links>
10027                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
10028                         <link field="parent" reltype="has_a" key="id" map="" class="rof"/>
10029                         <link field="children" reltype="has_many" key="parent" map="" class="rof"/>
10030                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
10031                         <link field="outputs" reltype="has_many" key="folder" map="" class="rs"/>
10032                 </links>
10033         </class>
10034         <class id="rtf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::template_folder" oils_persist:tablename="reporter.template_folder" reporter:label="Template Folder">
10035                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_folder_id_seq">
10036                         <field name="id" reporter:datatype="id" />
10037                         <field name="parent" reporter:datatype="link"/>
10038                         <field name="owner" reporter:datatype="link"/>
10039                         <field name="create_time" reporter:datatype="timestamp"/>
10040                         <field name="name" reporter:datatype="text"/>
10041                         <field name="shared" reporter:datatype="bool"/>
10042                         <field name="share_with" reporter:datatype="link"/>
10043                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
10044                         <field name="templates" oils_persist:virtual="true" reporter:datatype="link"/>
10045                 </fields>
10046                 <links>
10047                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
10048                         <link field="parent" reltype="has_a" key="id" map="" class="rtf"/>
10049                         <link field="children" reltype="has_many" key="parent" map="" class="rtf"/>
10050                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
10051                         <link field="templates" reltype="has_many" key="folder" map="" class="rt"/>
10052                 </links>
10053         </class>
10054         <class id="rrf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report_folder" oils_persist:tablename="reporter.report_folder" reporter:label="Report Folder">
10055                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_folder_id_seq">
10056                         <field name="id" reporter:datatype="id" />
10057                         <field name="parent" reporter:datatype="link"/>
10058                         <field name="owner" reporter:datatype="link"/>
10059                         <field name="create_time" reporter:datatype="timestamp"/>
10060                         <field name="name" reporter:datatype="text"/>
10061                         <field name="shared" reporter:datatype="bool"/>
10062                         <field name="share_with" reporter:datatype="link"/>
10063                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
10064                         <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>
10065                 </fields>
10066                 <links>
10067                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
10068                         <link field="parent" reltype="has_a" key="id" map="" class="rrf"/>
10069                         <link field="children" reltype="has_many" key="parent" map="" class="rrf"/>
10070                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
10071                         <link field="reports" reltype="has_many" key="folder" map="" class="rr"/>
10072                 </links>
10073         </class>
10074         <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">
10075                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_id_seq">
10076                         <field name="id" reporter:datatype="id" />
10077                         <field name="owner" reporter:datatype="link"/>
10078                         <field name="create_time" reporter:datatype="timestamp"/>
10079                         <field name="name" reporter:datatype="text"/>
10080                         <field name="data" reporter:datatype="text"/>
10081                         <field name="folder" reporter:datatype="link"/>
10082                         <field name="description" reporter:datatype="text"/>
10083                         <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>
10084                 </fields>
10085                 <links>
10086                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
10087                         <link field="folder" reltype="has_a" key="id" map="" class="rtf"/>
10088                         <link field="reports" reltype="has_many" key="template" map="" class="rr"/>
10089                 </links>
10090         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10091             <actions>
10092                 <create   permission="RUN_REPORTS" owning_user="owner" global_required="true"/>
10093                 <retrieve permission="RUN_REPORTS" owning_user="owner" global_required="true"/>
10094                 <update   permission="RUN_REPORTS" owning_user="owner" global_required="true"/>
10095                 <delete   permission="RUN_REPORTS" owning_user="owner" global_required="true"/>
10096             </actions>
10097         </permacrud>
10098         </class>
10099         <class id="rr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report" oils_persist:tablename="reporter.report" reporter:label="Report">
10100                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_id_seq">
10101                         <field name="id" reporter:datatype="id" />
10102                         <field name="owner" reporter:datatype="link"/>
10103                         <field name="create_time" reporter:datatype="timestamp"/>
10104                         <field name="template" reporter:datatype="link"/>
10105                         <field name="data" reporter:datatype="text"/>
10106                         <field name="folder" reporter:datatype="link"/>
10107                         <field name="recur" reporter:datatype="bool"/>
10108                         <field name="recurrence" reporter:datatype="interval"/>
10109                         <field name="name" reporter:datatype="text"/>
10110                         <field name="description" reporter:datatype="text"/>
10111                         <field name="runs" oils_persist:virtual="true" reporter:datatype="link"/>
10112                 </fields>
10113                 <links>
10114                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
10115                         <link field="template" reltype="has_a" key="id" map="" class="rt"/>
10116                         <link field="folder" reltype="has_a" key="id" map="" class="rrf"/>
10117                         <link field="runs" reltype="has_many" key="report" map="" class="rs"/>
10118                 </links>
10119         </class>
10120         <class id="rs" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::schedule" oils_persist:tablename="reporter.schedule" reporter:label="Schedule">
10121                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.schedule_id_seq">
10122                         <field name="id" reporter:datatype="id" />
10123                         <field name="runner" reporter:datatype="link"/>
10124                         <field name="start_time" reporter:datatype="timestamp"/>
10125                         <field name="complete_time" reporter:datatype="timestamp"/>
10126                         <field name="run_time" reporter:datatype="timestamp"/>
10127                         <field name="email" reporter:datatype="text"/>
10128                         <field name="excel_format" reporter:datatype="bool"/>
10129                         <field name="csv_format" reporter:datatype="bool"/>
10130                         <field name="html_format" reporter:datatype="bool"/>
10131                         <field name="error_code" reporter:datatype="int"/>
10132                         <field name="error_text" reporter:datatype="text"/>
10133                         <field name="report" reporter:datatype="link"/>
10134                         <field name="folder" reporter:datatype="link"/>
10135                         <field name="chart_pie" reporter:datatype="bool"/>
10136                         <field name="chart_bar" reporter:datatype="bool"/>
10137                         <field name="chart_line" reporter:datatype="bool"/>
10138                 </fields>
10139                 <links>
10140                         <link field="runner" reltype="has_a" key="id" map="" class="au"/>
10141                         <link field="report" reltype="has_a" key="id" map="" class="rr"/>
10142                         <link field="folder" reltype="has_a" key="id" map="" class="rof"/>
10143                 </links>
10144         </class>
10145         <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">
10146                 <fields oils_persist:primary="id">
10147                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
10148                         <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>
10149                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
10150                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
10151                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
10152                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
10153                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
10154                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
10155                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
10156                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
10157                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
10158                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
10159                 </fields>
10160                 <links>
10161                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
10162                 </links>
10163                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10164                         <actions>
10165                                 <retrieve />
10166                         </actions>
10167                 </permacrud>
10168         </class>
10169         <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">
10170                 <fields oils_persist:primary="id">
10171                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
10172                         <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>
10173                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
10174                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
10175                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
10176                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
10177                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
10178                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
10179                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
10180                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
10181                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
10182                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
10183                 </fields>
10184                 <links>
10185                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
10186                 </links>
10187         </class>
10188         <class id="rsr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::simple_record" oils_persist:tablename="reporter.simple_record" reporter:label="Simple Record">
10189                 <fields oils_persist:primary="id">
10190                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
10191                         <field reporter:label="Metarecord" name="metarecord" reporter:datatype="link"/>
10192                         <field reporter:label="Fingerprint" name="fingerprint" />
10193                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
10194                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
10195                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
10196                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
10197                         <field reporter:label="Uniform Title (normalized)" name="uniform_title" reporter:datatype="text"/>
10198                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
10199                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
10200                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
10201                         <field reporter:label="Series Title (normalized)" name="series_title" reporter:datatype="text"/>
10202                         <field reporter:label="Series Statement (normalized)" name="series_statement" reporter:datatype="text"/>
10203                         <field reporter:label="Summary (normalized)" name="summary" reporter:datatype="text"/>
10204                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
10205                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
10206                         <field reporter:label="Topic Subjects (normalized)" name="topic_subject" reporter:datatype="text"/>
10207                         <field reporter:label="Geographic Subjects (normalized)" name="geographic_subject" reporter:datatype="text"/>
10208                         <field reporter:label="Genres (normalized)" name="genre" reporter:datatype="text"/>
10209                         <field reporter:label="Personal Name Subjects (normalized)" name="name_subject" reporter:datatype="text"/>
10210                         <field reporter:label="Corporate Name Subjects (normalized)" name="corporate_subject" reporter:datatype="text"/>
10211                         <field reporter:label="External URI List (normalized)" name="external_uri" reporter:datatype="text"/>
10212                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
10213                 </fields>
10214                 <links>
10215                         <link field="metarecord" reltype="has_a" key="id" map="" class="mmr"/>
10216                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
10217                 </links>
10218         </class>
10219         <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">
10220                 <fields oils_persist:primary="id">
10221                         <field reporter:label="User ID" name="id" reporter:datatype="id" />
10222                         <field reporter:label="Date of Birth" name="dob" reporter:datatype="timestamp"/>
10223                         <field reporter:label="General Demographic Division" name="general_division" reporter:datatype="text"/>
10224                 </fields>
10225                 <links>
10226                         <link field="id" reltype="might_have" key="id" map="" class="au"/>
10227                 </links>
10228         </class>
10229         <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">
10230                 <fields oils_persist:primary="id">
10231                         <field reporter:label="Circulation ID" name="id" reporter:datatype="id" />
10232                         <field reporter:label="Circulation Type" name="type" reporter:datatype="text"/>
10233                 </fields>
10234                 <links>
10235                         <link field="id" reltype="might_have" key="id" map="" class="circ"/>
10236                 </links>
10237         </class>
10238         <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">
10239                 <fields oils_persist:primary="id">
10240                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
10241                         <field reporter:label="Hold Target" name="target" reporter:datatype="int" />
10242                         <field reporter:label="Hold Request Type" name="hold_type" reporter:datatype="text"/>
10243                         <field reporter:label="Target Bib Record" name="bib_record" reporter:datatype="link"/>
10244                 </fields>
10245                 <links>
10246                         <link field="id" reltype="might_have" key="id" map="" class="ahr"/>
10247                         <link field="bib_record" reltype="has_a" key="id" map="" class="bre"/>
10248                 </links>
10249         </class>
10250         <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">
10251                 <fields oils_persist:primary="xact">
10252                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />
10253                         <field reporter:label="Unvoided Billing Amount" name="unvoided" reporter:datatype="int" />
10254                         <field reporter:label="Voided Billing Amount" name="voided" reporter:datatype="money"/>
10255                         <field reporter:label="Total Billing Amount" name="total" reporter:datatype="money"/>
10256                 </fields>
10257                 <links>
10258                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
10259                 </links>
10260         </class>
10261         <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">
10262                 <fields oils_persist:primary="xact">
10263                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />
10264                         <field reporter:label="Unvoided Paid Amount" name="unvoided" reporter:datatype="int" />
10265                         <field reporter:label="Voided (Returned) Paid Amount" name="voided" reporter:datatype="money"/>
10266                         <field reporter:label="Total Paid Amount" name="total" reporter:datatype="money"/>
10267                 </fields>
10268                 <links>
10269                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
10270                 </links>
10271         </class>
10272         <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)">
10273                 <fields oils_persist:primary="id">
10274                         <field reporter:label="Bib ID" name="id" reporter:datatype="id" />
10275                         <field reporter:label="Update Time" name="holding_update" reporter:datatype="timestamp" />
10276                         <field reporter:label="Update Type" name="update_type" reporter:datatype="text" />
10277                 </fields>
10278                 <links>
10279                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
10280                 </links>
10281         </class>
10282         <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">
10283                 <fields oils_persist:primary="id">
10284                         <field reporter:label="Copy ID" name="id" reporter:datatype="int" />
10285                         <field reporter:label="Total Circulation Count" name="circ_count" reporter:datatype="int" />
10286                 </fields>
10287                 <links>
10288                         <link field="id" reltype="has_a" key="id" map="" class="acp"/>
10289                 </links>
10290         </class>
10291         <class id="erccpo" controller="open-ils.reporter-store" oils_obj:fieldmapper="extend_reporter::copy_count_per_org" oils_persist:tablename="extend_reporter.copy_count_per_org" reporter:label="Library Holdings Count with Deleted">
10292                 <fields oils_persist:primary="bibid">
10293                         <field reporter:label="Bib Record" name="bibid" reporter:datatype="id" />
10294                         <field reporter:label="Circulation Library" name="circ_lib" reporter:datatype="link" />
10295                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link" />
10296                         <field reporter:label="Last Edit Date" name="last_edit_time" reporter:datatype="timestamp" />
10297                         <field reporter:label="Has Only Deleted Copies 0/1" name="has_only_deleted_copies" reporter:datatype="int" />
10298                         <field reporter:label="Total deleted copies" name="deleted_count" reporter:datatype="int" />
10299                         <field reporter:label="Total visible copies" name="visible_count" reporter:datatype="int" />
10300                         <field reporter:label="Total copies attached" name="total_count" reporter:datatype="int" />
10301                 </fields>
10302                 <links>
10303                         <link field="bibid" reltype="has_a" key="id" map="" class="bre"/>
10304                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
10305                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10306                 </links>
10307         </class>
10308         <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">
10309                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_id_seq">
10310                         <field reporter:label="Formula ID" name="id" reporter:datatype="id" reporter:selector="name" />
10311                         <field reporter:label="Formula Owner" name="owner" reporter:datatype="org_unit"/>
10312                         <field reporter:label="Formula Name" name="name" reporter:datatype="text"/>
10313                         <field reporter:label="Skip Count" name="skip_count" reporter:datatype="int"/>
10314                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
10315                         <field reporter:label="Use Count" name="use_count" oils_persist:virtual="true" reporter:datatype="int"/>
10316                 </fields>
10317                 <links>
10318                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
10319                         <link field="entries" reltype="has_many" key="formula" map="" class="acqdfe"/>
10320                 </links>
10321                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10322                         <actions>
10323                                 <create permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
10324                                 <retrieve permission="CREATE_PURCHASE_ORDER ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
10325                                 <update permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
10326                                 <delete permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
10327                         </actions>
10328                 </permacrud>
10329         </class>
10330         <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">
10331                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_entry_id_seq">
10332                         <field reporter:label="Entry ID" name="id" reporter:datatype="id"/>
10333                         <field reporter:label="Formula ID" name="formula" reporter:datatype="link"/>
10334                         <field reporter:label="Position" name="position" reporter:datatype="int"/>
10335                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
10336                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
10337                         <field reporter:label="Location" name="location" reporter:datatype="link"/>
10338                         <field reporter:label="Fund" name="fund" reporter:datatype="link"/>
10339                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
10340                         <field reporter:label="Collection Code" name="collection_code" reporter:datatype="text"/>
10341                 </fields>
10342                 <links>
10343                         <link field="formula" reltype="has_a" key="id" map="" class="acqdf"/>
10344                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10345                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
10346                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
10347                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
10348                 </links>
10349                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10350                         <actions>
10351                                 <create permission="ADMIN_ACQ_DISTRIB_FORMULA">
10352                                         <context link="formula" field="owner"/>
10353                                 </create>
10354                                 <retrieve permission="ADMIN_ACQ_DISTRIB_FORMULA">
10355                                         <context link="formula" field="owner"/>
10356                                 </retrieve>
10357                                 <update permission="ADMIN_ACQ_DISTRIB_FORMULA">
10358                                         <context link="formula" field="owner"/>
10359                                 </update>
10360                                 <delete permission="ADMIN_ACQ_DISTRIB_FORMULA">
10361                                         <context link="formula" field="owner"/>
10362                                 </delete>
10363                         </actions>
10364                 </permacrud>
10365         </class>
10366
10367         <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">
10368                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_application_id_seq">
10369                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
10370                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
10371                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
10372                         <field reporter:label="Distribution Formula" name="formula" reporter:datatype="link"/>
10373                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
10374                 </fields>
10375                 <links>
10376                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
10377                         <link field="formula" reltype="has_a" key="id" map="" class="acqdf"/>
10378                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
10379                 </links>
10380                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10381                         <actions>
10382                                 <create permission="CREATE_PURCHASE_ORDER">
10383                                         <context link="formula" field="owner"/>
10384                 </create>
10385                                 <retrieve permission="CREATE_PURCHASE_ORDER">
10386                                         <context link="formula" field="owner"/>
10387                 </retrieve>
10388                                 <update permission="CREATE_PURCHASE_ORDER">
10389                                         <context link="formula" field="owner"/>
10390                 </update>
10391                                 <delete permission="CREATE_PURCHASE_ORDER">
10392                                         <context link="formula" field="owner"/>
10393                 </delete>
10394                         </actions>
10395                 </permacrud>
10396         </class>
10397
10398         <class id="acqda" controller="open-ils.cstore" oils_obj:fieldmapper="acq::debit_attribution" oils_persist:tablename="acq.debit_attribution" reporter:label="Debit Attribution">
10399                 <fields oils_persist:primary="id">
10400                         <field reporter:label="Debit Attribution ID" name="id" reporter:datatype="id"/>
10401                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
10402                         <field reporter:label="Debit Amount" name="debit_amount" reporter:datatype="money"/>
10403                         <field reporter:label="Funding Source Credit" name="funding_source_credit" reporter:datatype="link"/>
10404                         <field reporter:label="Credit Amount" name="credit_amount" reporter:datatype="money"/>
10405                 </fields>
10406                 <links>
10407                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
10408                         <link field="funding_source_credit" reltype="has_a" key="id" map="" class="acqfscred"/>
10409                 </links>
10410         </class>
10411
10412         <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">
10413                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_type_id_seq">
10414                         <field reporter:label="Claim Type ID" name="id" reporter:datatype="id" reporter:selector="code" />
10415                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
10416                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
10417                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
10418                 </fields>
10419                 <links>
10420                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
10421                 </links>
10422                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10423                         <actions>
10424                                 <create permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
10425                                 <retrieve permission="ADMIN_ACQ_CLAIM_TYPE ADMIN_ACQ_CLAIM VIEW_CLAIM MANAGE_CLAIM" context_field="org_unit"/>
10426                                 <update permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
10427                                 <delete permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
10428                         </actions>
10429                 </permacrud>
10430         </class>
10431
10432         <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">
10433                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_event_type_id_seq">
10434                         <field reporter:label="Claim Event Type ID" name="id" reporter:datatype="id" reporter:selector="code" />
10435                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
10436                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
10437                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
10438                         <field reporter:label="Library Initiated" name="library_initiated" reporter:datatype="bool"/>
10439                 </fields>
10440                 <links>
10441                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
10442                 </links>
10443                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10444                         <actions>
10445                                 <create permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
10446                                 <retrieve permission="ADMIN_ACQ_CLAIM_EVENT_TYPE ADMIN_ACQ_CLAIM VIEW_CLAIM MANAGE_CLAIM" context_field="org_unit"/>
10447                                 <update permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
10448                                 <delete permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
10449                         </actions>
10450                 </permacrud>
10451         </class>
10452
10453         <class id="acqcl" controller="open-ils.cstore" oils_obj:fieldmapper="acq::claim" oils_persist:tablename="acq.claim" reporter:label="Claim">
10454                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_id_seq">
10455                         <field reporter:label="Claim ID" name="id" reporter:datatype="id"/>
10456                         <field reporter:label="Claim Type" name="type" reporter:datatype="link"/>
10457                         <field reporter:label="Lineitem Detail" name="lineitem_detail" reporter:datatype="link"/>
10458                 </fields>
10459                 <links>
10460                         <link field="type" reltype="has_a" key="id" map="" class="acqclt"/>
10461                         <link field="lineitem_detail" reltype="has_a" key="id" map="" class="acqlid"/>
10462                 </links>
10463         </class>
10464
10465         <class id="acqcle" controller="open-ils.cstore" oils_obj:fieldmapper="acq::claim_event" oils_persist:tablename="acq.claim_event" reporter:label="Claim Event">
10466                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_event_id_seq">
10467                         <field reporter:label="Claim Event ID" name="id" reporter:datatype="id"/>
10468                         <field reporter:label="Claim Event Type" name="type" reporter:datatype="link"/>
10469                         <field reporter:label="Claim ID" name="claim" reporter:datatype="link"/>
10470                         <field reporter:label="Event Date" name="event_date" reporter:datatype="timestamp"/>
10471                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
10472                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
10473                 </fields>
10474                 <links>
10475                         <link field="type" reltype="has_a" key="id" map="" class="acqclet"/>
10476                         <link field="claim" reltype="has_a" key="id" map="" class="acqcl"/>
10477                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
10478                 </links>
10479         </class>
10480
10481         <class id="acqscl" controller="open-ils.cstore" oils_obj:fieldmapper="acq::serial_claim" oils_persist:tablename="acq.serial_claim" reporter:label="Serial Claim">
10482                 <fields oils_persist:primary="id" oils_persist:sequence="acq.serial_claim_id_seq">
10483                         <field reporter:label="Claim ID" name="id" reporter:datatype="id"/>
10484                         <field reporter:label="Claim Type" name="type" reporter:datatype="link"/>
10485                         <field reporter:label="Serial Item" name="item" reporter:datatype="link"/>
10486                 </fields>
10487                 <links>
10488                         <link field="type" reltype="has_a" key="id" map="" class="acqclt"/>
10489                         <link field="item" reltype="has_a" key="id" map="" class="sitem"/>
10490                 </links>
10491         </class>
10492
10493         <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">
10494                 <fields oils_persist:primary="id" oils_persist:sequence="acq.serial_claim_event_id_seq">
10495                         <field reporter:label="Claim Event ID" name="id" reporter:datatype="id"/>
10496                         <field reporter:label="Claim Event Type" name="type" reporter:datatype="link"/>
10497                         <field reporter:label="Claim ID" name="claim" reporter:datatype="link"/>
10498                         <field reporter:label="Event Date" name="event_date" reporter:datatype="timestamp"/>
10499                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
10500                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
10501                 </fields>
10502                 <links>
10503                         <link field="type" reltype="has_a" key="id" map="" class="acqclet"/>
10504                         <link field="claim" reltype="has_a" key="id" map="" class="acqscl"/>
10505                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
10506                 </links>
10507         </class>
10508
10509         <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">
10510                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_policy_id_seq">
10511                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
10512                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
10513                         <field reporter:label="Claim Policy Name" name="name" reporter:datatype="text"/>
10514                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
10515                 </fields>
10516                 <links>
10517                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
10518                 </links>
10519                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10520             <actions>
10521                 <create   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
10522                 <retrieve permission="ADMIN_CLAIM_POLICY VIEW_PROVIDER" context_field="org_unit"/>
10523                 <update   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
10524                 <delete   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
10525             </actions>
10526                 </permacrud>
10527         </class>
10528
10529         <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">
10530                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_policy_action_id_seq">
10531                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="action"/>
10532                         <field reporter:label="Claim Policy ID" name="claim_policy" reporter:datatype="link"/>
10533                         <field reporter:label="Action Interval" name="action_interval" reporter:datatype="interval"/>
10534                         <field reporter:label="Action (Event Type)" name="action" reporter:datatype="link"/>
10535                 </fields>
10536                 <links>
10537                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
10538                         <link field="action" reltype="has_a" key="id" map="" class="acqclet"/>
10539                 </links>
10540                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10541                         <actions>
10542                                 <create permission="ADMIN_CLAIM_POLICY">
10543                                         <context link="claim_policy" field="org_unit"/>
10544                 </create>
10545                                 <retrieve permission="ADMIN_CLAIM_POLICY VIEW_PROVIDER">
10546                                         <context link="claim_policy" field="org_unit"/>
10547                 </retrieve>
10548                                 <update permission="ADMIN_CLAIM_POLICY">
10549                                         <context link="claim_policy" field="org_unit"/>
10550                 </update>
10551                                 <delete permission="ADMIN_CLAIM_POLICY">
10552                                         <context link="claim_policy" field="org_unit"/>
10553                 </delete>
10554                         </actions>
10555                 </permacrud>
10556         </class>
10557
10558     <class id="stgu" controller="open-ils.cstore" oils_obj:fieldmapper="staging::user_stage" oils_persist:tablename="staging.user_stage" reporter:label="User Stage">
10559         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.user_stage_row_id_seq">
10560             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
10561             <field reporter:label="Create Date" name="row_date" reporter:datatype="timestamp"/>
10562             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
10563             <field reporter:label="Main (Profile) Permission Group" name="profile" reporter:datatype="text"/>
10564             <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
10565             <field reporter:label="Password" name="passwd" reporter:datatype="text"/>
10566             <field reporter:label="Primary Identification Type" name="ident_type" reporter:datatype="int"/>
10567             <field reporter:label="First Name" name="first_given_name" reporter:datatype="text"/>
10568             <field reporter:label="Middle Name" name="second_given_name" reporter:datatype="text"/>
10569             <field reporter:label="Last Name" name="family_name" reporter:datatype="text"/>
10570             <field reporter:label="Daytime Phone" name="day_phone" reporter:datatype="text"/>
10571             <field reporter:label="Evening Phone" name="evening_phone" reporter:datatype="text"/>
10572             <field reporter:label="Home Library" name="home_ou" reporter:datatype="int"/>
10573             <field reporter:label="Date of Birth" name="dob" reporter:datatype="text"/>
10574             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
10575             <field reporter:label="Requesting User" name="requesting_usr" reporter:datatype="link"/>
10576                                                 <field reporter:label="Preferred First Name" name="pref_first_given_name" reporter:datatype="text"/>
10577                                                 <field reporter:label="Preferred Middle Name" name="pref_second_given_name" reporter:datatype="text"/>
10578                                                 <field reporter:label="Preferred Last Name" name="pref_family_name"  reporter:datatype="text"/>
10579         </fields>
10580         <links>
10581             <link field="requesting_usr" reltype="has_a" key="id" map="" class="au"/>
10582         </links>
10583     </class>
10584
10585     <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">
10586         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.card_stage_row_id_seq">
10587             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
10588             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
10589             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
10590             <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
10591             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
10592         </fields>
10593     </class>
10594
10595     <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">
10596         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.mailing_address_stage_row_id_seq">
10597             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
10598             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
10599             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
10600             <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
10601             <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
10602             <field reporter:label="City" name="city" reporter:datatype="text"/>
10603             <field reporter:label="County" name="county"  reporter:datatype="text"/>
10604             <field reporter:label="State" name="state" reporter:datatype="text"/>
10605             <field reporter:label="Country" name="country" reporter:datatype="text"/>
10606             <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
10607             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
10608         </fields>
10609     </class>
10610
10611     <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">
10612         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.mailing_address_stage_row_id_seq">
10613             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
10614             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
10615             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
10616             <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
10617             <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
10618             <field reporter:label="City" name="city" reporter:datatype="text"/>
10619             <field reporter:label="County" name="county"  reporter:datatype="text"/>
10620             <field reporter:label="State" name="state" reporter:datatype="text"/>
10621             <field reporter:label="Country" name="country" reporter:datatype="text"/>
10622             <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
10623             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
10624         </fields>
10625     </class>
10626
10627     <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">
10628         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.statcat_stage_row_id_seq">
10629             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
10630             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
10631             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
10632             <field reporter:label="Stat Cat ID" name="statcat" reporter:datatype="text"/>
10633             <field reporter:label="Stat Cat Value" name="value" reporter:datatype="text"/>
10634             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
10635         </fields>
10636     </class>
10637
10638     <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">
10639         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.setting_stage_row_id_seq">
10640             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
10641             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
10642             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
10643             <field reporter:label="User Setting Code" name="setting" reporter:datatype="text"/>
10644             <field reporter:label="User Setting Value" name="value" reporter:datatype="text"/>
10645             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
10646         </fields>
10647     </class>
10648
10649         <class id="afsg" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::fieldset_group" oils_persist:tablename="action.fieldset_group" reporter:label="Fieldset Group">
10650                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_group_id_seq">
10651                         <field reporter:label="Fieldset Group ID" name="id" reporter:datatype="id"/>
10652                         <field reporter:label="Fieldset Group Name" name="name" reporter:datatype="text" oils_obj:required="true"/>
10653                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp"/>
10654                         <field reporter:label="Complete Time" name="complete_time" reporter:datatype="timestamp"/>
10655                         <field reporter:label="Container ID" name="container" reporter:datatype="int" oils_obj:required="true"/> <!-- not an fkey because could be on multiple tables -->
10656                         <field reporter:label="Container Type" name="container_type" reporter:datatype="text" oils_obj:required="true"/>
10657                         <field reporter:label="Rollback Group" name="rollback_group" reporter:datatype="link"/>
10658                         <field reporter:label="Rollback Time" name="rollback_time" reporter:datatype="timestamp"/>
10659                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
10660                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
10661                 </fields>
10662                 <links>
10663                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
10664                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10665                         <link field="rollback_group" reltype="has_a" key="id" map="" class="afsg"/>
10666                 </links>
10667                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10668                         <actions>
10669                                 <create permission="CREATE_FIELDSET_GROUP ADMIN_FIELDSET_GROUP" context_field="owning_lib" owning_user="creator"/>
10670                                 <retrieve permission="RETRIEVE_FIELDSET_GROUP ADMIN_FIELDSET_GROUP" context_field="owning_lib" owning_user="creator"/>
10671                                 <update permission="UPDATE_FIELDSET_GROUP ADMIN_FIELDSET_GROUP" context_field="owning_lib" owning_user="creator"/>
10672                                 <delete permission="DELETE_FIELDSET_GROUP ADMIN_FIELDSET_GROUP" context_field="owning_lib" owning_user="creator"/>
10673                         </actions>
10674                 </permacrud>
10675         </class>
10676
10677         <class id="afs" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::fieldset" oils_persist:tablename="action.fieldset" reporter:label="Fieldset">
10678                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_id_seq">
10679                         <field reporter:label="Fieldset ID" name="id" reporter:datatype="id"/>
10680                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
10681                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link"/>
10682                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
10683                         <field reporter:label="Creation Time" name="creation_time" reporter:datatype="timestamp"/>
10684                         <field reporter:label="Scheduled Time" name="scheduled_time" reporter:datatype="timestamp"/>
10685                         <field reporter:label="Applied Time" name="applied_time" reporter:datatype="timestamp"/>
10686                         <field reporter:label="Class Name" name="classname" reporter:datatype="text"/>
10687                         <field reporter:label="Fieldset Name" name="name" reporter:datatype="text"/>
10688                         <field reporter:label="Stored Query" name="stored_query" reporter:datatype="link"/>
10689                         <field reporter:label="Primary Key Value" name="pkey_value" reporter:datatype="text"/>
10690                         <field reporter:label="Fieldset Group" name="fieldset_group" reporter:datatype="link"/>
10691                         <field reporter:label="Error Message" name="error_msg" reporter:datatype="text"/>
10692                 </fields>
10693                 <links>
10694                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
10695                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10696                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
10697                         <link field="fieldset_group" reltype="has_a" key="id" map="" class="afsg"/>
10698                 </links>
10699                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10700                         <actions>
10701                                 <create permission="CREATE_FIELDSET ADMIN_FIELDSET" context_field="owning_lib" owning_user="owner"/>
10702                                 <retrieve permission="RETRIEVE_FIELDSET ADMIN_FIELDSET" context_field="owning_lib" owning_user="owner"/>
10703                                 <update permission="UPDATE_FIELDSET ADMIN_FIELDSET" context_field="owning_lib" owning_user="owner"/>
10704                                 <delete permission="DELETE_FIELDSET ADMIN_FIELDSET" context_field="owning_lib" owning_user="owner"/>
10705                         </actions>
10706                 </permacrud>
10707         </class>
10708
10709         <class id="afscv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::fieldset_col_val" oils_persist:tablename="action.fieldset_col_val" reporter:label="Fieldset Column Value">
10710                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_col_val_id_seq">
10711                         <field reporter:label="Column Value ID" name="id" reporter:datatype="id"/>
10712                         <field reporter:label="Fieldset ID" name="fieldset" reporter:datatype="link"/>
10713                         <field reporter:label="Column Name" name="col" reporter:datatype="text"/>
10714                         <field reporter:label="Column Value" name="val" reporter:datatype="text"/>
10715                 </fields>
10716                 <links>
10717                         <link field="fieldset" reltype="has_a" key="id" map="" class="afs"/>
10718                 </links>
10719                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1"> <!-- NOTE: foreign context does not support owning_user today -->
10720                         <actions>
10721                                 <create permission="CREATE_FIELDSET_ENTRY ADMIN_FIELDSET_ENTRY">
10722                     <context link="fieldset" field="owning_lib"/>
10723                 </create>
10724                                 <retrieve permission="RETRIEVE_FIELDSET_ENTRY ADMIN_FIELDSET_ENTRY">
10725                     <context link="fieldset" field="owning_lib"/>
10726                 </retrieve>
10727                                 <update permission="UPDATE_FIELDSET_ENTRY ADMIN_FIELDSET_ENTRY">
10728                     <context link="fieldset" field="owning_lib"/>
10729                 </update>
10730                                 <delete permission="DELETE_FIELDSET_ENTRY ADMIN_FIELDSET_ENTRY">
10731                     <context link="fieldset" field="owning_lib"/>
10732                 </delete>
10733                         </actions>
10734                 </permacrud>
10735         </class>
10736
10737     <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">
10738         <fields>
10739             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
10740             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
10741             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
10742         </fields>
10743                 <links>
10744                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
10745                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
10746                 </links>
10747     </class>
10748
10749     <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">
10750         <fields>
10751             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
10752             <field reporter:label="Min Loop" name="min" reporter:datatype="int"/>
10753         </fields>
10754                 <links>
10755                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
10756                 </links>
10757     </class>
10758
10759     <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">
10760         <fields>
10761             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
10762             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
10763             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
10764         </fields>
10765                 <links>
10766                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
10767                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
10768                 </links>
10769     </class>
10770
10771     <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">
10772         <fields>
10773             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
10774             <field reporter:label="Max Loop" name="max" reporter:datatype="int"/>
10775         </fields>
10776                 <links>
10777                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
10778                 </links>
10779     </class>
10780
10781     <class id="aufhol" controller="open-ils.cstore" oils_obj:fieldmapper="action::unfulfilled_hold_outermost_loop" oils_persist:readonly="true">
10782                 <oils_persist:source_definition><![CDATA[
10783
10784             SELECT  DISTINCT l.*
10785               FROM  action.unfulfilled_hold_loops l
10786                     JOIN action.unfulfilled_hold_max_loop m USING (hold)
10787               WHERE l.count = m.max
10788
10789                 ]]></oils_persist:source_definition>
10790         <fields>
10791             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
10792             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
10793             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
10794         </fields>
10795                 <links>
10796                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
10797                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
10798                 </links>
10799     </class>
10800
10801         <class id="qsq" controller="open-ils.cstore" oils_obj:fieldmapper="query::stored_query" oils_persist:tablename="query.stored_query" reporter:label="Stored Query">
10802                 <fields oils_persist:primary="id" oils_persist:sequence="query.stored_query_id_seq">
10803                         <field reporter:label="Query ID" name="id" reporter:datatype="id"/>
10804                         <field reporter:label="Query type" name="type" reporter:datatype="text"/>
10805                         <field reporter:label="Use ALL" name="use_all" reporter:datatype="bool"/>
10806                         <field reporter:label="Use DISTINCT" name="use_distinct" reporter:datatype="bool"/>
10807                         <field reporter:label="FROM Clause" name="from_clause" reporter:datatype="link"/>
10808                         <field reporter:label="WHERE Clause" name="where_clause" reporter:datatype="link"/>
10809                         <field reporter:label="HAVING Clause" name="having_clause" reporter:datatype="link"/>
10810                         <field reporter:label="LIMIT count" name="limit_count" reporter:datatype="link"/>
10811                         <field reporter:label="OFFSET count" name="offset_count" reporter:datatype="link"/>
10812                 </fields>
10813                 <links>
10814                         <link field="from_clause" reltype="has_a" key="id" map="" class="qfr"/>
10815                         <link field="having_clause" reltype="has_a" key="id" map="" class="qxp"/>
10816                         <link field="where_clause" reltype="has_a" key="id" map="" class="qxp"/>
10817                         <link field="limit_count" reltype="has_a" key="id" map="" class="qxp"/>
10818                         <link field="offset_count" reltype="has_a" key="id" map="" class="qxp"/>
10819                 </links>
10820         </class>
10821
10822         <class id="qseq" controller="open-ils.cstore" oils_obj:fieldmapper="query::query_sequence" oils_persist:tablename="query.query_sequence" reporter:label="Query Sequence">
10823                 <fields oils_persist:primary="id" oils_persist:sequence="query.query_sequence_id_seq">
10824                         <field reporter:label="Query Seq ID" name="id" reporter:datatype="id"/>
10825                         <field reporter:label="Parent Query" name="parent_query" reporter:datatype="link"/>
10826                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10827                         <field reporter:label="Child Query" name="child_query" reporter:datatype="link"/>
10828                 </fields>
10829                 <links>
10830                         <link field="parent_query" reltype="has_a" key="id" map="" class="qsq"/>
10831                         <link field="child_query" reltype="has_a" key="id" map="" class="qsq"/>
10832                 </links>
10833         </class>
10834
10835         <class id="qdt" controller="open-ils.cstore" oils_obj:fieldmapper="query::datatype" oils_persist:tablename="query.datatype" reporter:label="Datatype">
10836                 <fields oils_persist:primary="id" oils_persist:sequence="query.datatype_id_seq">
10837                         <field reporter:label="Datatype ID" name="id" reporter:datatype="id"/>
10838                         <field reporter:label="Datatype Name" name="datatype_name" reporter:datatype="text"/>
10839                         <field reporter:label="Is Numeric" name="is_numeric" reporter:datatype="bool"/>
10840                         <field reporter:label="Is Composite" name="is_composite" reporter:datatype="bool"/>
10841                 </fields>
10842                 <links>
10843                 </links>
10844         </class>
10845
10846         <class id="qsf" controller="open-ils.cstore" oils_obj:fieldmapper="query::subfield" oils_persist:tablename="query.subfield" reporter:label="Subfield">
10847                 <fields oils_persist:primary="id" oils_persist:sequence="query.subfield_id_seq">
10848                         <field reporter:label="Subfield ID" name="id" reporter:datatype="id"/>
10849                         <field reporter:label="Composite Type" name="composite_type" reporter:datatype="link"/>
10850                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10851                         <field reporter:label="Subfield Type" name="subfield_type" reporter:datatype="link"/>
10852                 </fields>
10853                 <links>
10854                         <link field="composite_type" reltype="has_a" key="id" map="" class="qdt"/>
10855                         <link field="subfield_type" reltype="has_a" key="id" map="" class="qdt"/>
10856                 </links>
10857         </class>
10858         
10859         <class id="qfs" controller="open-ils.cstore" oils_obj:fieldmapper="query::function_sig" oils_persist:tablename="query.function_sig" reporter:label="Function Signature">
10860                 <fields oils_persist:primary="id" oils_persist:sequence="query.function_sig_id_seq">
10861                         <field reporter:label="Function Signature ID" name="id" reporter:datatype="id"/>
10862                         <field reporter:label="Function Name" name="function_name" reporter:datatype="text"/>
10863                         <field reporter:label="Return Type" name="return_type" reporter:datatype="link"/>
10864                         <field reporter:label="Is Aggregate" name="is_aggregate" reporter:datatype="bool"/>
10865                 </fields>
10866                 <links>
10867                         <link field="return_type" reltype="has_a" key="id" map="" class="qdt"/>
10868                 </links>
10869         </class>
10870         
10871         <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">
10872                 <fields oils_persist:primary="id" oils_persist:sequence="query.function_param_def_id_seq">
10873                         <field reporter:label="Function Param Def ID" name="id" reporter:datatype="id"/>
10874                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
10875                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10876                         <field reporter:label="Datatype" name="datatype" reporter:datatype="link"/>
10877                 </fields>
10878                 <links>
10879                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
10880                         <link field="datatype" reltype="has_a" key="id" map="" class="qdt"/>
10881                 </links>
10882         </class>
10883
10884         <class id="qbv" controller="open-ils.cstore" oils_obj:fieldmapper="query::bind_variable" oils_persist:tablename="query.bind_variable" reporter:label="Bind Variable">
10885                 <fields oils_persist:primary="name">
10886                         <field reporter:label="Name" name="name" reporter:datatype="id"/>
10887                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
10888                         <field reporter:label="Type" name="type" reporter:datatype="text"/>
10889                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
10890                         <field reporter:label="Default Value" name="default_value" reporter:datatype="text"/>
10891                         <field reporter:label="Actual Value" name="actual_value" oils_persist:virtual="true" reporter:datatype="text"/>
10892                 </fields>
10893                 <links>
10894                 </links>
10895         </class>
10896
10897         <class id="qxp" controller="open-ils.cstore" oils_obj:fieldmapper="query::expression" oils_persist:tablename="query.expression" reporter:label="Expression">
10898                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10899                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10900                         <field reporter:label="Expression Type" name="type" reporter:datatype="text"/>
10901                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10902                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10903                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10904                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
10905                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
10906                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
10907                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
10908                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
10909                         <field reporter:label="Right Operand" name="right_operand" reporter:datatype="link"/>
10910                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
10911                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
10912                         <field reporter:label="Cast Type" name="cast_type" reporter:datatype="link"/>
10913                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
10914                         <field reporter:label="Bind Variable" name="bind_variable" reporter:datatype="link"/>
10915                 </fields>
10916                 <links>
10917                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10918                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
10919                         <link field="right_operand" reltype="has_a" key="id" map="" class="qxp"/>
10920                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
10921                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
10922                         <link field="cast_type" reltype="has_a" key="id" map="" class="qdt"/>
10923                         <link field="bind_variable" reltype="has_a" key="name" map="" class="qbv"/>
10924                 </links>
10925         </class>
10926
10927         <class id="qcb" controller="open-ils.cstore" oils_obj:fieldmapper="query::case_branch" oils_persist:tablename="query.case_branch" reporter:label="Case Branch">
10928                 <fields oils_persist:primary="id" oils_persist:sequence="query.case_branch_id_seq">
10929                         <field reporter:label="Case Branch ID" name="id" reporter:datatype="id"/>
10930                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10931                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10932                         <field reporter:label="Condition" name="condition" reporter:datatype="link"/>
10933                         <field reporter:label="Result" name="result" reporter:datatype="link"/>
10934                 </fields>
10935                 <links>
10936                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10937                         <link field="condition" reltype="has_a" key="id" map="" class="qxp"/>
10938                         <link field="result" reltype="has_a" key="id" map="" class="qxp"/>
10939                 </links>
10940         </class>
10941
10942         <class id="qfr" controller="open-ils.cstore" oils_obj:fieldmapper="query::from_relation" oils_persist:tablename="query.from_relation" reporter:label="From Relation">
10943                 <fields oils_persist:primary="id" oils_persist:sequence="query.from_relation_id_seq">
10944                         <field reporter:label="From Relation ID" name="id" reporter:datatype="id"/>
10945                         <field reporter:label="From Relation Type" name="type" reporter:datatype="text"/>
10946                         <field reporter:label="Table Name" name="table_name" reporter:datatype="text"/>
10947                         <field reporter:label="Class Name" name="class_name" reporter:datatype="text"/>
10948                         <field reporter:label="Subquery ID" name="subquery" reporter:datatype="link"/>
10949                         <field reporter:label="Function Call ID" name="function_call" reporter:datatype="link"/>
10950                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
10951                         <field reporter:label="Parent Relation ID" name="parent_relation" reporter:datatype="link"/>
10952                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10953                         <field reporter:label="Join Type" name="join_type" reporter:datatype="text"/>
10954                         <field reporter:label="On Clause ID" name="on_clause" reporter:datatype="link"/>
10955                 </fields>
10956                 <links>
10957                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
10958                         <link field="function_call" reltype="has_a" key="id" map="" class="qxp"/>
10959                         <link field="parent_relation" reltype="has_a" key="id" map="" class="qfr"/>
10960                         <link field="on_clause" reltype="has_a" key="id" map="" class="qxp"/>
10961                 </links>
10962         </class>
10963
10964         <class id="qrc" controller="open-ils.cstore" oils_obj:fieldmapper="query::record_column" oils_persist:tablename="query.record_column" reporter:label="Record Column">
10965                 <fields oils_persist:primary="id" oils_persist:sequence="query.record_column_id_seq">
10966                         <field reporter:label="Record Column ID" name="id" reporter:datatype="id"/>
10967                         <field reporter:label="From Relation ID" name="from_relation" reporter:datatype="link"/>
10968                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10969                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
10970                         <field reporter:label="Column Type" name="column_type" reporter:datatype="link"/>
10971                 </fields>
10972                 <links>
10973                         <link field="from_relation" reltype="has_a" key="id" map="" class="qfr"/>
10974                         <link field="column_type" reltype="has_a" key="id" map="" class="qdt"/>
10975                 </links>
10976         </class>
10977
10978         <class id="qsi" controller="open-ils.cstore" oils_obj:fieldmapper="query::select_item" oils_persist:tablename="query.select_item" reporter:label="Select Item">
10979                 <fields oils_persist:primary="id" oils_persist:sequence="query.select_item_id_seq">
10980                         <field reporter:label="Select Item ID" name="id" reporter:datatype="id"/>
10981                         <field reporter:label="Stored Query ID" name="stored_query" reporter:datatype="link"/>
10982                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10983                         <field reporter:label="Expression" name="expression" reporter:datatype="link"/>
10984                         <field reporter:label="Column Alias" name="column_alias" reporter:datatype="text"/>
10985                         <field reporter:label="Is Grouped By" name="grouped_by" reporter:datatype="bool"/>
10986                 </fields>
10987                 <links>
10988                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
10989                         <link field="expression" reltype="has_a" key="id" map="" class="qxp"/>
10990                 </links>
10991         </class>
10992
10993         <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">
10994                 <fields oils_persist:primary="id" oils_persist:sequence="query.order_by_item_id_seq">
10995                         <field reporter:label="Order By Item ID" name="id" reporter:datatype="id"/>
10996                         <field reporter:label="Stored Query ID" name="stored_query" reporter:datatype="link"/>
10997                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10998                         <field reporter:label="Expression" name="expression" reporter:datatype="link"/>
10999                 </fields>
11000                 <links>
11001                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
11002                         <link field="expression" reltype="has_a" key="id" map="" class="qxp"/>
11003                 </links>
11004         </class>
11005
11006         <class id="xbet" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbet" oils_persist:tablename="query.expr_xbet" reporter:label="Between Expression">
11007                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11008                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11009                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11010                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11011                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11012                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
11013                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
11014                 </fields>
11015                 <links>
11016                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11017                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
11018                 </links>
11019         </class>
11020
11021         <class id="xbind" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbind" oils_persist:tablename="query.expr_xbind" reporter:label="Bind Variable Expression">
11022                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11023                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11024                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11025                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11026                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11027                         <field reporter:label="Bind Variable" name="bind_variable" reporter:datatype="link"/>
11028                 </fields>
11029                 <links>
11030                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11031                         <link field="bind_variable" reltype="has_a" key="name" map="" class="qbv"/>
11032                 </links>
11033         </class>
11034
11035         <class id="xbool" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbool" oils_persist:tablename="query.expr_xbool" reporter:label="Boolean Expression">
11036                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11037                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11038                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11039                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11040                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11041                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
11042                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
11043                 </fields>
11044                 <links>
11045                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11046                 </links>
11047         </class>
11048
11049         <class id="xcase" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcase" oils_persist:tablename="query.expr_xcase" reporter:label="Case Expression">
11050                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11051                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11052                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11053                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11054                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11055                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
11056                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
11057                 </fields>
11058                 <links>
11059                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11060                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
11061                 </links>
11062         </class>
11063
11064         <class id="xcast" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcast" oils_persist:tablename="query.expr_xcast" reporter:label="Cast Expression">
11065                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11066                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11067                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11068                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11069                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11070                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
11071                         <field reporter:label="Cast Type" name="cast_type" reporter:datatype="link"/>
11072                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
11073                 </fields>
11074                 <links>
11075                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11076                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
11077                         <link field="cast_type" reltype="has_a" key="id" map="" class="qdt"/>
11078                 </links>
11079         </class>
11080
11081         <class id="xcol" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcol" oils_persist:tablename="query.expr_xcol" reporter:label="Column Expression">
11082                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11083                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11084                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11085                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11086                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11087                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
11088                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
11089                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
11090                 </fields>
11091                 <links>
11092                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11093                 </links>
11094         </class>
11095
11096         <class id="xex" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xex" oils_persist:tablename="query.expr_xex" reporter:label="Exists Expression">
11097                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11098                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11099                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11100                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11101                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11102                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
11103                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
11104                 </fields>
11105                 <links>
11106                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11107                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
11108                 </links>
11109         </class>
11110
11111         <class id="xfunc" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xfunc" oils_persist:tablename="query.expr_xfunc" reporter:label="Function Expression">
11112                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11113                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11114                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11115                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11116                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11117                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
11118                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
11119                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
11120                 </fields>
11121                 <links>
11122                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11123                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
11124                 </links>
11125         </class>
11126
11127         <class id="xin" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xin" oils_persist:tablename="query.expr_xin" reporter:label="In Expression">
11128                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11129                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11130                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11131                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11132                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11133                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
11134                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
11135                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
11136                 </fields>
11137                 <links>
11138                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11139                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
11140                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
11141                 </links>
11142         </class>
11143
11144         <class id="xisnull" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xisnull" oils_persist:tablename="query.expr_xisnull" reporter:label="IS NULL Expression">
11145                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11146                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11147                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11148                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11149                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11150                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
11151                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
11152                 </fields>
11153                 <links>
11154                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11155                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
11156                 </links>
11157         </class>
11158
11159         <class id="xnull" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xnull" oils_persist:tablename="query.expr_xnull" reporter:label="Null Expression">
11160                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11161                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11162                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11163                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11164                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11165                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
11166                 </fields>
11167                 <links>
11168                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11169                 </links>
11170         </class>
11171
11172         <class id="xnum" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xnum" oils_persist:tablename="query.expr_xnum" reporter:label="Number Expression">
11173                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11174                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11175                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11176                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11177                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11178                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
11179                 </fields>
11180                 <links>
11181                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11182                 </links>
11183         </class>
11184
11185         <class id="xop" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xop" oils_persist:tablename="query.expr_xop" reporter:label="Operator Expression">
11186                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11187                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11188                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11189                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11190                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11191                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
11192                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
11193                         <field reporter:label="Right Operand" name="right_operand" reporter:datatype="link"/>
11194                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
11195                 </fields>
11196                 <links>
11197                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11198                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
11199                         <link field="right_operand" reltype="has_a" key="id" map="" class="qxp"/>
11200                 </links>
11201         </class>
11202
11203         <class id="xser" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xser" oils_persist:tablename="query.expr_xser" reporter:label="Operator Expression">
11204                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11205                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11206                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11207                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11208                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11209                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
11210                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
11211                 </fields>
11212                 <links>
11213                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11214                 </links>
11215         </class>
11216
11217         <class id="xstr" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xstr" oils_persist:tablename="query.expr_xstr" reporter:label="String Expression">
11218                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11219                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11220                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11221                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11222                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11223                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
11224                 </fields>
11225                 <links>
11226                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11227                 </links>
11228         </class>
11229
11230         <class id="xsubq" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xsubq" oils_persist:tablename="query.expr_xsubq" reporter:label="Subquery Expression">
11231                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11232                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11233                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11234                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11235                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11236                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
11237                 </fields>
11238                 <links>
11239                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11240                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
11241                 </links>
11242         </class>
11243
11244         <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">
11245                 <fields oils_persist:primary="id">
11246                         <field reporter:label="Temp ID" name="id" reporter:datatype="id"/>
11247                         <field reporter:label="Type" name="ptype" reporter:datatype="link"/>
11248                         <field reporter:label="Subfield" name="subfield" reporter:datatype="link"/>
11249                         <field reporter:label="Value" name="value" reporter:datatype="link"/>
11250                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
11251                 </fields>
11252                 <links>
11253                         <link field="ptype" reltype="has_a" key="id" map="" class="cmpctm"/>
11254                         <link field="subfield" reltype="has_a" key="id" map="" class="cmpcsm"/>
11255                         <link field="value" reltype="has_a" key="id" map="" class="cmpcvm"/>
11256                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
11257                 </links>
11258         </class>
11259
11260         <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">
11261                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_ff_pos_map_id_seq">
11262                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
11263                         <field reporter:label="Fixed Field" name="fixed_field" reporter:datatype="text"/>
11264                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
11265                         <field reporter:label="Record Type" name="rec_type" reporter:datatype="text"/>
11266                         <field reporter:label="Start Postion" name="start_pos" reporter:datatype="int"/>
11267                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
11268                         <field reporter:label="Default Value" name="default_val" reporter:datatype="text"/>
11269                 </fields>
11270                 <links/>
11271                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11272                         <actions>
11273                                 <retrieve/>
11274                         </actions>
11275                 </permacrud>
11276         </class>
11277
11278         <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">
11279                 <fields oils_persist:primary="ptype_key">
11280                         <field reporter:label="Type Key" name="ptype_key" reporter:datatype="id"/>
11281                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
11282                 </fields>
11283                 <links/>
11284                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11285                         <actions>
11286                                 <retrieve/>
11287                         </actions>
11288                 </permacrud>
11289         </class>
11290
11291         <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">
11292                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_physical_characteristic_subfield_map_id_seq">
11293                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
11294                         <field reporter:label="Type Key" name="ptype_key" reporter:datatype="link"/>
11295                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
11296                         <field reporter:label="Start Postion" name="start_pos" reporter:datatype="int"/>
11297                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
11298                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
11299                 </fields>
11300                 <links>
11301                         <link field="ptype_key" reltype="has_a" key="id" map="" class="cmpctm"/>
11302                 </links>
11303                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11304                         <actions>
11305                                 <retrieve/>
11306                         </actions>
11307                 </permacrud>
11308         </class>
11309
11310         <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">
11311                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_physical_characteristic_value_map_id_seq">
11312                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
11313                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
11314                         <field reporter:label="Subfield" name="ptype_subfield" reporter:datatype="link"/>
11315                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
11316                 </fields>
11317                 <links>
11318                         <link field="ptype_subfield" reltype="has_a" key="id" map="" class="cmpcsm"/>
11319                 </links>
11320                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11321                         <actions>
11322                                 <retrieve/>
11323                         </actions>
11324                 </permacrud>
11325         </class>
11326
11327     <class
11328         id="uvs"
11329         controller="open-ils.cstore open-ils.pcrud"
11330         oils_obj:fieldmapper="url_verify::session"
11331         oils_persist:tablename="url_verify.session"
11332         reporter:label="URL Verification Session"
11333     >
11334         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.session_id_seq">
11335             <field reporter:label="Session ID" name="id" reporter:datatype="id"/>
11336             <field reporter:label="Name" name="name" reporter:datatype="text" oils_obj:required="true"/>
11337                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" oils_obj:required="true"/>
11338             <field reporter:label="Creator" name="creator" reporter:datatype="link" oils_obj:required="true"/>
11339             <field reporter:label="Record Container" name="container" reporter:datatype="link" oils_obj:required="true"/>
11340             <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
11341             <field reporter:label="Search Constraints" name="search" reporter:datatype="text" oils_obj:required="true"/>
11342             <field reporter:label="URL Selectors" name="selectors" reporter:datatype="link" oils_persist:virtual="true"/>
11343             <field reporter:label="Verification Attempts" name="attempts" reporter:datatype="link" oils_persist:virtual="true"/>
11344         </fields>
11345
11346         <links>
11347             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
11348             <link field="creator" reltype="has_a" key="id" map="" class="au"/>
11349             <link field="container" reltype="has_a" key="id" map="" class="cbreb"/>
11350             <link field="selectors" reltype="has_many" key="session" map="" class="uvus"/>
11351             <link field="attempts" reltype="has_many" key="session" map="" class="uvva"/>
11352         </links>
11353
11354         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11355             <actions>
11356                 <retrieve permission="URL_VERIFY" context_field="owning_lib"/>
11357             </actions>
11358         </permacrud>
11359
11360     </class>
11361
11362     <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">
11363         <oils_persist:source_definition><![CDATA[
11364             SELECT
11365                 cbrebi.id AS id,  -- so we can have a pkey in our view
11366                 uvs.id AS session,
11367                 uvs.owning_lib,
11368                 cbrebi.target_biblio_record_entry
11369             FROM url_verify.session uvs
11370             JOIN container.biblio_record_entry_bucket cbreb
11371                 ON (uvs.container = cbreb.id)
11372             JOIN container.biblio_record_entry_bucket_item cbrebi
11373                 ON (cbrebi.bucket = cbreb.id)
11374         ]]></oils_persist:source_definition>
11375         <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_id_seq">
11376             <field reporter:label="Bucket Item ID" name="id" reporter:datatype="id" />
11377             <field reporter:label="Session" name="session" reporter:datatype="link" />
11378             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" />
11379             <field reporter:label="Target Biblio Record Entry" name="target_biblio_record_entry" reporter:datatype="link" />
11380         </fields>
11381         <links>
11382             <link field="target_biblio_record_entry" reltype="has_a" key="id" map="" class="bre" />
11383             <link field="session" reltype="has_a" key="id" map="" class="uvs" />
11384             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou" />
11385         </links>
11386         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11387             <actions>
11388                 <retrieve permission="URL_VERIFY" context_field="owning_lib" />
11389             </actions>
11390         </permacrud>
11391     </class>
11392
11393     <class
11394         id="uvus"
11395         controller="open-ils.cstore open-ils.pcrud"
11396         oils_obj:fieldmapper="url_verify::url_selector"
11397         oils_persist:tablename="url_verify.url_selector"
11398         reporter:label="URL Verification URL Selector"
11399     >
11400         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.url_selector_id_seq">
11401             <field reporter:label="URL Selector ID" name="id" reporter:datatype="id"/>
11402             <field reporter:label="XPath" name="xpath" reporter:datatype="text" oils_obj:required="true"/>
11403                         <field reporter:label="Session" name="session" reporter:datatype="link" oils_obj:required="true"/>
11404             <field reporter:label="URLs" name="urls" reporter:datatype="link" oils_persist:virtual="true"/>
11405         </fields>
11406
11407         <links>
11408             <link field="session" reltype="has_a" key="id" map="" class="uvs"/>
11409             <link field="urls" reltype="has_many" key="id" map="" class="uvu"/>
11410         </links>
11411
11412         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11413             <actions>
11414                 <create permission="URL_VERIFY">
11415                     <context link="session" field="owning_lib"/>
11416                 </create>
11417                 <retrieve permission="URL_VERIFY">
11418                     <context link="session" field="owning_lib"/>
11419                 </retrieve>
11420                 <update permission="URL_VERIFY">
11421                     <context link="session" field="owning_lib"/>
11422                 </update>
11423                 <delete permission="URL_VERIFY">
11424                     <context link="session" field="owning_lib"/>
11425                 </delete>
11426             </actions>
11427         </permacrud>
11428
11429     </class>
11430
11431     <class
11432         id="uvu"
11433         controller="open-ils.cstore open-ils.pcrud"
11434         oils_obj:fieldmapper="url_verify::url"
11435         oils_persist:tablename="url_verify.url"
11436         reporter:label="URL Verification URL"
11437     >
11438         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.url_id_seq">
11439             <field reporter:label="URL ID" name="id" reporter:datatype="id"/>
11440                         <field reporter:label="Redirected From" name="redirect_from" reporter:datatype="link"/>
11441                         <field reporter:label="Container Item" name="item" reporter:datatype="link" oils_obj:required="true"/>
11442                         <field reporter:label="Session" name="session" reporter:datatype="link" oils_obj:required="true"/>
11443                         <field reporter:label="URL Selector" name="url_selector" reporter:datatype="link"/>
11444             <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
11445             <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
11446             <field reporter:label="Ordinal Position" name="ord" reporter:datatype="int"/>
11447             <field reporter:label="URL" name="full_url" reporter:datatype="text"/>
11448             <field reporter:label="Scheme" name="scheme" reporter:datatype="text"/>
11449             <field reporter:label="Host" name="host" reporter:datatype="text"/>
11450             <field reporter:label="Domain" name="domain" reporter:datatype="text"/>
11451             <field reporter:label="TLD" name="tld" reporter:datatype="text"/>
11452             <field reporter:label="Path" name="path" reporter:datatype="text"/>
11453             <field reporter:label="Page" name="page" reporter:datatype="text"/>
11454             <field reporter:label="Query" name="query" reporter:datatype="text"/>
11455             <field reporter:label="Fragment" name="fragment" reporter:datatype="text"/>
11456             <field reporter:label="Verifications" name="verifications" reporter:datatype="link" oils_persist:virtual="true" />
11457         </fields>
11458
11459         <links>
11460             <link field="redirect_from" reltype="has_a" key="id" map="" class="uvu"/>
11461             <link field="item" reltype="has_a" key="id" map="" class="uvsbrem" />
11462             <link field="session" reltype="has_a" key="id" map="" class="uvs"/>
11463             <link field="url_selector" reltype="has_a" key="id" map="" class="uvus"/>
11464             <link field="verifications" reltype="has_many" key="url" map="" class="uvuv"/>
11465         </links>
11466
11467         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11468             <actions>
11469                 <create permission="URL_VERIFY">
11470                     <context link="session" field="owning_lib"/>
11471                 </create>
11472                 <retrieve permission="URL_VERIFY">
11473                     <context link="session" field="owning_lib"/>
11474                 </retrieve>
11475                 <update permission="URL_VERIFY">
11476                     <context link="session" field="owning_lib"/>
11477                 </update>
11478                 <delete permission="URL_VERIFY">
11479                     <context link="session" field="owning_lib"/>
11480                 </delete>
11481             </actions>
11482         </permacrud>
11483
11484     </class>
11485
11486     <class
11487         id="uvva"
11488         controller="open-ils.cstore open-ils.pcrud"
11489         oils_obj:fieldmapper="url_verify::verification_attempt"
11490         oils_persist:tablename="url_verify.verification_attempt"
11491         reporter:label="URL Verification Attempt"
11492     >
11493         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.verification_attempt_id_seq">
11494             <field reporter:label="Attempt ID" name="id" reporter:datatype="id"/>
11495                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
11496                         <field reporter:label="Session" name="session" reporter:datatype="link"/>
11497             <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
11498             <field reporter:label="Finish Time" name="finish_time" reporter:datatype="timestamp"/>
11499         </fields>
11500
11501         <links>
11502             <link field="session" reltype="has_a" key="id" map="" class="uvs"/>
11503             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
11504         </links>
11505
11506         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11507             <actions>
11508                 <create permission="URL_VERIFY">
11509                     <context link="session" field="owning_lib"/>
11510                 </create>
11511                 <retrieve permission="URL_VERIFY">
11512                     <context link="session" field="owning_lib"/>
11513                 </retrieve>
11514                 <update permission="URL_VERIFY">
11515                     <context link="session" field="owning_lib"/>
11516                 </update>
11517                 <delete permission="URL_VERIFY">
11518                     <context link="session" field="owning_lib"/>
11519                 </delete>
11520             </actions>
11521         </permacrud>
11522
11523     </class>
11524
11525     <class
11526         id="uvuv"
11527         controller="open-ils.cstore open-ils.pcrud"
11528         oils_obj:fieldmapper="url_verify::url_verification"
11529         oils_persist:tablename="url_verify.url_verification"
11530         reporter:label="URL Verification"
11531     >
11532         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.url_verification_id_seq">
11533             <field reporter:label="Verification ID" name="id" reporter:datatype="id"/>
11534                         <field reporter:label="URL" name="url" reporter:datatype="link"/>
11535                         <field reporter:label="Attempt" name="attempt" reporter:datatype="link"/>
11536             <field reporter:label="Request Time" name="req_time" reporter:datatype="timestamp"/>
11537             <field reporter:label="Result Time" name="res_time" reporter:datatype="timestamp"/>
11538             <field reporter:label="Result Code" name="res_code" reporter:datatype="int"/>
11539             <field reporter:label="Result Text" name="res_text" reporter:datatype="text"/>
11540                         <field reporter:label="Redirected To" name="redirect_to" reporter:datatype="link"/>
11541         </fields>
11542
11543         <links>
11544             <link field="url" reltype="has_a" key="id" map="" class="uvu"/>
11545             <link field="attempt" reltype="has_a" key="id" map="" class="uvva"/>
11546             <link field="redirect_to" reltype="has_a" key="id" map="" class="uvu"/>
11547         </links>
11548
11549         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11550             <actions>
11551                 <create permission="URL_VERIFY">
11552                     <context link="attempt" jump="session" field="owning_lib"/>
11553                 </create>
11554                 <retrieve permission="URL_VERIFY">
11555                     <context link="attempt" jump="session" field="owning_lib"/>
11556                 </retrieve>
11557                 <update permission="URL_VERIFY">
11558                     <context link="attempt" jump="session" field="owning_lib"/>
11559                 </update>
11560                 <delete permission="URL_VERIFY">
11561                     <context link="attempt" jump="session" field="owning_lib"/>
11562                 </delete>
11563             </actions>
11564         </permacrud>
11565
11566     </class>
11567
11568         <class
11569                 id="cfdi"
11570                 controller="open-ils.cstore open-ils.pcrud"
11571                 oils_obj:fieldmapper="config::filter_dialog_interface"
11572                 oils_persist:tablename="config.filter_dialog_interface"
11573                 reporter:label="FilterDialog Interface">
11574                 <fields oils_persist:primary="key" oils_persist:sequence="config.filter_dialog_interface_pkey">
11575                         <field reporter:label="Interface Key" name="key" reporter:datatype="text" />
11576                         <field reporter:label="Description" name="description" reporter:datatype="text" />
11577                 </fields>
11578                 <links>
11579                         <link field="filter_sets" reltype="has_many" key="interface" map="" class="cfdfs"/>
11580                 </links>
11581                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11582                         <actions>
11583                                 <retrieve />
11584                         </actions>
11585                 </permacrud>
11586         </class>
11587
11588         <class
11589                 id="cfdfs"
11590                 controller="open-ils.cstore open-ils.pcrud"
11591                 oils_obj:fieldmapper="config::filter_dialog_filter_set"
11592                 oils_persist:tablename="config.filter_dialog_filter_set"
11593                 reporter:label="FilterDialog Filter Set">
11594                 <fields oils_persist:primary="id" oils_persist:sequence="config.filter_dialog_filter_set_id_seq">
11595                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
11596                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
11597                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
11598                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
11599                         <field reporter:label="Interface" name="interface" reporter:datatype="link"/>
11600                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
11601                         <field reporter:label="Filters" name="filters" reporter:datatype="text"/>
11602                 </fields>
11603                 <links>
11604                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
11605                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
11606                         <link field="interface" reltype="has_a" key="key" map="" class="cfdi"/>
11607                 </links>
11608                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11609                         <actions>
11610                                 <create permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
11611                                 <retrieve permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
11612                                 <update permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
11613                                 <delete permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
11614                         </actions>
11615                 </permacrud>
11616
11617         </class>
11618
11619         <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">
11620                 <fields oils_persist:primary="code">
11621                         <field reporter:label="Code" name="code" reporter:datatype="id"/>
11622                         <field reporter:label="Type Value" name="type_val" reporter:datatype="text"/>
11623                         <field reporter:label="BLvl Value" name="blvl_val" reporter:datatype="text"/>
11624                 </fields>
11625                 <links/>
11626                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11627                         <actions>
11628                                 <retrieve/>
11629                         </actions>
11630                 </permacrud>
11631         </class>
11632
11633         <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">
11634                 <oils_persist:source_definition><![CDATA[
11635
11636             SELECT  b.id,
11637                     MAX(dcp.edit_date) AS last_delete_date
11638              FROM   biblio.record_entry b
11639                     JOIN asset.call_number cn ON (cn.record = b.id)
11640                     JOIN asset.copy dcp ON (cn.id = dcp.call_number)
11641              WHERE  NOT b.deleted
11642              GROUP BY b.id
11643              HAVING SUM( CASE WHEN NOT dcp.deleted THEN 1 ELSE 0 END) = 0 
11644
11645                 ]]></oils_persist:source_definition>
11646                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
11647                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
11648                         <field reporter:label="Delete Date/Time" name="last_delete_date" reporter:datatype="timestamp"/>
11649                 </fields>
11650                 <links>
11651                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
11652                 </links>
11653                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11654                         <actions>
11655                                 <retrieve/>
11656                         </actions>
11657                 </permacrud>
11658         </class>
11659
11660         <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">
11661                 <oils_persist:source_definition><![CDATA[
11662
11663             -- -- 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.
11664             -- -- 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
11665             -- -- may not.
11666             -- SELECT
11667             --     bre.id AS bib_id,
11668             --     COALESCE( z.copy_count, 0 ) AS copy_count,
11669             --     COALESCE( z.hold_count, 0 ) AS hold_count,
11670             --     COALESCE( z.copy_hold_ratio, 0 ) AS hold_copy_ratio
11671             -- FROM (
11672                 SELECT
11673                     y.bre AS id,
11674                     COALESCE( x.copy_count, 0 ) AS copy_count,
11675                     y.hold_count AS hold_count,
11676                     (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
11677                 FROM (
11678                         SELECT
11679                             (SELECT bib_record FROM reporter.hold_request_record r WHERE r.id = h.id LIMIT 1) AS bre,
11680                             COUNT(*) AS hold_count
11681                         FROM action.hold_request h
11682                         WHERE
11683                             cancel_time IS NULL
11684                             AND fulfillment_time IS NULL
11685                             -- AND NOT frozen  -- a frozen hold is still a desired hold, eh?
11686                         GROUP BY 1
11687                     )y LEFT JOIN (
11688                         SELECT 
11689                             (SELECT id
11690                                 FROM biblio.record_entry 
11691                                 WHERE id = (SELECT record FROM asset.call_number WHERE id = call_number and deleted is false)
11692                             ) AS bre, 
11693                             COUNT(*) AS copy_count
11694                         FROM asset.copy
11695                             JOIN asset.copy_location loc ON (copy.location = loc.id AND loc.holdable)
11696                         WHERE copy.holdable 
11697                             AND NOT copy.deleted 
11698                             AND copy.status IN ( SELECT id FROM config.copy_status WHERE holdable ) 
11699                         GROUP BY 1
11700                     )x ON x.bre = y.bre
11701                 -- )z RIGHT JOIN (
11702                 --     SELECT id
11703                 --     FROM biblio.record_entry
11704                 --     WHERE NOT deleted
11705                 -- )bre ON (z.bib_id = bre.id)
11706                 
11707
11708                 ]]></oils_persist:source_definition>
11709                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
11710                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
11711                         <field reporter:label="Holdable Copy Count" name="copy_count" reporter:datatype="int"/>
11712                         <field reporter:label="Active Holds" name="hold_count" reporter:datatype="int"/>
11713                         <field reporter:label="Hold/Copy Ratio" name="hold_copy_ratio" reporter:datatype="float"/>
11714                 </fields>
11715                 <links>
11716                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
11717                 </links>
11718                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11719                         <actions>
11720                                 <retrieve/>
11721                         </actions>
11722                 </permacrud>
11723         </class>
11724
11725         <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">
11726                 <oils_persist:source_definition><![CDATA[
11727             SELECT *,
11728                 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,
11729                 CASE WHEN copy_count_everywhere = 0 THEN 'Infinity'::FLOAT ELSE holds_everywhere::FLOAT/copy_count_everywhere END AS everywhere_ratio
11730             FROM
11731                 (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
11732                     FROM
11733                         action.hold_request ahr
11734                         JOIN reporter.hold_request_record rhrr USING (id)
11735                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
11736                         LEFT JOIN asset.copy ac ON (ahcm.target_copy = ac.id AND ahr.pickup_lib = ac.circ_lib)
11737                     WHERE
11738                         ahr.cancel_time IS NULL
11739                         AND ahr.fulfillment_time IS NULL
11740                     GROUP BY bib_record, pickup_lib
11741                 )x
11742                 JOIN
11743                 (SELECT bib_record as id, count(DISTINCT ahr.id) AS holds_everywhere, COALESCE(count(DISTINCT target_copy),0) as copy_count_everywhere
11744                     FROM
11745                         action.hold_request ahr
11746                         JOIN reporter.hold_request_record rhrr USING (id)
11747                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
11748                     WHERE
11749                         ahr.cancel_time IS NULL
11750                         AND ahr.fulfillment_time IS NULL
11751                     GROUP BY bib_record
11752                 )y
11753                 USING (id)
11754                 ]]></oils_persist:source_definition>
11755                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
11756                         <field reporter:label="Record ID" name="id" reporter:datatype="link"/>
11757                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
11758                         <field reporter:label="Active Holds at Pickup Library" name="holds_at_pickup_library" reporter:datatype="int"/>
11759                         <field reporter:label="Holdable Copy Count at Pickup Library" name="copy_count_at_pickup_library" reporter:datatype="int"/>
11760                         <field reporter:label="Active Holds Everywhere" name="holds_everywhere" reporter:datatype="int"/>
11761                         <field reporter:label="Holdable Copy Count Everywhere" name="copy_count_everywhere" reporter:datatype="int"/>
11762                         <field reporter:label="Hold/Copy Ratio at Pickup Library" name="pickup_library_ratio" reporter:datatype="float"/>
11763                         <field reporter:label="Hold/Copy Ratio Everywhere" name="everywhere_ratio" reporter:datatype="float"/>
11764                 </fields>
11765                 <links>
11766                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
11767                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
11768                 </links>
11769                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11770                         <actions>
11771                                 <retrieve/>
11772                         </actions>
11773                 </permacrud>
11774         </class>
11775
11776         <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) ">
11777                 <oils_persist:source_definition><![CDATA[
11778             WITH counts_at_ou AS (
11779                 SELECT  rhrr.bib_record AS id,
11780                         aou.id AS pickup_lib_or_desc,
11781                         COUNT(DISTINCT ahr.id) AS holds_at_or_below,
11782                         COALESCE(COUNT(DISTINCT ac.id),0) AS copy_count_at_or_below
11783                   FROM  actor.org_unit aou
11784                         JOIN actor.org_unit_type aout ON (aou.ou_type = aout.id),
11785                         action.hold_request ahr
11786                         JOIN reporter.hold_request_record rhrr USING (id)
11787                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
11788                         LEFT JOIN asset.copy ac ON (ahcm.target_copy = ac.id)
11789                   WHERE ahr.cancel_time IS NULL AND ahr.fulfillment_time IS NULL
11790                         AND ac.circ_lib IN (SELECT id FROM actor.org_unit_descendants(aou.id))
11791                         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
11792                   GROUP BY 1, 2
11793             )
11794             SELECT x.id, x.pickup_lib_or_desc, x.holds_at_or_below, x.copy_count_at_or_below,
11795                    y.holds_everywhere, y.copy_count_everywhere,
11796                 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,
11797                 CASE WHEN copy_count_everywhere = 0 THEN 'Infinity'::FLOAT ELSE y.holds_everywhere::FLOAT/y.copy_count_everywhere END AS everywhere_ratio
11798             FROM counts_at_ou x
11799                 JOIN (SELECT bib_record AS id, count(DISTINCT ahr.id) AS holds_everywhere, COALESCE(count(DISTINCT target_copy),0) as copy_count_everywhere
11800                     FROM
11801                         action.hold_request ahr
11802                         JOIN reporter.hold_request_record rhrr USING (id)
11803                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
11804                     WHERE
11805                         ahr.cancel_time IS NULL
11806                         AND ahr.fulfillment_time IS NULL
11807                     GROUP BY bib_record
11808                 )y
11809                 USING (id)
11810                 ]]></oils_persist:source_definition>
11811                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
11812                         <field reporter:label="Record ID" name="id" reporter:datatype="link"/>
11813                         <field reporter:label="Pickup Library" name="pickup_lib_or_desc" reporter:datatype="org_unit"/>
11814                         <field reporter:label="Active Holds at Pickup Library and its Descendants" name="holds_at_or_below" reporter:datatype="int"/>
11815                         <field reporter:label="Holdable Copy Count at Pickup Library and its Descendants" name="copy_count_at_or_below" reporter:datatype="int"/>
11816                         <field reporter:label="Active Holds Everywhere" name="holds_everywhere" reporter:datatype="int"/>
11817                         <field reporter:label="Holdable Copy Count Everywhere" name="copy_count_everywhere" reporter:datatype="int"/>
11818                         <field reporter:label="Hold/Copy Ratio at Pickup Library and its Descendants" name="hold_copy_ratio_at_or_below_ou" reporter:datatype="float"/>
11819                         <field reporter:label="Hold/Copy Ratio Everywhere" name="everywhere_ratio" reporter:datatype="float"/>
11820                 </fields>
11821                 <links>
11822                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
11823                         <link field="pickup_lib_or_desc" reltype="has_a" key="id" map="" class="aou"/>
11824                 </links>
11825                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11826                         <actions>
11827                                 <retrieve/>
11828                         </actions>
11829                 </permacrud>
11830         </class>
11831
11832         <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">
11833                 <oils_persist:source_definition><![CDATA[
11834             SELECT
11835                 ac.id,
11836                 COALESCE(MAX(actac.xact_start), ac.create_date) AS last_circ_or_create,
11837                 MAX(actac.xact_start) AS last_circ
11838             FROM asset.copy ac
11839                  LEFT JOIN action.all_circulation actac ON ac.id = actac.target_copy
11840             GROUP BY ac.id
11841
11842             -- Alternate version, say if you have migrated last checkout information in extend_reporter.legacy_circ_timestamp:
11843             --SELECT
11844             --    ac.id,
11845             --    GREATEST(MAX(actac.xact_start), erlct.last_cko_ts, ac.create_date) AS last_circ_or_create,
11846             --    GREATEST(MAX(actac.xact_start), erlct.last_cko_ts) AS last_circ
11847             --FROM asset.copy ac
11848             --     LEFT JOIN action.all_circulation actac ON ac.id = actac.target_copy
11849             --     LEFT JOIN extend_reporter.legacy_circ_timestamp erlct ON ac.id = erlct.id
11850             --GROUP BY ac.id, ac.create_date, erlct.last_cko_ts
11851                 ]]></oils_persist:source_definition>
11852                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
11853                         <field reporter:label="Copy ID" name="id" reporter:datatype="link"/>
11854                         <field reporter:label="Last Circulation or Creation Date" name="last_circ_or_create" reporter:datatype="timestamp"/>
11855                         <field reporter:label="Last Circulation Date" name="last_circ" reporter:datatype="timestamp"/>
11856                 </fields>
11857                 <links>
11858                         <link field="id" reltype="has_a" key="id" map="" class="acp"/>
11859                 </links>
11860                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11861                         <actions>
11862                                 <retrieve/>
11863                         </actions>
11864                 </permacrud>
11865         </class>
11866
11867         <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">
11868                 <fields oils_persist:primary="id">
11869                         <field reporter:label="Text Search Config" reporter:selector="name" reporter:datatype="text" name="id"/>
11870                         <field reporter:label="Text Search Config Name" reporter:datatype="text" name="name"/>
11871                 </fields>
11872                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11873                         <actions>
11874                                 <retrieve/>
11875                         </actions>
11876                 </permacrud>
11877         </class>
11878
11879         <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">
11880                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_class_ts_map_id_seq">
11881                         <field reporter:label="Map ID" reporter:datatype="id" name="id"/>
11882                         <field reporter:label="Metabib Class" reporter:datatype="text" name="field_class"/>
11883                         <field reporter:label="Text Search Config" reporter:datatype="text" name="ts_config"/>
11884                         <field reporter:label="Active?" reporter:datatype="bool" name="active"/>
11885                         <field reporter:label="Index Weight" reporter:datatype="text" name="index_weight"/>
11886                         <field reporter:label="Index Language" reporter:datatype="text" name="index_lang"/>
11887                         <field reporter:label="Search Language" reporter:datatype="text" name="search_lang"/>
11888                         <field reporter:label="Always Apply?" reporter:datatype="bool" name="always"/>
11889                 </fields>
11890                 <links>
11891                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
11892                         <link field="ts_config" reltype="has_a" key="id" map="" class="ctcl"/>
11893                 </links>
11894                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11895                         <actions>
11896                                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
11897                                 <retrieve/>
11898                                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
11899                                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
11900                         </actions>
11901                 </permacrud>
11902         </class>
11903
11904         <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">
11905                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_ts_map_id_seq">
11906                         <field reporter:label="Map ID" reporter:datatype="id" name="id"/>
11907                         <field reporter:label="Metabib Field" reporter:datatype="text" name="metabib_field"/>
11908                         <field reporter:label="Text Search Config" reporter:datatype="text" name="ts_config"/>
11909                         <field reporter:label="Active?" reporter:datatype="bool" name="active"/>
11910                         <field reporter:label="Index Weight" reporter:datatype="text" name="index_weight"/>
11911                         <field reporter:label="Index Language" reporter:datatype="text" name="index_lang"/>
11912                         <field reporter:label="Search Language" reporter:datatype="text" name="search_lang"/>
11913                 </fields>
11914                 <links>
11915                         <link field="metabib_field" reltype="has_a" key="id" map="" class="cmf"/>
11916                         <link field="ts_config" reltype="has_a" key="id" map="" class="ctcl"/>
11917                 </links>
11918                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11919                         <actions>
11920                                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
11921                                 <retrieve/>
11922                                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
11923                                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
11924                         </actions>
11925                 </permacrud>
11926         </class>
11927
11928
11929         <!-- ********************************************************************************************************************* -->
11930         <!-- What follows is a set of example extensions that are useful for PINES.  Comment out or remove if you don't want them. -->
11931         <!-- ********************************************************************************************************************* -->
11932         <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">
11933                 <fields oils_persist:primary="id">
11934                         <field reporter:label="Circulation" name="id" reporter:datatype="id" />
11935                         <field reporter:label="Library Circulation Location Short (Policy) Name" name="circ_lib" reporter:datatype="text"/>
11936                         <field reporter:label="Library Circulation Location Link" name="circ_lib_id" reporter:datatype="org_unit"/>
11937                         <field reporter:label="Circulation Date/Time" name="xact_start" reporter:datatype="timestamp"/>
11938                         <field reporter:label="Circulation Type" name="circ_type" reporter:datatype="text"/>
11939                         <field reporter:label="Copy Link" name="copy_id" reporter:datatype="link"/>
11940                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
11941                         <field reporter:label="Owning Library Short (Policy) Name" name="owning_lib_name" reporter:datatype="text"/>
11942                         <field reporter:label="Item Language" name="language" reporter:datatype="text"/>
11943                         <field reporter:label="Literary Form" name="lit_form" reporter:datatype="text"/>
11944                         <field reporter:label="MARC Form" name="item_form" reporter:datatype="text"/>
11945                         <field reporter:label="MARC Type" name="item_type" reporter:datatype="text"/>
11946                         <field reporter:label="Shelving Location" name="shelving_location" reporter:datatype="text"/>
11947                         <field reporter:label="Patron Profile Group" name="profile_group" reporter:datatype="text"/>
11948                         <field reporter:label="Patron Age Demographic" name="demographic_general_division" reporter:datatype="text"/>
11949                         <field reporter:label="Call Number Link" name="call_number" reporter:datatype="link"/>
11950                         <field reporter:label="Call Number Label" name="call_number_label" reporter:datatype="text"/>
11951                         <field reporter:label="Call Number Dewey/Prefix" name="dewey" reporter:datatype="text"/>
11952                         <field reporter:label="Patron Link" name="patron_id" reporter:datatype="link"/>
11953                         <field reporter:label="Patron Home Library Link" name="patron_home_lib" reporter:datatype="link"/>
11954                         <field reporter:label="Patron Home Library Short (Policy) Name" name="patron_home_lib_shortname" reporter:datatype="text"/>
11955                         <field reporter:label="Patron County" name="patron_county" reporter:datatype="text"/>
11956                         <field reporter:label="Patron City" name="patron_city" reporter:datatype="text"/>
11957                         <field reporter:label="Patron ZIP Code" name="patron_zip" reporter:datatype="text"/>
11958                         <field reporter:label="Legacy CAT1 Link" name="stat_cat_1" reporter:datatype="link"/>
11959                         <field reporter:label="Legacy CAT2 Link" name="stat_cat_2" reporter:datatype="link"/>
11960                         <field reporter:label="Dewey Range - Tens" name="dewey_range_tens" reporter:datatype="text"/>
11961                         <field reporter:label="Dewey Range - Hundreds" name="dewey_range_hundreds" reporter:datatype="text"/>
11962                         <field reporter:label="Dewey Block - Tens" name="dewey_block_tens" reporter:datatype="text"/>
11963                         <field reporter:label="Dewey Block - Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
11964                         <field reporter:label="Legacy CAT1 Value" name="stat_cat_1_value" reporter:datatype="text"/>
11965                         <field reporter:label="Legacy CAT2 Value" name="stat_cat_2_value" reporter:datatype="text"/>
11966                 </fields>
11967                 <links>
11968                         <link field="id" reltype="has_a" key="id" map="" class="circ"/>
11969                         <link field="copy_id" reltype="has_a" key="id" map="" class="acp"/>
11970                         <link field="patron_id" reltype="has_a" key="id" map="" class="au"/>
11971                         <link field="circ_lib_id" reltype="has_a" key="id" map="" class="aou"/>
11972                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
11973                         <link field="patron_home_lib" reltype="has_a" key="id" map="" class="aou"/>
11974                         <link field="stat_cat_1" reltype="has_a" key="id" map="" class="rsce1"/>
11975                         <link field="stat_cat_2" reltype="has_a" key="id" map="" class="rsce2"/>
11976                 </links>
11977         </class>
11978
11979         <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">
11980                 <fields oils_persist:primary="id">
11981                         <field reporter:label="Entry ID" name="id" reporter:selector="value" reporter:datatype="id" />
11982                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
11983                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
11984                 </fields>
11985                 <links>
11986                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
11987                 </links>
11988         </class>
11989
11990         <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">
11991                 <fields oils_persist:primary="id">
11992                         <field reporter:label="Entry ID" name="id" reporter:selector="value" reporter:datatype="id" />
11993                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
11994                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
11995                 </fields>
11996                 <links>
11997                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
11998                 </links>
11999         </class>
12000
12001         <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">
12002                 <fields oils_persist:primary="id">
12003                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
12004
12005                         <field reporter:label="Billing Location Short (Policy) Name" name="billing_location_shortname" reporter:datatype="text"/>
12006                         <field reporter:label="Billing Location Name" name="billing_location_name" reporter:datatype="text"/>
12007                         <field reporter:label="Billing Location Link" name="billing_location" reporter:datatype="org_unit"/>
12008
12009                         <field reporter:label="User Home Library Short (Policy) Name" name="usr_home_ou_shortname" reporter:datatype="text"/>
12010                         <field reporter:label="User Home Library Name" name="usr_home_ou_name" reporter:datatype="text"/>
12011                         <field reporter:label="User Home Library Link" name="usr_home_ou" reporter:datatype="org_unit"/>
12012
12013                         <field reporter:label="User Barcode" name="barcode" reporter:datatype="text"/>
12014                         <field reporter:label="User Link" name="usr" reporter:datatype="link"/>
12015
12016                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
12017                         <field reporter:label="Transaction End Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
12018                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
12019
12020                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
12021                         <field reporter:label="Total Billed" name="total_owed" reporter:datatype="money"/>
12022
12023                         <field reporter:label="Last Payment Date/Time" name="last_payment_ts" reporter:datatype="timestamp"/>
12024                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
12025                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
12026
12027                         <field reporter:label="Last Billing Date/Time" name="last_billing_ts" reporter:datatype="timestamp"/>
12028                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
12029                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
12030
12031                         <field reporter:label="User Age Demographic" name="demographic_general_division" reporter:datatype="text"/>
12032                         <field reporter:label="User County" name="patron_county" reporter:datatype="text"/>
12033                         <field reporter:label="User City" name="patron_city" reporter:datatype="text"/>
12034                         <field reporter:label="User ZIP Code" name="patron_zip" reporter:datatype="text"/>
12035
12036                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
12037                         <field reporter:label="User Profile Group" name="profile_group" reporter:datatype="text"/>
12038
12039                 </fields>
12040                 <links>
12041                         <link field="id" reltype="has_a" key="id" map="" class="mbt"/>
12042                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
12043                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
12044                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
12045                 </links>
12046         </class>
12047
12048         <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">
12049                 <oils_persist:source_definition><![CDATA[
12050
12051             SELECT
12052                 po.ordering_agency AS ordering_agency,
12053                 po.id AS purchase_order,
12054                 li.id AS lineitem,
12055                 lid.id AS lineitem_detail,
12056                 cpa.id AS claim_policy_action
12057             FROM
12058                 acq.lineitem_detail lid
12059                 JOIN acq.lineitem li ON (li.id = lid.lineitem)
12060                 JOIN acq.purchase_order po ON (po.id = li.purchase_order)
12061                 JOIN acq.claim_policy cp ON (li.claim_policy = cp.id)
12062                 JOIN acq.claim_policy_action cpa ON (
12063                     cpa.claim_policy = cp.id
12064
12065                     -- we only care about claim policy actions whose claim
12066                     -- interval we'd reached or exceeded
12067                     AND (NOW() - cpa.action_interval) > po.order_date
12068
12069                     -- filter out all claim policy actions where claim events
12070                     -- have occurred on or after the action's action_interval
12071                     AND NOT EXISTS (
12072                         SELECT 1
12073                         FROM
12074                             acq.claim_event evt
12075                             JOIN acq.claim claim ON (
12076                                 claim.id = evt.claim
12077                                 AND claim.lineitem_detail = lid.id
12078                             )
12079                         WHERE
12080                             evt.event_date >= (po.order_date + cpa.action_interval)
12081                     )
12082                 )
12083             WHERE
12084                 lid.cancel_reason IS NULL
12085                 AND li.cancel_reason IS NULL -- belt/suspenders
12086                 AND po.cancel_reason IS NULL -- belt/suspenders
12087                 AND lid.recv_time IS NULL
12088                 AND po.state = 'on-order'
12089             ORDER BY 1, 2, 3, 4, 5
12090
12091                 ]]></oils_persist:source_definition>
12092                 <fields>
12093                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="link"/>
12094                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
12095                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
12096                         <field reporter:label="Lineitem Detail" name="lineitem_detail" reporter:datatype="link"/>
12097                         <field reporter:label="Claim Policy Action" name="claim_policy_action" reporter:datatype="link"/>
12098                 </fields>
12099                 <links>
12100                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
12101                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
12102                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
12103                         <link field="lineitem_detail" reltype="has_a" key="id" map="" class="acqlid"/>
12104                         <link field="claim_policy_action" reltype="has_a" key="id" map="" class="acqclpa"/>
12105                 </links>
12106         </class>
12107         <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">
12108                 <fields oils_persist:primary="lineitem" oils_persist:sequence="acq.lineitem_id_seq">
12109                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
12110                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
12111                         <field reporter:label="Receive Count" name="recv_count" reporter:datatype="int"/>
12112                         <field reporter:label="Cancel Count" name="cancel_count" reporter:datatype="int"/>
12113                         <field reporter:label="Delay Count" name="delay_count" reporter:datatype="int"/>
12114                         <field reporter:label="Invoice Count" name="invoice_count" reporter:datatype="int"/>
12115                         <field reporter:label="Claim Count" name="claim_count" reporter:datatype="int"/>
12116                         <field reporter:label="Estimated Amount" name="estimated_amount" reporter:datatype="money"/>
12117                         <field reporter:label="Encumbrance Amount" name="encumbrance_amount" reporter:datatype="money"/>
12118                         <field reporter:label="Paid Amount" name="paid_amount" reporter:datatype="money"/>
12119                 </fields>
12120                 <links>
12121                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
12122                 </links>
12123     </class>
12124         <class id="acqlisumi" controller="open-ils.cstore" oils_obj:fieldmapper="acq::lineitem_summary_invoiceable" oils_persist:readonly="true" reporter:label="Invoiceable Lineitem Summary">
12125                 <oils_persist:source_definition><![CDATA[
12126             SELECT * FROM acq.lineitem_summary 
12127                                 WHERE item_count > (invoice_count + cancel_count)
12128         ]]></oils_persist:source_definition>
12129                 <fields oils_persist:primary="lineitem" oils_persist:sequence="acq.lineitem_id_seq">
12130                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
12131                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
12132                         <field reporter:label="Receive Count" name="recv_count" reporter:datatype="int"/>
12133                         <field reporter:label="Cancel Count" name="cancel_count" reporter:datatype="int"/>
12134                         <field reporter:label="Delay Count" name="delay_count" reporter:datatype="int"/>
12135                         <field reporter:label="Invoice Count" name="invoice_count" reporter:datatype="int"/>
12136                         <field reporter:label="Claim Count" name="claim_count" reporter:datatype="int"/>
12137                         <field reporter:label="Estimated Amount" name="estimated_amount" reporter:datatype="money"/>
12138                         <field reporter:label="Encumbrance Amount" name="encumbrance_amount" reporter:datatype="money"/>
12139                         <field reporter:label="Paid Amount" name="paid_amount" reporter:datatype="money"/>
12140                 </fields>
12141                 <links>
12142                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
12143                 </links>
12144     </class>
12145         <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">
12146                 <oils_persist:source_definition><![CDATA[
12147
12148                         SELECT  t.*
12149                           FROM  action.transit_copy t
12150                                 JOIN actor.org_unit AS s ON (t.source = s.id)
12151                                 JOIN actor.org_unit AS d ON (t.dest = d.id)
12152                           WHERE s.parent_ou <> d.parent_ou
12153
12154                 ]]></oils_persist:source_definition>
12155                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
12156                         <field reporter:label="Pretransit Copy Status" name="copy_status" reporter:datatype="link"/>
12157                         <field reporter:label="Destination" name="dest" reporter:datatype="link"/>
12158                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
12159                         <field reporter:label="Transit ID" name="id" reporter:datatype="id"/>
12160                         <field reporter:label="Is Persistent? (unused)" name="persistant_transfer" reporter:datatype="bool"/>
12161                         <field reporter:label="Previous Hop (unused)" name="prev_hop" reporter:datatype="link"/>
12162                         <field reporter:label="Source" name="source" reporter:datatype="link"/>
12163                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
12164                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
12165                         <field reporter:label="Hold Transit" name="hold_transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
12166                         <field reporter:label="Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
12167                 </fields>
12168                 <links>
12169                         <link field="hold_transit_copy" reltype="might_have" key="id" map="" class="ahtc"/>
12170                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
12171                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
12172                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
12173                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
12174                         <link field="prev_hop" reltype="has_a" key="id" map="" class="atc"/>
12175                 </links>
12176         </class>
12177
12178     <class id="circbyyr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::circ_counts_by_year" oils_persist:readonly="true">
12179                 <oils_persist:source_definition><![CDATA[
12180
12181         SELECT copy, SUM(count) AS count, year, is_renewal FROM (
12182                 SELECT
12183                         cp.id as copy,
12184                         COUNT(circ.id),
12185                         EXTRACT(YEAR FROM circ.xact_start) AS year,
12186                         (phone_renewal OR desk_renewal OR opac_renewal) as is_renewal
12187                 FROM
12188                         asset.copy cp
12189                                 JOIN action.circulation circ ON (cp.id = circ.target_copy)
12190                 GROUP BY 1, 3, 4
12191                 UNION ALL
12192                 SELECT
12193                         cp.id as copy,
12194                         COUNT(circ.id),
12195                         EXTRACT(YEAR FROM circ.xact_start) AS year,
12196                         (phone_renewal OR desk_renewal OR opac_renewal) as is_renewal
12197                 FROM
12198                         asset.copy cp
12199                                 JOIN action.aged_circulation circ ON (cp.id = circ.target_copy)
12200                 GROUP BY 1, 3, 4
12201                 UNION ALL
12202                 SELECT
12203                         id as copy,
12204                         circ_count,
12205                         -1 AS year,
12206                         false as is_renewal
12207                 FROM
12208                         extend_reporter.legacy_circ_count
12209         )x GROUP BY 1, 3, 4
12210
12211                 ]]></oils_persist:source_definition>
12212         <fields>
12213             <field reporter:label="Copy ID" name="copy" reporter:datatype="link"/>
12214             <field reporter:label="Count" name="count" reporter:datatype="int"/>
12215             <field reporter:label="Year" name="year" reporter:datatype="int"/>
12216             <field reporter:label="Renewal" name="is_renewal" reporter:datatype="bool"/>
12217         </fields>
12218                 <links>
12219                         <link field="copy" reltype="has_a" key="id" map="" class="acp"/>
12220                 </links>
12221                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12222                         <actions>
12223                                 <retrieve/>
12224                         </actions>
12225                 </permacrud>
12226     </class>
12227
12228         <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">
12229                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
12230                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
12231                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
12232                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
12233                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
12234                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
12235                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
12236                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
12237                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
12238                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
12239                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
12240                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
12241                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
12242                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
12243                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
12244                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
12245                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
12246                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
12247                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
12248                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
12249                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
12250                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
12251                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
12252                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
12253                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
12254                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
12255                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
12256                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
12257                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="link"/>
12258                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="link"/>
12259                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="link"/>
12260                 </fields>
12261                 <links>
12262                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
12263                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
12264                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
12265                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
12266                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
12267                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
12268                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
12269                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
12270                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
12271                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
12272                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
12273                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
12274                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
12275                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
12276                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
12277                 </links>
12278         </class>
12279
12280     <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">
12281         <fields oils_persist:primary="id">
12282             <field reporter:label="Title" name="title" reporter:datatype="text"/>
12283             <field reporter:label="Author" name="author" reporter:datatype="text"/>
12284             <field reporter:label="Pubdate" name="pubdate" reporter:datatype="text"/>
12285             <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
12286             <field reporter:label="Price" name="price" reporter:datatype="money"/>
12287             <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
12288             <field reporter:label="Callnumber Label" name="call_number_label" reporter:datatype="text"/>
12289             <field reporter:label="Dewy Tens" name="dewey_block_tens" reporter:datatype="text"/>
12290             <field reporter:label="Dewy Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
12291             <field reporter:label="Use Count" name="use_count" reporter:datatype="int"/>
12292             <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
12293             <field reporter:label="Shelving Location Name" name="shelving_location" reporter:datatype="text"/>
12294             <field reporter:label="Legacy Stat Cat 1" name="stat_cat_1" reporter:datatype="link"/>
12295             <field reporter:label="Legacy Stat Cat 2" name="stat_cat_2" reporter:datatype="link"/>
12296             <field reporter:label="Legacy Stat Cat 1 Value" name="stat_cat_1_value" reporter:datatype="text"/>
12297             <field reporter:label="Legacy Stat Cat 2 Value" name="stat_cat_2_value" reporter:datatype="text"/>
12298             <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
12299             <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
12300             <field reporter:label="Owning Lib Name" name="owning_lib_name" reporter:datatype="text"/>
12301             <field reporter:label="Circ Lib Name" name="circ_lib_name" reporter:datatype="text"/>
12302             <field reporter:label="Owning Lib" name="owning_lib" reporter:datatype="link"/>
12303             <field reporter:label="Circ Lib" name="circ_lib" reporter:datatype="link"/>
12304             <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
12305             <field reporter:label="Age Protection" name="age_protect" reporter:datatype="link"/>
12306             <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
12307             <field reporter:label="Reference" name="ref" reporter:datatype="bool"/>
12308             <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="text"/>
12309             <field reporter:label="Deleted" name="deleted" reporter:datatype="bool"/>
12310             <field reporter:label="TCN" name="tcn_value" reporter:datatype="text"/>
12311             <field reporter:label="Status" name="status" reporter:datatype="link"/>
12312             <field reporter:label="Stop Fines Reason" name="stop_fines" reporter:datatype="text"/>
12313             <field reporter:label="Due Date" name="due_date" reporter:datatype="timestamp"/>
12314             <field reporter:label="Patron Barcode" name="patron_barcode" reporter:datatype="text"/>
12315             <field reporter:label="Patron Name" name="patron_name" reporter:datatype="text"/>
12316         </fields>
12317         <links>
12318             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
12319             <link field="id" reltype="has_a" key="id" map="" class="acp"/>
12320             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
12321             <link field="creator" reltype="has_a" key="id" map="" class="au"/>
12322             <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
12323             <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
12324             <link field="stat_cat_1" reltype="might_have" key="id" map="" class="rsce1"/>
12325             <link field="stat_cat_2" reltype="might_have" key="id" map="" class="rsce2"/>
12326         </links>
12327     </class>
12328
12329     <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">
12330         <fields oils_persist:primary="id">
12331             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
12332             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
12333             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
12334             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
12335         </fields>
12336         <links>
12337             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
12338             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
12339         </links>
12340     </class>
12341
12342     <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">
12343         <fields oils_persist:primary="owning_lib">
12344             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
12345             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
12346             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
12347         </fields>
12348         <links>
12349             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
12350         </links>
12351     </class>
12352
12353     <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">
12354         <fields oils_persist:primary="id">
12355             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
12356             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
12357             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
12358             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
12359             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
12360         </fields>
12361         <links>
12362             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
12363             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
12364             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
12365         </links>
12366     </class>
12367
12368     <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">
12369         <fields oils_persist:primary="circ_lib">
12370             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
12371             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
12372             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
12373             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
12374         </fields>
12375         <links>
12376             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
12377             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
12378         </links>
12379     </class>
12380
12381     <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">
12382         <fields oils_persist:primary="id">
12383             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
12384             <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
12385             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
12386             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
12387             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
12388         </fields>
12389         <links>
12390             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
12391             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
12392             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
12393         </links>
12394     </class>
12395
12396     <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">
12397         <fields oils_persist:primary="home_ou">
12398             <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
12399             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
12400             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
12401             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
12402         </fields>
12403         <links>
12404             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
12405             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
12406         </links>
12407     </class>
12408         <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">
12409                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_id_seq">
12410                         <field reporter:label="Fund Tag ID" name="id" reporter:datatype="id"/>
12411                         <field reporter:label="Fund Tag Owner" name="owner" reporter:datatype="org_unit"/>
12412                         <field reporter:label="Fund Tag Name" name="name" reporter:datatype="text"/>
12413                         <field reporter:label="Map Entries" name="map_entries" oils_persist:virtual="true" reporter:datatype="link"/>
12414                 </fields>
12415                 <links>
12416                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
12417                         <link field="map_entries" reltype="has_many" key="fund" map="" class="acqftm"/>
12418                 </links>
12419                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12420                         <actions>
12421                                 <create permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
12422                                 <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="owner"/>
12423                                 <update permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
12424                         <delete permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
12425                         </actions>
12426                 </permacrud>
12427         </class>
12428         <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">
12429                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_map_id_seq">
12430                         <field reporter:label="Map Entry ID" name="id" reporter:datatype="id"/>
12431                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link"/>
12432                         <field reporter:label="Tag ID" name="tag" reporter:datatype="link"/>
12433                 </fields>
12434                 <links>
12435                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
12436                         <link field="tag" reltype="has_a" key="id" map="" class="acqft"/>
12437                         </links>
12438                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12439                 <actions>
12440                                 <create permission="ADMIN_ACQ_FUND_TAG">
12441                                         <context link="tag" field="owner"/>
12442                                 </create>
12443                                 <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
12444                                         <context link="tag" field="owner"/>
12445                                 </retrieve>
12446                                 <update permission="ADMIN_ACQ_FUND_TAG">
12447                                         <context link="tag" field="owner"/>
12448                                 </update>
12449                                 <delete permission="ADMIN_ACQ_FUND_TAG">
12450                                         <context link="tag" field="owner"/>
12451                                 </delete>
12452                         </actions>
12453                 </permacrud>
12454         </class>
12455         <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">
12456                 <oils_persist:source_definition><![CDATA[
12457                 SELECT
12458                         poi.purchase_order AS purchase_order,
12459                         ii.invoice AS invoice,
12460                         NULL AS lineitem,
12461                         poi.id AS po_item,
12462                         NULL AS picklist
12463                 FROM
12464                         acq.po_item poi
12465                         JOIN acq.invoice_item ii ON (ii.po_item = poi.id)
12466                 UNION SELECT
12467                         jub.purchase_order AS purchase_order,
12468                         ie.invoice AS invoice,
12469                         jub.id AS lineitem,
12470                         NULL AS po_item,
12471                         jub.picklist AS picklist
12472                 FROM
12473                         acq.lineitem jub
12474                         JOIN acq.invoice_entry ie ON (ie.lineitem = jub.id)
12475                 UNION SELECT
12476                         ii.purchase_order AS purchase_order,
12477                         ii.invoice AS invoice,
12478                         NULL AS lineitem,
12479                         NULL AS po_item,
12480                         NULL AS picklist
12481                 FROM
12482                         acq.invoice_item ii
12483                 WHERE ii.po_item IS NULL
12484                 UNION SELECT
12485                         ie.purchase_order AS purchase_order,
12486                         ie.invoice AS invoice,
12487                         NULL AS lineitem,
12488                         NULL AS po_item,
12489                         NULL AS picklist
12490                 FROM
12491                         acq.invoice_entry ie
12492                 WHERE ie.lineitem IS NULL
12493                 UNION SELECT
12494                         NULL AS purchase_order,
12495                         NULL AS invoice,
12496                         jub.id AS lineitem,
12497                         NULL AS po_item,
12498                         jub.picklist AS picklist
12499                 FROM
12500                         acq.lineitem jub
12501                 WHERE jub.purchase_order IS NULL
12502                 ]]></oils_persist:source_definition>
12503                 <fields>
12504                         <field reporter:label="Purchase Order ID" name="purchase_order" reporter:datatype="link"/>
12505                         <field reporter:label="Lineitem ID" name="lineitem" reporter:datatype="link"/>
12506                         <field reporter:label="Invoice ID" name="invoice" reporter:datatype="link"/>
12507                         <field reporter:label="Purchase Order Item ID" name="po_item" reporter:datatype="link"/>
12508                         <field reporter:label="Picklist ID" name="picklist" reporter:datatype="link"/>
12509                 </fields>
12510                 <links>
12511                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo" />
12512                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub" />
12513                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv" />
12514                         <link field="po_item" reltype="has_a" key="id" map="" class="acqpoi" />
12515                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl" />
12516                 </links>
12517         </class>
12518         <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">
12519                 <fields oils_persist:primary="id" oils_persist:sequence="config.barcode_completion_id_seq">
12520                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
12521                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
12522                         <field reporter:label="Owner" name="org_unit" reporter:datatype="org_unit"/>
12523                         <field reporter:label="Prefix" name="prefix" reporter:datatype="text"/>
12524                         <field reporter:label="Suffix" name="suffix" reporter:datatype="text"/>
12525                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
12526                         <field reporter:label="Padding" name="padding" reporter:datatype="text"/>
12527                         <field reporter:label="Padding At End" name="padding_end" reporter:datatype="bool"/>
12528                         <field reporter:label="Applies to Items" name="asset" reporter:datatype="bool"/>
12529                         <field reporter:label="Applies to Users" name="actor" reporter:datatype="bool"/>
12530                 </fields>
12531                 <links>
12532                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
12533                 </links>
12534                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12535                         <actions>
12536                                 <create permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
12537                                 <retrieve/>
12538                                 <update permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
12539                                 <delete permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
12540                         </actions>
12541                 </permacrud>
12542         </class>
12543
12544         <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">
12545                 <fields oils_persist:primary="id" oils_persist:sequence="config.org_unit_setting_type_log_id_seq">
12546                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
12547                         <field name="date_applied" reporter:datatype="timestamp"/>
12548                         <field name="org" reporter:datatype="org_unit"/>
12549                         <field name="original_value" reporter:datatype="text"/>
12550                         <field name="new_value" reporter:datatype="text"/>
12551                         <field name="field_name" reporter:datatype="link"/>
12552                 </fields>
12553                 <links>
12554                         <link field="field_name" reltype="has_a" key="name" map="" class="coust"/>
12555                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
12556                 </links>
12557                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12558                         <actions>
12559                                 <create permission="ADMIN_ORG_UNIT_SETTING_TYPE" context_field="org"/>
12560                                 <retrieve permission="STAFF_LOGIN" context_field="org"/>
12561                                 <update permission="ADMIN_ORG_UNIT_SETTING_TYPE_LOG" context_field="org"/>
12562                                 <delete permission="ADMIN_ORG_UNIT_SETTING_TYPE_LOG" context_field="org"/>
12563                         </actions>
12564                 </permacrud>
12565         </class>
12566         <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">
12567                 <fields oils_persist:primary="id" oils_persist:sequence="action.archive_actor_stat_cat_id_seq">
12568                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
12569                         <field reporter:label="Circ" name="xact" reporter:datatype="link"/>
12570                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
12571                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
12572                 </fields>
12573                 <links>
12574                         <link field="xact" reltype="has_a" key="id" map="" class="combcirc"/>
12575                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
12576                 </links>
12577         </class>
12578         <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">
12579                 <fields oils_persist:primary="id" oils_persist:sequence="action.archive_actor_stat_cat_id_seq">
12580                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
12581                         <field reporter:label="Circ" name="xact" reporter:datatype="link"/>
12582                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
12583                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
12584                 </fields>
12585                 <links>
12586                         <link field="xact" reltype="has_a" key="id" map="" class="combcirc"/>
12587                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
12588                 </links>
12589         </class>
12590         <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">
12591                 <fields oils_persist:primary="id" oils_persist:sequence="config.floating_group_id_seq">
12592                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
12593                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
12594                         <field reporter:label="Manual" name="manual" reporter:datatype="bool"/>
12595                         <field reporter:label="Group Members" name="members" oils_persist:virtual="true" reporter:datatype="link"/>
12596                 </fields>
12597                 <links>
12598                         <link field="members" reltype="has_many" key="floating_group" class="cfgm"/>
12599                 </links>
12600                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12601                         <actions>
12602                                 <create permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
12603                                 <retrieve/>
12604                                 <update permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
12605                                 <delete permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
12606                         </actions>
12607                 </permacrud>
12608         </class>
12609         <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">
12610                 <fields oils_persist:primary="id" oils_persist:sequence="config.floating_group_member_id_seq">
12611                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
12612                         <field reporter:label="Floating Group" name="floating_group" reporter:datatype="link"/>
12613                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="link"/>
12614                         <field reporter:label="Stop Depth" name="stop_depth" reporter:datatype="int"/>
12615                         <field reporter:label="Max Depth" name="max_depth" reporter:datatype="int"/>
12616                         <field reporter:label="Exclude" name="exclude" reporter:datatype="bool"/>
12617                 </fields>
12618                 <links>
12619                         <link field="floating_group" reltype="has_a" key="id" class="cfg"/>
12620                         <link field="org_unit" reltype="has_a" key="id" class="aou"/>
12621                 </links>
12622                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12623                         <actions>
12624                                 <create permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
12625                                 <retrieve/>
12626                                 <update permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
12627                                 <delete permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
12628                         </actions>
12629                 </permacrud>
12630         </class>
12631         <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">
12632                 <fields oils_persist:primary="code">
12633                         <field reporter:label="Code" name="code" reporter:selector="label" reporter:datatype="id" oils_obj:required="true"/>
12634                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_obj:required="true"/>
12635                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" oils_obj:required="true"/>
12636                 </fields>
12637                 <links>
12638                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
12639                 </links>
12640                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12641                         <actions>
12642                                 <create permission="ADMIN_COPY_TAG_TYPES" context_field="owner"/>
12643                                 <retrieve/>
12644                                 <update permission="ADMIN_COPY_TAG_TYPES" context_field="owner"/>
12645                                 <delete permission="ADMIN_COPY_TAG_TYPES" context_field="owner"/>
12646                         </actions>
12647                 </permacrud>
12648         </class>
12649         <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">
12650                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_tag_id_seq">
12651                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
12652                         <field reporter:label="Copy Tag Type" name="tag_type" reporter:datatype="link"/>
12653                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
12654                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
12655                         <field reporter:label="Staff Note" name="staff_note" reporter:datatype="text"/>
12656                         <field reporter:label="Is OPAC Visible?" name="pub" reporter:datatype="bool"/>
12657                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" oils_obj:required="true"/>
12658                 </fields>
12659                 <links>
12660                         <link field="tag_type" reltype="has_a" key="code" map="" class="cctt"/>
12661                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
12662                 </links>
12663                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12664                         <actions>
12665                                 <create permission="ADMIN_COPY_TAG" context_field="owner"/>
12666                                 <retrieve/>
12667                                 <update permission="ADMIN_COPY_TAG" context_field="owner"/>
12668                                 <delete permission="ADMIN_COPY_TAG" context_field="owner"/>
12669                         </actions>
12670                 </permacrud>
12671         </class>
12672         <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">
12673                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_tag_copy_map_id_seq">
12674                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
12675                         <field reporter:label="Copy" name="copy" reporter:datatype="link"/>
12676                         <field reporter:label="Tag" name="tag" reporter:datatype="link"/>
12677                 </fields>
12678                 <links>
12679                         <link field="copy" reltype="has_a" key="id" map="" class="acp"/>
12680                         <link field="tag" reltype="has_a" key="id" map="" class="acpt"/>
12681                 </links>
12682                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12683                         <actions>
12684                                 <create permission="UPDATE_COPY">
12685                     <context link="copy" field="circ_lib"/>
12686                 </create>
12687                                 <retrieve/>
12688                                 <update permission="UPDATE_COPY">
12689                     <context link="copy" field="circ_lib"/>
12690                 </update>
12691                                 <delete permission="UPDATE_COPY">
12692                     <context link="copy" field="circ_lib"/>
12693                 </delete>
12694                         </actions>
12695                 </permacrud>
12696         </class>
12697         <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">
12698         <oils_persist:source_definition><![CDATA[
12699         SELECT ahcm.target_copy AS id,count(*) AS count
12700          FROM
12701          action.hold_request ahr,
12702          action.hold_copy_map ahcm
12703          WHERE
12704          ahr.cancel_time IS NULL AND
12705          ahr.fulfillment_time IS NULL AND
12706          ahr.capture_time IS NULL AND
12707          ahr.id = ahcm.hold
12708          GROUP BY ahcm.target_copy
12709         ]]></oils_persist:source_definition>
12710         <fields oils_persist:primary="id">
12711             <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
12712             <field reporter:label="Holds Count" name="count" reporter:datatype="text"/>
12713         </fields>
12714         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12715             <actions>
12716                <retrieve/>
12717             </actions>
12718         </permacrud>
12719         </class>
12720
12721         <class id="cwst" controller="open-ils.cstore open-ils.pcrud"
12722                 oils_obj:fieldmapper="config::workstation_setting_type" 
12723                 oils_persist:tablename="config.workstation_setting_type" 
12724                 reporter:label="Workstation Setting Type">
12725                 <fields oils_persist:primary="name">
12726                         <field name="name" reporter:datatype="text"/>
12727                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
12728                         <field name="description" reporter:datatype="text" oils_persist:i18n="true"/>
12729                         <field name="datatype" reporter:datatype="text"/>
12730                         <field name="fm_class" reporter:datatype="text"/>
12731                         <field name="grp" reporter:datatype="link"/>
12732                 </fields>
12733                 <links>
12734                         <link field="name" reltype="has_many" key="name" map="" class="aous"/>
12735                         <link field="grp" reltype="has_a" key="name" map="" class="csg"/>
12736                 </links>
12737                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12738                         <actions>
12739                                 <create permission="ADMIN_WORKSTATION_SETTING_TYPE" global_required="true"/>
12740                                 <retrieve/>
12741                                 <update permission="ADMIN_WORKSTATION_SETTING_TYPE" global_required="true"/>
12742                                 <delete permission="ADMIN_WORKSTATION_SETTING_TYPE" global_required="true"/>
12743                         </actions>
12744                 </permacrud>
12745         </class>
12746
12747         <!-- no pcrud access is granted for now, because it's assumed these
12748                          setting values will be applied and retrived via the API. -->
12749         <class id="awss" 
12750                 controller="open-ils.cstore"
12751                 oils_obj:fieldmapper="actor::workstation_setting" 
12752                 oils_persist:tablename="actor.workstation_setting" 
12753                 reporter:label="Workstation Setting">
12754                 <fields oils_persist:primary="id" oils_persist:sequence="actor.workstation_setting_id_seq">
12755                         <field reporter:label="Setting ID" name="id" reporter:datatype="id" />
12756                         <field reporter:label="Name" name="name" reporter:datatype="link"/>
12757                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
12758                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
12759                 </fields>
12760                 <links>
12761                         <link field="name" reltype="has_a" key="name" map="" class="cwst"/>
12762                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
12763                 </links>
12764         </class>
12765
12766         <!-- ********************************************************************************************************************* -->
12767 </IDL>
12768
12769 <!--
12770     vim:noet:ts=4:sw=4:
12771 -->