]> git.evergreen-ils.org Git - Evergreen.git/blob - Open-ILS/examples/fm_IDL.xml
LP#1514085 Vandelay in-database session tracking
[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" 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         </class>
2347         <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">
2348                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.author_field_entry_id_seq">
2349                         <field name="field" reporter:datatype="link"/>
2350                         <field name="id" reporter:datatype="id" />
2351                         <field name="source" reporter:datatype="link"/>
2352                         <field name="value" reporter:datatype="text"/>
2353                 </fields>
2354                 <links>
2355                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
2356                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
2357                 </links>
2358         </class>
2359         <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">
2360                 <fields oils_persist:primary="id" oils_persist:sequence="action.in_house_use_id_seq">
2361                         <field reporter:label="Use ID" name="id" reporter:datatype="id" />
2362                         <field reporter:label="Item" name="item" reporter:datatype="int" />
2363                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
2364                         <field reporter:label="Recording Staff" name="staff" reporter:datatype="link"/>
2365                         <field reporter:label="Use Date/Time" name="use_time" reporter:datatype="timestamp"/>
2366                 </fields>
2367                 <links>
2368                         <link field="item" reltype="has_a" key="id" map="" class="acp"/>
2369                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
2370                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
2371                 </links>
2372                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2373                         <actions>
2374                                 <retrieve/>
2375                         </actions>
2376                 </permacrud>
2377         </class>
2378         <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">
2379                 <fields oils_persist:primary="id" oils_persist:sequence="action.non_cat_in_house_use_id_seq">
2380                         <field reporter:label="Use ID" name="id" reporter:datatype="id" />
2381                         <field reporter:label="Item Type" name="item_type" reporter:datatype="link"/>
2382                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
2383                         <field reporter:label="Recording Staff" name="staff" reporter:datatype="link"/>
2384                         <field reporter:label="Use Date/Time" name="use_time" reporter:datatype="timestamp"/>
2385                 </fields>
2386                 <links>
2387                         <link field="item_type" reltype="has_a" key="id" map="" class="cnct"/>
2388                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
2389                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
2390                 </links>
2391                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2392                         <actions>
2393                                 <retrieve/>
2394                         </actions>
2395                 </permacrud>
2396         </class>
2397         <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">
2398                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
2399                         <field reporter:label="Pretransit Copy Status" name="copy_status" reporter:datatype="bool"/>
2400                         <field reporter:label="Destination" name="dest" reporter:datatype="link"/>
2401                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
2402                         <field reporter:label="Transit ID" name="id" reporter:datatype="id"/>
2403                         <field reporter:label="Is Persistent? (unused)" name="persistant_transfer" reporter:datatype="bool"/>
2404                         <field reporter:label="Previous Hop (unused)" name="prev_hop" reporter:datatype="link"/>
2405                         <field reporter:label="Source" name="source" reporter:datatype="link"/>
2406                         <field reporter:label="Prev Destination" name="prev_dest" reporter:datatype="org_unit"/>
2407                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
2408                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
2409                         <field reporter:label="Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
2410                         <field reporter:label="Hold Transit" name="hold_transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
2411                 </fields>
2412                 <links>
2413                         <link field="hold_transit_copy" reltype="might_have" key="id" map="" class="ahtc"/>
2414                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
2415                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
2416                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
2417                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
2418                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
2419                 </links>
2420         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2421             <actions>
2422                 <create permission="TRANSIT_COPY" context_field="owner">
2423                     <context link="target_copy" field="circ_lib"/>
2424                 </create>
2425                 <retrieve/>
2426                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
2427                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
2428             </actions>
2429         </permacrud>
2430         </class>
2431         <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">
2432                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_response_id_seq">
2433                         <field reporter:label="Answer" name="answer" reporter:datatype="link"/>
2434                         <field reporter:label="Answer Date/Time" name="answer_date" reporter:datatype="timestamp"/>
2435                         <field reporter:label="Effective Answer Date/Time" name="effective_date" reporter:datatype="timestamp"/>
2436                         <field reporter:label="Answer ID" name="id" reporter:datatype="id" />
2437                         <field reporter:label="Question" name="question" reporter:datatype="link"/>
2438                         <field reporter:label="Response Group ID" name="response_group_id" reporter:datatype="int" />
2439                         <field reporter:label="Survey" name="survey" reporter:datatype="link"/>
2440                         <field reporter:label="Responding User" name="usr" reporter:datatype="link"/>
2441                 </fields>
2442                 <links>
2443                         <link field="question" reltype="has_a" key="id" map="" class="asvq"/>
2444                         <link field="survey" reltype="has_a" key="id" map="" class="asv"/>
2445                         <link field="answer" reltype="has_a" key="id" map="" class="asva"/>
2446                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2447                 </links>
2448         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2449             <actions>
2450                 <create permission="ADMIN_SURVEY">
2451                     <context link="survey" field="owner"/>
2452                 </create>
2453                 <retrieve permission="VIEW_USER">
2454                     <context link="usr" field="home_ou"/>
2455                 </retrieve>
2456                 <update permission="ADMIN_SURVEY">
2457                     <context link="survey" field="owner"/>
2458                 </update>
2459                 <delete permission="ADMIN_SURVEY">
2460                     <context link="survey" field="owner"/>
2461                 </delete>
2462             </actions>
2463         </permacrud>
2464         </class>
2465         <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">
2466                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_item_id_seq">
2467                         <field name="bucket" />
2468                         <field name="id" reporter:datatype="id" />
2469                         <field name="target_copy" reporter:datatype="link"/>
2470                         <field name="create_time" reporter:datatype="timestamp" />
2471                         <field name="pos" reporter:datatype="int" />
2472                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
2473                 </fields>
2474                 <links>
2475                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
2476                         <link field="bucket" reltype="has_a" key="id" map="" class="ccb"/>
2477             <link field="notes" reltype="has_many" map="" key="item" class="ccbin"/>
2478                 </links>
2479                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2480                         <actions>
2481                                 <retrieve permission="ADMIN_COPY_BUCKET">
2482                     <context link="bucket" owning_lib="owning_lib"/>
2483                 </retrieve>
2484             </actions>
2485         </permacrud>
2486         </class>
2487         <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">
2488                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_item_note_id_seq">
2489                         <field name="id" reporter:datatype="id" />
2490                         <field name="item" reporter:datatype="link"/>
2491                         <field name="note" reporter:datatype="text" />
2492                 </fields>
2493                 <links>
2494                         <link field="item" reltype="has_a" key="id" map="" class="ccbi"/>
2495                 </links>
2496         </class>
2497
2498         <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">
2499                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_id_seq">
2500                         <field reporter:label="Control Set ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2501                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
2502                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2503                         <field reporter:label="Controlling Authority Fields" name="authority_fields" reporter:datatype="link" oils_persist:virtual="true"/>
2504                         <field reporter:label="Thesauri" name="thesauri" reporter:datatype="link" oils_persist:virtual="true"/>
2505                 </fields>
2506                 <links>
2507                         <link field="authority_fields" reltype="has_many" key="control_set" map="" class="acsaf"/>
2508                         <link field="thesauri" reltype="has_many" key="control_set" map="" class="at"/>
2509                 </links>
2510                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2511                         <actions>
2512                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2513                                 <retrieve/>
2514                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2515                                 <delete permission="DELETE_AUTHORITY_CONTROL_SET" global_required="true"/>
2516                         </actions>
2517                 </permacrud>
2518         </class>
2519
2520         <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">
2521                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_authority_field_id_seq">
2522                         <field reporter:label="Control Set Authority Field ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2523                         <field reporter:label="Main Entry" name="main_entry" reporter:datatype="link"/>
2524                         <field reporter:label="Control Set" name="control_set" reporter:datatype="link"/>
2525                         <field reporter:label="Tag" name="tag" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.{3}$"/>
2526                         <field reporter:label="Subfield List" name="sf_list" reporter:datatype="text" />
2527                         <field reporter:label="Subfield List for Display" name="display_sf_list" reporter:datatype="text" />
2528                         <field reporter:label="Non-filing Indicator" name="nfi" reporter:datatype="text" />
2529                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
2530                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2531                         <field reporter:label="Linking Subfield" name="linking_subfield" reporter:datatype="text" />
2532                         <field reporter:label="Subordinate Entries" name="sub_entries" reporter:datatype="link" oils_persist:virtual="true"/>
2533                         <field reporter:label="Controlled Bib Fields" name="bib_fields" reporter:datatype="link" oils_persist:virtual="true"/>
2534                         <field reporter:label="Thesauri" name="thesauri" reporter:datatype="link" oils_persist:virtual="true"/>
2535                         <field reporter:label="Browse Axis Maps" name="axis_maps" reporter:datatype="link" oils_persist:virtual="true"/>
2536                         <field reporter:label="Joiner" name="joiner" reporter:datatype="text" />
2537                         <field reporter:label="Heading Field" name="heading_field" reporter:datatype="link" />
2538                 </fields>
2539                 <links>
2540                         <link field="axis_maps" reltype="has_many" key="field" map="" class="abaafm"/>
2541                         <link field="control_set" reltype="has_a" key="id" map="" class="acs"/>
2542                         <link field="bib_fields" reltype="has_many" key="authority_field" map="" class="acsbf"/>
2543                         <link field="thesauri" reltype="has_many" key="control_set" map="" class="at"/>
2544                         <link field="main_entry" reltype="has_a" key="id" map="" class="acsaf"/>
2545                         <link field="sub_entries" reltype="has_many" key="main_entry" map="" class="acsaf"/>
2546                         <link field="heading" reltype="has_a" key="id" map="" class="ahf"/>
2547                 </links>
2548                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2549                         <actions>
2550                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2551                                 <retrieve/>
2552                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2553                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2554                         </actions>
2555                 </permacrud>
2556         </class>
2557
2558         <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">
2559                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_bib_field_id_seq">
2560                         <field reporter:label="Controlled Bib Field ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2561                         <field reporter:label="Controlling Authority Field" name="authority_field" reporter:datatype="link"/>
2562                         <field reporter:label="Tag" name="tag" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.{3}$"/>
2563                 </fields>
2564                 <links>
2565                         <link field="authority_field" reltype="has_a" key="id" map="" class="acsaf"/>
2566                 </links>
2567                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2568                         <actions>
2569                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2570                                 <retrieve/>
2571                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2572                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2573                         </actions>
2574                 </permacrud>
2575         </class>
2576
2577         <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">
2578                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_bib_field_metabib_field_map_id_seq">
2579                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2580                         <field reporter:label="Bib Field" name="bib_field" reporter:datatype="link"/>
2581                         <field reporter:label="Metabib Field" name="metabib_field" reporter:datatype="link"/>
2582                 </fields>
2583                 <links>
2584                         <link field="bib_field" reltype="has_a" key="id" map="" class="acsbf"/>
2585                         <link field="metabib_field" reltype="has_a" key="id" map="" class="cmf"/>
2586                 </links>
2587                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2588                         <actions>
2589                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2590                                 <retrieve/>
2591                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2592                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2593                         </actions>
2594                 </permacrud>
2595         </class>
2596
2597         <class id="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">
2598                 <fields oils_persist:primary="code">
2599                         <field reporter:label="Thesaurus Code" name="code" reporter:datatype="id" reporter:selector="name"/>
2600                         <field reporter:label="Control Set" name="control_set" reporter:datatype="link"/>
2601                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
2602                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2603                         <field reporter:label="Short Code" name="short_code" reporter:datatype="text" />
2604                         <field reporter:label="URI" name="uri" reporter:datatype="text" />
2605                 </fields>
2606                 <links>
2607                         <link field="control_set" reltype="has_a" key="id" map="" class="acs"/>
2608                 </links>
2609                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2610                         <actions>
2611                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2612                                 <retrieve/>
2613                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2614                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2615                         </actions>
2616                 </permacrud>
2617         </class>
2618
2619         <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">
2620                 <fields oils_persist:primary="code">
2621                         <field reporter:label="Code" name="code" reporter:datatype="id" reporter:selector="name" oils_obj:validate="^\S+$"/>
2622                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true"/>
2623                         <field reporter:label="Sorter Attribute" name="sorter" reporter:datatype="link"/>
2624                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
2625                         <field reporter:label="Authority Fields" name="fields" reporter:datatype="link" oils_persist:virtual="true"/>
2626                         <field reporter:label="Authority Field Maps" name="maps" reporter:datatype="link" oils_persist:virtual="true"/>
2627                 </fields>
2628                 <links>
2629                         <link field="sorter" reltype="has_a" key="name" map="" class="crad"/>
2630                         <link field="fields" reltype="has_many" key="axis" map="field" class="abaafm"/>
2631                         <link field="maps" reltype="has_many" key="axis" map="" class="abaafm"/>
2632                 </links>
2633                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2634                         <actions>
2635                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2636                                 <retrieve/>
2637                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2638                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2639                         </actions>
2640                 </permacrud>
2641         </class>
2642
2643     <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">
2644         <fields oils_persist:primary="id" oils_persist:sequence="authority.browse_axis_authority_field_map_id_seq">
2645             <field reporter:label="Axis Authority Field Map ID" name="id" reporter:datatype="id"/>
2646             <field reporter:label="Authority Field" name="field" oils_obj:required="true" reporter:datatype="link"/>
2647             <field reporter:label="Axis" name="axis" reporter:datatype="link" oils_obj:required="true"/>
2648         </fields>
2649         <links>
2650             <link field="field" reltype="has_a" key="id" map="" class="acsaf"/>
2651             <link field="axis" reltype="has_a" key="code" map="" class="aba"/>
2652         </links>
2653         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2654             <actions>
2655                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2656                 <retrieve/>
2657                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2658                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2659             </actions>
2660         </permacrud>
2661     </class>
2662
2663         <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">
2664                 <fields oils_persist:primary="id" oils_persist:sequence="authority.record_entry_id_seq">
2665                         <field name="active" reporter:datatype="bool"/>
2666                         <field name="create_date" reporter:datatype="timestamp"/>
2667                         <field name="creator" />
2668                         <field name="deleted" reporter:datatype="bool"/>
2669                         <field name="edit_date" reporter:datatype="timestamp"/>
2670                         <field name="editor" />
2671                         <field name="id" reporter:datatype="id" />
2672                         <field name="last_xact_id" />
2673                         <field name="marc" />
2674                         <field name="source" />
2675                         <field reporter:label="Control Set" name="control_set" reporter:datatype="link"/>
2676                         <field reporter:label="Owner" name="owner"  reporter:datatype="org_unit"/>
2677                         <field name="heading" />
2678                         <field name="simple_heading" />
2679                         <field name="fixed_fields" oils_persist:virtual="true" reporter:datatype="link"/>
2680                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
2681                         <field name="bib_links" oils_persist:virtual="true" reporter:datatype="link"/>
2682                 </fields>
2683                 <links>
2684                         <link field="control_set" reltype="has_a" key="id" map="" class="acs"/>
2685                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
2686                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
2687                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2688                         <link field="notes" reltype="has_many" key="record" map="" class="arn"/>
2689                         <link field="bib_links" reltype="has_many" key="authority" map="" class="abl"/>
2690                         <link field="fixed_fields" reltype="might_have" key="record" map="" class="ard"/>
2691                 </links>
2692                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2693                         <actions>
2694                                 <create permission="CREATE_AUTHORITY_RECORD IMPORT_MARC" global_required="true"/>
2695                                 <retrieve/>
2696                                 <update permission="UPDATE_AUTHORITY_RECORD" global_required="true"/>
2697                                 <delete permission="DELETE_AUTHORITY_RECORD" global_required="true"/>
2698                         </actions>
2699                 </permacrud>
2700         </class>
2701         <class id="ard" controller="open-ils.cstore" oils_obj:fieldmapper="authority::record_descriptor" oils_persist:tablename="authority.rec_descriptor" reporter:label="Authority Record Descriptor">
2702                 <fields oils_persist:primary="id" oils_persist:sequence="authority.rec_descriptor_id_seq">
2703                         <field name="char_encoding" />
2704                         <field name="id" />
2705                         <field name="record" />
2706                         <field name="record_status" />
2707                         <field name="thesaurus" />
2708                 </fields>
2709                 <links>
2710                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
2711                         <link field="thesaurus" reltype="might_have" key="code" map="" class="at"/>
2712                 </links>
2713         </class>
2714         <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">
2715                 <fields oils_persist:primary="id" oils_persist:sequence="authority.bib_linking_id_seq">
2716                         <field name="id" reporter:datatype="id" />
2717                         <field name="bib" reporter:datatype="link" />
2718                         <field name="authority" reporter:datatype="link" />
2719                 </fields>
2720                 <links>
2721                         <link field="bib" reltype="has_a" key="id" map="" class="bre"/>
2722                         <link field="authority" reltype="has_a" key="id" map="" class="are"/>
2723                 </links>
2724         </class>
2725         <class id="ash" controller="open-ils.cstore" oils_obj:fieldmapper="authority::simple_heading" oils_persist:tablename="authority.simple_heading" reporter:label="Authority Simple Heading">
2726                 <fields oils_persist:primary="id" oils_persist:sequence="authority.simple_heading_id_seq">
2727                         <field name="id" reporter:datatype="id" />
2728                         <field name="record" reporter:datatype="link" />
2729                         <field name="atag" reporter:datatype="link" />
2730                         <field name="value" reporter:datatype="text" />
2731                 </fields>
2732                 <links>
2733                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
2734                         <link field="atag" reltype="has_a" key="id" map="" class="acsaf"/>
2735                 </links>
2736         </class>
2737
2738         <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">
2739                 <fields oils_persist:primary="id" oils_persist:sequence="authority.heading_fields_id_seq">
2740                         <field name="id" reporter:datatype="id" />
2741                         <field name="heading_type" reporter:datatype="text" reporter:label="Heading Type" />
2742                         <field name="heading_purpose" reporter:datatype="text" reporter:label="Heading Purpose" />
2743                         <field name="label" reporter:datatype="text" reporter:label="Heading Field Label" />
2744                         <field name="format" reporter:datatype="text" reporter:label="Heading XSLT Format" />
2745                         <field name="heading_xpath" reporter:datatype="text" reporter:label="Heading XPath" />
2746                         <field name="component_xpath" reporter:datatype="text" reporter:label="Heading Component XPath" />
2747                         <field name="type_xpath" reporter:datatype="text" reporter:label="Related/Variant Type XPath" />
2748                         <field name="thesaurus_xpath" reporter:datatype="text" reporter:label="Thesaurus XPath" />
2749                         <field name="thesaurus_override_xpath" reporter:datatype="text" reporter:label="Thesaurus Override XPath" />
2750                         <field name="joiner" reporter:datatype="text" reporter:label="Joiner string" />
2751                 </fields>
2752                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2753                         <actions>
2754                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2755                                 <retrieve/>
2756                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2757                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2758                         </actions>
2759                 </permacrud>
2760         </class>
2761
2762         <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">
2763                 <fields oils_persist:primary="code" oils_persist:sequence="">
2764                         <field reporter:label="Language Code" name="code" reporter:selector="value" reporter:datatype="text"/>
2765                         <field reporter:label="Language" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
2766                 </fields>
2767                 <links/>
2768         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2769             <actions>
2770                 <create permission="CREATE_MARC_CODE" global_required="true"/>
2771                 <retrieve/>
2772                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
2773                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
2774             </actions>
2775         </permacrud>
2776         </class>
2777         <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">
2778                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
2779                         <field name="accepting_usr" />
2780                         <field name="amount" reporter:datatype="money" />
2781                         <field name="amount_collected" reporter:datatype="money" />
2782                         <field name="approval_code" reporter:datatype="text"/>
2783                         <field name="cash_drawer" reporter:datatype="link"/>
2784                         <field name="cc_number" reporter:datatype="text"/>
2785                         <field name="cc_order_number" reporter:datatype="text"/>
2786                         <field name="cc_processor" reporter:datatype="text"/>
2787                         <field name="id" reporter:datatype="id" />
2788                         <field name="note" reporter:datatype="text"/>
2789                         <field name="payment_ts" reporter:datatype="timestamp"/>
2790                         <field name="xact" reporter:datatype="link"/>
2791                         <field name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
2792                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
2793                 </fields>
2794                 <links>
2795                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
2796                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
2797                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
2798                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
2799                 </links>
2800         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2801             <actions>
2802                 <retrieve permission="VIEW_USER_TRANSACTIONS">
2803                     <context link="xact" jump="usr" field="home_ou"/>
2804                 </retrieve>
2805                         </actions>
2806                 </permacrud>
2807         </class>
2808         <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">
2809                 <fields oils_persist:primary="name">
2810                         <field reporter:label="Name" name="name" reporter:datatype="text" />
2811                         <field reporter:label="Namespace URI" name="namespace_uri" reporter:datatype="text"/>
2812                         <field reporter:label="Namespace Prefix" name="prefix" reporter:datatype="text"/>
2813                         <field reporter:label="XSLT" name="xslt" reporter:datatype="text" />
2814                 </fields>
2815                 <links/>
2816         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2817             <actions>
2818                 <create permission="CREATE_XML_TRANSFORM" global_required="true"/>
2819                 <retrieve/>
2820                 <update permission="UPDATE_XML_TRANSFORM" global_required="true"/>
2821                 <delete permission="DELETE_XML_TRANSFORM" global_required="true"/>
2822             </actions>
2823         </permacrud>
2824         </class>
2825
2826         <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">
2827                 <fields oils_persist:primary="alias">
2828                         <field reporter:label="Alias (RegExp)" name="alias" reporter:datatype="text"/>
2829                         <field reporter:label="Class" name="field_class" reporter:datatype="link"/>
2830                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
2831                 </fields>
2832                 <links>
2833                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
2834                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
2835                 </links>
2836         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2837             <actions>
2838                 <create permission="CREATE_METABIB_SEARCH_ALIAS" global_required="true"/>
2839                 <retrieve/>
2840                 <update permission="UPDATE_METABIB_SEARCH_ALIAS" global_required="true"/>
2841                 <delete permission="DELETE_METABIB_SEARCH_ALIAS" global_required="true"/>
2842             </actions>
2843         </permacrud>
2844         </class>
2845
2846         <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">
2847                 <fields oils_persist:primary="name">
2848                         <field reporter:label="Name" name="name" reporter:datatype="text" reporter:selector="label"/>
2849                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
2850                         <field reporter:label="Buoyant?" name="buoyant" reporter:datatype="bool" />
2851                         <field reporter:label="Restrict?" name="restrict" reporter:datatype="bool" />
2852                         <field reporter:label="Combined?" name="combined" reporter:datatype="bool" />
2853                         <field reporter:label="A Weight" name="a_weight" reporter:datatype="float" />
2854                         <field reporter:label="B Weight" name="b_weight" reporter:datatype="float" />
2855                         <field reporter:label="C Weight" name="c_weight" reporter:datatype="float" />
2856                         <field reporter:label="D Weight" name="d_weight" reporter:datatype="float" />
2857                         <field reporter:label="Fields" name="fields" reporter:datatype="link" oils_persist:virtual="true"/>
2858                 </fields>
2859                 <links>
2860                         <link field="fields" reltype="has_many" key="name" map="" class="cmf"/>
2861                 </links>
2862         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2863             <actions>
2864                 <create permission="CREATE_METABIB_CLASS" global_required="true"/>
2865                 <retrieve/>
2866                 <update permission="UPDATE_METABIB_CLASS" global_required="true"/>
2867                 <delete permission="DELETE_METABIB_CLASS" global_required="true"/>
2868             </actions>
2869         </permacrud>
2870         </class>
2871
2872         <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">
2873                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_id_seq">
2874                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="label"/>
2875                         <field reporter:label="Class" name="field_class" reporter:datatype="link"/>
2876                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
2877                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2878                         <field reporter:label="Weight" name="weight" reporter:datatype="int" />
2879                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
2880                         <field reporter:label="Joiner" name="joiner" reporter:datatype="text"/>
2881                         <field reporter:label="Format" name="format" reporter:datatype="link"/>
2882                         <field reporter:label="Search Field" name="search_field" reporter:datatype="bool" />
2883                         <field reporter:label="Facet Field" name="facet_field" reporter:datatype="bool" />
2884                         <field reporter:label="Facet XPath" name="facet_xpath" reporter:datatype="text" />
2885                         <field reporter:label="Display Field?" name="display_field" reporter:datatype="bool" />
2886                         <field reporter:label="Display XPath" name="display_xpath" reporter:datatype="text" />
2887                         <field reporter:label="Browse Field" name="browse_field" reporter:datatype="bool" />
2888                         <field reporter:label="Browse XPath" name="browse_xpath" reporter:datatype="text" />
2889                         <field reporter:label="Browse Sort XPath" name="browse_sort_xpath" reporter:datatype="text" />
2890                         <field reporter:label="Authority XPath" name="authority_xpath" reporter:datatype="text" />
2891                         <field reporter:label="Restrict?" name="restrict" reporter:datatype="bool" />
2892                         <field reporter:label="Display Field Map" name="display_field_map" oils_persist:virtual="true" reporter:datatype="link"/>
2893                         <field reporter:label="Virtual Field Data Suppliers" name="data_sources" oils_persist:virtual="true" reporter:datatype="link"/>
2894                 </fields>
2895                 <links>
2896                         <link field="format" reltype="has_a" key="name" map="" class="cxt"/>
2897                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
2898                         <link field="display_field_map" reltype="might_have" key="field" map="" class="cdfm"/>
2899                         <link field="data_sources" reltype="has_many" key="virtual" map="" class="cmfvm"/>
2900                 </links>
2901         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2902             <actions>
2903                 <create permission="CREATE_METABIB_FIELD" global_required="true"/>
2904                 <retrieve/>
2905                 <update permission="UPDATE_METABIB_FIELD" global_required="true"/>
2906                 <delete permission="DELETE_METABIB_FIELD" global_required="true"/>
2907             </actions>
2908         </permacrud>
2909         </class>
2910
2911         <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">
2912                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_virtual_map_id_seq">
2913                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
2914                         <field reporter:label="Real" name="real" reporter:datatype="link"/>
2915                         <field reporter:label="Virtual" name="virtual" reporter:datatype="link"/>
2916                         <field reporter:label="Weight" name="weight" reporter:datatype="int"/>
2917                 </fields>
2918                 <links>
2919                         <link field="real" reltype="has_a" key="id" map="" class="cmf"/>
2920                         <link field="virtual" reltype="has_a" key="id" map="" class="cmf"/>
2921                 </links>
2922         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2923             <actions>
2924                 <create permission="CREATE_METABIB_FIELD ADMIN_METABIB_FIELD" global_required="true"/>
2925                 <retrieve/>
2926                 <update permission="UPDATE_METABIB_FIELD ADMIN_METABIB_FIELD" global_required="true"/>
2927                 <delete permission="DELETE_METABIB_FIELD ADMIN_METABIB_FIELD" global_required="true"/>
2928             </actions>
2929         </permacrud>
2930         </class>
2931
2932         <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">
2933                 <fields oils_persist:primary="id" oils_persist:sequence="config.best_hold_order_id_seq">
2934                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name" />
2935                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2936                         <field reporter:label="Capture Lib to Pickup Lib Proximity" name="pprox" reporter:datatype="int" />
2937                         <field reporter:label="Circ Lib to Request Lib Proximity" name="hprox" reporter:datatype="int" />
2938                         <field reporter:label="Adjusted Circ Lib to Pickup Lib Proximity" name="aprox" reporter:datatype="int" />
2939                         <field reporter:label="Adjusted Capture Location to Pickup Lib Proximity" name="approx" reporter:datatype="int" />
2940                         <field reporter:label="Hold Priority" name="priority" reporter:datatype="int" />
2941                         <field reporter:label="Hold Cut-in-line State" name="cut" reporter:datatype="int" />
2942                         <field reporter:label="Hold Selection Depth" name="depth" reporter:datatype="int" />
2943                         <field reporter:label="Copy Has Circulated From Home Lately" name="htime" reporter:datatype="int" />
2944                         <field reporter:label="Hold Request Time" name="rtime" reporter:datatype="int" />
2945                         <field reporter:label="Copy Has Been Home At All Lately" name="shtime" reporter:datatype="int" />
2946                 </fields>
2947                 <links>
2948                 </links>
2949                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2950                         <actions>
2951                                 <create permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
2952                                 <retrieve permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
2953                                 <update permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
2954                                 <delete permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
2955                         </actions>
2956                 </permacrud>
2957         </class>
2958         <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">
2959                 <fields oils_persist:primary="id" oils_persist:sequence="config.biblio_fingerprint_id_seq">
2960                         <field name="id" reporter:datatype="id" />
2961                         <field name="name" reporter:datatype="text"/>
2962                         <field name="xpath" reporter:datatype="text"/>
2963                         <field name="format" reporter:datatype="link"/>
2964                         <field name="first_word" reporter:datatype="bool" />
2965                 </fields>
2966                 <links/>
2967         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2968             <actions>
2969                 <create permission="CREATE_BIBLIO_FINGERPRINT" global_required="true"/>
2970                 <retrieve/>
2971                 <update permission="UPDATE_BIBLIO_FINGERPRINT" global_required="true"/>
2972                 <delete permission="DELETE_BIBLIO_FINGERPRINT" global_required="true"/>
2973             </actions>
2974         </permacrud>
2975         </class>
2976         <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">
2977                 <fields oils_persist:primary="code" oils_persist:sequence="">
2978                         <field reporter:label="Audience Code" name="code" reporter:selector="value" reporter:datatype="text"/>
2979                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2980                         <field reporter:label="Audience" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
2981                 </fields>
2982                 <links/>
2983         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2984             <actions>
2985                 <create permission="CREATE_MARC_CODE" global_required="true"/>
2986                 <retrieve/>
2987                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
2988                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
2989             </actions>
2990         </permacrud>
2991         </class>
2992         <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">
2993                 <fields oils_persist:primary="code" oils_persist:sequence="">
2994                         <field reporter:label="Item Form Code" name="code" reporter:selector="value" reporter:datatype="text"/>
2995                         <field reporter:label="Item Form" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
2996                 </fields>
2997                 <links/>
2998         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2999             <actions>
3000                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
3001                 <retrieve/>
3002                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
3003                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
3004             </actions>
3005         </permacrud>
3006         </class>
3007     <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">
3008         <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_class_id_seq">
3009             <field reporter:label="Call number class ID" name="id" reporter:datatype="id"/>
3010             <field reporter:label="Name" name="name" reporter:datatype="text"/>
3011             <field reporter:label="Normalizer function" name="normalizer" reporter:datatype="text"/>
3012             <field reporter:label="Call number fields" name="field" reporter:datatype="text"/>
3013         </fields>
3014         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3015             <actions>
3016                 <retrieve/>
3017             </actions>
3018         </permacrud>
3019     </class>
3020         <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">
3021                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_suffix_id_seq">
3022                         <field reporter:label="ID" name="id" reporter:datatype="id" />
3023                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
3024                         <field reporter:label="Label Sort Key" name="label_sortkey" reporter:datatype="text"/>
3025                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
3026                 </fields>
3027                 <links>
3028                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
3029                 </links>
3030         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3031             <actions>
3032                 <create permission="CREATE_VOLUME_SUFFIX" context_field="owning_lib"/>
3033                 <retrieve/>
3034                 <update permission="UPDATE_VOLUME_SUFFIX" context_field="owning_lib"/>
3035                 <delete permission="DELETE_VOLUME_SUFFIX" context_field="owning_lib"/>
3036             </actions>
3037         </permacrud>
3038         </class>
3039         <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">
3040                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_prefix_id_seq">
3041                         <field reporter:label="ID" name="id" reporter:datatype="id" />
3042                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
3043                         <field reporter:label="Label Sort Key" name="label_sortkey" reporter:datatype="text"/>
3044                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
3045                 </fields>
3046                 <links>
3047                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
3048                 </links>
3049         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3050             <actions>
3051                 <create permission="CREATE_VOLUME_PREFIX" context_field="owning_lib"/>
3052                 <retrieve/>
3053                 <update permission="UPDATE_VOLUME_PREFIX" context_field="owning_lib"/>
3054                 <delete permission="DELETE_VOLUME_PREFIX" context_field="owning_lib"/>
3055             </actions>
3056         </permacrud>
3057         </class>
3058         <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">
3059                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_id_seq">
3060                         <field reporter:label="Copies" name="copies" oils_persist:virtual="true" reporter:datatype="link"/>
3061                         <field reporter:label="Create Date/Time" name="create_date" reporter:datatype="timestamp"/>
3062                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
3063                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
3064                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
3065                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
3066                         <field reporter:label="Call Number/Volume ID" name="id" reporter:datatype="id" />
3067                         <field reporter:label="Call Number Label" name="label" reporter:datatype="text"/>
3068                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
3069                         <field reporter:label="Bib Record" name="record" reporter:datatype="link"/>
3070                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
3071                         <field reporter:label="URI Maps" name="uri_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3072                         <field reporter:label="URIs" name="uris" oils_persist:virtual="true" reporter:datatype="link"/>
3073                         <field reporter:label="Call Number Sort Key" name="label_sortkey" reporter:datatype="text"/>
3074                         <field reporter:label="Classification Scheme" name="label_class" reporter:datatype="link"/>
3075                         <field reporter:label="Prefix" name="prefix" reporter:datatype="link"/>
3076                         <field reporter:label="Suffix" name="suffix" reporter:datatype="link"/>
3077                 </fields>
3078                 <links>
3079                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
3080                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3081                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3082                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
3083                         <link field="notes" reltype="has_many" key="call_number" map="" class="acnn"/>
3084                         <link field="copies" reltype="has_many" key="call_number" map="" class="acp"/>
3085                         <link field="uris" reltype="has_many" key="call_number" map="uri" class="auricnm"/>
3086                         <link field="uri_maps" reltype="has_many" key="call_number" map="" class="auricnm"/>
3087                         <link field="label_class" reltype="has_a" key="id" map="" class="acnc"/>
3088                         <link field="prefix" reltype="has_a" key="id" map="" class="acnp"/>
3089                         <link field="suffix" reltype="has_a" key="id" map="" class="acns"/>
3090                 </links>
3091         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3092             <actions>
3093                 <create permission="CREATE_VOLUME" context_field="owning_lib"/>
3094                 <retrieve/>
3095                 <update permission="UPDATE_VOLUME" context_field="owning_lib"/>
3096                 <delete permission="DELETE_VOLUME" context_field="owning_lib"/>
3097             </actions>
3098         </permacrud>
3099         </class>
3100         <class id="auri" controller="open-ils.cstore" oils_obj:fieldmapper="asset::uri" oils_persist:tablename="asset.uri" reporter:label="Electronic Access URI">
3101                 <fields oils_persist:primary="id" oils_persist:sequence="asset.uri_id_seq">
3102                         <field reporter:label="URI ID" name="id" reporter:datatype="id"/>
3103                         <field reporter:label="URI" name="href" reporter:datatype="text"/>
3104                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
3105                         <field reporter:label="Use Information" name="use_restriction" reporter:datatype="text"/>
3106                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
3107                         <field reporter:label="Call Number Maps" name="call_number_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3108                         <field reporter:label="Call Numbers" name="call_numbers" oils_persist:virtual="true" reporter:datatype="link"/>
3109                 </fields>
3110                 <links>
3111                         <link field="call_numbers" reltype="has_many" key="uri" map="call_number" class="auricnm"/>
3112                         <link field="call_number_maps" reltype="has_many" key="uri" map="" class="auricnm"/>
3113         </links>
3114         </class>
3115         <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">
3116                 <fields oils_persist:primary="id" oils_persist:sequence="asset.uri_call_number_map_id_seq">
3117                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3118                         <field reporter:label="URI" name="uri" reporter:datatype="int"/>
3119                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
3120                 </fields>
3121                 <links>
3122                         <link field="uri" reltype="has_a" key="id" map="" class="auri"/>
3123                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
3124                 </links>
3125         </class>
3126         <class id="cst" controller="open-ils.cstore" oils_obj:fieldmapper="config::standing" oils_persist:tablename="config.standing" reporter:label="Standing Penalty">
3127                 <fields oils_persist:primary="id" oils_persist:sequence="config.standing_id_seq">
3128                         <field name="id" reporter:datatype="id" />
3129                         <field name="value" oils_persist:i18n="true" />
3130                 </fields>
3131                 <links/>
3132         </class>
3133         <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">
3134                 <fields oils_persist:primary="usr" oils_persist:sequence="">
3135                         <field name="balance_owed" reporter:datatype="money" />
3136                         <field name="total_owed" reporter:datatype="money" />
3137                         <field name="total_paid" reporter:datatype="money" />
3138                         <field name="usr" reporter:datatype="link"/>
3139                 </fields>
3140                 <links>
3141                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3142         </links>
3143         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3144             <actions>
3145                 <retrieve permission="VIEW_USER">
3146                     <context link="usr" field="home_ou"/>
3147                 </retrieve>
3148             </actions>
3149         </permacrud>
3150         </class>
3151         <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">
3152                 <fields oils_persist:primary="id" oils_persist:sequence="money.collections_tracker_id_seq">
3153                         <field name="collector" />
3154                         <field name="enter_time" reporter:datatype="timestamp"/>
3155                         <field name="id" reporter:datatype="id" />
3156                         <field name="location" reporter:datatype="link"/>
3157                         <field name="usr" reporter:datatype="link"/>
3158                 </fields>
3159                 <links>
3160                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3161                         <link field="collector" reltype="has_a" key="id" map="" class="au"/>
3162                         <link field="location" reltype="has_a" key="id" map="" class="aou"/>
3163                 </links>
3164         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3165             <actions>
3166                 <create permission="money.collections_tracker.create" context_field="location"/>
3167                 <retrieve permission="money.collections_tracker.create" context_field="location"/> 
3168                 <delete permission="money.collections_tracker.create" context_field="location"/>
3169             </actions>
3170         </permacrud>
3171         </class>
3172         <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">
3173                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry_id_seq">
3174                         <field reporter:label="Call Numbers" name="call_numbers" oils_persist:virtual="true" reporter:datatype="link"/>
3175                         <field reporter:label="Fixed Field Entry" name="fixed_fields" oils_persist:virtual="true" reporter:datatype="link"/>
3176                         <field reporter:label="Is Active?" name="active" reporter:datatype="bool"/>
3177                         <field reporter:label="Record Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
3178                         <field reporter:label="Record Creator" name="creator" reporter:datatype="link"/>
3179                         <field reporter:label="Is Deleted?" name="deleted" reporter:datatype="bool"/>
3180                         <field reporter:label="Last Edit Data/Time" name="edit_date" reporter:datatype="timestamp"/>
3181                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
3182                         <field reporter:label="Fingerprint" name="fingerprint"  reporter:datatype="text"/>
3183                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
3184                         <field reporter:label="Last Transaction ID" name="last_xact_id"  reporter:datatype="text"/>
3185                         <field reporter:label="MARC21Slim" name="marc"  reporter:datatype="text"/>
3186                         <field reporter:label="Overall Quality" name="quality" reporter:datatype="int" />
3187                         <field reporter:label="Record Source" name="source" reporter:datatype="link"/>
3188                         <field reporter:label="TCN Source" name="tcn_source"  reporter:datatype="text"/>
3189                         <field reporter:label="TCN Value" name="tcn_value"  reporter:datatype="text"/>
3190                         <field reporter:label="Owner" name="owner"  reporter:datatype="org_unit"/>
3191                         <field reporter:label="Share Depth" name="share_depth"  reporter:datatype="int"/>
3192                         <field reporter:label="Metarecord" name="metarecord" oils_persist:virtual="true" reporter:datatype="link"/>
3193                         <field reporter:label="Language Code" name="language" oils_persist:virtual="true" reporter:datatype="link"/>
3194                         <field reporter:label="Non-MARC Record Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
3195                         <field reporter:label="Indexed Keyword Field Entries" name="keyword_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3196                         <field reporter:label="Indexed Subject Field Entries" name="subject_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3197                         <field reporter:label="Indexed Title Field Entries" name="title_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3198                         <field reporter:label="Indexed Identifier Field Entries" name="identifier_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3199                         <field reporter:label="Indexed Author Field Entries" name="author_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3200                         <field reporter:label="Indexed Series Field Entries" name="series_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3201                         <field reporter:label="Flattened MARC Fields " name="full_record_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3202                         <field reporter:label="Simple Record Extracts " name="simple_record" oils_persist:virtual="true" reporter:datatype="link"/>
3203                         <field reporter:label="Authority Links" name="authority_links" oils_persist:virtual="true" reporter:datatype="link"/>
3204                         <field reporter:label="Subscriptions" name="subscriptions" oils_persist:virtual="true" reporter:datatype="link"/>
3205                         <field reporter:label="SVF Attributes" name="attrs" oils_persist:virtual="true" reporter:datatype="link"/>
3206                         <field reporter:label="MVF Attributes" name="mattrs" oils_persist:virtual="true" reporter:datatype="link"/>
3207                         <field reporter:label="Display Fields" name="display_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3208                         <field reporter:label="Flat Display Entries" name="flat_display_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3209                         <field reporter:label="Compressed Display Entries" name="compressed_display_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3210                         <field reporter:label="Wide Display Entries" name="wide_display_entry" oils_persist:virtual="true" reporter:datatype="link"/>
3211                         <field reporter:label="Merge Date" name="merge_date" reporter:datatype="timestamp"/>
3212                         <field reporter:label="Merged To" name="merged_to" reporter:datatype="link"/>
3213                 </fields>
3214                 <links>
3215                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3216                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
3217                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3218                         <link field="simple_record" reltype="might_have" key="id" map="" class="rmsr"/>
3219                         <link field="metarecord" reltype="might_have" key="source" map="metarecord" class="mmrsm"/>
3220                         <link field="call_numbers" reltype="has_many" key="record" map="" class="acn"/>
3221                         <link field="keyword_field_entries" reltype="has_many" key="source" map="" class="mkfe"/>
3222                         <link field="fixed_fields" reltype="might_have" key="record" map="" class="mrd"/>
3223                         <link field="language" reltype="might_have" key="record" map="item_lang" class="mrd"/>
3224                         <link field="subject_field_entries" reltype="has_many" key="source" map="" class="msfe"/>
3225                         <link field="title_field_entries" reltype="has_many" key="source" map="" class="mtfe"/>
3226                         <link field="identifier_field_entries" reltype="has_many" key="source" map="" class="mife"/>
3227                         <link field="notes" reltype="has_many" key="record" map="" class="bren"/>
3228                         <link field="author_field_entries" reltype="has_many" key="source" map="" class="mafe"/>
3229                         <link field="series_field_entries" reltype="has_many" key="source" map="" class="msefe"/>
3230                         <link field="full_record_entries" reltype="has_many" key="record" map="" class="mfr"/>
3231                         <link field="authority_links" reltype="has_many" key="bib" map="" class="abl"/>
3232                         <link field="subscriptions" reltype="has_many" key="record_entry" map="" class="ssub"/>
3233                         <link field="attrs" reltype="might_have" key="id" map="" class="mra"/>
3234                         <link field="mattrs" reltype="might_have" key="id" map="" class="mraf"/>
3235                         <link field="source" reltype="has_a" key="id" map="" class="cbs"/>
3236                         <link field="display_entries" reltype="has_many" key="source" map="" class="mde"/>
3237                         <link field="flat_display_entries" reltype="has_many" key="source" map="" class="mfde"/>
3238                         <link field="compressed_display_entries" reltype="has_many" key="source" map="" class="mcde"/>
3239                         <link field="wide_display_entry" reltype="might_have" key="source" map="" class="mwde"/>
3240                         <link field="merged_to" reltype="has_a" key="id" map="" class="bre"/>
3241                 </links>
3242         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3243             <actions>
3244                 <create permission="CREATE_MARC IMPORT_MARC" global_required="true"/>
3245                 <retrieve/>
3246                 <update permission="UPDATE_MARC" global_required="true"/>
3247                 <!-- 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. -->
3248                 <delete permission="DELETE_RECORD" global_required="true"/>
3249             </actions>
3250         </permacrud>
3251         </class>
3252         <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">
3253                 <fields oils_persist:primary="id">
3254                         <field name="dow_0_close" />
3255                         <field name="dow_0_open" />
3256                         <field name="dow_1_close" />
3257                         <field name="dow_1_open" />
3258                         <field name="dow_2_close" />
3259                         <field name="dow_2_open" />
3260                         <field name="dow_3_close" />
3261                         <field name="dow_3_open" />
3262                         <field name="dow_4_close" />
3263                         <field name="dow_4_open" />
3264                         <field name="dow_5_close" />
3265                         <field name="dow_5_open" />
3266                         <field name="dow_6_close" />
3267                         <field name="dow_6_open" />
3268                         <field name="id" reporter:datatype="id" />
3269                         <field name="org_unit" oils_persist:virtual="true" reporter:datatype="org_unit"/>
3270                 </fields>
3271                 <links>
3272                         <link field="id" reltype="might_have" key="id" map="" class="aou"/>
3273                 </links>
3274         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3275             <actions>
3276                 <create permission="CREATE_HOURS_OF_OPERATION" context_field="id"/>
3277                 <retrieve/>
3278                 <update permission="UPDATE_HOURS_OF_OPERATION" context_field="id"/>
3279                 <delete permission="DELETE_HOURS_OF_OPERATION" context_field="id"/>
3280             </actions>
3281         </permacrud>
3282         </class>
3283         <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">
3284                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.monograph_part_id_seq">
3285                         <field name="id" reporter:datatype="id" />
3286                         <field name="record" reporter:datatype="link"/>
3287                         <field name="label" reporter:datatype="text"/>
3288                         <field name="label_sortkey" reporter:datatype="text"/>
3289                         <field name="deleted" reporter:datatype="bool"/>
3290                 </fields>
3291                 <links>
3292                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3293                 </links>
3294         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3295             <actions>
3296                 <create permission="CREATE_MONOGRAPH_PART" global_required="true"/>
3297                 <retrieve/>
3298                 <update permission="UPDATE_MONOGRAPH_PART" global_required="true"/>
3299                 <delete permission="DELETE_MONOGRAPH_PART" global_required="true"/>
3300             </actions>
3301         </permacrud>
3302         </class>
3303         <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">
3304                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_part_map_id_seq">
3305                         <field name="id" reporter:datatype="id" />
3306                         <field name="target_copy" reporter:datatype="link" />
3307                         <field name="part" reporter:datatype="link"/>
3308                 </fields>
3309                 <links>
3310                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
3311                         <link field="part" reltype="has_a" key="id" map="" class="bmp"/>
3312                 </links>
3313         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3314             <actions>
3315                 <create permission="MAP_MONOGRAPH_PART" global_required="true"/>
3316                 <retrieve/>
3317                 <update permission="MAP_MONOGRAPH_PART" global_required="true"/>
3318                 <delete permission="MAP_MONOGRAPH_PART" global_required="true"/>
3319             </actions>
3320         </permacrud>
3321         </class>
3322     <class  id="aecc"
3323             controller="open-ils.cstore open-ils.pcrud"
3324             oils_obj:fieldmapper="action::emergency_closing_circulation"
3325             oils_persist:tablename="action.emergency_closing_circulation"
3326             reporter:label="Emergency Closing Circulation Entry"
3327             oils_persist:readonly="true"
3328     > <!-- This is not a view, but is managed via functions, so it's readonly. -->
3329         <fields oils_persist:primary="id">
3330             <field name="id" reporter:datatype="id" />
3331             <field name="circulation" reporter:datatype="link" />
3332                         <field name="emergency_closing" reporter:datatype="link"/>
3333             <field name="original_due_date" reporter:datatype="timestamp" />
3334             <field name="process_time" reporter:datatype="timestamp" />
3335         </fields>
3336         <links>
3337             <link field="circulation" reltype="has_a" key="id" map="" class="circ"/>
3338             <link field="emergency_closing" reltype="has_a" key="id" map="" class="aec"/>
3339         </links>
3340         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3341             <actions>
3342                 <retrieve/>
3343             </actions>
3344         </permacrud>
3345     </class>
3346     <class  id="aecr"
3347             controller="open-ils.cstore open-ils.pcrud"
3348             oils_obj:fieldmapper="action::emergency_closing_reservation"
3349             oils_persist:tablename="action.emergency_closing_reservation"
3350             reporter:label="Emergency Closing Reservation Entry"
3351             oils_persist:readonly="true"
3352     > <!-- This is not a view, but is managed via functions, so it's readonly. -->
3353         <fields oils_persist:primary="id">
3354             <field name="id" reporter:datatype="id" />
3355             <field name="reservation" reporter:datatype="link" />
3356                         <field name="emergency_closing" reporter:datatype="link"/>
3357             <field name="original_end_time" reporter:datatype="timestamp" />
3358             <field name="process_time" reporter:datatype="timestamp" />
3359         </fields>
3360         <links>
3361             <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
3362             <link field="emergency_closing" reltype="has_a" key="id" map="" class="aec"/>
3363         </links>
3364         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3365             <actions>
3366                 <retrieve/>
3367             </actions>
3368         </permacrud>
3369     </class>
3370     <class  id="aech"
3371             controller="open-ils.cstore open-ils.pcrud"
3372             oils_obj:fieldmapper="action::emergency_closing_hold"
3373             oils_persist:tablename="action.emergency_closing_hold"
3374             reporter:label="Emergency Closing Hold Entry"
3375             oils_persist:readonly="true"
3376     > <!-- This is not a view, but is managed via functions, so it's readonly. -->
3377         <fields oils_persist:primary="id">
3378             <field name="id" reporter:datatype="id" />
3379             <field name="hold" reporter:datatype="link" />
3380                         <field name="emergency_closing" reporter:datatype="link"/>
3381             <field name="original_shelf_expire_time" reporter:datatype="timestamp" />
3382             <field name="process_time" reporter:datatype="timestamp" />
3383         </fields>
3384         <links>
3385             <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
3386             <link field="emergency_closing" reltype="has_a" key="id" map="" class="aec"/>
3387         </links>
3388         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3389             <actions>
3390                 <retrieve/>
3391             </actions>
3392         </permacrud>
3393     </class>
3394     <class  id="aecs"
3395             controller="open-ils.cstore open-ils.pcrud"
3396             oils_obj:fieldmapper="action::emergency_closing_status"
3397             oils_persist:tablename="action.emergency_closing_status"
3398             reporter:label="Emergency Closing Status"
3399             oils_persist:readonly="true"
3400     >
3401         <fields oils_persist:primary="id">
3402             <field name="id" reporter:datatype="id" />
3403             <field name="creator" reporter:datatype="link" />
3404             <field name="create_time" reporter:datatype="timestamp" />
3405             <field name="process_start_time" reporter:datatype="timestamp" />
3406             <field name="process_end_time" reporter:datatype="timestamp" />
3407             <field name="last_update_time" reporter:datatype="timestamp" />
3408             <field name="circulations" reporter:datatype="int" />
3409             <field name="circulations_complete" reporter:datatype="int" />
3410             <field name="reservations" reporter:datatype="int" />
3411             <field name="reservations_complete" reporter:datatype="int" />
3412             <field name="holds" reporter:datatype="int" />
3413             <field name="holds_complete" reporter:datatype="int" />
3414         </fields>
3415         <links>
3416             <link field="id" reltype="has_a" key="id" map="" class="aec"/>
3417         </links>
3418         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3419             <actions>
3420                 <retrieve/>
3421             </actions>
3422         </permacrud>
3423     </class>
3424     <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">
3425         <fields oils_persist:primary="id" oils_persist:sequence="action.emergency_closing_id_seq">
3426             <field name="id" reporter:datatype="id" />
3427             <field name="creator" reporter:datatype="link" />
3428             <field name="create_time" reporter:datatype="timestamp" />
3429             <field name="process_start_time" reporter:datatype="timestamp" />
3430             <field name="process_end_time" reporter:datatype="timestamp" />
3431             <field name="last_update_time" reporter:datatype="timestamp" />
3432             <field name="closing" oils_persist:virtual="true" reporter:datatype="link"/>
3433             <field name="status" oils_persist:virtual="true" reporter:datatype="link"/>
3434             <field name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
3435             <field name="reservations" oils_persist:virtual="true" reporter:datatype="link"/>
3436             <field name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
3437         </fields>
3438         <links>
3439             <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3440             <link field="closing" reltype="might_have" key="emergency_closing" map="" class="aoucd"/>
3441             <link field="status" reltype="might_have" key="id" map="" class="aecs"/>
3442             <link field="circulations" reltype="has_many" key="emergency_closing" map="" class="aecc"/>
3443             <link field="reservations" reltype="has_many" key="emergency_closing" map="" class="aecr"/>
3444             <link field="holds" reltype="has_many" key="emergency_closing" map="" class="aech"/>
3445         </links>
3446         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3447             <actions>
3448                 <create permission="EMERGENCY_CLOSING">
3449                     <context link="closing" field="org_unit" />
3450                 </create>
3451                 <retrieve/>
3452                 <update permission="EMERGENCY_CLOSING">
3453                     <context link="closing" field="org_unit" />
3454                 </update>
3455                 <delete permission="EMERGENCY_CLOSING">
3456                     <context link="closing" field="org_unit" />
3457                 </delete>
3458             </actions>
3459         </permacrud>
3460     </class>
3461         <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">
3462                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_closed_id_seq">
3463                         <field name="close_end" reporter:datatype="timestamp" />
3464                         <field name="close_start" reporter:datatype="timestamp" />
3465                         <field name="id" reporter:datatype="id" />
3466                         <field name="org_unit" reporter:datatype="org_unit"/>
3467                         <field name="reason" reporter:datatype="text"/>
3468                         <field name="full_day" reporter:datatype="bool"/>
3469                         <field name="multi_day" reporter:datatype="bool"/>
3470                         <field name="emergency_closing" reporter:datatype="link"/>
3471                 </fields>
3472                 <links>
3473                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3474                         <link field="emergency_closing" reltype="has_a" key="id" map="" class="aec"/>
3475                 </links>
3476         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3477             <actions>
3478                 <create permission="CREATE_ORG_UNIT_CLOSING" context_field="org_unit"/>
3479                 <retrieve/>
3480                 <update permission="UPDATE_ORG_UNIT_CLOSING" context_field="org_unit"/>
3481                 <delete permission="DELETE_ORG_UNIT_CLOSING" context_field="org_unit"/>
3482             </actions>
3483         </permacrud>
3484         </class>
3485         <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">
3486                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_circ_duration_id_seq">
3487                         <field name="extended" reporter:datatype="interval"/>
3488                         <field name="id" reporter:datatype="id" reporter:selector="name"/>
3489                         <field name="max_renewals" reporter:datatype="int" />
3490                         <field name="name" reporter:datatype="text"/>
3491                         <field name="normal" reporter:datatype="interval"/>
3492                         <field name="shrt" reporter:datatype="interval"/>
3493                         <field name="max_auto_renewals" reporter:datatype="int" />
3494                 </fields>
3495                 <links>
3496                 </links>
3497         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3498             <actions>
3499                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
3500                 <retrieve/>
3501                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
3502                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
3503             </actions>
3504         </permacrud>
3505         </class>
3506
3507         <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">
3508                 <fields oils_persist:primary="id" oils_persist:sequence="config.hard_due_date_id_seq">
3509                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
3510                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
3511             <field reporter:label="Always Use?" name="forceto" reporter:datatype="bool"/>
3512                         <field reporter:label="Current Ceiling Date" name="ceiling_date" reporter:datatype="timestamp"/>
3513             <field reporter:label="Owner" name="owner" reporter:datatype="org_unit"/>
3514                 </fields>
3515                 <links>
3516             <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3517                 </links>
3518                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3519             <actions>
3520                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
3521                 <retrieve/>
3522                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
3523                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
3524             </actions>
3525                 </permacrud>
3526         </class>
3527
3528         <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">
3529                 <fields oils_persist:primary="id" oils_persist:sequence="config.hard_due_date_values_id_seq">
3530                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3531                         <field reporter:label="Hard Due Date" name="hard_due_date" reporter:datatype="link"/>
3532                         <field reporter:label="Ceiling Date" name="ceiling_date" reporter:datatype="timestamp"/>
3533             <field reporter:label="Active Date" name="active_date" reporter:datatype="timestamp"/>
3534                 </fields>
3535                 <links>
3536                         <link field="hard_due_date" reltype="has_a" key="id" map="" class="chdd"/>
3537                 </links>
3538                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3539             <actions>
3540                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
3541                 <retrieve/>
3542                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
3543                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
3544             </actions>
3545                 </permacrud>
3546         </class>
3547
3548         <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">
3549                 <fields oils_persist:primary="id" oils_persist:sequence="">
3550                         <field name="balance_owed" reporter:datatype="money"/>
3551                         <field name="id" reporter:datatype="id" />
3552                         <field name="last_billing_note" reporter:datatype="text"/>
3553                         <field name="last_billing_ts" reporter:datatype="timestamp"/>
3554                         <field name="last_billing_type" reporter:datatype="text"/>
3555                         <field name="last_payment_note" reporter:datatype="text"/>
3556                         <field name="last_payment_ts" reporter:datatype="timestamp"/>
3557                         <field name="last_payment_type" reporter:datatype="text"/>
3558                         <field name="total_owed" reporter:datatype="money"/>
3559                         <field name="total_paid" reporter:datatype="money"/>
3560                         <field name="usr" reporter:datatype="link"/>
3561                         <field name="xact_finish" reporter:datatype="timestamp" />
3562                         <field name="xact_start" reporter:datatype="timestamp" />
3563                         <field name="xact_type" reporter:datatype="text"/>
3564                         <field name="xact" oils_persist:virtual="true" reporter:datatype="link"/>
3565                         <field name="grocery" oils_persist:virtual="true" reporter:datatype="link"/>
3566                         <field name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
3567                         <field name="reservation" oils_persist:virtual="true" reporter:datatype="link"/>
3568                         <field name="billing_location" reporter:datatype="link"/>
3569                 </fields>
3570                 <links>
3571                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3572                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
3573                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
3574                         <link field="grocery" reltype="might_have" key="id" map="" class="mg"/>
3575                         <link field="reservation" reltype="might_have" key="id" map="" class="bresv"/>
3576                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
3577                 </links>
3578                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3579                         <actions>
3580                                 <retrieve permission="VIEW_USER_TRANSACTIONS">
3581                                         <context link="usr" field="home_ou" />
3582                                 </retrieve>
3583                         </actions>
3584                 </permacrud>
3585         </class>
3586         <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">
3587                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_id_seq">
3588                         <field reporter:label="All Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>
3589                         <field reporter:label="All Library Cards" name="cards" oils_persist:virtual="true" reporter:datatype="link"/>
3590                         <field reporter:label="All Circulations" name="checkouts" oils_persist:virtual="true" reporter:datatype="link"/>
3591                         <field reporter:label="All Hold Requests" name="hold_requests" oils_persist:virtual="true" reporter:datatype="link"/>
3592                         <field reporter:label="All Permissions" name="permissions" oils_persist:virtual="true" reporter:datatype="link"/>
3593                         <field reporter:label="All User Settings" name="settings" oils_persist:virtual="true" reporter:datatype="link"/>
3594                         <field reporter:label="Standing Penalties" name="standing_penalties" oils_persist:virtual="true" reporter:datatype="link"/>
3595                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3596                         <field reporter:label="Survey Responses" name="survey_responses" oils_persist:virtual="true" reporter:datatype="link"/>
3597                         <field reporter:label="Workstation Org Unit" name="ws_ou" oils_persist:virtual="true" reporter:datatype="link"/>
3598                         <field reporter:label="Workstation ID" name="wsid" oils_persist:virtual="true" reporter:datatype="link"/>
3599                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
3600                         <field reporter:label="Alert Message" name="alert_message"  reporter:datatype="text"/>
3601                         <field reporter:label="Barred" name="barred" reporter:datatype="bool"/>
3602                         <field reporter:label="Physical Address" name="billing_address" reporter:datatype="link"/>
3603                         <field reporter:label="Current Library Card" name="card" reporter:datatype="link"/>
3604                         <field reporter:label="Claims-returned Count" name="claims_returned_count" reporter:datatype="int" />
3605                         <field reporter:label="Claims Never Checked Out Count" name="claims_never_checked_out_count" reporter:datatype="int" />
3606                         <field reporter:label="Record Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
3607                         <field reporter:label="User Credit Balance" name="credit_forward_balance" reporter:datatype="money" />
3608                         <field reporter:label="Daytime Phone" name="day_phone"  reporter:datatype="text"/>
3609                         <field reporter:label="Date of Birth" name="dob" reporter:datatype="timestamp"/>
3610                         <field reporter:label="Email Address" name="email"  reporter:datatype="text"/>
3611                         <field reporter:label="Evening Phone" name="evening_phone"  reporter:datatype="text"/>
3612                         <field reporter:label="Privilege Expiration Date" name="expire_date" reporter:datatype="timestamp"/>
3613                         <field reporter:label="Last Name" name="family_name"  reporter:datatype="text"/>
3614                         <field reporter:label="First Name" name="first_given_name"  reporter:datatype="text"/>
3615                         <field reporter:label="Home Library" name="home_ou" reporter:datatype="org_unit"/>
3616                         <field reporter:label="User ID" name="id" reporter:datatype="id" />
3617                         <field reporter:label="Primary Identification Type" name="ident_type" reporter:datatype="link"/>
3618                         <field reporter:label="Secondary Identification Type" name="ident_type2" reporter:datatype="link"/>
3619                         <field reporter:label="Primary Identification" name="ident_value"  reporter:datatype="text"/>
3620                         <field reporter:label="Secondary Identification" name="ident_value2"  reporter:datatype="text"/>
3621                         <field reporter:label="Last Transaction ID" name="last_xact_id" reporter:datatype="text"/>
3622                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="link"/>
3623                         <field reporter:label="Is Group Lead Account" name="master_account" reporter:datatype="bool"/>
3624                         <field reporter:label="Internet Access Level" name="net_access_level" reporter:datatype="link"/>
3625                         <field reporter:label="Other Phone" name="other_phone"  reporter:datatype="text"/>
3626                         <field reporter:label="Password" name="passwd" suppress_controller="open-ils.pcrud open-ils.reporter-store" reporter:datatype="text"/>
3627                         <field reporter:label="Photo URL" name="photo_url"  reporter:datatype="text"/>
3628                         <field reporter:label="Prefix/Title" name="prefix"  reporter:datatype="text"/>
3629                         <field reporter:label="Main (Profile) Permission Group" name="profile" reporter:datatype="link"/>
3630                         <field reporter:label="Middle Name" name="second_given_name"  reporter:datatype="text"/>
3631                         <field reporter:label="Standing (unused)" name="standing" reporter:datatype="link"/>
3632                         <field reporter:label="Suffix" name="suffix"  reporter:datatype="text"/>
3633                         <field reporter:label="Is Super User" name="super_user" reporter:datatype="bool"/>
3634                         <field reporter:label="Family Linkage or other Group" name="usrgroup" reporter:datatype="int"/>
3635                         <field reporter:label="OPAC/Staff Client User Name" name="usrname"  reporter:datatype="text"/>
3636                         <field reporter:label="OPAC/Staff Client Holds Alias" name="alias"  reporter:datatype="text"/>
3637                         <field reporter:label="Juvenile" name="juvenile"  reporter:datatype="bool"/>
3638                         <field reporter:label="Record Last Update Time" name="last_update_time" reporter:datatype="timestamp"/>
3639                         <field reporter:label="Preferred Prefix" name="pref_prefix" reporter:datatype="text"/>
3640                         <field reporter:label="Preferred First Name" name="pref_first_given_name" reporter:datatype="text"/>
3641                         <field reporter:label="Preferred Middle Name" name="pref_second_given_name" reporter:datatype="text"/>
3642                         <field reporter:label="Preferred Last Name" name="pref_family_name"  reporter:datatype="text"/>
3643                         <field reporter:label="Preferred Suffix" name="pref_suffix" reporter:datatype="text"/>
3644                         <field reporter:label="Name Keywords" name="name_keywords" reporter:datatype="text"/>
3645                         <field reporter:label="Additional Permission Groups" name="groups" oils_persist:virtual="true" reporter:datatype="link"/>
3646                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
3647                         <field reporter:label="User Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
3648                         <field reporter:label="Demographic Info" name="demographic" oils_persist:virtual="true" reporter:datatype="link"/>
3649                         <field reporter:label="Billable Transactions" name="billable_transactions" oils_persist:virtual="true" reporter:datatype="link"/>
3650                         <field reporter:label="Money Summary" name="money_summary" oils_persist:virtual="true" reporter:datatype="link"/>
3651                         <field reporter:label="Open Billable Transactions" name="open_billable_transactions_summary" oils_persist:virtual="true" reporter:datatype="link"/>
3652                         <field reporter:label="Checkins" name="checkins" oils_persist:virtual="true" reporter:datatype="link"/>
3653                         <field reporter:label="Circulations Performed as Staff" name="performed_circulations" oils_persist:virtual="true" reporter:datatype="link"/>
3654                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
3655                         <field reporter:label="Reservations" name="reservations" oils_persist:virtual="true" reporter:datatype="link"/>
3656                         <field reporter:label="User Activity Entries" name="usr_activity" oils_persist:virtual="true" reporter:datatype="link"/>
3657                         <field reporter:label="User/Working Location Map" name="usr_work_ou_map" oils_persist:virtual="true" reporter:datatype="link"/>
3658                 </fields>
3659                 <links>
3660                         <link field="demographic" reltype="might_have" key="id" map="" class="rud"/>
3661                         <link field="net_access_level" reltype="has_a" key="id" map="" class="cnal"/>
3662                         <link field="profile" reltype="has_a" key="id" map="" class="pgt"/>
3663                         <link field="ident_type" reltype="has_a" key="id" map="" class="cit"/>
3664                         <link field="billing_address" reltype="has_a" key="id" map="" class="aua"/>
3665                         <link field="mailing_address" reltype="has_a" key="id" map="" class="aua"/>
3666                         <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
3667                         <link field="standing" reltype="has_a" key="id" map="" class="cst"/>
3668                         <link field="card" reltype="has_a" key="id" map="" class="ac"/>
3669                         <link field="ident_type2" reltype="has_a" key="id" map="" class="cit"/>
3670                         <link field="stat_cat_entries" reltype="has_many" key="target_usr" map="" class="actscecm"/>
3671                         <link field="groups" reltype="has_many" key="usr" map="grp" class="pugm"/>
3672                         <link field="usrgroup" reltype="has_many" key="usrgroup" map="" class="au"/>
3673                         <link field="checkouts" reltype="has_many" key="usr" map="" class="circ"/>
3674                         <link field="hold_requests" reltype="has_many" key="usr" map="" class="ahr"/>
3675                         <link field="permissions" reltype="has_many" key="usr" map="perm" class="pupm"/>
3676                         <link field="settings" reltype="has_many" key="usr" map="" class="aus"/>
3677                         <link field="billable_transactions" reltype="has_many" key="usr" map="" class="mbt"/>
3678                         <link field="open_billable_transactions_summary" reltype="has_many" key="usr" map="" class="mobts"/>
3679                         <link field="money_summary" reltype="might_have" key="usr" map="" class="mus"/>
3680                         <link field="standing_penalties" reltype="has_many" key="usr" map="" class="ausp"/>
3681                         <link field="addresses" reltype="has_many" key="usr" map="" class="aua"/>
3682                         <link field="survey_responses" reltype="has_many" key="usr" map="" class="asvr"/>
3683                         <link field="notes" reltype="has_many" key="usr" map="" class="aun"/>
3684                         <link field="checkins" reltype="has_many" key="checkin_staff" map="" class="circ"/>
3685                         <link field="cards" reltype="has_many" key="usr" map="" class="ac"/>
3686                         <link field="performed_circulations" reltype="has_many" key="circ_staff" map="" class="circ"/>
3687                         <link field="fund_alloc_pcts" reltype="has_many" key="allocator" map="" class="acqfap"/>
3688                         <link field="reservations" reltype="has_many" key="usr" map="" class="bresv"/>
3689                         <link field="usr_activity" reltype="has_many" key="usr" map="" class="auact"/>
3690                         <link field="usr_work_ou_map" reltype="has_many" key="usr" map="" class="puwoum"/>
3691                 </links>
3692                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3693                         <actions>
3694                                 <retrieve permission="VIEW_USER" context_field="home_ou" />
3695                         </actions>
3696                 </permacrud>
3697         </class>
3698         <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">
3699                 <fields oils_persist:primary="id" oils_persist:sequence="config.usr_activity_type_id_seq">
3700                         <field name="id" reporter:label="ID" reporter:datatype="id" />
3701                         <field name="ewho" reporter:label="Event Caller" reporter:datatype="text"/>
3702                         <field name="ewhat" reporter:label="Event Type" reporter:datatype="text"/>
3703                         <field name="ehow" reporter:label="Event Mechanism" reporter:datatype="text"/>
3704                         <field name="label" reporter:label="Label" reporter:datatype="text"/>
3705                         <field name="egroup" reporter:label="Activity Group" reporter:datatype="text"/>
3706                         <field name="enabled" reporter:label="Enabled" reporter:datatype="bool"/>
3707                         <field name="transient" reporter:label="Transient" reporter:datatype="bool"/>
3708         </fields>
3709                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3710                         <actions>
3711                                 <create permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>
3712                                 <retrieve/>
3713                                 <update permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>
3714                                 <delete permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>
3715                         </actions>
3716                 </permacrud>
3717         </class>
3718         <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">
3719                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_activity_id_seq">
3720                         <field name="id" reporter:label="ID" reporter:datatype="id" />
3721                         <field name="usr" reporter:label="User" reporter:datatype="link" />
3722                         <field name="etype" reporter:label="Activity Type" reporter:datatype="link" />
3723                         <field name="event_time" reporter:label="Event Time" reporter:datatype="timestamp" />
3724         </fields>
3725         <links>
3726                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3727                         <link field="etype" reltype="has_a" key="id" map="" class="cuat"/>
3728                 </links>
3729                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3730                         <actions>
3731                                 <retrieve permission="RUN_REPORTS">
3732                                         <context link="usr" field="home_ou" />
3733                                 </retrieve>
3734                         </actions>
3735                 </permacrud>
3736         </class>
3737         <class id="atb" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::toolbar" oils_persist:tablename="actor.toolbar" reporter:label="Custom Toolbar">
3738                 <fields oils_persist:primary="id" oils_persist:sequence="actor.toolbar_id_seq">
3739                         <field name="id" reporter:label="ID" reporter:datatype="id" />
3740                         <field name="usr" reporter:label="Owning User" reporter:datatype="link" />
3741                         <field name="org" reporter:label="Owning Org Unit" reporter:datatype="link" />
3742                         <field name="ws" reporter:label="Owning Workstation" reporter:datatype="link" />
3743                         <field name="label" reporter:label="Label" reporter:datatype="text" oils_persist:i18n="true" />
3744                         <field name="layout" reporter:label="Layout" reporter:datatype="text" />
3745         </fields>
3746         <links>
3747                         <link field="usr" reltype="might_have" key="id" map="" class="au"/>
3748                         <link field="org" reltype="might_have" key="id" map="" class="aou"/>
3749                         <link field="ws" reltype="might_have" key="id" map="" class="aws"/>
3750                 </links>
3751                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3752                         <actions>
3753                                 <retrieve permission="ADMIN_TOOLBAR STAFF_LOGIN" context_field="org">
3754                                         <context link="usr" field="home_ou" />
3755                                         <context link="ws" field="owning_lib" />
3756                                 </retrieve>
3757                                 <create permission="ADMIN_TOOLBAR" context_field="org">
3758                                         <context link="usr" field="home_ou" />
3759                                         <context link="ws" field="owning_lib" />
3760                                 </create>
3761                                 <update permission="ADMIN_TOOLBAR" context_field="org">
3762                                         <context link="usr" field="home_ou" />
3763                                         <context link="ws" field="owning_lib" />
3764                                 </update>
3765                                 <delete permission="ADMIN_TOOLBAR" context_field="org">
3766                                         <context link="usr" field="home_ou" />
3767                                         <context link="ws" field="owning_lib" />
3768                                 </delete>
3769                         </actions>
3770                 </permacrud>
3771         </class>
3772         <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">
3773                 <fields oils_persist:primary="name">
3774                         <field name="name" reporter:datatype="text"/>
3775                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
3776                 </fields>
3777                 <links/>
3778                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3779                         <actions>
3780                                 <create permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
3781                                 <retrieve/>
3782                                 <update permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
3783                                 <delete permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
3784                         </actions>
3785                 </permacrud>
3786         </class>
3787         <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">
3788                 <fields oils_persist:primary="name">
3789                         <field name="name" reporter:label="Name" reporter:datatype="text"/>
3790                         <field name="label" reporter:label="Label" reporter:datatype="text" oils_persist:i18n="true"/>
3791                         <field name="description" reporter:label="Description" reporter:datatype="text" oils_persist:i18n="true"/>
3792                         <field name="datatype" reporter:label="Datatype" reporter:datatype="text"/>
3793                         <field name="fm_class" reporter:label="Fieldmapper Class" reporter:datatype="text"/>
3794                         <field name="grp" reporter:label="Settings Group" reporter:datatype="link"/>
3795                         <field name="opac_visible" reporter:label="OPAC/Patron Visible" reporter:datatype="bool"/>
3796                         <field name="reg_default" reporter:label="Registration Default" reporter:datatype="text"/>
3797                 </fields>
3798                 <links>
3799                         <link field="name" reltype="has_many" key="name" map="" class="aus"/>
3800                         <link field="grp" reltype="has_a" key="name" map="" class="csg"/>
3801                 </links>
3802                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3803                         <actions>
3804                                 <create permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
3805                                 <retrieve/>
3806                                 <update permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
3807                                 <delete permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
3808                         </actions>
3809                 </permacrud>
3810         </class>
3811         <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">
3812                 <fields oils_persist:primary="name">
3813                         <field name="name" reporter:datatype="text"/>
3814                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
3815                         <field name="description" reporter:datatype="text" oils_persist:i18n="true"/>
3816                         <field name="datatype" reporter:datatype="text"/>
3817                         <field name="view_perm" reporter:datatype="link"/>
3818                         <field name="update_perm" reporter:datatype="link"/>
3819                         <field name="fm_class" reporter:datatype="text"/>
3820                         <field name="grp" reporter:datatype="link"/>
3821                 </fields>
3822                 <links>
3823                         <link field="name" reltype="has_many" key="name" map="" class="aous"/>
3824                         <link field="view_perm" reltype="has_a" key="id" map="" class="ppl"/>
3825                         <link field="update_perm" reltype="has_a" key="id" map="" class="ppl"/>
3826                         <link field="grp" reltype="has_a" key="name" map="" class="csg"/>
3827                 </links>
3828                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3829                         <actions>
3830                                 <create permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
3831                                 <retrieve/>
3832                                 <update permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
3833                                 <delete permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
3834                         </actions>
3835                 </permacrud>
3836         </class>
3837         <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">
3838                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_setting_id_seq">
3839                         <field name="id" />
3840                         <field name="name"  reporter:datatype="text"/>
3841                         <field name="org_unit" reporter:datatype="org_unit"/>
3842                         <field name="value"  reporter:datatype="text"/>
3843                 </fields>
3844                 <links>
3845                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3846                         <link field="name" reltype="has_a" key="name" map="" class="coust"/>
3847                 </links>
3848         </class>
3849         <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">
3850                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_note_id_seq">
3851                         <field reporter:label="Note Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
3852                         <field reporter:label="Note Creator" name="creator" reporter:datatype="link"/>
3853                         <field reporter:label="Note ID" name="id" reporter:datatype="id" />
3854                         <field reporter:label="Copy" name="owning_copy" reporter:datatype="link"/>
3855                         <field reporter:label="Is OPAC Visible?" name="pub" reporter:datatype="bool"/>
3856                         <field reporter:label="Note Title" name="title"  reporter:datatype="text"/>
3857                         <field reporter:label="Note Content" name="value"  reporter:datatype="text"/>
3858                 </fields>
3859                 <links>
3860                         <link field="owning_copy" reltype="has_a" key="id" map="" class="acp"/>
3861                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3862                 </links>
3863         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3864             <actions>
3865                 <create permission="CREATE_COPY_NOTE">
3866                     <context link="owning_copy" field="circ_lib"/>
3867                 </create>
3868                 <retrieve permission="VIEW_COPY_NOTES">
3869                     <context link="owning_copy" field="circ_lib"/>
3870                 </retrieve>
3871                 <update permission="UPDATE_COPY_NOTE">
3872                     <context link="owning_copy" field="circ_lib"/>
3873                 </update>
3874                 <delete permission="DELETE_COPY_NOTE">
3875                     <context link="owning_copy" field="circ_lib"/>
3876                 </delete>
3877             </actions>
3878         </permacrud>
3879         </class>
3880         <class id="mfr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::full_rec" oils_persist:tablename="metabib.full_rec" reporter:label="Flattened MARC Fields">
3881                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.full_rec_id_seq">
3882                         <field reporter:label="Field ID" name="id" reporter:datatype="id" />
3883                         <field reporter:label="Indicator 1" name="ind1" oils_persist:primitive="string"  reporter:datatype="text"/>
3884                         <field reporter:label="Indicator 2" name="ind2" oils_persist:primitive="string"  reporter:datatype="text"/>
3885                         <field reporter:label="Bib Record Entry" name="record" reporter:datatype="link"/>
3886                         <field reporter:label="Subfield" name="subfield" oils_persist:primitive="string"  reporter:datatype="text"/>
3887                         <field reporter:label="Tag" name="tag"  reporter:datatype="text"/>
3888                         <field reporter:label="Normalized Value" name="value"  reporter:datatype="text"/>
3889                 </fields>
3890                 <links>
3891                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3892                 </links>
3893         </class>
3894         <class id="mmr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::metarecord" oils_persist:tablename="metabib.metarecord" reporter:label="Metarecord">
3895                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.metarecord_id_seq">
3896                         <field name="fingerprint"  reporter:datatype="text"/>
3897                         <field name="id" reporter:datatype="id" />
3898                         <field name="master_record" reporter:datatype="link"/>
3899                         <field name="mods"  reporter:datatype="text"/>
3900                         <field name="source_records" oils_persist:virtual="true" reporter:datatype="link"/>
3901                 </fields>
3902                 <links>
3903                         <link field="master_record" reltype="has_a" key="id" map="" class="bre"/>
3904                         <link field="source_records" reltype="has_many" key="metarecord" map="source" class="mmrsm"/>
3905                 </links>
3906         </class>
3907         <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">
3908                 <fields oils_persist:primary="id" oils_persist:sequence="config.net_access_level_id_seq">
3909                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
3910                         <field name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
3911                 </fields>
3912                 <links/>
3913         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3914             <actions>
3915                 <create permission="CREATE_NET_ACCESS_LEVEL" global_required="true"/>
3916                 <retrieve/>
3917                 <update permission="UPDATE_NET_ACCESS_LEVEL" global_required="true"/>
3918                 <delete permission="DELETE_NET_ACCESS_LEVEL" global_required="true"/>
3919             </actions>
3920         </permacrud>
3921         </class>
3922         <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">
3923                 <fields oils_persist:primary="id" oils_persist:sequence="permission.perm_list_id_seq">
3924                         <field name="code"  reporter:datatype="text"/>
3925                         <field name="description"  reporter:datatype="text" oils_persist:i18n="true"/>
3926                         <field name="id" reporter:selector="code" reporter:datatype="id"/>
3927                 </fields>
3928                 <links/>
3929         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3930             <actions>
3931                 <create permission="CREATE_PERM" global_required="true"/>
3932                 <retrieve permission="CREATE_PERM UPDATE_PERM DELETE_PERM" global_required="true"/>
3933                 <update permission="UPDATE_PERM" global_required="true"/>
3934                 <delete permission="DELETE_PERM" global_required="true"/>
3935             </actions>
3936         </permacrud>
3937         </class>
3938         <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">
3939                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.metarecord_source_map_id_seq">
3940                         <field name="id" reporter:datatype="id" />
3941                         <field name="metarecord" reporter:datatype="link"/>
3942                         <field name="source" reporter:datatype="link"/>
3943                 </fields>
3944                 <links>
3945                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3946                         <link field="metarecord" reltype="has_a" key="id" map="" class="mmr"/>
3947                 </links>
3948         </class>
3949         <class id="mde" controller="open-ils.cstore open-ils.pcrud" 
3950                         oils_obj:fieldmapper="metabib::display_entry" 
3951                         oils_persist:tablename="metabib.display_entry" 
3952                         oils_persist:field_safe="true"
3953                         reporter:label="Display Field Entry" oils_persist:readonly="true">
3954                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.display_entry_id_seq">
3955                         <field name="id" reporter:datatype="id" />
3956                         <field name="field" reporter:datatype="link"/>
3957                         <field name="source" reporter:datatype="link"/>
3958                         <field name="value"  reporter:datatype="text"/>
3959                         <field name="highlight" oils_persist:virtual="true"  reporter:datatype="text"/>
3960                 </fields>
3961                 <links>
3962                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3963                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3964                 </links>
3965                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3966                         <actions>
3967                                 <retrieve/>
3968                         </actions>
3969                 </permacrud>
3970         </class>
3971         <class id="mfde" controller="open-ils.cstore open-ils.pcrud" 
3972                 oils_persist:tablename="metabib.flat_display_entry"
3973                 oils_obj:fieldmapper="metabib::flat_display_entry" 
3974                 oils_persist:field_safe="true"
3975                 reporter:label="Flat Display Entry" 
3976                 oils_persist:readonly="true">
3977                 <fields>
3978                         <field name="source" reporter:datatype="id" />
3979                         <field name="name" reporter:datatype="text"/>
3980                         <field name="multi" reporter:datatype="bool"/>
3981                         <field name="label" reporter:datatype="text"/>
3982                         <field name="field" reporter:datatype="link"/>
3983                         <field name="value" reporter:datatype="text"/>
3984                 </fields>
3985                 <links>
3986                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3987                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3988                         <link field="name" reltype="has_a" key="name" map="" class="cdfm"/>
3989                 </links>
3990                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3991                         <actions>
3992                                 <retrieve/>
3993                         </actions>
3994                 </permacrud>
3995         </class>
3996         <class id="mcde" controller="open-ils.cstore open-ils.pcrud" 
3997                 oils_persist:tablename="metabib.compressed_display_entry"
3998                 oils_obj:fieldmapper="metabib::compressed_display_entry" 
3999                 oils_persist:field_safe="true"
4000                 reporter:label="Compressed Display Entry" 
4001                 oils_persist:readonly="true">
4002                 <fields>
4003                         <field name="source" reporter:datatype="id" />
4004                         <field name="name" reporter:datatype="text"/>
4005                         <field name="multi" reporter:datatype="bool"/>
4006                         <field name="label" reporter:datatype="text"/>
4007                         <field name="field" reporter:datatype="link"/>
4008                         <field name="value" reporter:datatype="text"/>
4009                 </fields>
4010                 <links>
4011                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
4012                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
4013                         <link field="name" reltype="has_a" key="name" map="" class="cdfm"/>
4014                 </links>
4015                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4016                         <actions>
4017                                 <retrieve/>
4018                         </actions>
4019                 </permacrud>
4020         </class>
4021         <class id="mwde" controller="open-ils.cstore open-ils.pcrud" 
4022                 oils_persist:tablename="metabib.wide_display_entry"
4023                 oils_obj:fieldmapper="metabib::wide_display_entry" 
4024                 oils_persist:field_safe="true"
4025                 reporter:label="Wide Display Entry" 
4026                 oils_persist:readonly="true">
4027                 <fields oils_persist:primary="source">
4028                         <field name="source" reporter:label="Record ID" reporter:datatype="id" />
4029                         <field name="title" reporter:label="Title" reporter:datatype="text"/>
4030                         <field name="author" reporter:label="Author" reporter:datatype="text"/>
4031                         <field name="creators" reporter:label="Creators" reporter:datatype="text"/>
4032                         <field name="isbn" reporter:label="ISBN" reporter:datatype="text"/>
4033                         <field name="issn" reporter:label="ISSN" reporter:datatype="text"/>
4034                         <field name="upc" reporter:label="UPC" reporter:datatype="text"/>
4035                         <field name="tcn" reporter:label="TCN" reporter:datatype="text"/>
4036                         <field name="edition" reporter:label="Edition" reporter:datatype="text"/>
4037                         <field name="physical_description" reporter:label="Physical Description" reporter:datatype="text"/>
4038                         <field name="publisher" reporter:label="Publisher" reporter:datatype="text"/>
4039                         <field name="series_title" reporter:label="Series Title" reporter:datatype="text"/>
4040                         <field name="subject_geographic" reporter:label="Geographic Subject" reporter:datatype="text"/>
4041                         <field name="subject_name" reporter:label="Name Subject" reporter:datatype="text"/>
4042                         <field name="subject_temporal" reporter:label="Temporal Subject" reporter:datatype="text"/>
4043                         <field name="subject_topic" reporter:label="Topic Subject" reporter:datatype="text"/>
4044                         <field name="abstract" reporter:label="Abstract" reporter:datatype="text"/>
4045                         <field name="toc" reporter:label="Table of Contents" reporter:datatype="text"/>
4046                         <field name="pubdate" reporter:label="Publication Date" reporter:datatype="text"/>
4047                         <field name="type_of_resource" reporter:label="Type of Resource" reporter:datatype="text"/>
4048                 </fields>
4049                 <links>
4050                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
4051                 </links>
4052                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4053                         <actions>
4054                                 <retrieve/>
4055                         </actions>
4056                 </permacrud>
4057         </class>
4058
4059         <class id="cdfm" controller="open-ils.cstore open-ils.pcrud" 
4060                 oils_persist:tablename="config.display_field_map"
4061                 oils_obj:fieldmapper="config::display_field_map"
4062                 oils_persist:field_safe="true"
4063                 reporter:label="Display Field Map">
4064                 <fields oils_persist:primary="name">
4065                         <field name="name" reporter:datatype="text"/>
4066                         <field name="field" reporter:datatype="link"/>
4067                         <field name="multi" reporter:datatype="bool"/>
4068                 </fields>
4069                 <links>
4070                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
4071                 </links>
4072                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4073                         <actions>
4074                                 <retrieve/>
4075                                 <create permission="CREATE_METABIB_FIELD" global_required="true"/>
4076                                 <update permission="UPDATE_METABIB_FIELD" global_required="true"/>
4077                                 <delete permission="DELETE_METABIB_FIELD" global_required="true"/>
4078                         </actions>
4079                 </permacrud>
4080         </class>
4081
4082         <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">
4083                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.facet_entry_id_seq">
4084                         <field name="id" reporter:datatype="id" />
4085                         <field name="field" reporter:datatype="link"/>
4086                         <field name="source" reporter:datatype="link"/>
4087                         <field name="value"  reporter:datatype="text"/>
4088                 </fields>
4089                 <links>
4090                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
4091                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
4092                 </links>
4093         </class>
4094         <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">
4095                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.browse_entry_id_seq">
4096                         <field name="id" reporter:datatype="id" />
4097                         <field name="value" reporter:datatype="text"/>
4098                         <field name="def_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4099                 </fields>
4100                 <links>
4101                         <link field="def_maps" reltype="has_many" key="entry" map="" class="mbedm"/>
4102                 </links>
4103         </class>
4104         <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">
4105                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.browse_entry_def_map_id_seq">
4106                         <field name="id" reporter:datatype="id" />
4107                         <field name="entry" reporter:datatype="link"/>
4108                         <field name="def" reporter:datatype="link"/>
4109                         <field name="source" reporter:datatype="link"/>
4110                 </fields>
4111                 <links>
4112                         <link field="entry" reltype="has_a" key="id" map="" class="mbe"/>
4113                         <link field="def" reltype="has_a" key="id" map="" class="cmf"/>
4114                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
4115                 </links>
4116         </class>
4117         <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">
4118                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.browse_entry_simple_heading_map_id_seq">
4119                         <field name="id" reporter:datatype="id" />
4120                         <field name="entry" reporter:datatype="link"/>
4121                         <field name="simple_heading" reporter:datatype="link"/>
4122                 </fields>
4123                 <links>
4124                         <link field="entry" reltype="has_a" key="id" map="" class="mbe"/>
4125                         <link field="simple_heading" reltype="has_a" key="id" map="" class="ash"/>
4126                 </links>
4127         </class>
4128         <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">
4129                 <oils_persist:source_definition>
4130                         SELECT * FROM metabib.author_field_entry
4131                                                 UNION ALL
4132                         SELECT * FROM metabib.keyword_field_entry
4133                                                 UNION ALL
4134                         SELECT * FROM metabib.identifier_field_entry
4135                                                 UNION ALL
4136                         SELECT * FROM metabib.title_field_entry
4137                                                 UNION ALL
4138                         SELECT * FROM metabib.subject_field_entry
4139                                                 UNION ALL
4140                         SELECT * FROM metabib.series_field_entry
4141                 </oils_persist:source_definition>
4142                 <fields>
4143                         <field name="field" reporter:datatype="link"/>
4144                         <field name="id" reporter:datatype="id" />
4145                         <field name="source" reporter:datatype="link"/>
4146                         <field name="value"  reporter:datatype="text"/>
4147                 </fields>
4148                 <links>
4149                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
4150                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
4151                 </links>
4152         </class>
4153         <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">
4154                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.keyword_field_entry_id_seq">
4155                         <field name="field" reporter:datatype="link"/>
4156                         <field name="id" reporter:datatype="id" />
4157                         <field name="source" reporter:datatype="link"/>
4158                         <field name="value"  reporter:datatype="text"/>
4159                 </fields>
4160                 <links>
4161                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
4162                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
4163                 </links>
4164         </class>
4165         <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">
4166                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
4167                         <field name="accepting_usr" reporter:datatype="link"/>
4168                         <field name="amount" reporter:datatype="money" />
4169                         <field name="amount_collected" reporter:datatype="money" />
4170                         <field name="cash_drawer" reporter:datatype="link"/>
4171                         <field name="id" reporter:datatype="id" />
4172                         <field name="note"  reporter:datatype="text"/>
4173                         <field name="payment_ts" reporter:datatype="timestamp"/>
4174                         <field name="xact" reporter:datatype="link"/>
4175                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
4176                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
4177                 </fields>
4178                 <links>
4179                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
4180                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
4181                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
4182                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
4183                 </links>
4184         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4185             <actions>
4186                 <retrieve permission="VIEW_USER_TRANSACTIONS">
4187                     <context link="xact" jump="usr" field="home_ou"/>
4188                 </retrieve>
4189                         </actions>
4190                 </permacrud>
4191         </class>
4192         <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">
4193                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
4194                         <field name="accepting_usr" reporter:datatype="link"/>
4195                         <field name="amount" reporter:datatype="money" />
4196                         <field name="amount_collected" reporter:datatype="money" />
4197                         <field name="id" reporter:datatype="id" />
4198                         <field name="note"  reporter:datatype="text"/>
4199                         <field name="payment_ts" reporter:datatype="timestamp"/>
4200                         <field name="xact" reporter:datatype="link"/>
4201                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
4202                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
4203                 </fields>
4204                 <links>
4205                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
4206                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
4207                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
4208                 </links>
4209         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4210             <actions>
4211                 <retrieve permission="VIEW_USER_TRANSACTIONS">
4212                     <context link="xact" jump="usr" field="home_ou"/>
4213                 </retrieve>
4214                         </actions>
4215                 </permacrud>
4216         </class>
4217         <class id="maa" controller="open-ils.cstore" oils_obj:fieldmapper="money::account_adjustment" oils_persist:tablename="money.account_adjustment" reporter:label="Account Adjustment">
4218                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
4219                         <field name="accepting_usr" reporter:datatype="link"/>
4220                         <field name="amount" reporter:datatype="money" />
4221                         <field name="amount_collected" reporter:datatype="money" />
4222                         <field name="id" reporter:datatype="id" />
4223                         <field name="note"  reporter:datatype="text"/>
4224                         <field name="payment_ts" reporter:datatype="timestamp"/>
4225                         <field name="xact" reporter:datatype="link"/>
4226                         <field name="billing" reporter:datatype="link"/>
4227                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
4228                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
4229                 </fields>
4230                 <links>
4231                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
4232                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
4233                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
4234                         <link field="billing" reltype="might_have" key="id" class="mb"/>
4235                 </links>
4236         </class>
4237         <class id="mrd" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::record_descriptor" oils_persist:tablename="metabib.rec_descriptor" reporter:label="Basic Record Descriptor">
4238                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.rec_descriptor_id_seq">
4239                         <field reporter:label="Audn" name="audience" oils_persist:primitive="string"  reporter:datatype="text"/>
4240                         <field reporter:label="BLvl" name="bib_level" oils_persist:primitive="string"  reporter:datatype="text"/>
4241                         <field reporter:label="Cat Form" name="cat_form" oils_persist:primitive="string"  reporter:datatype="text"/>
4242                         <field reporter:label="Character Encoding" name="char_encoding" oils_persist:primitive="string"  reporter:datatype="text"/>
4243                         <field reporter:label="Ctrl" name="control_type" oils_persist:primitive="string"  reporter:datatype="text"/>
4244                         <field reporter:label="ELvl" name="enc_level" oils_persist:primitive="string"  reporter:datatype="text"/>
4245                         <field reporter:label="Descriptor ID" name="id" reporter:datatype="id" />
4246                         <field reporter:label="Form" name="item_form" oils_persist:primitive="string"  reporter:datatype="text"/>
4247                         <field reporter:label="Lang" name="item_lang" oils_persist:primitive="string"  reporter:datatype="text"/>
4248                         <field reporter:label="Type" name="item_type" oils_persist:primitive="string"  reporter:datatype="text"/>
4249                         <field reporter:label="LitF" name="lit_form" oils_persist:primitive="string"  reporter:datatype="text"/>
4250                         <field reporter:label="Pub Status" name="pub_status" oils_persist:primitive="string"  reporter:datatype="text"/>
4251                         <field reporter:label="Bib Record Entry" name="record" reporter:datatype="link"/>
4252                         <field reporter:label="TMat" name="type_mat" oils_persist:primitive="string"  reporter:datatype="text"/>
4253                         <field reporter:label="Video Recording Format" name="vr_format" oils_persist:primitive="string"  reporter:datatype="text"/>
4254                         <field reporter:label="Date1" name="date1" oils_persist:primitive="string"  reporter:datatype="text"/>
4255                         <field reporter:label="Date2" name="date2" oils_persist:primitive="string"  reporter:datatype="text"/>
4256                 </fields>
4257                 <links>
4258                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
4259                         <link field="item_lang" reltype="has_a" key="code" map="" class="clm"/>
4260                         <link field="item_type" reltype="has_a" key="code" map="" class="citm"/>
4261                         <link field="bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
4262                         <link field="item_form" reltype="has_a" key="code" map="" class="cifm"/>
4263                         <link field="audience" reltype="has_a" key="code" map="" class="cam"/>
4264                         <link field="lit_form" reltype="has_a" key="code" map="" class="clfm"/>
4265                 </links>
4266         </class>
4267
4268         <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">
4269                 <fields oils_persist:primary="id" oils_persist:sequence="config.standing_penalty_id_seq">
4270                         <field reporter:label="Penalty ID" name="id" reporter:selector="name" reporter:datatype="id"/>
4271                         <field reporter:label="Name" name="name"  reporter:datatype="text"/>
4272                         <field reporter:label="Label" name="label"  reporter:datatype="text" oils_persist:i18n="true"/>
4273                         <field reporter:label="Block List" name="block_list" reporter:datatype="text"/>
4274                         <field reporter:label="Staff Alert" name="staff_alert" reporter:datatype="bool"/>
4275                         <field reporter:label="Org Depth" name="org_depth" reporter:datatype="int"/>
4276                         <field reporter:label="Ignore Proximity" name="ignore_proximity" reporter:datatype="int"/>
4277                 </fields>
4278                 <links/>
4279         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4280             <actions>
4281                 <create permission="ADMIN_STANDING_PENALTY" global_required="true"/>
4282                 <retrieve permission="ADMIN_STANDING_PENALTY VIEW_STANDING_PENALTY" global_required="true"/>
4283                 <update permission="ADMIN_STANDING_PENALTY" global_required="true"/>
4284                 <delete permission="ADMIN_STANDING_PENALTY" global_required="true"/>
4285             </actions>
4286         </permacrud>
4287         </class>
4288         <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">
4289                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_penalty_threshold_id_seq">
4290                         <field name="id" reporter:selector="name" reporter:datatype="id" reporter:label="ID"/>
4291                         <field name="grp"  reporter:datatype="link" reporter:label="Group"/>
4292                         <field name="penalty"  reporter:datatype="link" reporter:label="Penalty"/>
4293                         <field name="threshold" reporter:datatype="float" reporter:label="Threshold"/>
4294                         <field name="org_unit" reporter:datatype="org_unit" reporter:label="Org Unit"/>
4295                 </fields>
4296                 <links>
4297                         <link field="penalty" reltype="has_a" key="id" map="" class="csp"/>
4298                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
4299                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
4300         </links>
4301         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4302             <actions>
4303                 <create permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
4304                 <retrieve permission="VIEW_GROUP_PENALTY_THRESHOLD ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
4305                 <update permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
4306                 <delete permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
4307             </actions>
4308         </permacrud>
4309         </class>
4310         <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">
4311                 <fields oils_persist:primary="id" oils_persist:sequence="config.copy_status_id_seq">
4312                         <field name="holdable" reporter:datatype="bool"/>
4313                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
4314                         <field name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
4315                         <field name="opac_visible" reporter:datatype="bool"/>
4316             <field name="copy_active" reporter:datatype="bool"/>
4317             <field name="restrict_copy_delete" reporter:datatype="bool"/>
4318             <field name="is_available" reporter:datatype="bool"/>
4319                 </fields>
4320                 <links/>
4321         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4322             <actions>
4323                 <create permission="CREATE_COPY_STATUS" global_required="true"/>
4324                 <retrieve/>
4325                 <update permission="UPDATE_COPY_STATUS" global_required="true"/>
4326                 <delete permission="DELETE_COPY_STATUS" global_required="true"/>
4327             </actions>
4328         </permacrud>
4329         </class>
4330         <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">
4331                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_standing_penalty_id_seq">
4332                         <field name="id" reporter:datatype="id" reporter:label="ID" />
4333                         <field name="set_date" reporter:datatype="timestamp" reporter:label="Set Date"/>
4334                         <field name="usr" reporter:datatype="link" reporter:label="User"/>
4335                         <field name="staff" reporter:datatype="link" reporter:label="Staff"/>
4336                         <field name="standing_penalty" reporter:datatype="link" reporter:label="Standing Penalty"/>
4337                         <field name="org_unit" reporter:datatype="link" reporter:label="Org Unit"/>
4338                         <field name="stop_date" reporter:datatype="timestamp" reporter:label="Stop Date"/>
4339                         <field name="note" reporter:datatype="text" reporter:label="Note"/>
4340                 </fields>
4341                 <links>
4342                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4343                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
4344                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
4345                         <link field="standing_penalty" reltype="has_a" key="id" map="" class="csp"/>
4346                 </links>
4347                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4348                         <actions>
4349                                 <create permission="UPDATE_USER"><context link="usr" field="home_ou"/></create>
4350                                 <retrieve permission="VIEW_USER"><context link="usr" field="home_ou"/></retrieve>
4351                                 <update permission="UPDATE_USER"><context link="usr" field="home_ou"/></update>
4352                                 <delete permission="UPDATE_USER"><context link="usr" field="home_ou"/></delete>
4353                         </actions>
4354                 </permacrud>
4355         </class>
4356         <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">
4357                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_address_id_seq">
4358                         <field reporter:label="Type" name="address_type"  reporter:datatype="text"/>
4359                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
4360                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
4361                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
4362                         <field reporter:label="Address ID" name="id" reporter:datatype="id" />
4363                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
4364                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
4365                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
4366                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
4367                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
4368                         <field reporter:label="Valid Address?" name="valid" reporter:datatype="bool"/>
4369                         <field reporter:label="Within City Limits?" name="within_city_limits" reporter:datatype="bool"/>
4370                         <field reporter:label="Replaces" name="replaces" reporter:datatype="link"/>
4371                         <field reporter:label="Pending" name="pending" reporter:datatype="bool"/>
4372                 </fields>
4373                 <links>
4374                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4375                         <link field="replaces" reltype="has_a" key="id" map="" class="aua"/>
4376                 </links>
4377                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4378                         <actions>
4379                                 <create permission="UPDATE_USER"><context link="usr" field="home_ou"/></create>
4380                                 <retrieve permission="VIEW_USER"><context link="usr" field="home_ou"/></retrieve>
4381                                 <update permission="UPDATE_USER"><context link="usr" field="home_ou"/></update>
4382                                 <delete permission="UPDATE_USER"><context link="usr" field="home_ou"/></delete>
4383                         </actions>
4384                 </permacrud>
4385         </class>
4386         <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">
4387                 <fields oils_persist:primary="id" oils_persist:sequence="actor.address_alert_id_seq">
4388                         <field reporter:label="Address Alert ID" name="id" reporter:datatype="id" />
4389                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" oils_obj:required="true"/>
4390                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
4391                         <field reporter:label="Match All Fields" name="match_all" reporter:datatype="bool" />
4392                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text" oils_obj:required="true"/>
4393                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
4394                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
4395                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
4396                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
4397                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
4398                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
4399                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
4400                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="bool"/>
4401                         <field reporter:label="Billing Address" name="billing_address" reporter:datatype="bool"/>
4402                 </fields>
4403                 <links>
4404                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4405                 </links>
4406                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4407                         <actions>
4408                                 <create   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
4409                                 <retrieve context_field='owner' permission="ADMIN_ADDRESS_ALERT VIEW_ADDRESS_ALERT CREATE_USER"/>
4410                                 <update   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
4411                                 <delete   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
4412                         </actions>
4413                 </permacrud>
4414         </class>
4415
4416
4417         <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">
4418                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_saved_search_id_seq">
4419                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4420                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
4421                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
4422                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4423                         <field reporter:label="Query Text" name="query_text" reporter:datatype="text"/>
4424                         <field reporter:label="Query Type" name="query_type" reporter:datatype="text"/>
4425                         <field reporter:label="Target" name="target" reporter:datatype="text"/>
4426                 </fields>
4427                 <links>
4428                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
4429                 </links>
4430         </class>
4431
4432         <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">
4433                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_note_id_seq">
4434                         <field name="call_number" />
4435                         <field name="create_date" reporter:datatype="timestamp"/>
4436                         <field name="creator" reporter:datatype="link"/>
4437                         <field name="id" reporter:datatype="id" />
4438                         <field name="pub" reporter:datatype="bool"/>
4439                         <field name="title"  reporter:datatype="text"/>
4440                         <field name="value"  reporter:datatype="text"/>
4441                 </fields>
4442                 <links>
4443                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
4444                 </links>
4445         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4446             <actions>
4447                 <create permission="CREATE_VOLUME_NOTE">
4448                     <context link="call_number" field="owning_lib"/>
4449                 </create>
4450                 <retrieve permission="VIEW_VOLUME_NOTES">
4451                     <context link="call_number" field="owning_lib"/>
4452                 </retrieve>
4453                 <update permission="UPDATE_VOLUME_NOTE">
4454                     <context link="call_number" field="owning_lib"/>
4455                 </update>
4456                 <delete permission="DELETE_VOLUME_NOTE">
4457                     <context link="call_number" field="owning_lib"/>
4458                 </delete>
4459             </actions>
4460         </permacrud>
4461         </class>
4462         <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">
4463                 <fields oils_persist:primary="id" oils_persist:sequence="authority.record_note_id_seq">
4464                         <field name="create_date" reporter:datatype="timestamp"/>
4465                         <field name="creator" reporter:datatype="link"/>
4466                         <field name="edit_date" reporter:datatype="timestamp"/>
4467                         <field name="editor" reporter:datatype="link"/>
4468                         <field name="id" reporter:datatype="id" />
4469                         <field name="record" reporter:datatype="link"/>
4470                         <field name="value" reporter:datatype="text"/>
4471                 </fields>
4472                 <links>
4473                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
4474                 </links>
4475         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4476             <actions>
4477                 <create permission="CREATE_AUTHORITY_RECORD_NOTE" global_required='true'/>
4478                 <retrieve/>
4479                 <update permission="UPDATE_AUTHORITY_RECORD_NOTE" global_required='true'/>
4480                 <delete permission="DELETE_AUTHORITY_RECORD_NOTE" global_required='true'/>
4481             </actions>
4482         </permacrud>
4483         </class>
4484         <class id="ocirccount" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circ_count" reporter:label="Open Circulation Count" oils_persist:readonly="true">
4485         <oils_persist:source_definition>
4486 SELECT  usr,
4487         SUM(
4488             CASE
4489                 WHEN (
4490                     ((fine_interval >= '1 day' AND due_date >= 'today') OR (fine_interval &lt; '1 day'  AND due_date > 'now'))
4491                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
4492                 ) THEN 1
4493                 ELSE 0
4494             END
4495         ) AS out,
4496
4497         SUM(
4498             CASE
4499                 WHEN (
4500                     ((fine_interval >= '1 day' AND due_date &lt; 'today') OR (fine_interval &lt; '1 day'  AND due_date &lt; 'now'))
4501                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
4502                 ) THEN 1
4503                 ELSE 0
4504             END
4505         ) AS overdue,
4506
4507         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LOST') THEN 1 ELSE 0 END) AS lost,
4508         SUM( CASE WHEN stop_fines = 'CLAIMSRETURNED' THEN 1 ELSE 0 END) AS claims_returned,
4509         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LONGOVERDUE') THEN 1 ELSE 0 END) AS long_overdue
4510   FROM  action.circulation
4511   WHERE checkin_time IS NULL
4512   GROUP BY 1
4513         </oils_persist:source_definition>
4514         <fields oils_persist:primary="usr">
4515             <field reporter:label="User ID" name="usr" reporter:datatype="link"/>
4516             <field reporter:label="Out" name="out" reporter:datatype="text"/>
4517             <field reporter:label="Overdue" name="overdue" reporter:datatype="text"/>
4518             <field reporter:label="Lost" name="lost" reporter:datatype="text"/>
4519             <field reporter:label="Claims Returned" name="claims_returned" reporter:datatype="text"/>
4520             <field reporter:label="Long Overdue" name="long_overdue" reporter:datatype="text"/>
4521         </fields>
4522         <links>
4523             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4524         </links>
4525         </class>
4526         <class id="ocirclist" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circ_list" reporter:label="Open Circulation List" oils_persist:readonly="true">
4527         <oils_persist:source_definition>
4528 SELECT  usr,
4529         STRING_AGG(
4530             CASE
4531                 WHEN (
4532                     ((fine_interval >= '1 day' AND due_date >= 'today') OR (fine_interval &lt; '1 day'  AND due_date > 'now'))
4533                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
4534                 ) THEN id::TEXT
4535                 ELSE '0'
4536             END
4537         ,',') AS out,
4538
4539         STRING_AGG(
4540             CASE
4541                 WHEN (
4542                     ((fine_interval >= '1 day' AND due_date &lt; 'today') OR (fine_interval &lt; '1 day'  AND due_date &lt; 'now'))
4543                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
4544                 ) THEN id::TEXT
4545                 ELSE '0'
4546             END
4547         ,',') AS overdue,
4548
4549         STRING_AGG( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LOST') THEN id::TEXT ELSE '0' END,',') AS lost,
4550         STRING_AGG( CASE WHEN stop_fines = 'CLAIMSRETURNED' THEN id::TEXT ELSE '0' END,',') AS claims_returned,
4551         STRING_AGG( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LONGOVERDUE') THEN id::TEXT ELSE '0' END,',') AS long_overdue
4552   FROM  action.circulation
4553   WHERE checkin_time IS NULL
4554   GROUP BY 1
4555         </oils_persist:source_definition>
4556         <fields oils_persist:primary="usr">
4557             <field reporter:label="User ID" name="usr" reporter:datatype="link"/>
4558             <field reporter:label="Out" name="out" reporter:datatype="text"/>
4559             <field reporter:label="Overdue" name="overdue" reporter:datatype="text"/>
4560             <field reporter:label="Lost" name="lost" reporter:datatype="text"/>
4561             <field reporter:label="Claims Returned" name="claims_returned" reporter:datatype="text"/>
4562             <field reporter:label="Long Overdue" name="long_overdue" reporter:datatype="text"/>
4563         </fields>
4564         <links>
4565             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4566         </links>
4567         </class>
4568         <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">
4569                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
4570                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
4571                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
4572                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
4573                         <field reporter:label="Checkout / Renewal Library" name="circ_lib"  reporter:datatype="org_unit"/>
4574                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
4575                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
4576                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
4577                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
4578                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
4579                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4580                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
4581                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
4582                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
4583                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
4584                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
4585                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
4586                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
4587                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
4588                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
4589                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
4590                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
4591                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
4592                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
4593                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
4594                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
4595                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
4596                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
4597                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
4598                         <field reporter:label="Checkin Scan Date/Time" name="checkin_scan_time" reporter:datatype="timestamp" />
4599                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
4600                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4601                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4602                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
4603                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
4604                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4605                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4606                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
4607                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
4608                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4609                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4610                         <field reporter:label="Auto Renewal" name="auto_renewal" reporter:datatype="bool"/>
4611                         <field reporter:label="Remaining Auto Renewals" name="auto_renewal_remaining" reporter:datatype="int" />
4612                 </fields>
4613                 <links>
4614                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
4615                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
4616                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
4617                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4618                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
4619                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4620                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4621                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
4622                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
4623                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
4624                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
4625                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
4626                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
4627                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4628                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4629                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
4630                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
4631                         <link field="parent_circ" reltype="has_a" key="id" map="" class="circ"/>
4632                         <link field="renewals" reltype="has_many" key="parent_circ" map="" class="circ"/>
4633                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
4634                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
4635                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
4636                 </links>
4637                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4638                         <actions>
4639                                 <retrieve permission="VIEW_CIRCULATIONS" context_field="circ_lib" />
4640                         </actions>
4641                 </permacrud>
4642         </class>
4643         <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">
4644                 <fields>
4645                         <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
4646                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
4647                         <field reporter:label="Circ ID" name="id" reporter:datatype="int" />
4648                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
4649                         <field reporter:label="Create Date/Time" name="create_time" reporter:datatype="timestamp" />
4650                         <field reporter:label="Circulation Type" name="circ_type" reporter:datatype="text"/>
4651                         <field reporter:label="Item Type" name="item_type" reporter:datatype="text"/>
4652                 </fields>
4653                 <links>
4654                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
4655                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4656                 </links>
4657                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4658                         <actions>
4659                                 <retrieve permission="VIEW_CIRCULATIONS" context_field="circ_lib" />
4660                         </actions>
4661                 </permacrud>
4662         </class>
4663         <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">
4664                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
4665                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
4666                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
4667                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
4668                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
4669                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
4670                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
4671                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
4672                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
4673                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
4674                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4675                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
4676                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
4677                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
4678                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
4679                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
4680                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
4681                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
4682                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
4683                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
4684                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
4685                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
4686                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
4687                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
4688                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
4689                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
4690                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
4691                         <field reporter:label="Checkin Scan Time" name="checkin_scan_time" reporter:datatype="timestamp"/>
4692                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
4693                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
4694                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4695                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4696                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
4697                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
4698                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
4699                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4700                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4701                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4702                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4703                         <field reporter:label="Linked Active Circulation" name="active_circ" oils_persist:virtual="true" reporter:datatype="link"/>
4704                         <field reporter:label="Linked Aged Circulation" name="aged_circ" oils_persist:virtual="true" reporter:datatype="link"/>
4705                 </fields>
4706                 <links>
4707                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
4708                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
4709                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
4710                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4711                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
4712                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4713                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
4714                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
4715                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
4716                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
4717                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
4718                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
4719                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4720                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4721                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
4722                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
4723                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
4724                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
4725                         <link field="active_circ" reltype="might_have" key="id" map="" class="circ"/>
4726                         <link field="aged_circ" reltype="might_have" key="id" map="" class="acirc"/>
4727                         <link field="parent_circ" reltype="might_have" key="id" map="" class="acirc"/>
4728                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4729                 </links>
4730                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4731                         <actions>
4732                                 <retrieve permission="VIEW_CIRCULATIONS" context_field="circ_lib" />
4733                         </actions>
4734                 </permacrud>
4735         </class>
4736
4737         <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">
4738                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
4739                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
4740                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
4741                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
4742                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
4743                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
4744                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
4745                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
4746                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
4747                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
4748                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4749                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
4750                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
4751                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
4752                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
4753                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
4754                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
4755                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
4756                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
4757                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
4758                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
4759                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
4760                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
4761                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
4762                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
4763                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
4764                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
4765                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
4766                         <field reporter:label="Checkin Scan Time" name="checkin_scan_time" reporter:datatype="timestamp"/>
4767                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
4768                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
4769                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4770                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4771                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
4772                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
4773                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
4774                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4775                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4776                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
4777                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
4778                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
4779                         <field reporter:label="Call Number" name="copy_call_number" reporter:datatype="link"/>
4780                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
4781                         <field reporter:label="Copy Owning Library" name="copy_owning_lib" reporter:datatype="link"/>
4782                         <field reporter:label="Copy Circulating Library" name="copy_circ_lib" reporter:datatype="link"/>
4783                         <field reporter:label="Bib Record" name="copy_bib_record" reporter:datatype="link"/>
4784                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4785                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4786                         <field reporter:label="Linked Active Circulation" name="active_circ" oils_persist:virtual="true" reporter:datatype="link"/>
4787                         <field reporter:label="Linked Aged Circulation" name="aged_circ" oils_persist:virtual="true" reporter:datatype="link"/>
4788                 </fields>
4789                 <links>
4790                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
4791                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
4792                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
4793                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4794                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
4795                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4796                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
4797                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
4798                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
4799                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
4800                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
4801                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
4802                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4803                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4804                         <link field="copy_call_number" reltype="has_a" key="id" map="" class="acn"/>
4805                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
4806                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4807                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4808                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
4809                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
4810                         <link field="copy_bib_record" reltype="has_a" key="id" map="" class="bre"/>
4811                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
4812                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
4813                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
4814                         <link field="usr_profile" reltype="has_a" key="id" map="" class="pgt"/>
4815                         <link field="active_circ" reltype="might_have" key="id" map="" class="circ"/>
4816                         <link field="aged_circ" reltype="might_have" key="id" map="" class="acirc"/>
4817                         <link field="parent_circ" reltype="might_have" key="id" map="" class="acirc"/>
4818                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4819                 </links>
4820                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4821                         <actions>
4822                                 <retrieve permission="VIEW_CIRCULATIONS" context_field="circ_lib" />
4823                         </actions>
4824                 </permacrud>
4825         </class>
4826         <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">
4827                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
4828                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
4829                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
4830                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
4831                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
4832                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
4833                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
4834                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
4835                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
4836                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
4837                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4838                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
4839                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
4840                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
4841                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
4842                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
4843                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
4844                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
4845                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
4846                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
4847                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
4848                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
4849                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
4850                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
4851                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
4852                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
4853                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
4854                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
4855                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
4856                         <field reporter:label="Checkin Scan Date/Time" name="checkin_scan_time" reporter:datatype="timestamp" />
4857                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
4858                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4859                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4860                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
4861                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
4862                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4863                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4864                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
4865                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
4866                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
4867                         <field reporter:label="Call Number" name="copy_call_number" reporter:datatype="link"/>
4868                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
4869                         <field reporter:label="Copy Owning Library" name="copy_owning_lib" reporter:datatype="link"/>
4870                         <field reporter:label="Copy Circulating Library" name="copy_circ_lib" reporter:datatype="link"/>
4871                         <field reporter:label="Bib Record" name="copy_bib_record" reporter:datatype="link"/>
4872                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4873                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4874                 </fields>
4875                 <links>
4876                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
4877                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
4878                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
4879                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4880                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
4881                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4882                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
4883                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
4884                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
4885                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
4886                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
4887                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
4888                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4889                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4890                         <link field="copy_call_number" reltype="has_a" key="id" map="" class="acn"/>
4891                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
4892                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4893                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4894                         <link field="copy_bib_record" reltype="has_a" key="id" map="" class="bre"/>
4895                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
4896                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
4897                         <link field="parent_circ" reltype="might_have" key="id" map="" class="circ"/>
4898                         <link field="renewals" reltype="has_many" key="parent_circ" map="" class="circ"/>
4899                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
4900                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
4901                 </links>
4902         </class>
4903         <class id="auch" 
4904                 controller="open-ils.cstore" 
4905                 oils_obj:fieldmapper="action::user_circ_history" 
4906                 oils_persist:tablename="action.usr_circ_history" 
4907                 reporter:label="User Checkout History">
4908                 <fields oils_persist:primary="id" oils_persist:sequence="action.usr_circ_history_id_seq">
4909                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4910                         <!-- prevent reporting on the user that owns the checkout history -->
4911                         <field reporter:label="User" name="usr" reporter:datatype="link" suppress_controller="open-ils.reporter-store"/>
4912                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
4913                         <field reporter:label="Checkin Time" name="checkin_time" reporter:datatype="timestamp" />
4914                         <field reporter:label="Due Date" name="due_date" reporter:datatype="timestamp" />
4915                         <field reporter:label="Checkout Time" name="xact_start" reporter:datatype="timestamp" />
4916                         <field reporter:label="Source Circulation" name="source_circ" reporter:datatype="link" />
4917                 </fields>
4918                 <links>
4919                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4920                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4921                         <link field="source_circ" reltype="has_a" key="id" map="" class="circ"/>
4922                 </links>
4923         </class>
4924         <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">
4925                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_type_id_seq">
4926                         <field reporter:label="Resource Type ID" name="id" reporter:datatype="id" reporter:selector="name"/>
4927                         <field reporter:label="Resource Type Name" name="name" reporter:datatype="text"/>
4928                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4929                         <field reporter:label="Fine Amount" name="fine_amount" reporter:datatype="money"/>
4930                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money"/>
4931                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
4932                         <field reporter:label="Catalog Item" name="catalog_item" reporter:datatype="bool"/>
4933                         <field reporter:label="Bibliographic Record" name="record" reporter:datatype="link"/>
4934                         <field reporter:label="Transferable" name="transferable" reporter:datatype="bool"/>
4935                         <field reporter:label="Inter-booking and Inter-circulation Interval" name="elbow_room" reporter:datatype="interval"/>
4936                         <field reporter:label="Resources" name="resources" oils_persist:virtual="true" reporter:datatype="link"/>
4937                         <field reporter:label="Resource Attributes" name="resource_attrs" oils_persist:virtual="true" reporter:datatype="link"/>
4938                         <field reporter:label="Target Resource Types" name="tgt_rsrc_types" oils_persist:virtual="true" reporter:datatype="link"/>
4939                 </fields>
4940                 <links>
4941                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4942                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
4943                         <link field="resources" reltype="has_many" key="type" map="" class="brsrc"/>
4944                         <link field="resource_attrs" reltype="has_many" key="type" map="" class="bra"/>
4945                         <link field="tgt_rsrc_types" reltype="has_many" key="type" map="" class="bresv"/>
4946                 </links>
4947                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4948                         <actions>
4949                                 <create permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
4950                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
4951                                 <update permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
4952                                 <delete permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
4953                         </actions>
4954                 </permacrud>
4955         </class>
4956
4957         <class id="brsrc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::resource" oils_persist:tablename="booking.resource" reporter:label="Resource">
4958                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_id_seq">
4959                         <field reporter:label="Resource ID" name="id" reporter:datatype="id" reporter:selector="barcode" />
4960                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
4961                         <field reporter:label="Resource Type" name="type" reporter:datatype="link"/>
4962                         <field reporter:label="Overbook" name="overbook" reporter:datatype="bool"/>
4963                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
4964                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
4965                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
4966                         <field reporter:label="User Fee" name="user_fee" reporter:datatype="money"/>
4967                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4968                         <field reporter:label="Reservation Target Resources" name="tgt_rsrcs" oils_persist:virtual="true" reporter:datatype="link"/>
4969                         <field reporter:label="Reservation Current Resources" name="curr_rsrcs" oils_persist:virtual="true" reporter:datatype="link"/>
4970                         <field reporter:label="Catalog Item" name="catalog_item" oils_persist:virtual="true" reporter:datatype="link"/>
4971                 </fields>
4972                 <links>
4973                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4974                         <link field="type" reltype="has_a" key="id" map="" class="brt"/>
4975                         <link field="attr_maps" reltype="has_many" key="resource" map="" class="bram"/>
4976                         <link field="tgt_rsrcs" reltype="has_many" key="targeted_resource" map="" class="bresv"/>
4977                         <link field="curr_rsrcs" reltype="has_many" key="current_resource" map="" class="bresv"/>
4978                 </links>
4979                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4980                         <actions>
4981                                 <create permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
4982                                 <retrieve permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
4983                                 <update permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
4984                                 <delete permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
4985                         </actions>
4986                 </permacrud>
4987         </class>
4988         
4989         <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">
4990                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_id_seq">
4991                         <field reporter:label="Resource Attribute ID" name="id" reporter:datatype="id" reporter:selector="name" />
4992                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
4993                         <field reporter:label="Resource Attribute Name" name="name" reporter:datatype="text"/>
4994                         <field reporter:label="Resource Type" name="resource_type" reporter:datatype="link"/>
4995                         <field reporter:label="Is Required" name="required" reporter:datatype="bool"/>
4996                         <field reporter:label="Valid Values" name="valid_values" oils_persist:virtual="true" reporter:datatype="link"/>
4997                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4998                 </fields>
4999                 <links>
5000                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5001                         <link field="resource_type" reltype="has_a" key="id" map="" class="brt"/>
5002                         <link field="valid_values" reltype="has_many" key="attr" map="" class="brav"/>
5003                         <link field="attr_maps" reltype="has_many" key="attr" map="" class="bram"/>
5004                 </links>
5005                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5006                         <actions>
5007                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
5008                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
5009                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
5010                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
5011                         </actions>
5012                 </permacrud>
5013         </class>
5014         
5015         <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">
5016                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_value_id_seq">
5017                         <field reporter:label="Resource Attribute Value ID" name="id" reporter:datatype="id" reporter:selector="valid_value" />
5018                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
5019                         <field reporter:label="Resource Attribute" name="attr" reporter:datatype="link"/>
5020                         <field reporter:label="Valid Value" name="valid_value" reporter:datatype="text"/>
5021                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
5022                         <field reporter:label="Resource Attribute Value Maps" name="attr_val_maps" oils_persist:virtual="true" reporter:datatype="link"/>
5023                 </fields>
5024                 <links>
5025                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5026                         <link field="attr" reltype="has_a" key="id" map="" class="bra"/>
5027                         <link field="attr_maps" reltype="has_many" key="id" map="" class="bram"/>
5028                         <link field="attr_val_maps" reltype="has_many" key="attr_value" map="" class="bravm"/>
5029                 </links>
5030                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5031                         <actions>
5032                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
5033                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
5034                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
5035                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
5036                         </actions>
5037                 </permacrud>
5038         </class>
5039         
5040         <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">
5041                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_map_id_seq">
5042                         <field reporter:label="Resource Attribute Map ID" name="id" reporter:datatype="id"/>
5043                         <field reporter:label="Resource" name="resource" reporter:datatype="link"/>
5044                         <field reporter:label="Resource Attribute" name="resource_attr" reporter:datatype="link"/>
5045                         <field reporter:label="Attribute Value" name="value" reporter:datatype="link"/>
5046                 </fields>
5047                 <links>
5048                         <link field="resource" reltype="has_a" key="id" map="" class="brsrc"/>
5049                         <link field="resource_attr" reltype="has_a" key="id" map="" class="bra"/>
5050                         <link field="value" reltype="has_a" key="id" map="" class="brav"/>
5051                 </links>
5052                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5053                         <actions>
5054                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
5055                     <context link="resource" field="owner" />
5056                 </create>
5057                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
5058                     <context link="resource" field="owner" />
5059                 </retrieve>
5060                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
5061                     <context link="resource" field="owner" />
5062                 </update>
5063                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
5064                     <context link="resource" field="owner" />
5065                 </delete>
5066                         </actions>
5067                 </permacrud>
5068         </class>
5069         
5070         <class id="bresv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::reservation" oils_persist:tablename="booking.reservation" reporter:label="Reservation">
5071                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
5072                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
5073                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
5074                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
5075                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
5076                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
5077                         <field reporter:label="Billing Line Items" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
5078                         <field reporter:label="Payment Line Items" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
5079                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
5080                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
5081                         <field reporter:label="Payment Summary" name="summary" oils_persist:virtual="true" reporter:datatype="link"/>
5082                         <field reporter:label="Request Time" name="request_time" reporter:datatype="timestamp"/>
5083                         <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
5084                         <field reporter:label="End Time" name="end_time" reporter:datatype="timestamp"/>
5085                         <field reporter:label="Capture Time" name="capture_time" reporter:datatype="timestamp"/>
5086                         <field reporter:label="Cancel Time" name="cancel_time" reporter:datatype="timestamp"/>
5087                         <field reporter:label="Pickup Time" name="pickup_time" reporter:datatype="timestamp"/>
5088                         <field reporter:label="Return Time" name="return_time" reporter:datatype="timestamp"/>
5089                         <field reporter:label="Booking Interval" name="booking_interval" reporter:datatype="interval"/>
5090                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
5091                         <field reporter:label="Fine Amount" name="fine_amount" reporter:datatype="money"/>
5092                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money"/>
5093                         <field reporter:label="Target Resource Type" name="target_resource_type" reporter:datatype="link"/>
5094                         <field reporter:label="Target Resource" name="target_resource" reporter:datatype="link"/>
5095                         <field reporter:label="Current Resource" name="current_resource" reporter:datatype="link"/>
5096                         <field reporter:label="Request Library" name="request_lib" reporter:datatype="link"/>
5097                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link"/>
5098                         <field reporter:label="Capture Staff" name="capture_staff" reporter:datatype="link"/>
5099                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
5100                         <field reporter:label="Attribute Value Maps" name="attr_val_maps" oils_persist:virtual="true" reporter:datatype="link"/>
5101                 </fields>
5102                 <links>
5103                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5104                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
5105                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
5106                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
5107                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
5108                         <link field="summary" reltype="might_have" key="id" map="" class="mbts"/>
5109                         <link field="target_resource_type" reltype="has_a" key="id" map="" class="brt"/>
5110                         <link field="target_resource" reltype="has_a" key="id" map="" class="brsrc"/>
5111                         <link field="current_resource" reltype="has_a" key="id" map="" class="brsrc"/>
5112                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
5113                         <link field="pickup_lib" reltype="might_have" key="id" map="" class="aou"/>
5114                         <link field="capture_staff" reltype="might_have" key="id" map="" class="au"/>
5115                         <link field="attr_val_maps" reltype="has_many" key="reservation" map="" class="bravm"/>
5116                 </links>
5117                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5118                         <actions>
5119                                 <create permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
5120                                 <retrieve permission="STAFF_LOGIN" global_required='true'/>
5121                                 <update permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
5122                                 <delete permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
5123                         </actions>
5124                 </permacrud>
5125         </class>
5126         
5127         <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">
5128                 <fields oils_persist:primary="id" oils_persist:sequence="booking.reservation_attr_value_map_id_seq">
5129                         <field reporter:label="Reservation Attribute Value Map" name="id" reporter:datatype="id"/>
5130                         <field reporter:label="Reservation" name="reservation" reporter:datatype="link"/>
5131                         <field reporter:label="Attribute Map" name="attr_value" reporter:datatype="link"/>
5132                 </fields>
5133                 <links>
5134                         <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
5135                         <link field="attr_value" reltype="has_a" key="id" map="" class="brav"/>
5136                 </links>
5137                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5138                         <actions>
5139                                 <create permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
5140                                 <retrieve permission="STAFF_LOGIN" global_required='true'/>
5141                                 <update permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
5142                                 <delete permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
5143                         </actions>
5144                 </permacrud>
5145         </class>
5146
5147         <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">
5148                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_item_id_seq">
5149                         <field name="bucket" reporter:datatype="link"/>
5150                         <field name="id" reporter:datatype="id" />
5151                         <field name="target_call_number" reporter:datatype="link" />
5152                         <field name="create_time" reporter:datatype="timestamp" />
5153                         <field name="pos" reporter:datatype="int" />
5154                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
5155                 </fields>
5156                 <links>
5157                         <link field="target_call_number" reltype="has_a" key="id" map="" class="acn"/>
5158                         <link field="bucket" reltype="has_a" key="id" map="" class="ccnb"/>
5159             <link field="notes" reltype="has_many" map="" key="item" class="ccnbin"/>
5160                 </links>
5161                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5162                         <actions>
5163                                 <retrieve permission="ADMIN_CALLNUMBER_BUCKET">
5164                     <context link="bucket" owning_lib="owning_lib"/>
5165                 </retrieve>
5166             </actions>
5167         </permacrud>
5168         </class>
5169         <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">
5170                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_item_note_id_seq">
5171                         <field name="id" reporter:datatype="id" />
5172                         <field name="item" reporter:datatype="link"/>
5173                         <field name="note" reporter:datatype="text" />
5174                 </fields>
5175                 <links>
5176                         <link field="item" reltype="has_a" key="id" map="" class="ccnbi"/>
5177                 </links>
5178         </class>
5179         <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">
5180                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_id_seq">
5181                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
5182                         <field name="btype" reporter:datatype="text"/>
5183                         <field name="id" reporter:datatype="id" />
5184                         <field name="name" reporter:datatype="text"/>
5185                         <field name="description" reporter:datatype="text"/>
5186                         <field name="owner" reporter:datatype="link"/>
5187                         <field name="pub" reporter:datatype="bool"/>
5188                         <field name="create_time" reporter:datatype="timestamp" />
5189                         <field name="owning_lib" reporter:datatype="org_unit" />
5190                 </fields>
5191                 <links>
5192                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5193                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
5194                         <link field="items" reltype="has_many" key="bucket" map="" class="cbrebi"/>
5195                 </links>
5196                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5197                         <actions>
5198                                 <create permission="CREATE_BIB_BUCKET ADMIN_BIB_BUCKET" context="owning_lib" owning_user="owner"/>
5199                                 <retrieve permission="CREATE_BIB_BUCKET ADMIN_BIB_BUCKET" context="owning_lib" owning_user="owner"/>
5200                                 <update permission="CREATE_BIB_BUCKET ADMIN_BIB_BUCKET" context="owning_lib" owning_user="owner"/>
5201                                 <delete permission="CREATE_BIB_BUCKET ADMIN_BIB_BUCKET" context="owning_lib" owning_user="owner"/>
5202                         </actions>
5203                 </permacrud>
5204         </class>
5205         <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">
5206                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_note_id_seq">
5207                         <field name="id" reporter:datatype="id" />
5208                         <field name="bucket" reporter:datatype="link"/>
5209                         <field name="note" reporter:datatype="text" />
5210                 </fields>
5211                 <links>
5212                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
5213                 </links>
5214         </class>
5215         <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">
5216                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_copy_map_id_seq">
5217                         <field name="hold" reporter:datatype="link"/>
5218                         <field name="id" reporter:datatype="id" />
5219                         <field name="target_copy" reporter:datatype="link"/>
5220                         <field name="proximity" reporter:datatype="number"/>
5221                 </fields>
5222                 <links>
5223                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
5224                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
5225                 </links>
5226         </class>
5227         <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">
5228                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_notification_id_seq">
5229                         <field reporter:label="Hold" name="hold" reporter:datatype="link"/>
5230                         <field reporter:label="Notification ID" name="id" reporter:datatype="id" />
5231                         <field reporter:label="Notification Method" name="method"  reporter:datatype="text"/>
5232                         <field reporter:label="Notification Note" name="note"  reporter:datatype="text"/>
5233                         <field reporter:label="Notifying Staff" name="notify_staff" reporter:datatype="link"/>
5234                         <field reporter:label="Notification Date/Time" name="notify_time" reporter:datatype="timestamp"/>
5235                 </fields>
5236                 <links>
5237                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
5238                         <link field="notify_staff" reltype="has_a" key="id" map="" class="au"/>
5239                 </links>
5240         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5241             <actions>
5242                 <create permission="CREATE_HOLD_NOTIFICATION">
5243                                         <context link="hold" jump="usr" field="home_ou" />
5244                                 </create>
5245                 <retrieve permission="VIEW_HOLD_NOTIFICATION">
5246                                         <context link="hold" jump="usr" field="home_ou" />
5247                                 </retrieve>
5248                 <update permission="CREATE_HOLD_NOTIFICATION">
5249                                         <context link="hold" jump="usr" field="home_ou" />
5250                                 </update>
5251                 <delete permission="CREATE_HOLD_NOTIFICATION">
5252                                         <context link="hold" jump="usr" field="home_ou" />
5253                                 </delete>
5254             </actions>
5255         </permacrud>
5256         </class>
5257         <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">
5258                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_id_seq">
5259                         <field reporter:label="Can Circulate?" name="circulate"  reporter:datatype="bool"/>
5260                         <field reporter:label="Is Holdable?" name="holdable" reporter:datatype="bool"/>
5261                         <field reporter:label="Hold Capture Requires Verification" name="hold_verify" reporter:datatype="bool"/>
5262                         <field reporter:label="Location ID" name="id" reporter:selector="name" reporter:datatype="id"/>
5263                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
5264                         <field reporter:label="Is OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
5265                         <field reporter:label="Owning Org Unit" name="owning_lib"  reporter:datatype="org_unit"/>
5266                         <field reporter:label="Copy Location Orders" name="orders" oils_persist:virtual="true" reporter:datatype="link"/>
5267                         <field reporter:label="Copies" name="copies" oils_persist:virtual="true" reporter:datatype="link"/>
5268                         <field reporter:label="Label Prefix" name="label_prefix"  reporter:datatype="text" oils_persist:i18n="true"/>
5269                         <field reporter:label="Label Suffix" name="label_suffix"  reporter:datatype="text" oils_persist:i18n="true"/>
5270                         <field reporter:label="Checkin Alert" name="checkin_alert" reporter:datatype="bool" />
5271                         <field reporter:label="Is Deleted?" name="deleted" reporter:datatype="bool" />
5272                         <field reporter:label="URL" name="url" reporter:datatype="text" />
5273                 </fields>
5274                 <links>
5275                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5276                         <link field="distribution_formula_entries" reltype="has_many" key="location" map="" class="acqdfe"/>
5277                         <link field="orders" reltype="has_many" key="location" map="" class="acplo"/>
5278                         <link field="copies" reltype="has_many" key="location" map="" class="acp"/>
5279                 </links>
5280         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5281             <actions>
5282                 <create permission="CREATE_COPY_LOCATION" context_field="owning_lib"/>
5283                 <retrieve/>
5284                 <update permission="UPDATE_COPY_LOCATION" context_field="owning_lib"/>
5285                 <delete permission="DELETE_COPY_LOCATION" context_field="owning_lib"/>
5286             </actions>
5287         </permacrud>
5288         </class>
5289         <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">
5290                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_group_id_seq">
5291                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
5292                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
5293                         <field reporter:label="Is OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
5294                         <field reporter:label="Owning Org Unit" name="owner"  reporter:datatype="org_unit"/>
5295             <field reporter:label="Position" name="pos" reporter:datatype="int"/>
5296             <field reporter:label="Display Above Orgs" name="top" reporter:datatype="bool"/>
5297             <field reporter:label="Copy Location Mappings" name="location_maps" oils_persist:virtual="true" reporter:datatype="link"/>
5298                 </fields>
5299                 <links>
5300                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5301                         <link field="location_maps" reltype="has_many" key="lgroup" map="" class="acplgm"/>
5302                 </links>
5303         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5304             <actions>
5305                 <create permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
5306                 <retrieve/>
5307                 <update permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
5308                 <delete permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
5309             </actions>
5310         </permacrud>
5311         </class>
5312         <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">
5313                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_group_map_id_seq">
5314                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
5315             <field reporter:label="Group" name="lgroup" reporter:datatype="link"/>
5316             <field reporter:label="Copy Location" name="location" reporter:datatype="link"/>
5317                 </fields>
5318                 <links>
5319                         <link field="lgroup" reltype="has_a" key="id" map="" class="acplg"/>
5320                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
5321                 </links>
5322         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5323             <actions>
5324                 <create permission="ADMIN_COPY_LOCATION_GROUP">
5325                                         <context link="lgroup" field="owner" />
5326                 </create>
5327                 <retrieve/>
5328                 <update permission="ADMIN_COPY_LOCATION_GROUP">
5329                                         <context link="lgroup" field="owner" />
5330                 </update>
5331                 <delete permission="ADMIN_COPY_LOCATION_GROUP">
5332                                         <context link="lgroup" field="owner" />
5333                 </delete>
5334             </actions>
5335         </permacrud>
5336         </class>
5337
5338     <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">
5339         <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_order_id_seq">
5340             <field reporter:label="Location Order ID" name="id" reporter:datatype="id"/>
5341             <field reporter:label="Location ID" name="location" reporter:datatype="link"/>
5342             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit"/>
5343             <field reporter:label="Position" name="position" reporter:datatype="int"/>
5344         </fields>
5345         <links>
5346             <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
5347             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
5348         </links>
5349         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5350             <actions>
5351                                 <create permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
5352                 <retrieve/>
5353                                 <update permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
5354                                 <delete permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
5355             </actions>
5356         </permacrud>
5357     </class>
5358
5359         <class id="svr" controller="open-ils.cstore" oils_obj:fieldmapper="serial::virtual_record" oils_persist:virtual="true" reporter:label="Serial Virtual Record">
5360                 <fields>
5361                         <field name="sre_id" oils_persist:virtual="true" />
5362                         <field name="location" oils_persist:virtual="true" />
5363                         <field name="owning_lib" oils_persist:virtual="true" />
5364                         <field name="basic_holdings" oils_persist:virtual="true" />
5365                         <field name="basic_holdings_add" oils_persist:virtual="true" />
5366                         <field name="supplement_holdings" oils_persist:virtual="true" />
5367                         <field name="supplement_holdings_add" oils_persist:virtual="true" />
5368                         <field name="index_holdings" oils_persist:virtual="true" />
5369                         <field name="index_holdings_add" oils_persist:virtual="true" />
5370                         <field name="online" oils_persist:virtual="true" />
5371                         <field name="missing" oils_persist:virtual="true" />
5372                         <field name="incomplete" oils_persist:virtual="true" />
5373                 </fields>
5374         </class>
5375
5376         <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">
5377                 <fields oils_persist:primary="id" oils_persist:sequence="serial.record_entry_id_seq">
5378                         <field reporter:label="Is Active" name="active" reporter:datatype="bool"/>
5379                         <field reporter:label="Bib Record" name="record" reporter:datatype="link"/>
5380                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5381                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5382                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
5383                         <field reporter:label="Edit date" name="edit_date" reporter:datatype="timestamp"/>
5384                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
5385                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5386                         <field reporter:label="Last Transaction ID" name="last_xact_id" reporter:datatype="text"/>
5387                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
5388                         <field reporter:label="Source" name="source" reporter:datatype="int"/>
5389                         <field reporter:label="Owning Org Unit" name="owning_lib" reporter:datatype="org_unit"/>
5390                 </fields>
5391                 <links>
5392                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
5393                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5394                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5395                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5396                 </links>
5397                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5398                         <actions>
5399                                 <create permission="CREATE_MFHD_RECORD" context_field="owning_lib"/>
5400                                 <retrieve/>
5401                                 <update permission="UPDATE_MFHD_RECORD" context_field="owning_lib"/>
5402                                 <delete permission="DELETE_MFHD_RECORD" context_field="owning_lib"/>
5403                         </actions>
5404                 </permacrud>
5405         </class>
5406
5407         <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">
5408                 <fields oils_persist:primary="id" oils_persist:sequence="serial.caption_and_pattern_id_seq">
5409                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5410                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
5411                         <field reporter:label="Type" name="type" reporter:datatype="text"/>
5412                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5413                         <field reporter:label="Start Date" name="start_date" reporter:datatype="timestamp"/>
5414                         <field reporter:label="End Date" name="end_date" reporter:datatype="timestamp"/>
5415                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
5416                         <field reporter:label="Pattern Code" name="pattern_code" reporter:datatype="text"/>
5417                         <field reporter:label="Enum 1" name="enum_1" reporter:datatype="text"/>
5418                         <field reporter:label="Enum 2" name="enum_2" reporter:datatype="text"/>
5419                         <field reporter:label="Enum 3" name="enum_3" reporter:datatype="text"/>
5420                         <field reporter:label="Enum 4" name="enum_4" reporter:datatype="text"/>
5421                         <field reporter:label="Enum 5" name="enum_5" reporter:datatype="text"/>
5422                         <field reporter:label="Enum 6" name="enum_6" reporter:datatype="text"/>
5423                         <field reporter:label="Chron 1" name="chron_1" reporter:datatype="text"/>
5424                         <field reporter:label="Chron 2" name="chron_2" reporter:datatype="text"/>
5425                         <field reporter:label="Chron 3" name="chron_3" reporter:datatype="text"/>
5426                         <field reporter:label="Chron 4" name="chron_4" reporter:datatype="text"/>
5427                         <field reporter:label="Chron 5" name="chron_5" reporter:datatype="text"/>
5428                 </fields>
5429                 <links>
5430                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
5431                 </links>
5432                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5433                         <actions>
5434                                 <create permission="ADMIN_SERIAL_CAPTION_PATTERN">
5435                                         <context link="subscription" field="owning_lib" />
5436                                 </create>
5437                                 <retrieve />
5438                                 <update permission="ADMIN_SERIAL_CAPTION_PATTERN">
5439                                         <context link="subscription" field="owning_lib" />
5440                                 </update>
5441                                 <delete permission="ADMIN_SERIAL_CAPTION_PATTERN">
5442                                         <context link="subscription" field="owning_lib" />
5443                                 </delete>
5444                         </actions>
5445                 </permacrud>
5446         </class>
5447
5448         <class id="ssub" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::subscription" oils_persist:tablename="serial.subscription" reporter:label="Subscription">
5449                 <fields oils_persist:primary="id" oils_persist:sequence="serial.subscription_id_seq">
5450                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5451                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
5452                         <field reporter:label="Start Date" name="start_date" reporter:datatype="timestamp"/>
5453                         <field reporter:label="End Date" name="end_date" reporter:datatype="timestamp"/>
5454                         <field reporter:label="Bibliographic Record Entry" name="record_entry" reporter:datatype="link"/>
5455                         <field reporter:label="Expected Date Offset" name="expected_date_offset" reporter:datatype="interval"/>
5456                         <field reporter:label="Distributions" name="distributions" oils_persist:virtual="true" reporter:datatype="link"/>
5457                         <field reporter:label="Issuances" name="issuances" oils_persist:virtual="true" reporter:datatype="link"/>
5458                         <field reporter:label="Captions and Patterns" name="scaps" oils_persist:virtual="true" reporter:datatype="link"/>
5459                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
5460                 </fields>
5461                 <links>
5462                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5463                         <link field="record_entry" reltype="has_a" key="id" map="" class="bre"/>
5464                         <link field="distributions" reltype="has_many" key="subscription" map="" class="sdist"/>
5465                         <link field="issuances" reltype="has_many" key="subscription" map="" class="siss"/>
5466                         <link field="scaps" reltype="has_many" key="subscription" map="" class="scap"/>
5467                         <link field="notes" reltype="has_many" key="subscription" map="" class="ssubn"/>
5468                 </links>
5469                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5470                         <actions>
5471                                 <create permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
5472                                 <retrieve />
5473                                 <update permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
5474                                 <delete permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
5475                         </actions>
5476                 </permacrud>
5477         </class>
5478
5479         <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">
5480                 <fields oils_persist:primary="id" oils_persist:sequence="serial.subscription_note_id_seq">
5481                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5482                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
5483                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5484                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5485                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
5486                         <field reporter:label="Alert?" name="alert" reporter:datatype="bool"/>
5487                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
5488                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
5489                 </fields>
5490                 <links>
5491                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
5492                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5493                 </links>
5494                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5495                         <actions>
5496                                 <create permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib">
5497                     <context link="subscription" field="owning_lib"/>
5498                 </create>
5499                                 <retrieve />
5500                                 <update permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib">
5501                     <context link="subscription" field="owning_lib"/>
5502                 </update>
5503                                 <delete permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib">
5504                     <context link="subscription" field="owning_lib"/>
5505                 </delete>
5506                         </actions>
5507                 </permacrud>
5508         </class>
5509
5510         <class id="sdist" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::distribution" oils_persist:tablename="serial.distribution" reporter:label="Distribution">
5511                 <fields oils_persist:primary="id" oils_persist:sequence="serial.distribution_id_seq">
5512                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5513                         <field reporter:label="Legacy Record Entry" name="record_entry" reporter:datatype="link"/>
5514                         <field reporter:label="Summary Method" name="summary_method" reporter:datatype="text"/>
5515                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
5516                         <field reporter:label="Holding Lib" name="holding_lib" reporter:datatype="org_unit"/>
5517                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
5518                         <field reporter:label="Receive Call Number" name="receive_call_number" reporter:datatype="link"/>
5519                         <field reporter:label="Receive Unit Template" name="receive_unit_template" reporter:datatype="link"/>
5520                         <field reporter:label="Bind Call Number" name="bind_call_number" reporter:datatype="link"/>
5521                         <field reporter:label="Bind Unit Template" name="bind_unit_template" reporter:datatype="link"/>
5522                         <field reporter:label="Unit Label Prefix" name="unit_label_prefix" reporter:datatype="text"/>
5523                         <field reporter:label="Unit Label Suffix" name="unit_label_suffix" reporter:datatype="text"/>
5524                         <field reporter:label="Display Grouping" name="display_grouping" reporter:datatype="text"/>
5525                         <field reporter:label="Streams" name="streams" oils_persist:virtual="true" reporter:datatype="link"/>
5526                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
5527                         <field reporter:label="Basic Issue Summary" name="basic_summary" oils_persist:virtual="true" reporter:datatype="link"/>
5528                         <field reporter:label="Supplemental Issue Summary" name="supplement_summary" oils_persist:virtual="true" reporter:datatype="link"/>
5529                         <field reporter:label="Index Issue Summary" name="index_summary" oils_persist:virtual="true" reporter:datatype="link"/>
5530                 </fields>
5531                 <links>
5532                         <link field="record_entry" reltype="has_a" key="id" map="" class="sre"/>
5533                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
5534                         <link field="holding_lib" reltype="has_a" key="id" map="" class="aou"/>
5535                         <link field="receive_call_number" reltype="has_a" key="id" map="" class="acn"/>
5536                         <link field="receive_unit_template" reltype="has_a" key="id" map="" class="act"/>
5537                         <link field="bind_call_number" reltype="has_a" key="id" map="" class="acn"/>
5538                         <link field="bind_unit_template" reltype="has_a" key="id" map="" class="act"/>
5539                         <link field="streams" reltype="has_many" key="distribution" map="" class="sstr"/>
5540                         <link field="notes" reltype="has_many" key="distribution" map="" class="sdistn"/>
5541                         <link field="basic_summary" reltype="might_have" key="distribution" map="" class="sbsum"/>
5542                         <link field="supplement_summary" reltype="might_have" key="distribution" map="" class="sssum"/>
5543                         <link field="index_summary" reltype="might_have" key="distribution" map="" class="sisum"/>
5544                 </links>
5545                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5546                         <actions>
5547                                 <create permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
5548                                 <retrieve />
5549                                 <update permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
5550                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
5551                         </actions>
5552                 </permacrud>
5553         </class>
5554
5555         <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">
5556                 <fields oils_persist:primary="id" oils_persist:sequence="serial.distribution_note_id_seq">
5557                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5558                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
5559                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5560                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5561                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
5562                         <field reporter:label="Alert?" name="alert" reporter:datatype="bool"/>
5563                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
5564                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
5565                 </fields>
5566                 <links>
5567                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
5568                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5569                 </links>
5570                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5571                         <actions>
5572                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
5573                                         <context link="distribution" field="holding_lib" />
5574                                 </create>
5575                                 <retrieve permission="ADMIN_SERIAL_DISTRIBUTION">
5576                                         <context link="distribution" field="holding_lib" />
5577                                 </retrieve>
5578                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
5579                                         <context link="distribution" field="holding_lib" />
5580                                 </update>
5581                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
5582                                         <context link="distribution" field="holding_lib" />
5583                                 </delete>
5584                         </actions>
5585                 </permacrud>
5586         </class>
5587
5588         <class id="sstr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::stream" oils_persist:tablename="serial.stream" reporter:label="Stream">
5589                 <fields oils_persist:primary="id" oils_persist:sequence="serial.stream_id_seq">
5590                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5591                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
5592                         <field reporter:label="Routing Label" name="routing_label" reporter:datatype="text"/>
5593                         <field reporter:label="Items" name="items" oils_persist:virtual="true" reporter:datatype="link" />
5594                         <field reporter:label="Routing List Users" name="routing_list_users" oils_persist:virtual="true" reporter:datatype="link"/>
5595                 </fields>
5596                 <links>
5597                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
5598                         <link field="items" reltype="has_many" key="stream" map="" class="sitem"/>
5599                         <link field="routing_list_users" reltype="has_many" key="stream" map="" class="srlu"/>
5600                 </links>
5601                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5602                         <actions>
5603                                 <create permission="ADMIN_SERIAL_STREAM">
5604                                         <context link="distribution" field="holding_lib" />
5605                                 </create>
5606                                 <retrieve />
5607                                 <update permission="ADMIN_SERIAL_STREAM">
5608                                         <context link="distribution" field="holding_lib" />
5609                                 </update>
5610                                 <delete permission="ADMIN_SERIAL_STREAM">
5611                                         <context link="distribution" field="holding_lib" />
5612                                 </delete>
5613                         </actions>
5614                 </permacrud>
5615         </class>
5616
5617         <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">
5618                 <fields oils_persist:primary="id" oils_persist:sequence="serial.routing_list_user_id_seq">
5619                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5620                         <field reporter:label="Stream" name="stream" reporter:datatype="link"/>
5621                         <field reporter:label="Position" name="pos" reporter:datatype="int"/>
5622                         <field reporter:label="Reader" name="reader" reporter:datatype="link"/>
5623                         <field reporter:label="Department" name="department" reporter:datatype="text"/>
5624                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5625                 </fields>
5626                 <links>
5627                         <link field="stream" reltype="has_a" key="id" map="" class="sstr"/>
5628                         <link field="reader" reltype="has_a" key="id" map="" class="au"/>
5629                 </links>
5630                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5631                         <actions>
5632                                 <create permission="ADMIN_SERIAL_STREAM">
5633                                         <context link="stream" jump="distribution" field="holding_lib" />
5634                                 </create>
5635                                 <retrieve permission="RECEIVE_SERIAL">
5636                                         <context link="stream" jump="distribution" field="holding_lib" />
5637                                 </retrieve>
5638                                 <update permission="ADMIN_SERIAL_STREAM">
5639                                         <context link="stream" jump="distribution" field="holding_lib" />
5640                                 </update>
5641                                 <delete permission="ADMIN_SERIAL_STREAM">
5642                                         <context link="stream" jump="distribution" field="holding_lib" />
5643                                 </delete>
5644                         </actions>
5645                 </permacrud>
5646         </class>
5647
5648         <class id="siss" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::issuance" oils_persist:tablename="serial.issuance" reporter:label="Issuance">
5649                 <fields oils_persist:primary="id" oils_persist:sequence="serial.issuance_id_seq">
5650                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5651                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5652                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
5653                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5654                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
5655                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
5656                         <field reporter:label="Caption/Pattern" name="caption_and_pattern" reporter:datatype="link"/>
5657                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
5658                         <field reporter:label="Date Published" name="date_published" reporter:datatype="timestamp"/>
5659                         <field reporter:label="Holding Code" name="holding_code" reporter:datatype="text"/>
5660                         <field reporter:label="Holding Type" name="holding_type" reporter:datatype="text"/>
5661                         <field reporter:label="Holding Link ID" name="holding_link_id" reporter:datatype="int"/>
5662                         <field reporter:label="Items" name="items" oils_persist:virtual="true" reporter:datatype="link" />
5663                 </fields>
5664                 <links>
5665                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5666                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5667                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
5668                         <link field="caption_and_pattern" reltype="has_a" key="id" map="" class="scap"/>
5669                         <link field="items" reltype="has_many" key="issuance" map="" class="sitem"/>
5670                 </links>
5671                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5672                         <actions>
5673                                 <create permission="ADMIN_SERIAL_SUBSCRIPTION">
5674                                         <context link="subscription" field="owning_lib" />
5675                                 </create>
5676                                 <retrieve/>
5677                                 <update permission="ADMIN_SERIAL_SUBSCRIPTION">
5678                                         <context link="subscription" field="owning_lib" />
5679                                 </update>
5680                                 <delete permission="ADMIN_SERIAL_SUBSCRIPTION">
5681                                         <context link="subscription" field="owning_lib" />
5682                                 </delete>
5683                         </actions>
5684                 </permacrud>
5685         </class>
5686
5687         <class id="sunit" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::unit" oils_persist:tablename="serial.unit" reporter:label="Unit">
5688                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_id_seq">
5689                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5690                         <field reporter:label="Age Hold Protection" name="age_protect" reporter:datatype="link"/>
5691                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
5692                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
5693                         <field reporter:label="Call Number/Volume" name="call_number" reporter:datatype="link"/>
5694                         <field reporter:label="Circulation Type (MARC)" name="circ_as_type" reporter:datatype="text"/>
5695                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
5696                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
5697                         <field reporter:label="Can Circulate" name="circulate" reporter:datatype="bool"/>
5698                         <field reporter:label="Copy Number on Volume" name="copy_number" reporter:datatype="text"/>
5699                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
5700                         <field reporter:label="Active Date/Time" name="active_date" reporter:datatype="timestamp"/>
5701                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
5702                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
5703                         <field reporter:label="Dummy ISBN" name="dummy_isbn" reporter:datatype="text"/>
5704                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
5705                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money" />
5706                         <field reporter:label="Precat Dummy Author" name="dummy_author" reporter:datatype="text"/>
5707                         <field reporter:label="Precat Dummy Title" name="dummy_title" reporter:datatype="text"/>
5708                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
5709                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
5710                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
5711                         <field reporter:label="Is Holdable" name="holdable" reporter:datatype="bool" />
5712                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
5713                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link"/>
5714                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool" />
5715                         <field reporter:label="Price" name="price" reporter:datatype="money" />
5716                         <field reporter:label="Is Reference" name="ref" reporter:datatype="bool"/>
5717                         <field reporter:label="Copy Status" name="status" reporter:datatype="link"/>
5718                         <field reporter:label="Copy Status Changed Time" name="status_changed_time" reporter:datatype="timestamp"/>
5719                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool"/>
5720                         <field reporter:label="Floating Group" name="floating" reporter:datatype="link"/>
5721                         <field reporter:label="Cost" name="cost" reporter:datatype="money"/>
5722                         <field reporter:label="Sort Key" name="sort_key" reporter:datatype="text"/>
5723                         <field reporter:label="Summary Contents" name="summary_contents" reporter:datatype="text"/>
5724                         <field reporter:label="Detailed Contents" name="detailed_contents" reporter:datatype="text"/>
5725                         <field reporter:label="Copy Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
5726                         <field reporter:label="Stat-Cat entry maps" name="stat_cat_entry_copy_maps" oils_persist:virtual="true" reporter:datatype="link"/>
5727                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
5728                         <field reporter:label="Total Circulations" name="total_circ_count" oils_persist:virtual="true" reporter:datatype="link"/>
5729                         <field reporter:label="Holds" name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
5730                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
5731                 </fields>
5732                 <links>
5733                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
5734                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
5735                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
5736                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5737                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5738                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
5739                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5740                         <link field="holds" reltype="has_many" key="target_copy" map="hold" class="ahcm"/>
5741                         <link field="stat_cat_entry_copy_maps" reltype="has_many" key="owning_copy" map="" class="ascecm"/>
5742                         <link field="notes" reltype="has_many" key="owning_copy" map="" class="acpn"/>
5743                         <link field="stat_cat_entries" reltype="has_many" key="owning_copy" map="stat_cat_entry" class="ascecm"/>
5744                         <link field="circulations" reltype="has_many" key="target_copy" map="" class="circ"/>
5745                         <link field="total_circ_count" reltype="might_have" key="id" map="" class="erfcc"/>
5746                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
5747                         <link field="floating" reltype="has_a" key="id" map="" class="cfg"/>
5748                 </links>
5749                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5750                         <actions>
5751                                 <create permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
5752                                 <retrieve/>
5753                                 <update permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
5754                                 <delete permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
5755                         </actions>
5756                 </permacrud>
5757         </class>
5758
5759         <class id="sitem" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::item" oils_persist:tablename="serial.item" reporter:label="Item">
5760                 <fields oils_persist:primary="id" oils_persist:sequence="serial.item_id_seq">
5761                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5762                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5763                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
5764                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5765                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
5766                         <field reporter:label="Issuance" name="issuance" reporter:datatype="link"/>
5767                         <field reporter:label="Stream" name="stream" reporter:datatype="link"/>
5768                         <field reporter:label="Unit" name="unit" reporter:datatype="link"/>
5769                         <field reporter:label="URI" name="uri" reporter:datatype="link"/>
5770                         <field reporter:label="Date Expected" name="date_expected" reporter:datatype="timestamp"/>
5771                         <field reporter:label="Date Received" name="date_received" reporter:datatype="timestamp"/>
5772                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
5773                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
5774                         <field reporter:label="Shadowed?" name="shadowed" reporter:datatype="bool"/>
5775                 </fields>
5776                 <links>
5777                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5778                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5779                         <link field="issuance" reltype="has_a" key="id" map="" class="siss"/>
5780                         <link field="stream" reltype="has_a" key="id" map="" class="sstr"/>
5781                         <link field="unit" reltype="has_a" key="id" map="" class="sunit"/>
5782                         <link field="uri" reltype="has_a" key="id" map="" class="auri"/>
5783                         <link field="notes" reltype="has_many" key="item" map="" class="sin"/>
5784                 </links>
5785                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5786                         <actions>
5787                                 <create permission="ADMIN_SERIAL_ITEM">
5788                                         <context link="stream" jump="distribution" field="holding_lib" />
5789                                 </create>
5790                                 <retrieve permission="ADMIN_SERIAL_ITEM">
5791                                         <context link="stream" jump="distribution" field="holding_lib" />
5792                                 </retrieve>
5793                                 <update permission="ADMIN_SERIAL_ITEM">
5794                                         <context link="stream" jump="distribution" field="holding_lib" />
5795                                 </update>
5796                                 <delete permission="ADMIN_SERIAL_ITEM">
5797                                         <context link="stream" jump="distribution" field="holding_lib" />
5798                                 </delete>
5799                         </actions>
5800                 </permacrud>
5801         </class>
5802
5803         <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">
5804                 <fields oils_persist:primary="id" oils_persist:sequence="serial.item_note_id_seq">
5805                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5806                         <field reporter:label="Item" name="item" reporter:datatype="link"/>
5807                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5808                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5809                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
5810                         <field reporter:label="Alert?" name="alert" reporter:datatype="bool"/>
5811                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
5812                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
5813                 </fields>
5814                 <links>
5815                         <link field="item" reltype="has_a" key="id" map="" class="sitem"/>
5816                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5817                 </links>
5818                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5819                         <actions>
5820                                 <create permission="ADMIN_SERIAL_ITEM">
5821                                         <context link="item" jump="stream.distribution" field="holding_lib" />
5822                                 </create>
5823                                 <retrieve permission="ADMIN_SERIAL_ITEM">
5824                                         <context link="item" jump="stream.distribution" field="holding_lib" />
5825                                 </retrieve>
5826                                 <update permission="ADMIN_SERIAL_ITEM">
5827                                         <context link="item" jump="stream.distribution" field="holding_lib" />
5828                                 </update>
5829                                 <delete permission="ADMIN_SERIAL_ITEM">
5830                                         <context link="item" jump="stream.distribution" field="holding_lib" />
5831                                 </delete>
5832                         </actions>
5833                 </permacrud>
5834         </class>
5835         <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">
5836                 <fields>
5837                         <field name="summary_type" reporter:label="Summary Type" reporter:datatype="text" />
5838                         <field name="id" reporter:label="Native ID" reporter:datatype="int" /><!-- not datatype="id", because id is not unique in this view -->
5839                         <field name="distribution" reporter:label="Distribution" reporter:datatype="link" />
5840                         <field name="generated_coverage" reporter:label="Generated Coverage" reporter:datatype="text" />
5841                         <field name="show_generated" reporter:label="Show Generated?" reporter:datatype="bool" />
5842                 </fields>
5843                 <links>
5844                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
5845                 </links>
5846         </class>
5847         <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">
5848                 <fields oils_persist:primary="id" oils_persist:sequence="serial.materialized_holding_code_id_seq">
5849                         <field name="id" reporter:label="ID" reporter:datatype="id" />
5850                         <field name="issuance" reporter:label="Issuance" reporter:datatype="link" />
5851                         <field name="holding_type" reporter:label="Holding Type" reporter:datatype="text" />
5852                         <field name="ind1" reporter:label="First Indicator" reporter:datatype="text" />
5853                         <field name="ind2" reporter:label="Second Indicator" reporter:datatype="text" />
5854                         <field name="subfield" reporter:label="Subfield" reporter:datatype="text" />
5855                         <field name="value" reporter:label="Value" reporter:datatype="text" oils_obj:validate="^\w$" />
5856                 </fields>
5857                 <links>
5858                         <link field="issuance" reltype="has_a" key="id" map="" class="siss"/>
5859                 </links>
5860         </class>
5861         <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">
5862                 <fields oils_persist:primary="id" oils_persist:sequence="serial.basic_summary_id_seq">
5863                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5864                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
5865                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
5866                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
5867                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
5868                 </fields>
5869                 <links>
5870                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
5871                 </links>
5872                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5873                         <actions>
5874                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
5875                                         <context link="distribution" field="holding_lib" />
5876                                 </create>
5877                                 <retrieve/>
5878                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
5879                                         <context link="distribution" field="holding_lib" />
5880                                 </update>
5881                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
5882                                         <context link="distribution" field="holding_lib" />
5883                                 </delete>
5884                         </actions>
5885                 </permacrud>
5886         </class>
5887
5888         <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">
5889                 <fields oils_persist:primary="id" oils_persist:sequence="serial.supplement_summary_id_seq">
5890                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5891                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
5892                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
5893                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
5894                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
5895                 </fields>
5896                 <links>
5897                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
5898                 </links>
5899                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5900                         <actions>
5901                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
5902                                         <context link="distribution" field="holding_lib" />
5903                                 </create>
5904                                 <retrieve/>
5905                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
5906                                         <context link="distribution" field="holding_lib" />
5907                                 </update>
5908                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
5909                                         <context link="distribution" field="holding_lib" />
5910                                 </delete>
5911                         </actions>
5912                 </permacrud>
5913         </class>
5914
5915         <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">
5916                 <fields oils_persist:primary="id" oils_persist:sequence="serial.index_summary_id_seq">
5917                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5918                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
5919                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
5920                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
5921                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
5922                 </fields>
5923                 <links>
5924                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
5925                 </links>
5926                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5927                         <actions>
5928                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
5929                                         <context link="distribution" field="holding_lib" />
5930                                 </create>
5931                                 <retrieve/>
5932                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
5933                                         <context link="distribution" field="holding_lib" />
5934                                 </update>
5935                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
5936                                         <context link="distribution" field="holding_lib" />
5937                                 </delete>
5938                         </actions>
5939                 </permacrud>
5940         </class>
5941
5942         <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">
5943                 <fields oils_persist:primary="id" oils_persist:sequence="serial.pattern_template_id_seq">
5944                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5945                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_obj:required="true"/>
5946                         <field reporter:label="Pattern Code" name="pattern_code" reporter:datatype="text" oils_obj:required="true"/>
5947                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" oils_obj:required="true"/>
5948                         <field reporter:label="Share Depth" name="share_depth"  reporter:datatype="int"/>
5949                 </fields>
5950                 <links>
5951                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5952                 </links>
5953                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5954                         <actions>
5955                                 <create permission="ADMIN_SERIAL_PATTERN_TEMPLATE" context_field="owning_lib"/>
5956                                 <retrieve/>
5957                                 <update permission="ADMIN_SERIAL_PATTERN_TEMPLATE" context_field="owning_lib"/>
5958                                 <delete permission="ADMIN_SERIAL_PATTERN_TEMPLATE" context_field="owning_lib"/>
5959                         </actions>
5960                 </permacrud>
5961         </class>
5962
5963         <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">
5964                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_entry_copy_map_id_seq">
5965                         <field name="id" reporter:datatype="id" />
5966                         <field name="owning_copy" reporter:datatype="link"/>
5967                         <field name="stat_cat" reporter:datatype="link"/>
5968                         <field name="stat_cat_entry" reporter:datatype="link"/>
5969                 </fields>
5970                 <links>
5971                         <link field="owning_copy" reltype="has_a" key="id" map="" class="acp"/>
5972                         <link field="stat_cat_entry" reltype="has_a" key="id" map="" class="asce"/>
5973                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
5974                 </links>
5975                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5976                         <actions>
5977                                 <retrieve/>
5978                         </actions>
5979                 </permacrud>
5980         </class>
5981         <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">
5982                 <fields oils_persist:primary="code">
5983                         <field reporter:label="Item Type Code" name="code" reporter:selector="value" reporter:datatype="text"/>
5984                         <field reporter:label="Item Type" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
5985                 </fields>
5986                 <links/>
5987         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5988             <actions>
5989                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
5990                 <retrieve/>
5991                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
5992                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
5993             </actions>
5994         </permacrud>
5995         </class>
5996         <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">
5997                 <fields oils_persist:primary="code">
5998                         <field reporter:label="Bib Level Code" name="code"  reporter:datatype="text"/>
5999                         <field reporter:label="Bib Level" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
6000                 </fields>
6001                 <links/>
6002         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6003             <actions>
6004                 <create permission="CREATE_MARC_CODE" global_required="true"/>
6005                 <retrieve/>
6006                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
6007                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
6008             </actions>
6009         </permacrud>
6010         </class>
6011         <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">
6012                 <fields oils_persist:primary="id" oils_persist:sequence="search.relevance_adjustment_id_seq">
6013                         <field reporter:label="ID" name="id"  reporter:datatype="id"/>
6014                         <field reporter:label="Active" name="active"  reporter:datatype="bool"/>
6015                         <field reporter:label="Index Field" name="field"  reporter:datatype="link"/>
6016                         <field reporter:label="Bump Type" name="bump_type"  reporter:datatype="text"/>
6017                         <field reporter:label="Multiplier" name="multiplier"  reporter:datatype="number"/>
6018                 </fields>
6019                 <links>
6020             <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
6021         </links>
6022         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6023             <actions>
6024                 <create permission="CREATE_RELEVANCE_ADJUSTMENT" global_required="true"/>
6025                 <retrieve permission="CREATE_RELEVANCE_ADJUSTMENT UPDATE_RELEVANCE_ADJUSTMENT DELETE_RELEVANCE_ADJUSTMENT" global_required="true"/>
6026                 <update permission="UPDATE_RELEVANCE_ADJUSTMENT" global_required="true"/>
6027                 <delete permission="DELETE_RELEVANCE_ADJUSTMENT" global_required="true"/>
6028             </actions>
6029         </permacrud>
6030         </class>
6031         <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">
6032                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_lasso_id_seq">
6033                         <field name="id" reporter:datatype="id" />
6034                         <field name="name" reporter:datatype="text"/>
6035                 </fields>
6036                 <links/>
6037         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6038             <actions>
6039                 <create permission="CREATE_LASSO" global_required="true"/>
6040                 <retrieve permission="CREATE_LASSO UPDATE_LASSO DELETE_LASSO" global_required="true"/>
6041                 <update permission="UPDATE_LASSO" global_required="true"/>
6042                 <delete permission="DELETE_LASSO" global_required="true"/>
6043             </actions>
6044         </permacrud>
6045         </class>
6046         <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">
6047                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_lasso_map_id_seq">
6048                         <field name="id" reporter:datatype="id" />
6049                         <field name="lasso" reporter:datatype="link"/>
6050                         <field name="org_unit" reporter:datatype="org_unit"/>
6051                 </fields>
6052                 <links>
6053                         <link field="lasso" reltype="has_a" key="id" map="" class="lasso"/>
6054                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
6055                 </links>
6056         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6057             <actions>
6058                 <create permission="CREATE_LASSO_MAP" global_required="true"/>
6059                 <retrieve permission="CREATE_LASSO_MAP UPDATE_LASSO_MAP DELETE_LASSO_MAP" global_required="true"/>
6060                 <update permission="UPDATE_LASSO_MAP" global_required="true"/>
6061                 <delete permission="DELETE_LASSO_MAP" global_required="true"/>
6062             </actions>
6063         </permacrud>
6064         </class>
6065         <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">
6066                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_adjustment_id_seq">
6067                         <field name="id" reporter:label="ID" reporter:datatype="id" />
6068                         <field name="item_circ_lib" reporter:label="Item Circ Lib" reporter:datatype="org_unit"/>
6069                         <field name="item_owning_lib" reporter:label="Item Owning Lib" reporter:datatype="org_unit"/>
6070                         <field name="hold_pickup_lib" reporter:label="Hold Pickup Lib" reporter:datatype="org_unit"/>
6071                         <field name="hold_request_lib" reporter:label="Hold Request Lib" reporter:datatype="org_unit"/>
6072                         <field name="copy_location" reporter:label="Copy Location" reporter:datatype="link"/>
6073                         <field name="circ_mod" reporter:label="Circ Modifier" reporter:datatype="link"/>
6074                         <field name="pos" reporter:label="Position" reporter:datatype="int" />
6075                         <field name="absolute_adjustment" reporter:label="Absolute adjustment?" reporter:datatype="bool" />
6076                         <field name="prox_adjustment" reporter:label="Proximity Adjustment" reporter:datatype="number" />
6077                 </fields>
6078                 <links>
6079                         <link field="item_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
6080                         <link field="item_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
6081                         <link field="hold_pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
6082                         <link field="hold_request_lib" reltype="has_a" key="id" map="" class="aou"/>
6083                         <link field="circ_mod" reltype="has_a" key="code" map="" class="ccm"/>
6084                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
6085                 </links>
6086         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6087             <actions>
6088                 <create permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
6089                 <retrieve permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
6090                 <update permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
6091                 <delete permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
6092             </actions>
6093         </permacrud>
6094         </class>
6095         <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">
6096                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_id_seq">
6097                         <field name="id" reporter:datatype="id" />
6098                         <field name="from_org" reporter:datatype="org_unit"/>
6099                         <field name="to_org" reporter:datatype="org_unit"/>
6100                         <field name="prox" reporter:datatype="int" />
6101                 </fields>
6102                 <links>
6103                         <link field="from_org" reltype="has_a" key="id" map="" class="aou"/>
6104                         <link field="to_org" reltype="has_a" key="id" map="" class="aou"/>
6105                 </links>
6106         </class>
6107         <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">
6108                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_id_seq">
6109                         <field reporter:label="ID" name="id" reporter:datatype="id" />
6110                         <field reporter:label="Relevance" name="rel" reporter:datatype="float"/>
6111                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
6112                         <field reporter:label="Total Results" name="total" reporter:datatype="int" />
6113                         <field reporter:label="Checked" name="checked" reporter:datatype="int"/>
6114                         <field reporter:label="Visible" name="visible" reporter:datatype="int"/>
6115                         <field reporter:label="Deleted" name="deleted" reporter:datatype="int"/>
6116                         <field reporter:label="Excluded" name="excluded" reporter:datatype="int"/>
6117                 </fields>
6118                 <links/>
6119         </class>
6120         <class id="asv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::survey" oils_persist:tablename="action.survey" reporter:label="Survey">
6121                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_id_seq">
6122                         <field reporter:label="Questions" name="questions" oils_persist:virtual="true" reporter:datatype="link"/>
6123                         <field reporter:label="Responses" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
6124                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
6125                         <field reporter:label="Survey End Date/Time" name="end_date" reporter:datatype="timestamp"/>
6126                         <field reporter:label="Survey ID" name="id" reporter:datatype="id"/>
6127                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
6128                         <field reporter:label="OPAC Survey?" name="opac" reporter:datatype="bool"/>
6129                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
6130                         <field reporter:label="Poll Style?" name="poll" reporter:datatype="bool"/>
6131                         <field reporter:label="Is Required?" name="required" reporter:datatype="bool"/>
6132                         <field reporter:label="Survey Start Date/Time" name="start_date" reporter:datatype="timestamp"/>
6133                         <field reporter:label="Display in User Summary" name="usr_summary" reporter:datatype="bool"/>
6134                 </fields>
6135                 <links>
6136                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6137                         <link field="responses" reltype="has_many" key="survey" map="" class="asvr"/>
6138                         <link field="questions" reltype="has_many" key="survey" map="" class="asvq"/>
6139                 </links>
6140         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6141             <actions>
6142                 <create permission="ADMIN_SURVEY" context_field="owner"/>
6143                 <retrieve/>
6144                 <update permission="ADMIN_SURVEY" context_field="owner"/>
6145                 <delete permission="ADMIN_SURVEY" context_field="owner"/>
6146             </actions>
6147         </permacrud>
6148         </class>
6149         <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">
6150                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_address_id_seq">
6151                         <field name="address_type"  reporter:datatype="text"/>
6152                         <field name="city"  reporter:datatype="text"/>
6153                         <field name="country"  reporter:datatype="text"/>
6154                         <field name="county"  reporter:datatype="text"/>
6155                         <field name="id" reporter:datatype="id" />
6156                         <field name="org_unit" reporter:datatype="org_unit"/>
6157                         <field name="post_code"  reporter:datatype="text"/>
6158                         <field name="state"  reporter:datatype="text"/>
6159                         <field name="street1"  reporter:datatype="text"/>
6160                         <field name="street2"  reporter:datatype="text"/>
6161                         <field name="valid" reporter:datatype="bool"/>
6162                         <field name="san" reporter:datatype="text" reporter:label="SAN"/>
6163                 </fields>
6164                 <links>
6165                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
6166                 </links>
6167         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6168             <actions>
6169                 <create permission="CREATE_ORG_ADDRESS" context_field="org_unit"/>
6170                 <retrieve/>
6171                 <update permission="UPDATE_ORG_ADDRESS" context_field="org_unit"/>
6172                 <delete permission="DELETE_ORG_ADDRESS" context_field="org_unit"/>
6173             </actions>
6174         </permacrud>
6175         </class>
6176         <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">
6177                 <fields oils_persist:primary="id" oils_persist:sequence="actor.search_query_id_seq">
6178                         <field name="id" reporter:datatype="id" reporter:selector="label"/>
6179                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
6180                         <field name="query_text" reporter:datatype="text"/>
6181                 </fields>
6182         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6183             <actions>
6184                 <retrieve/>
6185             </actions>
6186         </permacrud>
6187         </class>
6188
6189         <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">
6190                 <fields oils_persist:primary="id" oils_persist:sequence="actor.search_filter_group_id_seq">
6191                         <field name="id" reporter:datatype="id" reporter:selector="label"/>
6192                         <field name="owner" reporter:datatype="org_unit"/>
6193                         <field name="code" reporter:datatype="text"/>
6194                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
6195                         <field name="create_date" reporter:datatype="timestamp"/>
6196                         <field name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
6197                 </fields>
6198                 <links>
6199                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6200                         <link field="entries" reltype="has_many" key="grp" map="" class="asfge"/>
6201                 </links>
6202         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6203             <actions>
6204                 <create permission="ADMIN_SEARCH_FILTER_GROUP" context_field="owner"/>
6205                 <retrieve/>
6206                 <update permission="ADMIN_SEARCH_FILTER_GROUP" context_field="owner"/>
6207                 <delete permission="ADMIN_SEARCH_FILTER_GROUP" context_field="owner"/>
6208             </actions>
6209         </permacrud>
6210         </class>
6211         <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">
6212                 <fields oils_persist:primary="id" oils_persist:sequence="actor.search_filter_group_entry_id_seq">
6213                         <field name="id" reporter:datatype="id"/>
6214                         <field name="grp" reporter:datatype="link"/>
6215                         <field name="pos" reporter:datatype="int"/>
6216                         <field name="query" reporter:datatype="link"/>
6217                 </fields>
6218                 <links>
6219                         <link field="grp" reltype="has_a" key="id" map="" class="asfg"/>
6220                         <link field="query" reltype="has_a" key="id" map="" class="asq"/>
6221                 </links>
6222         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6223             <actions>
6224                 <create permission="ADMIN_SEARCH_FILTER_GROUP">
6225                     <context link="grp" field="owner"/>
6226                 </create>
6227                 <retrieve/>
6228                 <update permission="ADMIN_SEARCH_FILTER_GROUP">
6229                     <context link="grp" field="owner"/>
6230                 </update>
6231                 <delete permission="ADMIN_SEARCH_FILTER_GROUP">
6232                     <context link="grp" field="owner"/>
6233                 </delete>
6234             </actions>
6235         </permacrud>
6236         </class>
6237
6238         <!-- A note: Please update alhr and ahopl when updating ahr -->
6239         <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">
6240                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
6241                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
6242                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
6243                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
6244                         <field reporter:label="Currently Targeted Copy" name="current_copy" reporter:datatype="link"/>
6245                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
6246                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
6247                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
6248                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
6249                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
6250                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
6251                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
6252                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
6253                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
6254                         <field reporter:label="Notifications SMS Number" name="sms_notify" reporter:datatype="text"/>
6255                         <field reporter:label="Notifications SMS Carrier" name="sms_carrier" reporter:datatype="link"/>
6256                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
6257                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
6258                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
6259                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
6260                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
6261                         <field reporter:label="Item Selection Depth" name="selection_depth" />
6262                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
6263                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
6264                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
6265                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
6266                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
6267                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
6268                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
6269                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
6270                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
6271                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
6272                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
6273                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
6274                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
6275                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
6276                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
6277                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
6278                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
6279                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
6280                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
6281                         <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>
6282                 </fields>
6283                 <links>
6284                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
6285                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
6286                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
6287                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
6288                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
6289                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
6290                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6291                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
6292                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
6293                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
6294                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
6295                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
6296                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
6297                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
6298                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
6299                         <link field="sms_carrier" reltype="has_a" key="id" map="" class="csc"/>
6300                 </links>
6301                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6302                         <actions>
6303                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
6304                         </actions>
6305                 </permacrud>
6306         </class>
6307         <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">
6308                 <oils_persist:source_definition><![CDATA[
6309                 SELECT
6310                         ahr.*,
6311                         COALESCE(acplo.position, acpl_ordered.fallback_position) AS
6312                                 copy_location_order_position,
6313                         CASE WHEN au.alias IS NOT NULL THEN
6314                                 au.alias
6315                         ELSE
6316                                 au.first_given_name
6317                         END AS usr_alias_or_first_given_name,
6318                         au.first_given_name AS usr_first_given_name,
6319                         au.second_given_name AS usr_second_given_name,
6320                         au.family_name AS usr_family_name,
6321                         au.prefix AS usr_prefix,
6322                         au.suffix AS usr_suffix,
6323                         au.alias AS usr_alias,
6324                         CASE WHEN au.alias IS NOT NULL THEN
6325                                 au.alias
6326                         ELSE
6327                                 REGEXP_REPLACE(ARRAY_TO_STRING(ARRAY[
6328                                         COALESCE(au.family_name, ''),
6329                                         COALESCE(au.suffix, ''),
6330                                         ', ',
6331                                         COALESCE(au.prefix, ''),
6332                                         COALESCE(au.first_given_name, ''),
6333                                         COALESCE(au.second_given_name, '')
6334                                 ], ' '), E'\\s+,', ',')
6335                         END AS usr_alias_or_display_name,
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+,', ',') AS usr_display_name,
6344                         TRIM(acnp.label || ' ' || acn.label || ' ' || acns.label)
6345                                 AS call_number_label,
6346                         siss.label AS issuance_label,
6347                         (ahr.usr <> ahr.requestor) AS is_staff_hold,
6348                         ahcm_1.copy_count AS potential_copies
6349                 FROM action.hold_request ahr
6350                 JOIN asset.copy acp ON (acp.id = ahr.current_copy)
6351                 JOIN asset.call_number acn ON (acp.call_number = acn.id)
6352                 JOIN asset.call_number_prefix acnp ON (acn.prefix = acnp.id)
6353                 JOIN asset.call_number_suffix acns ON (acn.suffix = acns.id)
6354                 JOIN actor.usr au ON (au.id = ahr.usr)
6355                 JOIN (
6356                         SELECT *, (ROW_NUMBER() OVER (ORDER BY name) + 1000000) AS fallback_position
6357                         FROM asset.copy_location
6358                 ) acpl_ordered ON (acpl_ordered.id = acp.location)
6359                 LEFT JOIN actor.usr_standing_penalty ausp 
6360                         ON (ahr.usr = ausp.usr AND (ausp.stop_date IS NULL OR ausp.stop_date > NOW()))
6361                 LEFT JOIN config.standing_penalty csp
6362                         ON (
6363                                 csp.id = ausp.standing_penalty AND 
6364                                 csp.block_list LIKE '%CAPTURE%' AND (
6365                                         (csp.org_depth IS NULL AND ahr.pickup_lib = ausp.org_unit) OR
6366                                         (csp.org_depth IS NOT NULL AND ahr.pickup_lib IN (
6367                                                 SELECT id FROM actor.org_unit_descendants(ausp.org_unit, csp.org_depth))
6368                                         )
6369                                 )
6370                         )
6371                 JOIN (
6372                         SELECT COUNT(target_copy) AS copy_count, hold
6373                         FROM action.hold_copy_map
6374                         GROUP BY 2
6375                 ) ahcm_1 ON (ahcm_1.hold = ahr.id)
6376                 LEFT JOIN serial.issuance siss
6377                         ON (ahr.hold_type = 'I' AND siss.id = ahr.target)
6378                 LEFT JOIN asset.copy_location_order acplo
6379                         ON (acp.location = acplo.location AND
6380                                 acp.circ_lib = acplo.org)
6381                 WHERE
6382                         ahr.capture_time IS NULL AND
6383                         ahr.cancel_time IS NULL AND
6384                         csp.id IS NULL AND
6385                         (ahr.expire_time is NULL OR ahr.expire_time > NOW()) AND
6386                         acp.status IN (0,7)
6387                 ]]></oils_persist:source_definition>
6388                 <fields oils_persist:primary="id">
6389                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
6390                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
6391                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
6392                         <field reporter:label="Currently Targeted Copy" name="current_copy" reporter:datatype="link"/>
6393                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
6394                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
6395                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
6396                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
6397                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
6398                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
6399                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
6400                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
6401                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
6402                         <field reporter:label="Notifications SMS Number" name="sms_notify" reporter:datatype="text"/>
6403                         <field reporter:label="Notifications SMS Carrier" name="sms_carrier" reporter:datatype="link"/>
6404                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
6405                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
6406                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
6407                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
6408                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
6409                         <field reporter:label="Item Selection Depth" name="selection_depth" />
6410                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
6411                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
6412                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
6413                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
6414                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
6415                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
6416                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
6417                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
6418                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
6419                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
6420                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
6421                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
6422                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
6423                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
6424                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
6425                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
6426                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
6427                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
6428                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
6429                         <field reporter:label="Copy Location Sort Order" name="copy_location_order_position" reporter:datatype="int" />
6430                         <field reporter:label="User First Given Name" name="usr_first_given_name" reporter:datatype="text" />
6431                         <field reporter:label="User Second Given Name" name="usr_second_given_name" reporter:datatype="text" />
6432                         <field reporter:label="User Family Name" name="usr_family_name" reporter:datatype="text" />
6433                         <field reporter:label="User Prefix" name="usr_prefix" reporter:datatype="text" />
6434                         <field reporter:label="User Suffix" name="usr_suffix" reporter:datatype="text" />
6435                         <field reporter:label="User Alias or First Given Name" name="usr_alias_or_first_given_name" reporter:datatype="text" />
6436                         <field reporter:label="User Display Name" name="usr_display_name" reporter:datatype="text" />
6437                         <field reporter:label="User Alias or Display Name" name="usr_alias_or_display_name" reporter:datatype="text" />
6438                         <field reporter:label="User Alias" name="usr_alias" reporter:datatype="text" />
6439                         <field reporter:label="Call Number Label" name="call_number_label" reporter:datatype="text" />
6440                         <field reporter:label="Issuance Label" name="issuance_label" reporter:datatype="text" />
6441                         <field reporter:label="Is Staff Hold?" name="is_staff_hold" reporter:datatype="bool" />
6442                         <field reporter:label="Potential Copies" name="potential_copies" reporter:datatype="int" />
6443                         <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>
6444                 </fields>
6445                 <links>
6446                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
6447                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
6448                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
6449                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
6450                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
6451                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
6452                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6453                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
6454                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
6455                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
6456                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
6457                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
6458                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
6459                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
6460                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
6461                         <link field="sms_carrier" reltype="has_a" key="id" map="" class="csc"/>
6462                 </links>
6463                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6464                         <actions>
6465                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
6466                         </actions>
6467                 </permacrud>
6468         </class>
6469         <class id="alhr" controller="open-ils.cstore" oils_obj:fieldmapper="action::last_hold_request" reporter:label="Last Captured Hold Request" oils_persist:readonly="true">
6470                 <oils_persist:source_definition>
6471                         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)
6472                 </oils_persist:source_definition>
6473                 <fields oils_persist:primary="id">
6474                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
6475                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
6476                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
6477                         <field reporter:label="Currently Targeted Copy" name="current_copy" reporter:datatype="link"/>
6478                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
6479                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
6480                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
6481                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
6482                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
6483                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
6484                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
6485                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
6486                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
6487                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
6488                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
6489                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
6490                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
6491                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
6492                         <field reporter:label="Item Selection Depth" name="selection_depth" />
6493                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
6494                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
6495                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
6496                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
6497                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
6498                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
6499                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
6500                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
6501                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
6502                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
6503                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
6504                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
6505                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
6506                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
6507                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
6508                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
6509                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
6510                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
6511                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
6512                         <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>
6513                 </fields>
6514                 <links>
6515                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
6516                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
6517                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
6518                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
6519                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
6520                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
6521                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6522                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
6523                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
6524                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
6525                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
6526                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
6527                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
6528                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
6529                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
6530                 </links>
6531         </class>
6532
6533         <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">
6534                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_note_id_seq">
6535                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6536                         <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
6537                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
6538                         <field reporter:label="Body" name="body" reporter:datatype="text"/>
6539                         <field reporter:label="Slip?" name="slip" reporter:datatype="bool"/>
6540                         <field reporter:label="Pub?" name="pub" reporter:datatype="bool"/>
6541                         <field reporter:label="Staff?" name="staff" reporter:datatype="bool"/>
6542                 </fields>
6543                 <links>
6544                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
6545                 </links>
6546                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6547                         <actions>
6548                                 <create permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></create>
6549                                 <retrieve permission="VIEW_USER"><context link="hold" field="request_lib"/></retrieve>
6550                                 <update permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></update>
6551                                 <delete permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></delete>
6552                         </actions>
6553                 </permacrud>
6554         </class>
6555         <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">
6556                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
6557                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
6558                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
6559                         <field reporter:label="Currently Targeted Copy" name="current_copy" reporter:datatype="link"/>
6560                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
6561                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
6562                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
6563                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
6564                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
6565                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
6566                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
6567                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
6568                         <field reporter:label="Notify by Phone?" name="phone_notify" reporter:datatype="bool"/>
6569                         <field reporter:label="Notify by SMS?" name="sms_notify" reporter:datatype="bool"/>
6570                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
6571                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
6572                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
6573                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
6574                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
6575                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
6576                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
6577                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
6578                         <field reporter:label="Staff Placed?" name="staff_placed" reporter:datatype="bool"/>
6579                         <field reporter:label="Item Selection Depth" name="selection_depth" />
6580                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
6581                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
6582                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
6583                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
6584                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
6585                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
6586                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
6587                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
6588                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
6589                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
6590                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
6591                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
6592                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
6593                         <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>
6594                 </fields>
6595                 <links>
6596                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
6597                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
6598                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
6599                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
6600                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
6601                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
6602                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
6603                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
6604                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
6605                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
6606                         <link field="usr_profile" reltype="has_a" key="id" map="" class="pgt"/>
6607                 </links>
6608                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6609                         <actions>
6610                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
6611                         </actions>
6612                 </permacrud>
6613         </class>
6614         <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">
6615                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
6616                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
6617                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
6618                         <field reporter:label="Currently Targeted Copy" name="current_copy" reporter:datatype="link"/>
6619                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
6620                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
6621                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
6622                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
6623                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
6624                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
6625                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
6626                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
6627                         <field reporter:label="Notify by Phone?" name="phone_notify" reporter:datatype="bool"/>
6628                         <field reporter:label="Notify by SMS?" name="sms_notify" reporter:datatype="bool"/>
6629                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
6630                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
6631                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
6632                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
6633                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
6634                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
6635                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
6636                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
6637                         <field reporter:label="Staff Placed?" name="staff_placed" reporter:datatype="bool"/>
6638                         <field reporter:label="Item Selection Depth" name="selection_depth" />
6639                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
6640                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
6641                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
6642                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
6643                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
6644                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
6645                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
6646                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
6647                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
6648                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
6649                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
6650                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
6651                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
6652                 </fields>
6653                 <links>
6654                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
6655                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
6656                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
6657                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
6658                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
6659                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
6660                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
6661                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
6662                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
6663                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
6664                         <link field="usr_profile" reltype="has_a" key="id" map="" class="pgt"/>
6665                 </links>
6666                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6667                         <actions>
6668                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
6669                         </actions>
6670                 </permacrud>
6671         </class>
6672
6673         <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">
6674                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_id_seq">
6675                         <field reporter:label="Subordinate Organizational Units" name="children" oils_persist:virtual="true" reporter:datatype="org_unit"/>
6676                         <field reporter:label="Billing Address" name="billing_address" reporter:datatype="link"/>
6677                         <field reporter:label="Holds Receiving Address" name="holds_address" reporter:datatype="link"/>
6678                         <field reporter:label="Organizational Unit ID" name="id" reporter:datatype="org_unit" reporter:selector="shortname"/>
6679                         <field reporter:label="ILL Receiving Address" name="ill_address" reporter:datatype="link"/>
6680                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="link"/>
6681                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
6682                         <field reporter:label="Organizational Unit Type" name="ou_type" reporter:datatype="link"/>
6683                         <field reporter:label="Parent Organizational Unit" name="parent_ou" reporter:datatype="link"/>
6684                         <field reporter:label="Short (Policy) Name" name="shortname" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.+$"/>
6685                         <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
6686                         <field reporter:label="Phone Number" name="phone" reporter:datatype="text"/>
6687                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
6688                         <field reporter:label="Fiscal Calendar" name="fiscal_calendar" reporter:datatype="link"/>
6689                         <field reporter:label="Users" name="users" oils_persist:virtual="true" reporter:datatype="link"/>
6690                         <field reporter:label="Closed Dates" name="closed_dates" oils_persist:virtual="true" reporter:datatype="link"/>
6691                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
6692                         <field reporter:label="Settings" name="settings" oils_persist:virtual="true" reporter:datatype="link"/>
6693                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>
6694                         <field reporter:label="Checkins" name="checkins" oils_persist:virtual="true" reporter:datatype="link"/>
6695                         <field reporter:label="Workstations" name="workstations" oils_persist:virtual="true" reporter:datatype="link"/>
6696                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
6697                         <field reporter:label="Copy Location Orders" name="copy_location_orders" oils_persist:virtual="true" reporter:datatype="link"/>
6698                         <field reporter:label="Transit Copy Prev Destinations" name="atc_prev_dests" oils_persist:virtual="true" reporter:datatype="link"/>
6699                         <field reporter:label="Reservation Requests" name="resv_requests" oils_persist:virtual="true" reporter:datatype="link"/>
6700                         <field reporter:label="Reservation Pickups" name="resv_pickups" oils_persist:virtual="true" reporter:datatype="link"/>
6701                         <field reporter:label="Resource Types" name="rsrc_types" oils_persist:virtual="true" reporter:datatype="link"/>
6702                         <field reporter:label="Resources" name="resources" oils_persist:virtual="true" reporter:datatype="link"/>
6703                         <field reporter:label="Resource Attributes" name="rsrc_attrs" oils_persist:virtual="true" reporter:datatype="link"/>
6704                         <field reporter:label="Attribute Values" name="attr_vals" oils_persist:virtual="true" reporter:datatype="link"/>
6705                         <field reporter:label="Hours of Operation" name="hours_of_operation" oils_persist:virtual="true" reporter:datatype="link"/>
6706                 </fields>
6707                 <links>
6708                         <link field="billing_address" reltype="has_a" key="id" map="" class="aoa"/>
6709                         <link field="holds_address" reltype="has_a" key="id" map="" class="aoa"/>
6710                         <link field="ou_type" reltype="has_a" key="id" map="" class="aout"/>
6711                         <link field="mailing_address" reltype="has_a" key="id" map="" class="aoa"/>
6712                         <link field="parent_ou" reltype="has_a" key="id" map="" class="aou"/>
6713                         <link field="ill_address" reltype="has_a" key="id" map="" class="aoa"/>
6714                         <link field="fiscal_calendar" reltype="has_a" key="id" map="" class="acqfc"/>
6715                         <link field="users" reltype="has_many" key="home_ou" map="" class="au"/>
6716                         <link field="closed_dates" reltype="has_many" key="org_unit" map="" class="aoucd"/>
6717                         <link field="children" reltype="has_many" key="parent_ou" map="" class="aou"/>
6718                         <link field="circulations" reltype="has_many" key="circ_lib" map="" class="circ"/>
6719                         <link field="settings" reltype="has_many" key="org_unit" map="" class="aous"/>
6720                         <link field="addresses" reltype="has_many" key="org_unit" map="" class="aoa"/>
6721                         <link field="checkins" reltype="has_many" key="checkin_lib" map="" class="circ"/>
6722                         <link field="workstations" reltype="has_many" key="owning_lib" map="" class="aws"/>
6723                         <link field="fund_alloc_pcts" reltype="has_many" key="org" map="" class="acqfap"/>
6724                         <link field="copy_location_orders" reltype="has_many" key="org" map="" class="acplo"/>
6725                         <link field="atc_prev_dests" reltype="has_many" key="prev_dest" map="" class="atc"/>
6726                         <link field="resv_requests" reltype="has_many" key="request_lib" map="" class="bresv"/>
6727                         <link field="resv_pickups" reltype="has_many" key="pickup_lib" map="" class="bresv"/>
6728                         <link field="rsrc_types" reltype="has_many" key="owner" map="" class="brt"/>
6729                         <link field="resources" reltype="has_many" key="owner" map="" class="brsrc"/>
6730                         <link field="rsrc_attrs" reltype="has_many" key="owner" map="" class="bra"/>
6731                         <link field="attr_vals" reltype="has_many" key="owner" map="" class="brav"/>
6732                         <link field="hours_of_operation" reltype="might_have" key="id" map="" class="aouhoo"/>
6733                 </links>
6734         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6735             <actions>
6736                 <create permission="CREATE_ORG_UNIT" context_field="parent_ou"/>
6737                 <retrieve />
6738                 <update permission="UPDATE_ORG_UNIT" context_field="id"/>
6739                 <delete permission="DELETE_ORG_UNIT" context_field="parent_ou"/>
6740             </actions>
6741         </permacrud>
6742         </class>
6743         <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">
6744                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_custom_tree_id_seq">
6745                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6746                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
6747                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
6748                 </fields>
6749                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6750                         <actions>
6751                                 <create permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
6752                                 <retrieve/>
6753                                 <update permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
6754                                 <delete permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
6755                         </actions>
6756                 </permacrud>
6757         </class>
6758         <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">
6759                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_custom_tree_node_id_seq">
6760                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6761                         <field reporter:label="Tree" name="tree" reporter:datatype="link"/>
6762                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="link"/>
6763                         <field reporter:label="Parent" name="parent_node" reporter:datatype="link"/>
6764                         <field reporter:label="Sibling Sort Order" name="sibling_order" reporter:datatype="int"/>
6765                         <field reporter:label="Children" name="children" reporter:datatype="link" oils_persist:virtual="true" />
6766                 </fields>
6767                 <links>
6768                         <link field="tree" reltype="has_a" key="id" map="" class="aouct"/>
6769                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
6770                         <link field="parent_node" reltype="has_a" key="id" map="" class="aouctn"/>
6771                         <link field="children" reltype="has_many" key="parent_node" map="" class="aouctn"/>
6772                 </links>
6773                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6774                         <actions>
6775                                 <create permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
6776                                 <retrieve/>
6777                                 <update permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
6778                                 <delete permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
6779                         </actions>
6780                 </permacrud>
6781         </class>
6782         <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">
6783                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_id_seq">
6784                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
6785                         <field name="btype" reporter:datatype="text"/>
6786                         <field name="id" reporter:datatype="id" />
6787                         <field name="name"  reporter:datatype="text"/>
6788                         <field name="description" reporter:datatype="text"/>
6789                         <field name="owner" reporter:datatype="link"/>
6790                         <field name="pub" reporter:datatype="bool"/>
6791                         <field name="create_time" reporter:datatype="timestamp" />
6792                         <field name="owning_lib" reporter:datatype="org_unit" />
6793                 </fields>
6794                 <links>
6795                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
6796                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
6797                         <link field="items" reltype="has_many" key="bucket" map="" class="ccnbi"/>
6798                 </links>
6799                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6800                         <actions>
6801                                 <create permission="CREATE_CALLNUMBER_BUCKET ADMIN_CALLNUMBER_BUCKET" context="owning_lib" owning_user="owner"/>
6802                                 <retrieve permission="CREATE_CALLNUMBER_BUCKET ADMIN_CALLNUMBER_BUCKET" context="owning_lib" owning_user="owner"/>
6803                                 <update permission="CREATE_CALLNUMBER_BUCKET ADMIN_CALLNUMBER_BUCKET" context="owning_lib" owning_user="owner"/>
6804                                 <delete permission="CREATE_CALLNUMBER_BUCKET ADMIN_CALLNUMBER_BUCKET" context="owning_lib" owning_user="owner"/>
6805                         </actions>
6806                 </permacrud>
6807         </class>
6808         <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">
6809                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_note_id_seq">
6810                         <field name="id" reporter:datatype="id" />
6811                         <field name="bucket" reporter:datatype="link"/>
6812                         <field name="note" reporter:datatype="text" />
6813                 </fields>
6814                 <links>
6815                         <link field="bucket" reltype="has_a" key="id" map="" class="ccnb"/>
6816                 </links>
6817         </class>
6818         <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">
6819                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_id_seq">
6820                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
6821                         <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>
6822                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
6823                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
6824                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
6825                         <field reporter:label="SIP Field" name="sip_field" reporter:datatype="link"/>
6826                         <field reporter:label="SIP Format" name="sip_format" reporter:datatype="text"/>
6827                         <field reporter:label="Required" name="required" reporter:datatype="bool"/>
6828                         <field reporter:label="Checkout Archive" name="checkout_archive" reporter:datatype="bool"/>
6829                 </fields>
6830                 <links>
6831                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6832                         <link field="sip_field" reltype="has_a" key="field" map="" class="ascsf"/>
6833                         <link field="entries" reltype="has_many" key="stat_cat" map="" class="asce"/>
6834                 </links>
6835                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6836                         <actions>
6837                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
6838                         </actions>
6839                 </permacrud>
6840         </class>
6841         <class id="ac" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::card" oils_persist:tablename="actor.card" reporter:label="Library Card">
6842                 <fields oils_persist:primary="id" oils_persist:sequence="actor.card_id_seq">
6843                         <field reporter:label="IsActive?" name="active" reporter:datatype="bool"/>
6844                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
6845                         <field reporter:label="Card ID" name="id" reporter:datatype="id" />
6846                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
6847                 </fields>
6848                 <links>
6849                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6850                 </links>
6851                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6852                         <actions>
6853                                 <retrieve permission="VIEW_USER">
6854                                         <context link="usr" field="home_ou" />
6855                                 </retrieve>
6856                         </actions>
6857                 </permacrud>
6858         </class>
6859     <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">
6860         <fields oils_persist:primary="field">
6861             <field reporter:label="Field Identifier" name="field" reporter:datatype="text" reporter:selector="name"/>
6862             <field reporter:label="Field Name" name="name" reporter:datatype="text"/>
6863             <field reporter:label="Exclusive?" name="one_only" reporter:datatype="bool"/>
6864         </fields>
6865         <links/>
6866         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6867             <actions>
6868                 <create permission="CREATE_PATRON_STAT_CAT" global_required="true"/>
6869                 <retrieve />
6870                 <update permission="UPDATE_PATRON_STAT_CAT" global_required="true"/>
6871                 <delete permission="DELETE_PATRON_STAT_CAT" global_required="true"/>
6872             </actions>
6873         </permacrud>
6874     </class>
6875         <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">
6876                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_id_seq">
6877                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
6878                         <field reporter:label="Default Entries" name="default_entries" oils_persist:virtual="true" reporter:datatype="link"/>
6879                         <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>
6880                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
6881                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
6882                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
6883                         <field reporter:label="User Summary" name="usr_summary" reporter:datatype="bool"/>
6884                         <field reporter:label="SIP Field" name="sip_field" reporter:datatype="link"/>
6885                         <field reporter:label="SIP Format" name="sip_format" reporter:datatype="text"/>
6886                         <field reporter:label="Checkout Archive" name="checkout_archive" reporter:datatype="bool"/>
6887                         <field reporter:label="Required" name="required" reporter:datatype="bool"/>
6888                         <field reporter:label="Free Text" name="allow_freetext" reporter:datatype="bool"/>
6889                 </fields>
6890                 <links>
6891                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6892                         <link field="sip_field" reltype="has_a" key="field" map="" class="actscsf"/>
6893                         <link field="entries" reltype="has_many" key="stat_cat" map="" class="actsce"/>
6894                         <link field="default_entries" reltype="has_many" key="stat_cat" map="" class="actsced"/>
6895                 </links>
6896         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6897             <actions>
6898                 <create permission="CREATE_PATRON_STAT_CAT" context_field="owner"/>
6899                 <retrieve />
6900                 <update permission="UPDATE_PATRON_STAT_CAT" context_field="owner"/>
6901                 <delete permission="DELETE_PATRON_STAT_CAT" context_field="owner"/>
6902             </actions>
6903         </permacrud>
6904         </class>
6905         <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">
6906                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.series_field_entry_id_seq">
6907                         <field name="field" reporter:datatype="link"/>
6908                         <field name="id" reporter:datatype="id" />
6909                         <field name="source" reporter:datatype="link"/>
6910                         <field name="value"  reporter:datatype="text"/>
6911                 </fields>
6912                 <links>
6913                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
6914                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
6915                 </links>
6916         </class>
6917         <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">
6918                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_id_seq">
6919                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
6920                         <field name="btype" reporter:datatype="text"/>
6921                         <field name="id" reporter:datatype="id" />
6922                         <field name="name"  reporter:datatype="text"/>
6923                         <field name="description" reporter:datatype="text"/>
6924                         <field name="owner" reporter:datatype="link"/>
6925                         <field name="pub" reporter:datatype="bool"/>
6926                         <field name="create_time" reporter:datatype="timestamp" />
6927                         <field name="owning_lib" reporter:datatype="org_unit" />
6928                 </fields>
6929                 <links>
6930                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
6931                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
6932                         <link field="items" reltype="has_many" key="bucket" map="" class="cubi"/>
6933                 </links>
6934                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6935                         <actions>
6936                                 <create permission="CREATE_USER_BUCKET ADMIN_USER_BUCKET" context="owning_lib" owning_user="owner"/>
6937                                 <retrieve permission="CREATE_USER_BUCKET ADMIN_USER_BUCKET" context="owning_lib" owning_user="owner"/>
6938                                 <update permission="CREATE_USER_BUCKET ADMIN_USER_BUCKET" context="owning_lib" owning_user="owner"/>
6939                                 <delete permission="CREATE_USER_BUCKET ADMIN_USER_BUCKET" context="owning_lib" owning_user="owner"/>
6940                         </actions>
6941                 </permacrud>
6942         </class>
6943         <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">
6944                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_note_id_seq">
6945                         <field name="id" reporter:datatype="id" />
6946                         <field name="bucket" reporter:datatype="link"/>
6947                         <field name="note" reporter:datatype="text" />
6948                 </fields>
6949                 <links>
6950                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
6951                 </links>
6952         </class>
6953         <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">
6954                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
6955                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
6956                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6957                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
6958                         <field reporter:label="Pyament ID" name="id" reporter:datatype="id" />
6959                         <field reporter:label="Payment Note" name="note"  reporter:datatype="text"/>
6960                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
6961                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
6962                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
6963                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
6964                 </fields>
6965                 <links>
6966                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
6967                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
6968                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6969                 </links>
6970         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6971             <actions>
6972                 <retrieve permission="VIEW_USER_TRANSACTIONS">
6973                     <context link="xact" jump="usr" field="home_ou"/>
6974                 </retrieve>
6975                         </actions>
6976                 </permacrud>
6977         </class>
6978         <class id="afr" controller="open-ils.cstore" oils_obj:fieldmapper="authority::full_rec" oils_persist:tablename="authority.full_rec" reporter:label="Full Authority Record">
6979                 <fields oils_persist:primary="id" oils_persist:sequence="authority.full_rec_id_seq">
6980                         <field name="id" reporter:datatype="id" />
6981                         <field name="ind1" />
6982                         <field name="ind2" />
6983                         <field name="record" />
6984                         <field name="subfield" />
6985                         <field name="tag" />
6986                         <field name="value" />
6987                 </fields>
6988                 <links>
6989                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
6990                 </links>
6991         </class>
6992         <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">
6993                 <fields oils_persist:primary="id" oils_persist:sequence="authority.authority_linking_id_seq">
6994                         <field name="id" reporter:label="ID" reporter:datatype="id" />
6995                         <field name="source" reporter:label="Source Record" reporter:datatype="link" />
6996                         <field name="target" reporter:label="Target Record" reporter:datatype="link" />
6997                         <field name="field" reporter:label="Authority Field" reporter:datatype="link" />
6998                 </fields>
6999                 <links>
7000                         <link field="source" reltype="has_a" key="id" map="" class="are"/>
7001                         <link field="target" reltype="has_a" key="id" map="" class="are"/>
7002                         <link field="field" reltype="has_a" key="id" map="" class="acsaf"/>
7003                 </links>
7004         </class>
7005         <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">
7006                 <fields oils_persist:primary="id" oils_persist:sequence="config.non_cataloged_type_id_seq">
7007                         <field reporter:label="Circulation Duration" name="circ_duration" reporter:datatype="interval"/>
7008                         <field reporter:label="Non-cat Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>
7009                         <field reporter:label="In House?" name="in_house" reporter:datatype="bool"/>
7010                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
7011                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
7012                 </fields>
7013                 <links>
7014                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
7015                 </links>
7016         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7017             <actions>
7018                 <create permission="CREATE_NON_CAT_TYPE" context_field="owning_lib"/>
7019                 <retrieve/>
7020                 <update permission="CREATE_NON_CAT_TYPE" context_field="owning_lib"/>
7021                 <delete permission="CREATE_NON_CAT_TYPE" context_field="owning_lib"/>
7022             </actions>
7023         </permacrud>
7024
7025         </class>
7026         <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">
7027                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_type_id_seq">
7028                         <field reporter:label="Subordinate Types" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
7029                         <field reporter:label="Can Have Users?" name="can_have_users" reporter:datatype="bool"/>
7030                         <field reporter:label="Can Have Volumes?" name="can_have_vols" reporter:datatype="bool"/>
7031                         <field reporter:label="Type Depth" name="depth" reporter:datatype="int" />
7032                         <field reporter:label="Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>
7033                         <field reporter:label="Type Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
7034                         <field reporter:label="OPAC Label" name="opac_label"  reporter:datatype="text" oils_persist:i18n="true"/>
7035                         <field reporter:label="Parent Type" name="parent" reporter:datatype="link"/>
7036                         <field reporter:label="Org Units" name="org_units" oils_persist:virtual="true"  reporter:datatype="org_unit"/>
7037                 </fields>
7038                 <links>
7039                         <link field="parent" reltype="has_a" key="id" map="" class="aout"/>
7040                         <link field="children" reltype="has_many" key="parent" map="" class="aout"/>
7041                         <link field="org_units" reltype="has_many" key="ou_type" map="" class="aou"/>
7042                 </links>
7043         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7044             <actions>
7045                 <create permission="CREATE_ORG_TYPE" global_required="true"/>
7046                 <retrieve/>
7047                 <update permission="UPDATE_ORG_TYPE" global_required="true"/>
7048                 <delete permission="DELETE_ORG_TYPE" global_required="true"/>
7049             </actions>
7050         </permacrud>
7051         </class>
7052         <class id="bren" controller="open-ils.cstore" oils_obj:fieldmapper="biblio::record_note" oils_persist:tablename="biblio.record_note" reporter:label="Bib Record Note">
7053                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_note_id_seq">
7054                         <field name="create_date" reporter:datatype="timestamp"/>
7055                         <field name="creator" reporter:datatype="link"/>
7056                         <field name="edit_date" reporter:datatype="timestamp"/>
7057                         <field name="editor" reporter:datatype="link"/>
7058                         <field name="id" reporter:datatype="id" />
7059                         <field name="pub" reporter:datatype="bool"/>
7060                         <field name="record" reporter:datatype="link"/>
7061                         <field name="value"  reporter:datatype="text"/>
7062                 </fields>
7063                 <links>
7064                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7065                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7066                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
7067                 </links>
7068         </class>
7069         <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">
7070                 <fields oils_persist:primary="usr" oils_persist:sequence="">
7071                         <field name="balance_owed" reporter:datatype="money" />
7072                         <field name="total_owed" reporter:datatype="money" />
7073                         <field name="total_paid" reporter:datatype="money" />
7074                         <field name="usr" reporter:datatype="link"/>
7075                 </fields>
7076                 <links>
7077                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7078                 </links>
7079         </class>
7080     <class id="mg" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::grocery" oils_persist:tablename="money.grocery" reporter:label="Grocery Transaction">
7081                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
7082                         <field reporter:label="Billing Location" name="billing_location" reporter:datatype="link"/>
7083                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
7084                         <field reporter:label="Note" name="note"  reporter:datatype="text"/>
7085                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
7086                         <field reporter:label="Transaction Finish Timestamp" name="xact_finish" reporter:datatype="timestamp" />
7087                         <field reporter:label="Transaction Start Timestamp" name="xact_start" reporter:datatype="timestamp" />
7088                         <field reporter:label="Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
7089                         <field reporter:label="Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
7090                         <field reporter:label="Billable Transaction link" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
7091                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
7092                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
7093                 </fields>
7094                 <links>
7095                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7096                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
7097                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
7098                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
7099                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
7100                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
7101                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
7102                 </links>
7103         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7104             <actions>
7105                 <retrieve permission="VIEW_USER_TRANSACTIONS" context_field="billing_location"/>
7106             </actions>
7107         </permacrud>
7108         </class>
7109         <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">
7110                 <fields oils_persist:primary="id" oils_persist:sequence="config.bib_source_id_seq">
7111                         <field name="id" reporter:selector="source" reporter:datatype="id"/>
7112                         <field name="quality" reporter:datatype="int" />
7113                         <field name="source" reporter:datatype="text"/>
7114                         <field name="transcendant" reporter:datatype="bool"/>
7115                         <field name="can_have_copies" reporter:datatype="bool"/>
7116                 </fields>
7117                 <links/>
7118         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7119             <actions>
7120                 <create permission="CREATE_BIB_SOURCE" global_required="true"/>
7121                 <retrieve/>
7122                 <update permission="UPDATE_BIB_SOURCE" global_required="true"/>
7123                 <delete permission="DELETE_BIB_SOURCE" global_required="true"/>
7124             </actions>
7125         </permacrud>
7126         </class>
7127         <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">
7128                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
7129                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
7130                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
7131                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
7132                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
7133                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
7134                         <field reporter:label="Grocery Billing link" name="grocery" oils_persist:virtual="true" reporter:datatype="link"/>
7135                         <field reporter:label="Circulation Billing link" name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
7136                         <field reporter:label="Billing Line Items" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
7137                         <field reporter:label="Payment Line Items" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
7138                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
7139                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
7140                         <field reporter:label="Payment Summary" name="summary" oils_persist:virtual="true" reporter:datatype="link"/>
7141                 </fields>
7142                 <links>
7143                         <link field="grocery" reltype="might_have" key="id" map="" class="mg"/>
7144                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
7145                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7146                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
7147                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
7148                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
7149                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
7150                         <link field="summary" reltype="might_have" key="id" map="" class="mbts"/>
7151                 </links>
7152                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7153                         <actions>
7154                                 <retrieve permission="VIEW_USER_TRANSACTIONS">
7155                                         <context link="usr" field="home_ou" />
7156                                 </retrieve>
7157                         </actions>
7158                 </permacrud>
7159         </class>
7160         <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">
7161                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_id_seq">
7162                         <field reporter:label="Entry ID" name="id" reporter:datatype="id" />
7163                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
7164                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
7165                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
7166                         <field reporter:label="Default Entries" name="default_entries" oils_persist:virtual="true" reporter:datatype="link"/>
7167                 </fields>
7168                 <links>
7169                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
7170                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7171                         <link field="default_entries" reltype="has_many" key="stat_cat_entry" map="" class="actsced"/>
7172                 </links>
7173         </class>
7174         <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">
7175                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_default_id_seq">
7176                         <field reporter:label="Default Entry ID" name="id" reporter:datatype="id" />
7177                         <field reporter:label="Default Entry Value" name="stat_cat_entry" reporter:datatype="link"/>
7178                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
7179                         <field reporter:label="Default for Owner" name="owner" 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="stat_cat_entry" reltype="has_a" key="id" map="" class="actsce"/>
7185                 </links>
7186         </class>
7187         <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">
7188                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_id_seq">
7189                         <field name="bucket" reporter:datatype="link"/>
7190                         <field name="id" reporter:datatype="id" />
7191                         <field name="target_user" reporter:datatype="link"/>
7192                         <field name="create_time" reporter:datatype="timestamp" />
7193                         <field name="pos" reporter:datatype="int" />
7194                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
7195                 </fields>
7196                 <links>
7197                         <link field="target_user" reltype="has_a" key="id" map="" class="au"/>
7198                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
7199             <link field="notes" reltype="has_many" map="" key="item" class="cubin"/>
7200                 </links>
7201                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7202                         <actions>
7203                                 <retrieve permission="ADMIN_USER_BUCKET">
7204                     <context link="bucket" owning_lib="owning_lib"/>
7205                 </retrieve>
7206             </actions>
7207         </permacrud>
7208         </class>
7209         <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">
7210                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_note_id_seq">
7211                         <field name="id" reporter:datatype="id" />
7212                         <field name="item" reporter:datatype="link"/>
7213                         <field name="note" reporter:datatype="text" />
7214                 </fields>
7215                 <links>
7216                         <link field="item" reltype="has_a" key="id" map="" class="cubi"/>
7217                 </links>
7218         </class>
7219         <class id="mus" controller="open-ils.cstore" oils_obj:fieldmapper="money::user_summary" oils_persist:tablename="money.usr_summary" reporter:label="User Summary">
7220                 <fields oils_persist:primary="usr" oils_persist:sequence="">
7221                         <field name="balance_owed" reporter:datatype="money" />
7222                         <field name="total_owed" reporter:datatype="money" />
7223                         <field name="total_paid" reporter:datatype="money" />
7224                         <field name="usr" reporter:datatype="link"/>
7225                 </fields>
7226                 <links>
7227                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7228                 </links>
7229         </class>
7230         <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">
7231                 <fields oils_persist:primary="code" oils_persist:sequence="">
7232                         <field reporter:label="LitF Code" name="code" reporter:datatype="text"/>
7233                         <field reporter:label="LitF Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
7234                         <field reporter:label="LitF Name" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
7235                 </fields>
7236                 <links/>
7237         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7238             <actions>
7239                 <create permission="CREATE_MARC_CODE" global_required="true"/>
7240                 <retrieve/>
7241                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
7242                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
7243             </actions>
7244         </permacrud>
7245         </class>
7246         <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">
7247                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
7248                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
7249                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7250                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
7251                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
7252                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7253                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
7254                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>
7255                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
7256                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
7257                 </fields>
7258                 <links>
7259                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
7260                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
7261                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7262                 </links>
7263         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7264             <actions>
7265                 <retrieve permission="VIEW_USER_TRANSACTIONS">
7266                     <context link="xact" jump="usr" field="home_ou"/>
7267                 </retrieve>
7268                         </actions>
7269                 </permacrud>
7270         </class>
7271         <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">
7272                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
7273                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
7274                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7275                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
7276                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
7277                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7278                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
7279                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>
7280                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
7281                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
7282                 </fields>
7283                 <links>
7284                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
7285                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
7286                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7287                 </links>
7288         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7289             <actions>
7290                 <retrieve permission="VIEW_USER_TRANSACTIONS">
7291                     <context link="xact" jump="usr" field="home_ou"/>
7292                 </retrieve>
7293                         </actions>
7294                 </permacrud>
7295         </class>
7296         <class id="aoc" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circulation" oils_persist:tablename="action.open_circulation" reporter:label="Open Circulation">
7297                 <fields oils_persist:primary="id" oils_persist:sequence="">
7298                         <field name="checkin_lib" reporter:datatype="link"/>
7299                         <field name="checkin_staff" reporter:datatype="link"/>
7300                         <field name="checkin_time" reporter:datatype="timestamp"/>
7301                         <field name="circ_lib"  reporter:datatype="org_unit"/>
7302                         <field name="circ_staff" reporter:datatype="link"/>
7303                         <field name="desk_renewal" reporter:datatype="bool"/>
7304                         <field name="due_date" reporter:datatype="timestamp"/>
7305                         <field name="duration" reporter:datatype="interval"/>
7306                         <field name="duration_rule" reporter:datatype="link"/>
7307                         <field name="fine_interval" reporter:datatype="interval"/>
7308                         <field name="id" reporter:datatype="id" />
7309                         <field name="max_fine" reporter:datatype="money" />
7310                         <field name="max_fine_rule" reporter:datatype="link"/>
7311                         <field name="opac_renewal" reporter:datatype="bool"/>
7312                         <field name="phone_renewal" reporter:datatype="bool"/>
7313                         <field name="recurring_fine" reporter:datatype="money" />
7314                         <field name="recurring_fine_rule" reporter:datatype="link"/>
7315                         <field name="renewal_remaining" reporter:datatype="int" />
7316             <field name="grace_period" reporter:datatype="interval" />
7317                         <field name="stop_fines" reporter:datatype="text"/>
7318                         <field name="stop_fines_time" reporter:datatype="timestamp"/>
7319                         <field name="target_copy" reporter:datatype="link"/>
7320                         <field name="usr" reporter:datatype="link"/>
7321                         <field name="xact_finish" reporter:datatype="timestamp" />
7322                         <field name="xact_start" reporter:datatype="timestamp" />
7323                         <field name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
7324                 </fields>
7325                 <links>
7326                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
7327                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
7328                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
7329                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
7330                 </links>
7331         </class>
7332         <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">
7333                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.subject_field_entry_id_seq">
7334                         <field name="field" reporter:datatype="link"/>
7335                         <field name="id" reporter:datatype="id" />
7336                         <field name="source" reporter:datatype="link"/>
7337                         <field name="value" reporter:datatype="text"/>
7338                 </fields>
7339                 <links>
7340                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
7341                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
7342                 </links>
7343         </class>
7344         <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">
7345                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_recurring_fine_id_seq">
7346                         <field name="high" reporter:datatype="money" />
7347                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
7348                         <field name="low" reporter:datatype="money" />
7349                         <field name="name" reporter:datatype="text"/>
7350                         <field name="normal" reporter:datatype="money" />
7351                         <field name="recurrence_interval" reporter:datatype="interval"/>
7352             <field name="grace_period" reporter:datatype="interval" />
7353                 </fields>
7354                 <links/>
7355         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7356             <actions>
7357                 <create permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
7358                 <retrieve/>
7359                 <update permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
7360                 <delete permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
7361             </actions>
7362         </permacrud>
7363         </class>
7364         <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">
7365                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
7366                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
7367                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7368                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
7369                         <field reporter:label="Workstation link" name="cash_drawer" reporter:datatype="link"/>
7370                         <field reporter:label="Check Number" name="check_number" reporter:datatype="int" />
7371                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
7372                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7373                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
7374                         <field reporter:label="Transaction link" name="xact" reporter:datatype="link"/>
7375                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
7376                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
7377                 </fields>
7378                 <links>
7379                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
7380                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
7381                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
7382                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7383                 </links>
7384         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7385             <actions>
7386                 <retrieve permission="VIEW_USER_TRANSACTIONS">
7387                     <context link="xact" jump="usr" field="home_ou"/>
7388                 </retrieve>
7389                         </actions>
7390                 </permacrud>
7391         </class>
7392         <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">
7393                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_id_seq">
7394                         <field reporter:label="Age Hold Protection" name="age_protect" reporter:datatype="link"/>
7395                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
7396                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
7397                         <field reporter:label="Call Number/Volume" name="call_number" reporter:datatype="link"/>
7398                         <field reporter:label="Circulation Type (MARC)" name="circ_as_type" reporter:datatype="link"/>
7399                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
7400                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
7401                         <field reporter:label="Can Circulate" name="circulate" reporter:datatype="bool"/>
7402                         <field reporter:label="Copy Number on Volume" name="copy_number" reporter:datatype="text"/>
7403                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
7404                         <field reporter:label="Active Date/Time" name="active_date" reporter:datatype="timestamp"/>
7405                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
7406                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
7407                         <field reporter:label="Dummy ISBN" name="dummy_isbn" reporter:datatype="text"/>
7408                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
7409                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money" />
7410                         <field reporter:label="Precat Dummy Author" name="dummy_author" reporter:datatype="text"/>
7411                         <field reporter:label="Precat Dummy Title" name="dummy_title" reporter:datatype="text"/>
7412                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
7413                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
7414                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
7415                         <field reporter:label="Is Holdable" name="holdable" reporter:datatype="bool" />
7416                         <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
7417                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
7418                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link"/>
7419                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool" />
7420                         <field reporter:label="Price" name="price" reporter:datatype="money" />
7421                         <field reporter:label="Is Reference" name="ref" reporter:datatype="bool"/>
7422                         <field reporter:label="Copy Status" name="status" reporter:datatype="link"/>
7423                         <field reporter:label="Copy Status Changed Time" name="status_changed_time" reporter:datatype="timestamp"/>
7424                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool"/>
7425                         <field reporter:label="Floating Group" name="floating" reporter:datatype="link"/>
7426                         <field reporter:label="Cost" name="cost" reporter:datatype="money"/>
7427                         <field reporter:label="Copy Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
7428                         <field reporter:label="Stat-Cat entry maps" name="stat_cat_entry_copy_maps" oils_persist:virtual="true" reporter:datatype="link"/>
7429                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
7430                         <field reporter:label="Aged (patronless) Circulations" name="aged_circulations" oils_persist:virtual="true" reporter:datatype="link"/>
7431                         <field reporter:label="Combined Aged and Active Circulations" name="all_circulations" oils_persist:virtual="true" reporter:datatype="link"/>
7432                         <field reporter:label="Total Circulations" name="total_circ_count" oils_persist:virtual="true" reporter:datatype="link"/>
7433                         <field reporter:label="Last Circulation Date" name="last_circ" oils_persist:virtual="true" reporter:datatype="link"/>
7434                         <field reporter:label="Holds" name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
7435                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
7436                         <field reporter:label="Monograph Parts" name="parts" oils_persist:virtual="true" reporter:datatype="link"/>
7437                         <field reporter:label="Peer Record Maps" name="peer_record_maps" oils_persist:virtual="true" reporter:datatype="link"/>
7438                         <field reporter:label="Peer Records" name="peer_records" oils_persist:virtual="true" reporter:datatype="link"/>
7439                         <field reporter:label="Last Captured Hold" name="last_captured_hold" oils_persist:virtual="true" reporter:datatype="link"/>
7440                         <field reporter:label="Latest Inventory" name="latest_inventory" oils_persist:virtual="true" reporter:datatype="link"/>
7441                         <field reporter:label="Has Holds" name="holds_count" oils_persist:virtual="true" reporter:datatype="link"/>
7442                         <field reporter:label="Copy Tags" name="tags" oils_persist:virtual="true" reporter:datatype="link"/>
7443                         <field reporter:label="Copy Alerts" name="copy_alerts" oils_persist:virtual="true" reporter:datatype="link"/>
7444                 </fields>
7445                 <links>
7446                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
7447                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
7448                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
7449                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7450                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7451                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
7452                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
7453                         <link field="holds" reltype="has_many" key="target_copy" map="hold" class="ahcm"/>
7454                         <link field="stat_cat_entry_copy_maps" reltype="has_many" key="owning_copy" map="" class="ascecm"/>
7455                         <link field="notes" reltype="has_many" key="owning_copy" map="" class="acpn"/>
7456                         <link field="stat_cat_entries" reltype="has_many" key="owning_copy" map="stat_cat_entry" class="ascecm"/>
7457                         <link field="circulations" reltype="has_many" key="target_copy" map="" class="circ"/>
7458                         <link field="aged_circulations" reltype="has_many" key="target_copy" map="" class="acirc"/>
7459                         <link field="all_circulations" reltype="has_many" key="target_copy" map="" class="combcirc"/>
7460                         <link field="total_circ_count" reltype="might_have" key="id" map="" class="erfcc"/>
7461                         <link field="last_circ" reltype="might_have" key="id" map="" class="rlc"/>
7462                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
7463                         <link field="parts" reltype="has_many" key="target_copy" map="part" class="acpm"/>
7464                         <link field="peer_record_maps" reltype="has_many" key="target_copy" map="" class="bpbcm"/>
7465                         <link field="peer_records" reltype="has_many" key="target_copy" map="peer_record" class="bpbcm"/>
7466                         <link field="last_captured_hold" reltype="has_a" key="current_copy" map="" class="alhr"/>
7467                         <link field="latest_inventory" reltype="might_have" key="copy" map="" class="alci"/>
7468                         <link field="floating" reltype="has_a" key="id" map="" class="cfg"/>
7469                         <link field="holds_count" reltype="might_have" key="id" map="" class="hasholdscount"/>
7470                         <link field="tags" reltype="has_many" key="copy" map="" class="acptcm"/>
7471                         <link field="copy_alerts" reltype="has_many" key="copy" map="" class="aca"/>
7472                         <link field="circ_as_type" reltype="has_a" key="code" map="" class="citm"/>
7473                 </links>
7474         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7475             <actions>
7476                 <create permission="CREATE_COPY">
7477                     <context link="call_number" field="owning_lib"/>
7478                 </create>
7479                 <retrieve/>
7480                 <update permission="UPDATE_COPY">
7481                     <context link="call_number" field="owning_lib"/>
7482                 </update>
7483                 <delete permission="DELETE_COPY">
7484                     <context link="call_number" field="owning_lib"/>
7485                 </delete>
7486             </actions>
7487         </permacrud>
7488         </class>
7489
7490         <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">
7491                 <fields oils_persist:primary="id" oils_persist:sequence="asset.latest_inventory_id_seq">
7492             <field reporter:label="Latest Inventory ID" name="id" reporter:datatype="id"/>
7493                         <field reporter:label="Latest Inventory Date" name="inventory_date" reporter:datatype="timestamp"/>
7494                         <field reporter:label="Latest Inventory Workstation" name="inventory_workstation" reporter:datatype="link"/>
7495                         <field reporter:label="Copy" name="copy" reporter:datatype="link"/>
7496                 </fields>
7497                 <links>
7498                         <link field="inventory_workstation" reltype="has_a" key="id" map="" class="aws"/>
7499                         <link field="copy" reltype="has_a" key="id" map="" class="acp"/>
7500                 </links>
7501         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7502             <actions>
7503                                 <create/>
7504                                 <retrieve/>
7505                                 <update/>
7506                                 <delete/>
7507             </actions>
7508         </permacrud>
7509         </class>
7510
7511         <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">
7512                 <fields oils_persist:primary="id" oils_persist:sequence="config.copy_alert_type_id_seq">
7513                         <field reporter:label="Id" name="id" reporter:selector="name" reporter:datatype="id"/>
7514                         <field reporter:label="Scope Org Unit" name="scope_org"  reporter:datatype="org_unit"/>
7515                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
7516                         <field reporter:label="Name" name="name" reporter:datatype="text" />
7517                         <field reporter:label="State" name="state" reporter:datatype="text"/>
7518                         <field reporter:label="Event" name="event" reporter:datatype="text" />
7519                         <field reporter:label="During Renewal" name="in_renew" reporter:datatype="bool" />
7520                         <field reporter:label="Allow At Copy Circ Lib" name="at_circ" reporter:datatype="bool"/>
7521                         <field reporter:label="Allow At Copy Owning Lib" name="at_owning" reporter:datatype="bool"/>
7522                         <field reporter:label="Invert allowed locations" name="invert_location" reporter:datatype="bool"/>
7523                         <field reporter:label="Next Statuses" name="next_status" reporter:datatype="text"/>
7524                 </fields>
7525                 <links>
7526                         <link field="scope_org" reltype="has_a" key="id" map="" class="aou"/>
7527                 </links>
7528         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7529             <actions>
7530                 <create permission="ADMIN_COPY_ALERT_TYPE CREATE_COPY_ALERT_TYPE" context_field="scope_org"/>
7531                 <retrieve/>
7532                 <update permission="ADMIN_COPY_ALERT_TYPE UPDATE_COPY_ALERT_TYPE" context_field="scope_org"/>
7533                 <delete permission="ADMIN_COPY_ALERT_TYPE DELETE_COPY_ALERT_TYPE" context_field="scope_org"/>
7534             </actions>
7535         </permacrud>
7536         </class>
7537
7538         <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">
7539                 <fields oils_persist:primary="id" oils_persist:sequence="actor.copy_alert_suppress_id_seq">
7540                         <field reporter:label="Id" name="id" reporter:datatype="id"/>
7541                         <field reporter:label="Org Unit" name="org"  reporter:datatype="org_unit"/>
7542                         <field reporter:label="Alert Type" name="alert_type" reporter:datatype="link" />
7543                 </fields>
7544                 <links>
7545                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
7546                         <link field="alert_type" reltype="has_a" key="id" map="" class="ccat"/>
7547                 </links>
7548         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7549             <actions>
7550                 <create permission="ADMIN_COPY_ALERT_SUPPRESS CREATE_COPY_ALERT_SUPPRESS" context_field="org"/>
7551                 <retrieve/>
7552                 <update permission="ADMIN_COPY_ALERT_SUPPRESS UPDATE_COPY_ALERT_SUPPRESS" context_field="org"/>
7553                 <delete permission="ADMIN_COPY_ALERT_SUPPRESS DELETE_COPY_ALERT_SUPPRESS" context_field="org"/>
7554             </actions>
7555         </permacrud>
7556         </class>
7557
7558         <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">
7559                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_alert_id_seq">
7560                         <field reporter:label="Id" name="id" reporter:datatype="id"/>
7561                         <field reporter:label="Alert Type" name="alert_type" reporter:datatype="link" />
7562                         <field reporter:label="Copy" name="copy"  reporter:datatype="link"/>
7563                         <field reporter:label="Temporary" name="temp" reporter:datatype="bool" />
7564                         <field reporter:label="Create Date/Time" name="create_time" reporter:datatype="timestamp" />
7565                         <field reporter:label="Creator" name="create_staff" reporter:datatype="link"/>
7566                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7567                         <field reporter:label="Acknowledge Date/Time" name="ack_time" reporter:datatype="timestamp" />
7568                         <field reporter:label="Acknowledger" name="ack_staff" reporter:datatype="link"/>
7569                 </fields>
7570                 <links>
7571                         <link field="alert_type" reltype="has_a" key="id" map="" class="ccat"/>
7572                         <link field="copy" reltype="has_a" key="id" map="" class="acp"/>
7573                         <link field="create_staff" reltype="has_a" key="id" map="" class="au"/>
7574                         <link field="ack_staff" reltype="has_a" key="id" map="" class="au"/>
7575                 </links>
7576         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7577             <actions>
7578                 <create permission="ADMIN_COPY_ALERT CREATE_COPY_ALERT" global_required="true"/>
7579                 <retrieve permission="ADMIN_COPY_ALERT VIEW_COPY_ALERT" global_required="true"/>
7580                 <update permission="ADMIN_COPY_ALERT UPDATE_COPY_ALERT" global_required="true"/>
7581                 <delete permission="ADMIN_COPY_ALERT DELETE_COPY_ALERT" global_required="true"/>
7582             </actions>
7583         </permacrud>
7584         </class>
7585
7586         <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">
7587                 <fields oils_persist:primary="id">
7588                         <field reporter:label="Id" name="id" reporter:datatype="id"/>
7589                         <field reporter:label="Alert Type" name="alert_type" reporter:datatype="link" />
7590                         <field reporter:label="Copy" name="copy"  reporter:datatype="link"/>
7591                         <field reporter:label="Temporary" name="temp" reporter:datatype="bool" />
7592                         <field reporter:label="Create Date/Time" name="create_time" reporter:datatype="timestamp" />
7593                         <field reporter:label="Creator" name="create_staff" reporter:datatype="link"/>
7594                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7595                         <field reporter:label="Acknowledge Date/Time" name="ack_time" reporter:datatype="timestamp" />
7596                         <field reporter:label="Acknowledger" name="ack_staff" reporter:datatype="link"/>
7597                 </fields>
7598                 <links>
7599                         <link field="alert_type" reltype="has_a" key="id" map="" class="ccat"/>
7600                         <link field="copy" reltype="has_a" key="id" map="" class="acp"/>
7601                         <link field="create_staff" reltype="has_a" key="id" map="" class="au"/>
7602                         <link field="ack_staff" reltype="has_a" key="id" map="" class="au"/>
7603                 </links>
7604         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7605             <actions>
7606                 <create permission="ADMIN_COPY_ALERT CREATE_COPY_ALERT" global_required="true"/>
7607                 <retrieve permission="ADMIN_COPY_ALERT VIEW_COPY_ALERT" global_required="true"/>
7608                 <update permission="ADMIN_COPY_ALERT UPDATE_COPY_ALERT" global_required="true"/>
7609                 <delete permission="ADMIN_COPY_ALERT DELETE_COPY_ALERT" global_required="true"/>
7610             </actions>
7611         </permacrud>
7612         </class>
7613
7614         <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">
7615                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_template_id_seq">
7616                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name" />
7617                         <field reporter:label="Owning Lib" name="owning_lib" reporter:datatype="org_unit"/>
7618                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
7619                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
7620                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
7621                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
7622                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
7623                         <field reporter:label="Circ Lib" name="circ_lib" reporter:datatype="org_unit"/>
7624                         <field reporter:label="Status" name="status" reporter:datatype="link"/>
7625                         <field reporter:label="Location" name="location" reporter:datatype="link"/>
7626                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
7627                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
7628                         <field reporter:label="Age Protect" name="age_protect" reporter:datatype="link"/>
7629                         <field reporter:label="Circulate?" name="circulate" reporter:datatype="bool"/>
7630                         <field reporter:label="Deposit?" name="deposit" reporter:datatype="bool"/>
7631                         <field reporter:label="Reference?" name="ref" reporter:datatype="bool"/>
7632                         <field reporter:label="Holdable?" name="holdable" reporter:datatype="bool"/>
7633                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
7634                         <field reporter:label="Price" name="price" reporter:datatype="money"/>
7635                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="link"/>
7636                         <field reporter:label="Circ As Type" name="circ_as_type" reporter:datatype="link"/>
7637                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
7638                         <field reporter:label="OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
7639                         <field reporter:label="Floating Group" name="floating" reporter:datatype="link"/>
7640                         <field reporter:label="Mint Condition?" name="mint_condition" reporter:datatype="bool"/>
7641                 </fields>
7642                 <links>
7643                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
7644                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7645                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7646                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
7647                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
7648                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
7649                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
7650                         <link field="floating" reltype="has_a" key="id" map="" class="cfg"/>
7651                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
7652                         <link field="circ_as_type" reltype="has_a" key="code" map="" class="citm"/>
7653                 </links>
7654                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7655                         <actions>
7656                                 <create permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
7657                                 <retrieve />
7658                                 <update permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
7659                                 <delete permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
7660                         </actions>
7661                 </permacrud>
7662         </class>
7663
7664         <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">
7665                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_age_hold_protect_id_seq">
7666                         <field reporter:label="Item Age" name="age" reporter:datatype="interval"/>
7667                         <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
7668                         <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>
7669                         <field reporter:label="Allowed Proximity" name="prox" reporter:datatype="int" />
7670                 </fields>
7671                 <links/>
7672         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7673             <actions>
7674                 <create permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
7675                 <retrieve/>
7676                 <update permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
7677                 <delete permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
7678             </actions>
7679         </permacrud>
7680         </class>
7681         <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">
7682                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_max_fine_id_seq">
7683                         <field reporter:label="Max Fine Amount" name="amount" reporter:datatype="money" />
7684                         <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
7685                         <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>
7686                         <field reporter:label="Is Percent" name="is_percent" reporter:datatype="bool"/>
7687                 </fields>
7688                 <links/>
7689         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7690             <actions>
7691                 <create permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
7692                 <retrieve/>
7693                 <update permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
7694                 <delete permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
7695             </actions>
7696         </permacrud>
7697         </class>
7698         <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">
7699                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_tree_id_seq">
7700                         <field reporter:label="Child Groups" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
7701                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
7702                         <field reporter:label="Group ID" name="id" reporter:selector="name" reporter:datatype="id"/>
7703                         <field reporter:label="Group Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
7704                         <field reporter:label="Parent Group" name="parent" reporter:datatype="link"/>
7705                         <field reporter:label="User Expiration Interval" name="perm_interval" reporter:datatype="interval"/>
7706                         <field reporter:label="Required Permission" name="application_perm" reporter:datatype="text"/>
7707                         <field reporter:label="Is User Group" name="usergroup" reporter:datatype="bool"/>
7708                         <field reporter:label="Hold Priority" name="hold_priority" reporter:datatype="int"/>
7709                 </fields>
7710                 <links>
7711                         <link field="parent" reltype="has_a" key="id" map="" class="pgt"/>
7712                         <link field="children" reltype="has_many" key="parent" map="" class="pgt"/>
7713                 </links>
7714         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7715             <actions>
7716                 <create permission="CREATE_PERM" global_required="true"/>
7717                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
7718                 <update permission="UPDATE_PERM" global_required="true"/>
7719                 <delete permission="DELETE_PERM" global_required="true"/>
7720             </actions>
7721         </permacrud>
7722         </class>
7723         <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">
7724                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_tree_display_entry_id_seq">
7725                         <field reporter:label="Entry ID" name="id" reporter:selector="name" reporter:datatype="id"/>
7726                         <field reporter:label="Group ID" name="grp" reporter:datatype="link" oils_persist:i18n="true"/>
7727                         <field reporter:label="Parent Group" name="parent" reporter:datatype="link"/>
7728                         <field reporter:label="Org Unit" name="org" reporter:datatype="link"/>
7729                         <field reporter:label="Position" name="position" reporter:datatype="int"/>
7730                         <field reporter:label="Child Entries" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
7731                 </fields>
7732                 <links>
7733                         <link field="parent" reltype="has_a" key="id" map="" class="pgtde"/>
7734                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
7735                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
7736                         <link field="children" reltype="has_many" key="parent" map="" class="pgtde"/>
7737                 </links>
7738                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7739                         <actions>
7740                                 <create permission="MANAGE_CUSTOM_PERM_GRP_TREE" global_required="true"/>
7741                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
7742                                 <update permission="MANAGE_CUSTOM_PERM_GRP_TREE" global_required="true"/>
7743                                 <delete permission="MANAGE_CUSTOM_PERM_GRP_TREE" global_required="true"/>
7744                         </actions>
7745                 </permacrud>
7746         </class>
7747         <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">
7748                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_answer_id_seq">
7749                         <field reporter:label="Responses using this Answer" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
7750                         <field reporter:label="Answer Text" name="answer" reporter:datatype="text"/>
7751                         <field reporter:label="Answer ID" name="id" reporter:datatype="id" />
7752                         <field reporter:label="Question" name="question" reporter:datatype="link"/>
7753                 </fields>
7754                 <links>
7755                         <link field="question" reltype="has_a" key="id" map="" class="asvq"/>
7756                         <link field="responses" reltype="has_many" key="answer" map="" class="asvr"/>
7757                 </links>
7758         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7759             <actions>
7760                 <create permission="ADMIN_SURVEY">
7761                     <context link="question" jump="survey" field="owner"/>
7762                 </create>
7763                 <retrieve/>
7764                 <update permission="ADMIN_SURVEY">
7765                     <context link="question" jump="survey" field="owner"/>
7766                 </update>
7767                 <delete permission="ADMIN_SURVEY">
7768                     <context link="question" jump="survey" field="owner"/>
7769                 </delete>
7770             </actions>
7771         </permacrud>
7772         </class>
7773         <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">
7774                 <fields oils_persist:primary="id" oils_persist:sequence="action.non_cataloged_circulation_id_seq">
7775                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
7776                         <field reporter:label="Circulation Date/Time" name="circ_time" reporter:datatype="timestamp"/>
7777                         <field reporter:label="Non-cat Circulation ID" name="id" reporter:datatype="id" />
7778                         <field reporter:label="Non-cat Item Type" name="item_type" reporter:datatype="link"/>
7779                         <field reporter:label="Patron" name="patron" reporter:datatype="link"/>
7780                         <field reporter:label="Circulating Staff" name="staff" reporter:datatype="link"/>
7781                         <field reporter:label="Virtual Due Date/Time" name="duedate" reporter:datatype="timestamp" oils_persist:virtual="true"/>
7782                 </fields>
7783                 <links>
7784                         <link field="item_type" reltype="has_a" key="id" map="" class="cnct"/>
7785                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
7786                         <link field="patron" reltype="has_a" key="id" map="" class="au"/>
7787                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
7788                 </links>
7789                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7790                         <actions>
7791                                 <retrieve permission="VIEW_CIRCULATIONS" context_field="circ_lib" />
7792                         </actions>
7793                 </permacrud>
7794         </class>
7795         <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">
7796                 <fields oils_persist:primary="usr" oils_persist:sequence="">
7797                         <field name="balance_owed" reporter:datatype="money" />
7798                         <field name="total_owed" reporter:datatype="money" />
7799                         <field name="total_paid" reporter:datatype="money" />
7800                         <field name="usr" reporter:datatype="link"/>
7801                 </fields>
7802                 <links>
7803                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7804                 </links>
7805         </class>
7806         <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">
7807                 <fields oils_persist:primary="id" oils_persist:sequence="action.unfulfilled_hold_list_id_seq">
7808                         <field reporter:label="Non-fulfilling Library" name="circ_lib"  reporter:datatype="org_unit"/>
7809                         <field reporter:label="Non-fulfilling Copy" name="current_copy" reporter:datatype="link"/>
7810                         <field reporter:label="Retargeting Date/Time" name="fail_time" reporter:datatype="timestamp"/>
7811                         <field reporter:label="Hold" name="hold" reporter:datatype="link"/>
7812                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
7813                 </fields>
7814                 <links>
7815                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
7816                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
7817                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
7818                 </links>
7819         </class>
7820         <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">
7821                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.identifier_field_entry_id_seq">
7822                         <field name="field" reporter:datatype="link"/>
7823                         <field name="id" reporter:datatype="id" />
7824                         <field name="source" reporter:datatype="link"/>
7825                         <field name="value" reporter:datatype="text"/>
7826                 </fields>
7827                 <links>
7828                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
7829                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
7830                 </links>
7831         </class>
7832         <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">
7833                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.title_field_entry_id_seq">
7834                         <field name="field" reporter:datatype="link"/>
7835                         <field name="id" reporter:datatype="id" />
7836                         <field name="source" reporter:datatype="link"/>
7837                         <field name="value" reporter:datatype="text"/>
7838                 </fields>
7839                 <links>
7840                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
7841                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
7842                 </links>
7843         </class>
7844         <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">
7845                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_usr_map_id_seq">
7846                         <field reporter:label="Entry ID" name="id" reporter:datatype="id" />
7847                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
7848                         <field reporter:label="Entry Text" name="stat_cat_entry" reporter:datatype="text"/>
7849                         <field reporter:label="User" name="target_usr" reporter:datatype="link"/>
7850                 </fields>
7851                 <links>
7852                         <link field="target_usr" reltype="has_a" key="id" map="" class="au"/>
7853                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
7854                 </links>
7855         </class>
7856         <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">
7857                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_perm_map_id_seq">
7858                         <field name="depth" reporter:datatype="int" />
7859                         <field name="grantable" reporter:datatype="bool"/>
7860                         <field name="grp" reporter:datatype="link"/>
7861                         <field name="id" reporter:datatype="id" />
7862                         <field name="perm" reporter:datatype="link"/>
7863                 </fields>
7864                 <links>
7865                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
7866                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
7867                 </links>
7868         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7869             <actions>
7870                 <create permission="ASSIGN_GROUP_PERM" global_required="true"/>
7871                 <retrieve permission="ASSIGN_GROUP_PERM UPDATE_GROUP_PERM REMOVE_GROUP_PERM" global_required="true"/>
7872                 <update permission="UPDATE_GROUP_PERM" global_required="true"/>
7873                 <delete permission="REMOVE_GROUP_PERM" global_required="true"/>
7874             </actions>
7875         </permacrud>
7876         </class>
7877         <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">
7878                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_id_seq">
7879                         <field name="items" oils_persist:virtual="true" />
7880                         <field name="btype" reporter:datatype="text"/>
7881                         <field name="id" reporter:datatype="id" />
7882                         <field name="name" reporter:datatype="text"/>
7883                         <field name="description" reporter:datatype="text"/>
7884                         <field name="owner" reporter:datatype="link"/>
7885                         <field name="pub" reporter:datatype="bool"/>
7886                         <field name="create_time" reporter:datatype="timestamp" />
7887                         <field name="owning_lib" reporter:datatype="org_unit" />
7888                 </fields>
7889                 <links>
7890                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
7891                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7892                         <link field="items" reltype="has_many" key="bucket" map="" class="ccbi"/>
7893                 </links>
7894                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7895                         <actions>
7896                                 <create permission="CREATE_COPY_BUCKET ADMIN_COPY_BUCKET" context="owning_lib" owning_user="owner"/>
7897                                 <retrieve permission="CREATE_COPY_BUCKET ADMIN_COPY_BUCKET" context="owning_lib" owning_user="owner"/>
7898                                 <update permission="CREATE_COPY_BUCKET ADMIN_COPY_BUCKET" context="owning_lib" owning_user="owner"/>
7899                                 <delete permission="CREATE_COPY_BUCKET ADMIN_COPY_BUCKET" context="owning_lib" owning_user="owner"/>
7900                         </actions>
7901                 </permacrud>
7902         </class>
7903         <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">
7904                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_note_id_seq">
7905                         <field name="id" reporter:datatype="id" />
7906                         <field name="bucket" reporter:datatype="link"/>
7907                         <field name="note" reporter:datatype="text" />
7908                 </fields>
7909                 <links>
7910                         <link field="bucket" reltype="has_a" key="id" map="" class="ccb"/>
7911                 </links>
7912         </class>
7913         <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">
7914                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_work_ou_map_id_seq">
7915                         <field reporter:label="User/Working Location Map ID" name="id" reporter:datatype="int" />
7916                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
7917                         <field reporter:label="Working Location" name="work_ou" reporter:datatype="link"/>
7918                 </fields>
7919                 <links>
7920                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7921                         <link field="work_ou" reltype="has_a" key="id" map="" class="aou"/>
7922                 </links>
7923         </class>
7924         <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">
7925                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_perm_map_id_seq">
7926                         <field name="depth" reporter:datatype="int"/>
7927                         <field name="grantable" reporter:datatype="bool"/>
7928                         <field name="id" reporter:datatype="id" />
7929                         <field name="perm" reporter:datatype="link"/>
7930                         <field name="usr" reporter:datatype="link"/>
7931                 </fields>
7932                 <links>
7933                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7934                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
7935                 </links>
7936         </class>
7937         <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">
7938                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_object_perm_map_id_seq">
7939                         <field name="object_id" reporter:datatype="text"/>
7940                         <field name="grantable" reporter:datatype="bool"/>
7941                         <field name="id" reporter:datatype="id" />
7942                         <field name="perm" reporter:datatype="link"/>
7943                         <field name="usr" reporter:datatype="link"/>
7944                         <field name="object_type" reporter:datatype="text"/>
7945                 </fields>
7946                 <links>
7947                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7948                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
7949                 </links>
7950         </class>
7951         <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">
7952                 <fields oils_persist:primary="id" oils_persist:sequence="">
7953                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7954                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
7955                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7956                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
7957                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
7958                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
7959                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
7960                         <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7961                         <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7962                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7963                         <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7964                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7965                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7966                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7967                         <field reporter:label="Account Adjustment Detail" name="account_adjustment" oils_persist:virtual="true" reporter:datatype="link"/>
7968                 </fields>
7969                 <links>
7970                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
7971                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
7972                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
7973                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
7974                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
7975                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
7976                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
7977                         <link field="account_adjustment" reltype="might_have" key="id" map="" class="maa"/>
7978                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7979                 </links>
7980         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7981             <actions>
7982                 <retrieve permission="VIEW_USER_TRANSACTIONS">
7983                     <context link="xact" jump="usr" field="home_ou"/>
7984                 </retrieve>
7985                         </actions>
7986                 </permacrud>
7987         </class>
7988         <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">
7989                 <fields oils_persist:primary="id" oils_persist:sequence="">
7990                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7991                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
7992                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7993                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
7994                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
7995                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
7996                         <field reporter:label="Accepting User" name="accepting_usr" reporter:datatype="link"/>
7997                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
7998                         <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7999                         <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8000                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8001                         <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8002                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8003                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8004                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8005                         <field reporter:label="Account Adjustment Detail" name="account_adjustment" oils_persist:virtual="true" reporter:datatype="link"/>
8006                 </fields>
8007                 <links>
8008                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
8009                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
8010                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
8011                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
8012                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
8013                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
8014                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
8015                         <link field="account_adjustment" reltype="might_have" key="id" map="" class="maa"/>
8016                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
8017                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
8018                 </links>
8019                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8020                         <actions>
8021                                 <retrieve permission="VIEW_USER_TRANSACTIONS">
8022                                         <context link="xact" jump="usr" field="home_ou"/>
8023                                 </retrieve>
8024                         </actions>
8025                 </permacrud>
8026         </class>
8027         <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">
8028                 <fields oils_persist:primary="id" oils_persist:sequence="">
8029                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
8030                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
8031                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8032                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
8033                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
8034                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
8035                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
8036                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8037                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8038                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8039                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8040                         <field reporter:label="Account Adjustment Detail" name="account_adjustment" oils_persist:virtual="true" reporter:datatype="link"/>
8041                 </fields>
8042                 <links>
8043                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
8044                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
8045                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
8046                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
8047                         <link field="account_adjustment" reltype="might_have" key="id" map="" class="maa"/>
8048                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
8049                 </links>
8050         </class>
8051         <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">
8052                 <fields oils_persist:primary="id" oils_persist:sequence="">
8053                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
8054                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
8055                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8056                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
8057                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
8058                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
8059                         <field reporter:label="Accepting User" name="accepting_usr" reporter:datatype="link"/>
8060                         <field reporter:label="Cash Drawer" name="cash_drawer" reporter:datatype="link"/>
8061                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
8062                         <field reporter:label="Cash Payment" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8063                         <field reporter:label="Credit Card Payment" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8064                         <field reporter:label="Check Payment" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8065                 </fields>
8066                 <links>
8067                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
8068                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
8069                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
8070                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
8071                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
8072                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
8073                 </links>
8074         </class>
8075         <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">
8076                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_id_seq">
8077                         <field name="bucket" reporter:datatype="link"/>
8078                         <field name="id" reporter:datatype="id" />
8079                         <field name="target_biblio_record_entry" reporter:datatype="link"/>
8080                         <field name="create_time" reporter:datatype="timestamp" />
8081                         <field name="pos" reporter:datatype="int" />
8082                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
8083                 </fields>
8084                 <links>
8085                         <link field="target_biblio_record_entry" reltype="has_a" key="id" map="" class="bre"/>
8086                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
8087             <link field="notes" reltype="has_many" map="" key="item" class="cbrebin"/>
8088                 </links>
8089                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8090                         <actions>
8091                                 <retrieve permission="ADMIN_COPY_BUCKET">
8092                     <context link="bucket" owning_lib="owning_lib"/>
8093                 </retrieve>
8094             </actions>
8095         </permacrud>
8096         </class>
8097         <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">
8098                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_note_id_seq">
8099                         <field name="id" reporter:datatype="id" />
8100                         <field name="item" reporter:datatype="link"/>
8101                         <field name="note" reporter:datatype="text" />
8102                 </fields>
8103                 <links>
8104                         <link field="item" reltype="has_a" key="id" map="" class="cbrebi"/>
8105                 </links>
8106         </class>
8107         <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">
8108                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_entry_id_seq">
8109                         <field reporter:label="Entry ID" name="id" reporter:datatype="int" />
8110                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
8111                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
8112                         <field reporter:label="Value" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
8113                 </fields>
8114                 <links>
8115                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
8116                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
8117                 </links>
8118                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8119                         <actions>
8120                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
8121                         </actions>
8122                 </permacrud>
8123         </class>
8124     <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">
8125         <fields oils_persist:primary="field">
8126             <field reporter:label="Field Identifier" name="field" reporter:datatype="text" reporter:selector="name"/>
8127             <field reporter:label="Field Name" name="name" reporter:datatype="text"/>
8128             <field reporter:label="Exclusive?" name="one_only" reporter:datatype="bool"/>
8129         </fields>
8130         <links/>
8131         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8132             <actions>
8133                 <create permission="CREATE_COPY_STAT_CAT" global_required="true"/>
8134                 <retrieve />
8135                 <update permission="UPDATE_COPY_STAT_CAT" global_required="true"/>
8136                 <delete permission="DELETE_COPY_STAT_CAT" global_required="true"/>
8137             </actions>
8138         </permacrud>
8139     </class>
8140         <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">
8141                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_cancel_cause_id_seq">
8142                         <field reporter:label="Cause ID" name="id" reporter:datatype="id" />
8143                         <field reporter:label="Cause Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
8144                 </fields>
8145                 <links/>
8146         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8147             <actions>
8148                 <create permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
8149                 <retrieve/>
8150                 <update permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
8151                 <delete permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
8152             </actions>
8153         </permacrud>
8154         </class>
8155
8156
8157         <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">
8158                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
8159                         <field reporter:label="Copy Status at Transit" name="copy_status" reporter:datatype="link"/>
8160                         <field reporter:label="Destination Library" name="dest" reporter:datatype="org_unit"/>
8161                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
8162                         <field reporter:label="Reservation requiring Transit" name="reservation" reporter:datatype="link"/>
8163                         <field reporter:label="Transit ID" name="id" reporter:datatype="id" />
8164                         <field reporter:label="Is Persistent?" name="persistant_transfer" reporter:datatype="bool"/>
8165                         <field reporter:label="Previous Stop" name="prev_hop" reporter:datatype="link"/>
8166                         <field reporter:label="Sending Library" name="source" reporter:datatype="org_unit"/>
8167                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
8168                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
8169                         <field reporter:label="Base Transit" name="transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
8170                         <field reporter:label="Prev Destination Library" name="prev_dest" reporter:datatype="org_unit"/>
8171                         <field reporter:label="Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
8172                 </fields>
8173                 <links>
8174                         <link field="transit_copy" reltype="might_have" key="id" map="" class="atc"/>
8175                         <link field="target_copy" reltype="has_a" key="id" map="" class="brsrc"/>
8176                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
8177                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
8178                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
8179                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
8180                         <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
8181                 </links>
8182         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8183             <actions>
8184                 <create permission="TRANSIT_COPY">
8185                     <context link="target_copy" field="owner"/>
8186                 </create>
8187                 <retrieve/>
8188                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
8189                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
8190             </actions>
8191         </permacrud>
8192         </class>
8193         <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">
8194                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
8195                         <field reporter:label="Copy Status at Transit" name="copy_status" reporter:datatype="link"/>
8196                         <field reporter:label="Destination Library" name="dest" reporter:datatype="org_unit"/>
8197                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
8198                         <field reporter:label="Hold requiring Transit" name="hold" reporter:datatype="link"/>
8199                         <field reporter:label="Transit ID" name="id" reporter:datatype="id" />
8200                         <field reporter:label="Is Persistent?" name="persistant_transfer" reporter:datatype="bool"/>
8201                         <field reporter:label="Previous Stop" name="prev_hop" reporter:datatype="link"/>
8202                         <field reporter:label="Sending Library" name="source" reporter:datatype="org_unit"/>
8203                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
8204                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
8205                         <field reporter:label="Base Transit" name="transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
8206                         <field reporter:label="Prev Destination Library" name="prev_dest" reporter:datatype="org_unit"/>
8207                         <field reporter:label="Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
8208                 </fields>
8209                 <links>
8210                         <link field="transit_copy" reltype="might_have" key="id" map="" class="atc"/>
8211                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
8212                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
8213                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
8214                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
8215                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
8216                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
8217                 </links>
8218         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8219             <actions>
8220                 <create permission="TRANSIT_COPY" context_field="owner">
8221                     <context link="target_copy" field="circ_lib"/>
8222                 </create>
8223                 <retrieve/>
8224                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
8225                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
8226             </actions>
8227         </permacrud>
8228         </class>
8229         <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">
8230                 <fields oils_persist:primary="id" oils_persist:sequence="money.billing_id_seq">
8231                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
8232                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
8233                         <field reporter:label="Billing Period Start" name="period_start" reporter:datatype="timestamp"/>
8234                         <field reporter:label="Billing Period End" name="period_end" reporter:datatype="timestamp"/>
8235                         <field reporter:label="Legacy Billing Timestamp" name="billing_ts" reporter:datatype="timestamp"/>
8236                         <field reporter:label="Legacy Billing Type" name="billing_type" reporter:datatype="text"/>
8237                         <field reporter:label="Billing ID" name="id" reporter:datatype="id" />
8238                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8239                         <field reporter:label="Void Timestamp" name="void_time" reporter:datatype="timestamp"/>
8240                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
8241                         <field reporter:label="Voiding Staff Member" name="voider" reporter:datatype="link"/>
8242                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
8243                         <field reporter:label="Type" name="btype" reporter:datatype="link"/>
8244                         <field reporter:label="Adjustments" name="adjustments" oils_persist:virtual="true" reporter:datatype="link"/>
8245                 </fields>
8246                 <links>
8247                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
8248                         <link field="voider" reltype="has_a" key="id" map="" class="au"/>
8249                         <link field="btype" reltype="has_a" key="id" map="" class="cbt"/>
8250                         <link field="adjustments" reltype="has_many" key="billing" map="" class="maa"/>
8251                 </links>
8252         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8253             <actions>
8254                 <retrieve permission="VIEW_USER_TRANSACTIONS">
8255                     <context link="xact" jump="usr" field="home_ou"/>
8256                 </retrieve>
8257                         </actions>
8258                 </permacrud>
8259         </class>
8260         <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">
8261                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_grp_map_id_seq">
8262                         <field name="grp" />
8263                         <field name="id" reporter:datatype="id" />
8264                         <field name="usr" />
8265                 </fields>
8266                 <links>
8267                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
8268                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
8269                 </links>
8270         </class>
8271         <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">
8272                 <fields oils_persist:primary="id" oils_persist:sequence="config.i18n_core_id_seq">
8273                         <field name="id" reporter:datatype="id" />
8274                         <field name="fq_field" reporter:datatype="text"/>
8275                         <field name="identity_value" reporter:datatype="text"/>
8276                         <field name="translation" reporter:datatype="text"/>
8277                         <field name="string" reporter:datatype="text"/>
8278                 </fields>
8279                 <links>
8280                         <link field="translation" reltype="has_a" key="code" map="" class="i18n_l"/>
8281                 </links>
8282         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8283             <actions>
8284                 <create permission="CREATE_TRANSLATION" global_required="true"/>
8285                 <retrieve permission="CREATE_TRANSLATION UPDATE_TRANSLATION DELETE_TRANSLATION" global_required="true"/>
8286                 <update permission="UPDATE_TRANSLATION" global_required="true"/>
8287                 <delete permission="DELETE_TRANSLATION" global_required="true"/>
8288             </actions>
8289         </permacrud>
8290         </class>
8291         <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">
8292                 <fields oils_persist:primary="id" oils_persist:sequence="config.idl_field_doc_id_seq">
8293                         <field name="id" reporter:datatype="id" />
8294                         <field name="fm_class" reporter:datatype="text"/>
8295                         <field name="field" reporter:datatype="text"/>
8296                         <field name="owner" reporter:datatype="org_unit"/>
8297                         <field name="string" reporter:datatype="text" oils_persist:i18n="true"/>
8298                 </fields>
8299                 <links>
8300                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
8301                 </links>
8302         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8303             <actions>
8304                 <create   permission="ADMIN_FIELD_DOC" context_field="owner"/>
8305                 <retrieve/>
8306                 <update   permission="ADMIN_FIELD_DOC" context_field="owner"/>
8307                 <delete   permission="ADMIN_FIELD_DOC" context_field="owner"/>
8308             </actions>
8309         </permacrud>
8310         </class>
8311         <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">
8312                 <fields oils_persist:primary="code">
8313                         <field name="code" reporter:datatype="id" />
8314                         <field name="marc_code" reporter:datatype="text"/>
8315                         <field name="name" reporter:datatype="text" oils_persist:i18n="true"/>
8316                         <field name="description" reporter:datatype="text" oils_persist:i18n="true"/>
8317                         <field name="rtl" reporter:datatype="bool"/>
8318                 </fields>
8319                 <links/>
8320         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8321             <actions>
8322                 <create permission="CREATE_LOCALE" global_required="true"/>
8323                 <retrieve/>
8324                 <update permission="UPDATE_LOCALE" global_required="true"/>
8325                 <delete permission="DELETE_LOCALE" global_required="true"/>
8326             </actions>
8327         </permacrud>
8328         </class>
8329         <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">
8330                 <fields oils_persist:primary="id" oils_persist:sequence="config.billing_type_id_seq">
8331                         <field name="id" reporter:datatype="id" reporter:label="ID" reporter:selector="name"/>
8332                         <field name="name" reporter:datatype="text" reporter:label="Name" oils_persist:i18n="true"/>
8333                         <field name="owner" reporter:datatype="org_unit" reporter:label="Org Unit" />
8334             <field name="default_price" reporter:datatype="money" reporter:label="Default Price"/>
8335                 </fields>
8336                 <links>
8337                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
8338                 </links>
8339         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8340             <actions>
8341                 <create permission="CREATE_BILLING_TYPE" context_field="owner"/>
8342                 <retrieve permission="VIEW_BILLING_TYPE CREATE_BILLING_TYPE UPDATE_BILLING_TYPE DELETE_BILLING_TYPE" context_field="owner"/>
8343                 <update permission="UPDATE_BILLING_TYPE" context_field="owner"/>
8344                 <delete permission="DELETE_BILLING_TYPE" context_field="owner"/>
8345             </actions>
8346         </permacrud>
8347         </class>
8348
8349         <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">
8350                 <fields oils_persist:primary="id">
8351                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
8352                         <field reporter:label="Type Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
8353                 </fields>
8354                 <links/>
8355         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8356             <actions>
8357                 <create permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
8358                 <retrieve/>
8359                 <update permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
8360                 <delete permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
8361             </actions>
8362         </permacrud>
8363         </class>
8364
8365         <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">
8366                 <fields oils_persist:primary="id" oils_persist:sequence="acq.user_request_id_seq">
8367                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
8368                         <field reporter:label="User" name="usr" reporter:datatype="link" />
8369                         <field reporter:label="Request Type" name="request_type" oils_obj:required="true" reporter:datatype="link" />
8370                         <field reporter:label="Place Hold" name="hold" reporter:datatype="bool" />
8371                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link" />
8372                         <field reporter:label="Holdable Formats" name="holdable_formats" reporter:datatype="text" />
8373                         <field reporter:label="Phone Notify" name="phone_notify" reporter:datatype="text" />
8374                         <field reporter:label="Email Notify" name="email_notify" reporter:datatype="bool" />
8375                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
8376                         <field reporter:label="Bib Record" name="eg_bib" reporter:datatype="link" />
8377                         <field reporter:label="Request Date/Time" name="request_date" reporter:datatype="timestamp" />
8378                         <field reporter:label="Need Before Date/Time" name="need_before" reporter:datatype="timestamp" />
8379                         <field reporter:label="Max Acceptable Fee" name="max_fee" reporter:datatype="text" />
8380                         <field reporter:label="ISxN" name="isxn" reporter:datatype="text" />
8381                         <field reporter:label="Title" name="title" reporter:datatype="text" />
8382                         <field reporter:label="Volume" name="volume" reporter:datatype="text" />
8383                         <field reporter:label="Author" name="author" reporter:datatype="text" />
8384                         <field reporter:label="Article Title" name="article_title" reporter:datatype="text" />
8385                         <field reporter:label="Article Pages" name="article_pages" reporter:datatype="text" />
8386                         <field reporter:label="Publisher" name="publisher" reporter:datatype="text" />
8387                         <field reporter:label="Publication Location" name="location" reporter:datatype="text" />
8388                         <field reporter:label="Publication Date" name="pubdate" reporter:datatype="text" />
8389                         <field reporter:label="Mentioned In" name="mentioned" reporter:datatype="text" />
8390                         <field reporter:label="Other Info" name="other_info" reporter:datatype="text" />
8391                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
8392                 </fields>
8393                 <links>
8394                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
8395                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
8396                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
8397                         <link field="eg_bib" reltype="has_a" key="id" map="" class="bre"/>
8398                         <link field="request_type" reltype="has_a" key="id" map="" class="aurt"/>
8399                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
8400                 </links>
8401         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8402             <actions>
8403                 <create permission="user_request.create">
8404                     <context link="usr" field="home_ou"/>
8405                                 </create>
8406                 <retrieve permission="user_request.view">
8407                     <context link="usr" field="home_ou"/>
8408                                 </retrieve>
8409                 <update permission="user_request.update">
8410                     <context link="usr" field="home_ou"/>
8411                                 </update>
8412                 <delete permission="user_request.delete">
8413                     <context link="usr" field="home_ou"/>
8414                                 </delete>
8415             </actions>
8416         </permacrud>
8417         </class>
8418
8419         <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">
8420                 <fields oils_persist:primary="code">
8421                         <field reporter:label="Currency Code" name="code" reporter:datatype="text" reporter:selector='label'/>
8422                         <field reporter:label="Currency Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
8423                 </fields>
8424                 <links/>
8425         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8426             <actions>
8427                 <create permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
8428                 <retrieve/>
8429                 <update permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
8430                 <delete permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
8431             </actions>
8432         </permacrud>
8433         </class>
8434
8435         <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">
8436                 <fields oils_persist:primary="id" oils_persist:sequence="acq.exchange_rate_id_seq">
8437                         <field reporter:label="Exchange Rate ID" name="id" reporter:datatype="id" />
8438                         <field reporter:label="From Currency" name="from_currency" reporter:datatype="link" />
8439                         <field reporter:label="To Currency" name="to_currency" reporter:datatype="link" />
8440                         <field reporter:label="Ratio" name="ratio" />
8441                 </fields>
8442                 <links>
8443                         <link field="from_currency" reltype="has_a" key="code" map="" class="acqct"/>
8444                         <link field="to_currency" reltype="has_a" key="code" map="" class="acqct"/>
8445                 </links>
8446                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8447                         <actions>
8448                                 <create permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
8449                                 <retrieve/>
8450                                 <update permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
8451                                 <delete permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
8452                         </actions>
8453                 </permacrud>
8454         </class>
8455
8456         <class id="acqpro" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::provider" oils_persist:tablename="acq.provider" reporter:label="Provider">
8457                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_id_seq">
8458                         <field reporter:label="Provider ID" name="id" reporter:datatype="id" reporter:selector='code'/>
8459                         <field reporter:label="Provider Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
8460                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" />
8461                         <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" />
8462                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8463                         <field reporter:label="Holdings Tag" name="holding_tag" reporter:datatype="text" />
8464                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link" />
8465                         <field reporter:label="SAN" name="san" reporter:datatype="text" />
8466                         <field reporter:label="EDI Default" name="edi_default" reporter:datatype="link" />
8467                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
8468                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
8469                         <field reporter:label="URL" name="url" reporter:datatype="text" />
8470                         <field reporter:label="Email" name="email" reporter:datatype="text" />
8471                         <field reporter:label="Phone" name="phone" reporter:datatype="text" />
8472                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text" />
8473                         <field reporter:label="Default Claim Policy" name="default_claim_policy" reporter:datatype="link" />
8474                         <field reporter:label="Default # Copies" name="default_copy_count" reporter:datatype="int" />
8475                         <field reporter:label="Notes" name="provider_notes" oils_persist:virtual="true" reporter:datatype="link" />
8476                 </fields>
8477                 <links>
8478                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
8479                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
8480             <link field="addresses" reltype="has_many" map="" key="provider" class="acqpa"/>
8481             <link field="edi_default" reltype="has_a" map="" key="id" class="acqedi"/>
8482                         <link field="default_claim_policy" reltype="has_a" map="" key="id" class="acqclp"/>
8483                         <link field="provider_notes" reltype="has_many" map="" key="provider" class="acqpron"/>
8484                 </links>
8485         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8486             <actions>
8487                 <create   permission="ADMIN_PROVIDER" context_field="owner"/>
8488                 <retrieve permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER" context_field="owner"/>
8489                 <update   permission="ADMIN_PROVIDER" context_field="owner"/>
8490                 <delete   permission="ADMIN_PROVIDER" context_field="owner"/>
8491             </actions>
8492         </permacrud>
8493         </class>
8494
8495         <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">
8496                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_note_id_seq">
8497                         <field reporter:label="PO Note ID" name="id" reporter:datatype="id" />
8498                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
8499                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
8500                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
8501                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
8502                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
8503                         <field reporter:label="Note Value" name="value" reporter:datatype="text" />
8504                 </fields>
8505                 <links>
8506                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8507                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8508                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8509                 </links>
8510         </class>
8511
8512         <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">
8513                 <fields oils_persist:primary="code">
8514                         <field reporter:label="Code" name="code" reporter:datatype="id" reporter:selector="name"/>
8515                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
8516                 </fields>
8517                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8518             <actions>
8519                 <create permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
8520                 <retrieve/>
8521                 <update permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
8522                 <delete permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
8523             </actions>
8524                 </permacrud>
8525         </class>
8526
8527         <class id="acqinv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::invoice" oils_persist:tablename="acq.invoice" reporter:label="Invoice">
8528                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_id_seq">
8529                         <field reporter:label="Internal Invoice ID" name="id" reporter:datatype="id"/>
8530                         <field reporter:label="Receiver" name="receiver" reporter:datatype="org_unit" />
8531                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
8532                         <field reporter:label="Shipper" name="shipper" reporter:datatype="link"/>
8533                         <field reporter:label="Invoice Date" name="recv_date" reporter:datatype="timestamp" />
8534                         <field reporter:label="Receive Method" name="recv_method" reporter:datatype="link" />
8535                         <field reporter:label="Invoice Type" name="inv_type" reporter:datatype="text" />
8536                         <field reporter:label="Vendor Invoice ID" name="inv_ident" reporter:datatype="text" />
8537                         <field reporter:label="Payment Auth" name="payment_auth" reporter:datatype="text" />
8538                         <field reporter:label="Payment Method" name="payment_method" reporter:datatype="link" />
8539                         <field reporter:label="Note" name="note" reporter:datatype="text" />
8540                         <field reporter:label="Complete" name="complete" reporter:datatype="bool" />
8541                         <field reporter:label="Invoice Entries" name="entries" reporter:datatype="link" oils_persist:virtual="true"/>
8542                         <field reporter:label="Invoice Items" name="items" reporter:datatype="link" oils_persist:virtual="true"/>
8543                 </fields>
8544                 <links>
8545                         <link field="receiver" reltype="has_a" key="id" map="" class="aou"/>
8546                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8547                         <link field="shipper" reltype="has_a" key="id" map="" class="acqpro"/>
8548                         <link field="recv_method" reltype="has_a" key="code" map="" class="acqim"/>
8549                         <link field="payment_method" reltype="has_a" key="code" map="" class="acqipm"/>
8550                         <link field="entries" reltype="has_many" key="invoice" map="" class="acqie"/>
8551                         <link field="items" reltype="has_many" key="invoice" map="" class="acqii"/>
8552                 </links>
8553         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8554             <actions>
8555                 <create   permission="CREATE_INVOICE" context_field="receiver"/>
8556                 <retrieve permission="CREATE_INVOICE VIEW_INVOICE" context_field="receiver"/>
8557                 <update   permission="CREATE_INVOICE" context_field="receiver"/>
8558                 <delete   permission="CREATE_INVOICE" context_field="receiver"/>
8559             </actions>
8560         </permacrud>
8561         </class>
8562
8563         <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">
8564                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_entry_id_seq">
8565                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
8566                         <field reporter:label="Invoice" name="invoice" reporter:datatype="link" />
8567                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
8568                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link"/>
8569                         <field reporter:label="Invoice Item Count" name="inv_item_count" reporter:datatype="int" />
8570                         <field reporter:label="Physical Item Count" name="phys_item_count" reporter:datatype="int" />
8571                         <field reporter:label="Note" name="note" reporter:datatype="text" />
8572                         <field reporter:label="Billed Cost per Item" name="billed_per_item" reporter:datatype="bool" />
8573                         <field reporter:label="Cost Billed" name="cost_billed" reporter:datatype="money" />
8574                         <field reporter:label="Actual Cost" name="actual_cost" reporter:datatype="money" />
8575                         <field reporter:label="Amount Paid" name="amount_paid" reporter:datatype="money" />
8576                 </fields>
8577                 <links>
8578                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv"/>
8579                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8580                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
8581                 </links>
8582         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8583             <actions>
8584                 <create   permission="ADMIN_INVOICE">
8585                                         <context link="invoice" field="receiver"/>
8586                                 </create>
8587                 <retrieve permission="ADMIN_INVOICE">
8588                                         <context link="invoice" field="receiver"/>
8589                                 </retrieve>
8590                 <update   permission="ADMIN_INVOICE">
8591                                         <context link="invoice" field="receiver"/>
8592                                 </update>
8593                                 <delete   permission="ADMIN_INVOICE">
8594                                         <context link="invoice" field="receiver"/>
8595                                 </delete>
8596             </actions>
8597         </permacrud>
8598         </class>
8599
8600         <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">
8601                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_item_id_seq">
8602                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
8603                         <field reporter:label="Invoice" name="invoice" reporter:datatype="link" />
8604                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
8605                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
8606                         <field reporter:label="Invoice Item Type" name="inv_item_type" reporter:datatype="link" />
8607                         <field reporter:label="Title or Item Name" name="title" reporter:datatype="text" />
8608                         <field reporter:label="Author" name="author" reporter:datatype="text" />
8609                         <field reporter:label="Note" name="note" reporter:datatype="text" />
8610                         <field reporter:label="Cost Billed" name="cost_billed" reporter:datatype="money" />
8611                         <field reporter:label="Actual Cost" name="actual_cost" reporter:datatype="money" />
8612                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
8613                         <field reporter:label="Amount Paid" name="amount_paid" reporter:datatype="money" />
8614                         <field reporter:label="Purchase Order Item" name="po_item" reporter:datatype="link" />
8615                         <field reporter:label="Target" name="target" reporter:datatype="int" />
8616                 </fields>
8617                 <links>
8618                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv"/>
8619                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8620                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
8621                         <link field="inv_item_type" reltype="has_a" key="code" map="" class="aiit"/>
8622                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8623                         <link field="po_item" reltype="has_a" key="id" map="" class="acqpoi"/>
8624                 </links>
8625         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8626             <actions>
8627                 <create   permission="ADMIN_INVOICE">
8628                                         <context link="invoice" field="receiver"/>
8629                                 </create>
8630                 <retrieve permission="ADMIN_INVOICE">
8631                                         <context link="invoice" field="receiver"/>
8632                                 </retrieve>
8633                 <update   permission="ADMIN_INVOICE">
8634                                         <context link="invoice" field="receiver"/>
8635                                 </update>
8636                                 <delete   permission="ADMIN_INVOICE">
8637                                         <context link="invoice" field="receiver"/>
8638                                 </delete>
8639             </actions>
8640         </permacrud>
8641         </class>
8642
8643         <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">
8644                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_address_id_seq">
8645                         <field reporter:label="Address Type" name="address_type"  reporter:datatype="text"/>
8646                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
8647                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
8648                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
8649                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
8650                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
8651                         <field reporter:label="Post Code" name="post_code"  reporter:datatype="text"/>
8652                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
8653                         <field reporter:label="Street 1" name="street1"  reporter:datatype="text"/>
8654                         <field reporter:label="Street 2" name="street2"  reporter:datatype="text"/>
8655                         <field reporter:label="Is Valid?" name="valid" reporter:datatype="bool"/>
8656                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text"/>
8657                 </fields>
8658                 <links>
8659                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8660                 </links>
8661         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8662             <actions>
8663                 <create permission="ADMIN_PROVIDER">
8664                     <context link="provider" field="owner"/>
8665                 </create>
8666                 <retrieve permission="ADMIN_PROVIDER">
8667                     <context link="provider" field="owner"/>
8668                 </retrieve>
8669                 <update permission="ADMIN_PROVIDER">
8670                     <context link="provider" field="owner"/>
8671                 </update>
8672                 <delete permission="ADMIN_PROVIDER">
8673                     <context link="provider" field="owner"/>
8674                 </delete>
8675             </actions>
8676         </permacrud>
8677         </class>
8678
8679         <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">
8680                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_id_seq">
8681                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
8682                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
8683                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
8684                         <field reporter:label="Role" name="role" reporter:datatype="text"/>
8685                         <field reporter:label="Email" name="email" reporter:datatype="text"/>
8686                         <field reporter:label="Phone" name="phone" reporter:datatype="text"/>
8687         </fields>
8688                 <links>
8689                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8690                 </links>
8691         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8692             <actions>
8693                 <create permission="ADMIN_PROVIDER">
8694                     <context link="provider" field="owner"/>
8695                 </create>
8696                 <retrieve permission="ADMIN_PROVIDER">
8697                     <context link="provider" field="owner"/>
8698                 </retrieve>
8699                 <update permission="ADMIN_PROVIDER">
8700                     <context link="provider" field="owner"/>
8701                 </update>
8702                 <delete permission="ADMIN_PROVIDER">
8703                     <context link="provider" field="owner"/>
8704                 </delete>
8705             </actions>
8706         </permacrud>
8707     </class>
8708         <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">
8709                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_address_id_seq">
8710                         <field reporter:label="Type" name="address_type"  reporter:datatype="text"/>
8711                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
8712                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
8713                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
8714                         <field reporter:label="Address ID" name="id" reporter:datatype="id" />
8715                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
8716                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
8717                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
8718                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
8719                         <field reporter:label="Contact" name="contact" reporter:datatype="link"/>
8720                         <field reporter:label="Valid Address?" name="valid" reporter:datatype="bool"/>
8721                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text"/>
8722                 </fields>
8723                 <links>
8724                         <link field="contact" reltype="has_a" key="id" map="" class="acqpc"/>
8725                 </links>
8726         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8727             <actions>
8728                 <create permission="ADMIN_PROVIDER">
8729                     <context link="contact" jump='provider' field="owner"/>
8730                 </create>
8731                 <retrieve permission="ADMIN_PROVIDER">
8732                     <context link="contact" jump='provider' field="owner"/>
8733                 </retrieve>
8734                 <update permission="ADMIN_PROVIDER">
8735                     <context link="contact" jump='provider' field="owner"/>
8736                 </update>
8737                 <delete permission="ADMIN_PROVIDER">
8738                     <context link="contact" jump='provider' field="owner"/>
8739                 </delete>
8740             </actions>
8741         </permacrud>
8742         </class>
8743
8744         <class id="acqftr" controller="open-ils.cstore" oils_obj:fieldmapper="acq::fund_transfer" oils_persist:tablename="acq.fund_transfer" reporter:label="Fund Transfer">
8745                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_transfer_id_seq">
8746                         <field reporter:label="Fund Transfer ID" name="id" reporter:datatype="id"/>
8747                         <field reporter:label="Source Fund" name="src_fund" reporter:datatype="link"/>
8748                         <field reporter:label="Source Amount" name="src_amount" reporter:datatype="money"/>
8749                         <field reporter:label="Destination Fund" name="dest_fund" reporter:datatype="link"/>
8750                         <field reporter:label="Destination Amount" name="dest_amount" reporter:datatype="money"/>
8751                         <field reporter:label="Transfer Time" name="transfer_time" reporter:datatype="timestamp"/>
8752                         <field reporter:label="Transfer User" name="transfer_user" reporter:datatype="link"/>
8753                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8754                         <field reporter:label="Funding Source Credit ID" name="funding_source_credit" reporter:datatype="link"/>
8755                 </fields>
8756                 <links>
8757                         <link field="src_fund" reltype="has_a" key="id" map="" class="acqf"/>
8758                         <link field="dest_fund" reltype="has_a" key="id" map="" class="acqf"/>
8759                         <link field="transfer_user" reltype="has_a" key="id" map="" class="au"/>
8760                         <link field="funding_source_credit" reltype="has_a" key="id" map="" class="acqfscred"/>
8761                 </links>
8762         </class>
8763
8764         <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">
8765                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fiscal_calendar_id_seq">
8766                         <field reporter:label="Fiscal Calendar ID" name="id" reporter:datatype="id" reporter:selector='name'/>
8767                         <field reporter:label="Fiscal Calendar Name" name="name" reporter:datatype="text"/>
8768                         <field reporter:label="Years" name="years" oils_persist:virtual="true" reporter:datatype="link"/>
8769                 </fields>
8770                 <links>
8771             <link field="years" reltype="has_many" map="" key="calendar" class="acqfy"/>
8772                 </links>
8773                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8774                         <actions>
8775                                 <create permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
8776                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
8777                                 <update permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
8778                                 <delete permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
8779                         </actions>
8780                 </permacrud>
8781         </class>
8782
8783         <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">
8784                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fiscal_year_id_seq">
8785                         <field reporter:label="Fiscal Year ID" name="id" reporter:datatype="id" reporter:selector='year'/>
8786                         <field reporter:label="Calendar" name="calendar" reporter:datatype="link"/>
8787                         <field reporter:label="Fiscal Year" name="year" reporter:datatype="int"/>
8788                         <field reporter:label="Year Begin" name="year_begin" reporter:datatype="timestamp"/>
8789                         <field reporter:label="Year End" name="year_end" reporter:datatype="timestamp"/>
8790                 </fields>
8791                 <links>
8792                         <link field="calendar" reltype="has_a" key="id" map="" class="acqfc"/>
8793                 </links>
8794                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8795                         <actions>
8796                                 <create permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
8797                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
8798                                 <update permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
8799                                 <delete permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
8800                         </actions>
8801                 </permacrud>
8802         </class>
8803
8804         <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">
8805                 <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_id_seq">
8806                         <field reporter:label="Funding Source ID" name="id" reporter:datatype="id" reporter:selector='code'/>
8807                         <field reporter:label="Funding Source Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
8808                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" />
8809                         <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" />
8810                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8811                         <field reporter:label="Summary" name="summary" oils_persist:virtual="true"/>
8812                         <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>
8813                         <field reporter:label="Credits" name="credits" oils_persist:virtual="true" reporter:datatype="link"/>
8814                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
8815                 </fields>
8816                 <links>
8817                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
8818                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
8819             <link field="allocations" reltype="has_many" map="" key="funding_source" class="acqfa"/>
8820             <link field="credits" reltype="has_many" key="funding_source" map="" class="acqfscred"/>
8821                         <link field="fund_alloc_pcts" reltype="has_many" key="funding_source" map="" class="acqfap"/>
8822                 </links>
8823         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8824             <actions>
8825                 <create   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
8826                 <retrieve permission="ADMIN_FUNDING_SOURCE MANAGE_FUNDING_SOURCE VIEW_FUNDING_SOURCE" context_field="owner"/>
8827                 <update   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
8828                 <delete   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
8829             </actions>
8830         </permacrud>
8831         </class>
8832
8833         <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">
8834                 <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_credit_id_seq">
8835                         <field reporter:label="Credit ID" name="id" reporter:datatype="id" />
8836                         <field reporter:label="Funding Source ID" name="funding_source" reporter:datatype="link" />
8837                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
8838                         <field reporter:label="Note" name="note" reporter:datatype="text" />
8839                         <field reporter:label="Deadline Date" name="deadline_date" reporter:datatype="timestamp" />
8840                         <field reporter:label="Effective Date" name="effective_date" reporter:datatype="timestamp" />
8841                 </fields>
8842                 <links>
8843                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
8844                 </links>
8845                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8846                         <actions>
8847                                 <create permission="ADMIN_FUNDING_SOURCE">
8848                     <context link="funding_source" field="owner"/>
8849                 </create>
8850                                 <retrieve permission="ADMIN_FUNDING_SOURCE">
8851                     <context link="funding_source" field="owner"/>
8852                 </retrieve>
8853                                 <update permission="ADMIN_FUNDING_SOURCE">
8854                     <context link="funding_source" field="owner"/>
8855                 </update>
8856                                 <delete permission="ADMIN_FUNDING_SOURCE">
8857                     <context link="funding_source" field="owner"/>
8858                 </delete>
8859                         </actions>
8860                 </permacrud>
8861         </class>
8862
8863         <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">
8864                 <fields oils_persist:primary="id">
8865                         <field reporter:label="Ordered Fund Src ID" name="id" reporter:datatype="id"/>
8866                         <field reporter:label="Sort Priority" name="sort_priority" reporter:datatype="int"/>
8867                         <field reporter:label="Sort Date" name="sort_date" reporter:datatype="timestamp"/>
8868                         <field reporter:label="Funding Source ID" name="funding_source" reporter:datatype="link"/>
8869                         <field reporter:label="Amount" name="amount" reporter:datatype="money"/>
8870                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8871                 </fields>
8872                 <links>
8873                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
8874                 </links>
8875         </class>
8876
8877         <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">
8878                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_debit_id_seq">
8879                         <field reporter:label="Debit ID" name="id" reporter:datatype="id" />
8880                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8881                         <field reporter:label="Origin Amount" name="origin_amount" reporter:datatype="money" />
8882                         <field reporter:label="Origin Currency" name="origin_currency_type" reporter:datatype="link" />
8883                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
8884                         <field reporter:label="Encumbrance" name="encumbrance" reporter:datatype="bool" />
8885                         <field reporter:label="Debit Type" name="debit_type" reporter:datatype="text" />
8886                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
8887                         <field reporter:label="Invoice Entry" name="invoice_entry" reporter:datatype="link" />
8888                 </fields>
8889                 <links>
8890                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8891                         <link field="origin_currency_type" reltype="has_a" key="code" map="" class="acqct"/>
8892                         <link field="invoice_entry" reltype="has_a" key="id" map="" class="acqie"/>
8893                 </links>
8894                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8895                         <actions>
8896                                 <create permission="ADMIN_ACQ_FUND">
8897                     <context link="fund" field="org"/>
8898                 </create>
8899                                 <retrieve permission="ADMIN_ACQ_FUND">
8900                     <context link="fund" field="org"/>
8901                 </retrieve>
8902                                 <update permission="ADMIN_ACQ_FUND">
8903                     <context link="fund" field="org"/>
8904                 </update>
8905                                 <delete permission="ADMIN_ACQ_FUND">
8906                     <context link="fund" field="org"/>
8907                 </delete>
8908                         </actions>
8909                 </permacrud>
8910         </class>
8911
8912         <class id="acqf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::fund" oils_persist:tablename="acq.fund" reporter:label="Fund">
8913                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_id_seq">
8914                         <field reporter:label="Fund ID" name="id" reporter:datatype="id" reporter:selector='code'/>
8915                         <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
8916                         <field reporter:label="Name" name="name" reporter:datatype="text" />
8917                         <field reporter:label="Year" name="year" reporter:datatype="int" />
8918                         <field reporter:label="Currency Type" name="currency_type" reporter:datatype="link" />
8919                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8920                         <field reporter:label="Rollover" name="rollover" reporter:datatype="bool" />
8921                         <field reporter:label="Propagate" name="propagate" reporter:datatype="bool" />
8922                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
8923                         <field reporter:label="Balance Warning Percent" name="balance_warning_percent" reporter:datatype="int" />
8924                         <field reporter:label="Balance Stop Percent" name="balance_stop_percent" reporter:datatype="int" />
8925                         <field reporter:label="Summary" name="summary" oils_persist:virtual="true"/>
8926                         <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>
8927                         <field reporter:label="Debits" name="debits" oils_persist:virtual="true" reporter:datatype="link"/>
8928                         <field reporter:label="Tags" name="tags" oils_persist:virtual="true" reporter:datatype="link"/>
8929                         <field reporter:label="Allocation Total" name="allocation_total" oils_persist:virtual="true" reporter:datatype="link"/>
8930                         <field reporter:label="Debit Total" name="debit_total" oils_persist:virtual="true" reporter:datatype="link"/>
8931                         <field reporter:label="Encumbrance Total" name="encumbrance_total" oils_persist:virtual="true" reporter:datatype="link"/>
8932                         <field reporter:label="Spent Total" name="spent_total" oils_persist:virtual="true" reporter:datatype="link"/>
8933                         <field reporter:label="Combined Balance" name="combined_balance" oils_persist:virtual="true" reporter:datatype="link"/>
8934                         <field reporter:label="Spent Balance" name="spent_balance" oils_persist:virtual="true" reporter:datatype="link"/>
8935                 </fields>
8936                 <links>
8937                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
8938                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
8939             <link field="allocations" reltype="has_many" key="fund" map="" class="acqfa"/>
8940             <link field="debits" reltype="has_many" key="fund" map="" class="acqfdeb"/>
8941             <link field="tags" reltype="has_many" key="fund" map="" class="acqftm"/>
8942             <link field="allocation_total" reltype="might_have" key="fund" map="" class="acqfat"/>
8943             <link field="debit_total" reltype="might_have" key="fund" map="" class="acqfdt"/>
8944             <link field="encumbrance_total" reltype="might_have" key="fund" map="" class="acqfet"/>
8945             <link field="spent_total" reltype="might_have" key="fund" map="" class="acqfst"/>
8946             <link field="combined_balance" reltype="might_have" key="fund" map="" class="acqfcb"/>
8947             <link field="spent_balance" reltype="might_have" key="fund" map="" class="acqfsb"/>
8948                 </links>
8949         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1" ignore_object_perms="true">
8950             <actions>
8951                 <create permission="ADMIN_ACQ_FUND" context_field="org"/>
8952                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="org"/>
8953                 <update permission="ADMIN_ACQ_FUND" context_field="org"/>
8954                 <delete permission="ADMIN_ACQ_FUND" context_field="org"/>
8955             </actions>
8956         </permacrud>
8957         </class>
8958
8959         <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">
8960                 <fields oils_persist:primary="fund">
8961                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8962                         <field reporter:label="Total Allocation Amount" name="amount" reporter:datatype="money" />
8963                 </fields>
8964                 <links>
8965                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8966                 </links>
8967         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8968             <actions>
8969                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
8970                                         <context link="fund" field="org" />
8971                 </retrieve>
8972             </actions>
8973         </permacrud>
8974         </class>
8975
8976         <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">
8977                 <fields oils_persist:primary="fund">
8978                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8979                         <field reporter:label="Total Debit Amount" name="amount" reporter:datatype="money" />
8980                 </fields>
8981                 <links>
8982                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8983                 </links>
8984         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8985             <actions>
8986                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
8987                                         <context link="fund" field="org" />
8988                 </retrieve>
8989             </actions>
8990         </permacrud>
8991         </class>
8992
8993         <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">
8994                 <fields oils_persist:primary="fund">
8995                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8996                         <field reporter:label="Total Encumbrance Amount" name="amount" reporter:datatype="money" />
8997                 </fields>
8998                 <links>
8999                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9000                 </links>
9001         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9002             <actions>
9003                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
9004                                         <context link="fund" field="org" />
9005                 </retrieve>
9006             </actions>
9007         </permacrud>
9008         </class>
9009
9010         <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">
9011                 <fields oils_persist:primary="fund">
9012                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
9013                         <field reporter:label="Total Spent Amount" name="amount" reporter:datatype="money" />
9014                 </fields>
9015                 <links>
9016                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9017                 </links>
9018         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9019             <actions>
9020                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
9021                                         <context link="fund" field="org" />
9022                 </retrieve>
9023             </actions>
9024         </permacrud>
9025         </class>
9026
9027         <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">
9028                 <fields oils_persist:primary="fund">
9029                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
9030                         <field reporter:label="Balance after Spent and Encumbered" name="amount" reporter:datatype="money" />
9031                 </fields>
9032                 <links>
9033                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9034                 </links>
9035         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9036             <actions>
9037                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
9038                                         <context link="fund" field="org" />
9039                 </retrieve>
9040             </actions>
9041         </permacrud>
9042         </class>
9043
9044    <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">
9045         <fields oils_persist:primary="fund">
9046             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
9047             <field reporter:label="Total Allocation Amount" name="amount" reporter:datatype="money" />
9048         </fields>
9049         <links>
9050             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9051         </links>
9052     </class>
9053
9054    <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">
9055         <fields oils_persist:primary="fund">
9056             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
9057             <field reporter:label="Total Encumbered Amount" name="amount" reporter:datatype="money" />
9058         </fields>
9059         <links>
9060             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9061         </links>
9062     </class>
9063
9064    <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">
9065         <fields oils_persist:primary="fund">
9066             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
9067             <field reporter:label="Total Spent Amount" name="amount" reporter:datatype="money" />
9068         </fields>
9069         <links>
9070             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9071         </links>
9072     </class>
9073
9074    <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">
9075         <fields oils_persist:primary="fund">
9076             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
9077             <field reporter:label="Total Spent Balance" name="amount" reporter:datatype="money" />
9078         </fields>
9079         <links>
9080             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9081         </links>
9082     </class>
9083
9084    <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">
9085         <fields oils_persist:primary="fund">
9086             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
9087             <field reporter:label="Total Combined Balance" name="amount" reporter:datatype="money" />
9088         </fields>
9089         <links>
9090             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9091         </links>
9092     </class>
9093
9094         <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">
9095                 <fields oils_persist:primary="funding_source">
9096                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
9097                         <field reporter:label="Total Credits to Funding Source" name="amount" reporter:datatype="money" />
9098                 </fields>
9099                 <links>
9100                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
9101                 </links>
9102         </class>
9103
9104         <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">
9105                 <fields oils_persist:primary="funding_source">
9106                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
9107                         <field reporter:label="Total Allocated from Funding Source" name="amount" reporter:datatype="money" />
9108                 </fields>
9109                 <links>
9110                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
9111                 </links>
9112         </class>
9113
9114         <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">
9115                 <fields oils_persist:primary="funding_source">
9116                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
9117                         <field reporter:label="Balance Remaining" name="amount" reporter:datatype="money" />
9118                 </fields>
9119                 <links>
9120                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
9121                 </links>
9122         </class>
9123
9124         <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">
9125                 <fields oils_persist:primary="fund">
9126                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
9127                         <field reporter:label="Balance after Spent" name="amount" reporter:datatype="money" />
9128                 </fields>
9129                 <links>
9130                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9131                 </links>
9132         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9133             <actions>
9134                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
9135                                         <context link="fund" field="org" />
9136                 </retrieve>
9137             </actions>
9138         </permacrud>
9139     </class>
9140     <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">
9141         <oils_persist:source_definition><![CDATA[
9142             SELECT
9143                 acqf.*,
9144                 COALESCE(acqfat.amount, 0.00) AS allocated_total,
9145                 COALESCE(acqfst.amount, 0.00) AS spent_total,
9146                 COALESCE(acqfet.amount, 0.00) AS encumbrance_total,
9147                 COALESCE(acqfcb.amount, 0.00) AS combined_balance
9148             FROM
9149                 acq.fund acqf
9150                 LEFT JOIN acq.fund_allocation_total acqfat ON (acqfat.fund = acqf.id)
9151                 LEFT JOIN acq.fund_spent_total acqfst ON (acqfst.fund = acqf.id)
9152                 LEFT JOIN acq.fund_encumbrance_total acqfet ON (acqfet.fund = acqf.id)
9153                 LEFT JOIN acq.fund_combined_balance acqfcb ON (acqfcb.fund = acqf.id)
9154         ]]></oils_persist:source_definition>
9155         <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_id_seq">
9156             <field reporter:label="Fund ID" name="id" reporter:datatype="id" reporter:selector='code'/>
9157             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
9158             <field reporter:label="Name" name="name" reporter:datatype="text" />
9159             <field reporter:label="Year" name="year" reporter:datatype="int" />
9160             <field reporter:label="Currency Type" name="currency_type" reporter:datatype="link" />
9161             <field reporter:label="Code" name="code" reporter:datatype="text" />
9162             <field reporter:label="Rollover" name="rollover" reporter:datatype="bool" />
9163             <field reporter:label="Propagate" name="propagate" reporter:datatype="bool" />
9164             <field reporter:label="Active" name="active" reporter:datatype="bool" />
9165             <field reporter:label="Balance Warning Percent" name="balance_warning_percent" reporter:datatype="int" />
9166             <field reporter:label="Balance Stop Percent" name="balance_stop_percent" reporter:datatype="int" />
9167
9168             <!-- non fund-native fields -->
9169             <field reporter:label="Total Allocated" name="allocated_total" reporter:datatype="money"/>
9170             <field reporter:label="Total Spent" name="spent_total" reporter:datatype="money"/>
9171             <field reporter:label="Total Encumbered" name="encumbrance_total" reporter:datatype="money"/>
9172             <field reporter:label="Remaining Balance" name="combined_balance" reporter:datatype="money"/>
9173         </fields>
9174         <links>
9175             <link field="id" reltype="has_a" key="id" map="" class="acqf"/>
9176             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
9177             <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
9178         </links>
9179         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9180             <actions>
9181                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="org"/>
9182             </actions>
9183         </permacrud>
9184         </class>
9185         <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">
9186                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_allocation_id_seq">
9187                         <field reporter:label="Allocation ID" name="id" reporter:datatype="id" />
9188                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
9189                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
9190                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
9191                         <field reporter:label="Allocating User" name="allocator" reporter:datatype="link" />
9192                         <field reporter:label="Note" name="note" reporter:datatype="text" />
9193                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
9194                 </fields>
9195                 <links>
9196                         <link field="allocator" reltype="has_a" key="id" map="" class="au"/>
9197                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9198                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
9199                 </links>
9200                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9201                         <actions>
9202                                 <create permission="ADMIN_ACQ_FUND">
9203                     <context link="fund" field="org"/>
9204                 </create>
9205                                 <retrieve permission="ADMIN_ACQ_FUND">
9206                     <context link="fund" field="org"/>
9207                 </retrieve>
9208                                 <update permission="ADMIN_ACQ_FUND">
9209                     <context link="fund" field="org"/>
9210                 </update>
9211                                 <delete permission="ADMIN_ACQ_FUND">
9212                     <context link="fund" field="org"/>
9213                 </delete>
9214                         </actions>
9215                 </permacrud>
9216         </class>
9217
9218     <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">
9219         <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_allocation_percent_id_seq">
9220             <field reporter:label="Allocation ID" name="id" reporter:datatype="id" />
9221             <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
9222             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
9223             <field reporter:label="Fund Code" name="fund_code" reporter:datatype="text" />
9224             <field reporter:label="Percent" name="percent" reporter:datatype="float" />
9225             <field reporter:label="Allocating User" name="allocator" reporter:datatype="link" />
9226             <field reporter:label="Note" name="note" reporter:datatype="text" />
9227             <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
9228         </fields>
9229         <links>
9230             <link field="allocator" reltype="has_a" key="id" map="" class="au"/>
9231             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
9232             <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
9233         </links>
9234                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9235                         <actions>
9236                                 <create permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
9237                                 <retrieve permission="VIEW_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
9238                                 <update permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
9239                                 <delete permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
9240                         </actions>
9241                 </permacrud>
9242     </class>
9243
9244         <class id="acqpl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::picklist" oils_persist:tablename="acq.picklist" reporter:label="Selection List">
9245                 <fields oils_persist:primary="id" oils_persist:sequence="acq.picklist_id_seq">
9246                         <field reporter:label="Selection List ID" name="id" reporter:datatype="id" reporter:selector='name' />
9247                         <field reporter:label="Owner" name="owner" reporter:datatype="link" />
9248                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit" />
9249                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
9250                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
9251                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
9252                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link" />
9253                         <field reporter:label="Entry Count" name="entry_count" oils_persist:virtual="true"/>
9254                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
9255                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
9256                 </fields>
9257                 <links>
9258                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
9259                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9260                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
9261                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
9262                         <link field="entries" reltype="has_many" key="picklist" map="" class="jub"/>
9263                 </links>
9264                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9265                         <actions>
9266                                 <retrieve permission="CREATE_PICKLIST VIEW_PICKLIST" context_field="org_unit"/>
9267                         </actions>
9268                 </permacrud>
9269         </class>
9270
9271         <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">
9272                 <fields oils_persist:primary="id" oils_persist:sequence="acq.cancel_reason_id_seq">
9273                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
9274                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
9275                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
9276                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
9277                         <field reporter:label="Keep Debits?" name="keep_debits" reporter:datatype="bool"/>
9278                 </fields>
9279                 <links>
9280                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
9281                 </links>
9282                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9283                         <actions>
9284                                 <create permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
9285                                 <retrieve permission="STAFF_LOGIN" context_field="org_unit"/>
9286                                 <update permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
9287                                 <delete permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
9288                         </actions>
9289                 </permacrud>
9290         </class>
9291
9292         <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">
9293                 <fields oils_persist:primary="id" oils_persist:sequence="acq.purchase_order_id_seq">
9294                         <field reporter:label="Purchase Order ID" name="id" reporter:datatype="id" reporter:selector='name'/>
9295                         <field reporter:label="Owner" name="owner" reporter:datatype="link" />
9296                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
9297                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
9298                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
9299                         <field reporter:label="State" name="state" reporter:datatype="text" />
9300                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="org_unit" />
9301                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
9302                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
9303                         <field reporter:label="Order Date" name="order_date" reporter:datatype="timestamp" />
9304                         <field reporter:label="Name" name="name" reporter:datatype="text" />
9305                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
9306                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
9307                         <field reporter:label="Line Items" name="lineitems" oils_persist:virtual="true" reporter:datatype="link" />
9308                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link" />
9309                         <field reporter:label="Line Item Count" name="lineitem_count" oils_persist:virtual="true" reporter:datatype="int" />
9310                         <field reporter:label="Amount Encumbered" name="amount_encumbered" oils_persist:virtual="true" reporter:datatype="float" />
9311                         <field reporter:label="Amount Spent" name="amount_spent" oils_persist:virtual="true" reporter:datatype="float" />
9312                         <field reporter:label="Amount Estimated" name="amount_estimated" oils_persist:virtual="true" reporter:datatype="float" />
9313                         <field reporter:label="PO Items" name="po_items" oils_persist:virtual="true" reporter:datatype="link" />
9314                 </fields>
9315                 <links>
9316                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
9317                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9318                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
9319                         <link field="default_fund" reltype="has_a" key="id" map="" class="acqf"/>
9320                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
9321                         <link field="lineitems" reltype="has_many" key="purchase_order" map="" class="jub"/>
9322                         <link field="po_items" reltype="has_many" key="purchase_order" map="" class="acqpoi"/>
9323                         <link field="notes" reltype="has_many" key="purchase_order" map="" class="acqpon"/>
9324                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
9325                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
9326                 </links>
9327                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9328                         <actions>
9329                                 <create permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
9330                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER" context_field="ordering_agency"/>
9331                                 <update permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
9332                                 <delete permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
9333                         </actions>
9334                 </permacrud>
9335         </class>
9336
9337         <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">
9338                 <fields oils_persist:primary="audit_id" oils_persist:sequence="acq.acq_purchase_order_pkey_seq">
9339                         <field reporter:label="Audit ID" name="audit_id" reporter:datatype="id"/>
9340                         <field reporter:label="Audit Time" name="audit_time" reporter:datatype="timestamp"/>
9341                         <field reporter:label="Audit Action" name="audit_action" reporter:datatype="text"/>
9342                         <field reporter:label="Purchase Order ID" name="id" reporter:datatype="link"/>
9343                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
9344                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
9345                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
9346                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="link"/>
9347                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
9348                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
9349                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
9350                         <field reporter:label="State" name="state" reporter:datatype="text"/>
9351                         <field reporter:label="Order Date" name="order_date" reporter:datatype="timestamp"/>
9352                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
9353                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link"/>
9354                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
9355                 </fields>
9356                 <links>
9357                         <link field="id" reltype="has_a" key="id" map="" class="acqpo"/>
9358                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
9359                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9360                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
9361                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
9362                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
9363                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
9364                 </links>
9365                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9366             <actions>
9367                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER" context_field="ordering_agency"/>
9368             </actions>
9369                 </permacrud>
9370         </class>
9371
9372         <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">
9373                 <fields oils_persist:primary="id" oils_persist:sequence="acq.po_note_id_seq">
9374                         <field reporter:label="PO Note ID" name="id" reporter:datatype="id" />
9375                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />
9376                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
9377                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
9378                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
9379                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
9380                         <field reporter:label="Vote Value" name="value" reporter:datatype="text" />
9381                         <field reporter:label="Vendor Public" name="vendor_public" reporter:datatype="bool" />
9382                 </fields>
9383                 <links>
9384                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9385                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
9386                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
9387                 </links>
9388                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9389             <actions>
9390                 <create permission="CREATE_PURCHASE_ORDER">
9391                     <context link="purchase_order" field="ordering_agency"/>
9392                 </create>
9393                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
9394                     <context link="purchase_order" field="ordering_agency"/>
9395                 </retrieve>
9396                 <update permission="CREATE_PURCHASE_ORDER">
9397                     <context link="purchase_order" field="ordering_agency"/>
9398                 </update>
9399                 <delete permission="CREATE_PURCHASE_ORDER">
9400                     <context link="purchase_order" field="ordering_agency"/>
9401                 </delete>
9402             </actions>
9403                 </permacrud>
9404         </class>
9405
9406         <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">
9407                 <fields oils_persist:primary="id" oils_persist:sequence="acq.po_item_id_seq">
9408                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
9409                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
9410                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
9411                         <field reporter:label="Invoice Item Type" name="inv_item_type" reporter:datatype="link"/>
9412                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
9413                         <field reporter:label="Author" name="author" reporter:datatype="text"/>
9414                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
9415                         <field reporter:label="Estimated Cost" name="estimated_cost" reporter:datatype="money"/>
9416                         <field reporter:label="Fund" name="fund" reporter:datatype="link"/>
9417                         <field reporter:label="Target" name="target" reporter:datatype="int" />
9418                 </fields>
9419                 <links>
9420                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
9421                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
9422                         <link field="inv_item_type" reltype="has_a" key="code" map="" class="aiit"/>
9423                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9424                 </links>
9425                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9426             <actions>
9427                 <create permission="CREATE_PURCHASE_ORDER">
9428                     <context link="purchase_order" field="ordering_agency"/>
9429                 </create>
9430                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
9431                     <context link="purchase_order" field="ordering_agency"/>
9432                 </retrieve>
9433                 <update permission="CREATE_PURCHASE_ORDER">
9434                     <context link="purchase_order" field="ordering_agency"/>
9435                 </update>
9436                 <delete permission="CREATE_PURCHASE_ORDER">
9437                     <context link="purchase_order" field="ordering_agency"/>
9438                 </delete>
9439             </actions>
9440                 </permacrud>
9441         </class>
9442
9443         <class id="jub" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::lineitem" oils_persist:tablename="acq.lineitem" reporter:label="Line Item">
9444                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_id_seq">
9445                         <field reporter:label="Lineitem ID" name="id" reporter:datatype="id" />
9446                         <field reporter:label="Selecting User" name="selector" reporter:datatype="link" />
9447                         <field reporter:label="Selection List" name="picklist" reporter:datatype="link" />
9448                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />
9449                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
9450                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
9451                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
9452                         <field reporter:label="MARC" name="marc" reporter:datatype="text" />
9453                         <field reporter:label="Evergreen Bib ID" name="eg_bib_id" reporter:datatype="link" />
9454                         <field reporter:label="Source Label" name="source_label" reporter:datatype="text" />
9455                         <field reporter:label="Expected Receive Date" name="expected_recv_time" reporter:datatype="timestamp" />
9456                         <field reporter:label="State" name="state" reporter:datatype="text" />
9457                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
9458                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
9459                         <field reporter:label="Claim Policy" name="claim_policy" reporter:datatype="link" />
9460                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
9461                         <field reporter:label="Estimated Unit Price" name="estimated_unit_price" reporter:datatype="money" />
9462                         <field reporter:label="Queued Vandelay Record" name="queued_record" reporter:datatype="link" />
9463                         <field reporter:label="Item Count" name="item_count" oils_persist:virtual="true" reporter:datatype="int" />
9464                         <field reporter:label="Descriptive Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link" />
9465                         <field reporter:label="Line Item Details" name="lineitem_details" oils_persist:virtual="true" reporter:datatype="link" />
9466                         <field reporter:label="Line Item Notes" name="lineitem_notes" oils_persist:virtual="true" reporter:datatype="link" />
9467                         <field reporter:label="Distribution Formulas" name="distribution_formulas" oils_persist:virtual="true" reporter:datatype="link" />
9468                         <field reporter:label="Invoice Entries" name="invoice_entries" oils_persist:virtual="true" reporter:datatype="link" />
9469                         <field reporter:label="Order Summary" name="order_summary" oils_persist:virtual="true" reporter:datatype="link" />
9470                 </fields>
9471                 <links>
9472                         <link field="selector" reltype="has_a" key="id" map="" class="au"/>
9473                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
9474                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9475                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
9476                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
9477                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl"/>
9478                         <link field="eg_bib_id" reltype="has_a" key="id" map="" class="bre"/>
9479                         <link field="attributes" reltype="has_many" key="lineitem" map="" class="acqlia"/>
9480                         <link field="lineitem_details" reltype="has_many" key="lineitem" map="" class="acqlid"/>
9481                         <link field="lineitem_notes" reltype="has_many" key="lineitem" map="" class="acqlin"/>
9482                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
9483                         <link field="distribution_formulas" reltype="has_many" key="lineitem" map="" class="acqdfa"/>
9484                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
9485                         <link field="invoice_entries" reltype="has_many" key="lineitem" map="" class="acqie"/>
9486                         <link field="order_summary" reltype="might_have" key="lineitem" map="" class="acqlisum"/>
9487                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
9488                 </links>
9489                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9490                         <actions>
9491                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER CREATE_PICKLIST VIEW_PICKLIST">
9492                                         <context link="purchase_order" field="ordering_agency"/>
9493                                         <context link="picklist" field="org_unit"/>
9494                                 </retrieve>
9495                         </actions>
9496                 </permacrud>
9497         </class>
9498
9499         <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">
9500                 <fields oils_persist:primary="audit_id" oils_persist:sequence="acq.acq_lineitem_pkey_seq">
9501                         <field reporter:label="Audit ID" name="audit_id" reporter:datatype="id"/>
9502                         <field reporter:label="Audit Time" name="audit_time" reporter:datatype="timestamp"/>
9503                         <field reporter:label="Audit Action" name="audit_action" reporter:datatype="text"/>
9504                         <field reporter:label="Lineitem ID" name="id" reporter:datatype="link"/>
9505                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
9506                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
9507                         <field reporter:label="Selector" name="selector" reporter:datatype="link"/>
9508                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
9509                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
9510                         <field reporter:label="Selection List" name="picklist" reporter:datatype="link"/>
9511                         <field reporter:label="Expected Receive Time" name="expected_recv_time" reporter:datatype="timestamp"/>
9512                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
9513                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
9514                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
9515                         <field reporter:label="Evergreen Bib ID" name="eg_bib_id" reporter:datatype="link"/>
9516                         <field reporter:label="Source Label" name="source_label" reporter:datatype="text"/>
9517                         <field reporter:label="State" name="state" reporter:datatype="text"/>
9518                         <field reporter:label="Claim Policy" name="claim_policy" reporter:datatype="link"/>
9519                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link"/>
9520                         <field reporter:label="Estimated Unit Price" name="estimated_unit_price" reporter:datatype="money" />
9521                         <field reporter:label="Queued Vandelay Record" name="queued_record" reporter:datatype="link" />
9522                 </fields>
9523                 <links>
9524                         <link field="id" reltype="has_a" key="id" map="" class="jub"/>
9525                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9526                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
9527                         <link field="selector" reltype="has_a" key="id" map="" class="au"/>
9528                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
9529                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
9530                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl"/>
9531                         <link field="eg_bib_id" reltype="has_a" key="id" map="" class="bre"/>
9532                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
9533                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
9534                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
9535                 </links>
9536                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9537                         <actions>
9538                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
9539                                         <context link="purchase_order" field="ordering_agency"/>
9540                                         <context link="picklist" field="org_unit"/>
9541                                 </retrieve>
9542                         </actions>
9543                 </permacrud>
9544         </class>
9545
9546         <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">
9547                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_alert_text_id_seq">
9548                         <field reporter:label="Alert Text ID" name="id" reporter:datatype="id"/>
9549                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
9550                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
9551                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link"/>
9552                 </fields>
9553                 <links>
9554                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9555                 </links>
9556                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9557                         <actions>
9558                                 <create permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
9559                                 <retrieve permission="STAFF_LOGIN" context_field="owning_lib"/>
9560                                 <update permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
9561                                 <delete permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
9562                         </actions>
9563                 </permacrud>
9564         </class>
9565
9566         <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">
9567                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_note_id_seq">
9568                         <field reporter:label="PO Line Item Note ID" name="id" reporter:datatype="id" />
9569                         <field reporter:label="Line Item" name="lineitem" reporter:datatype="link" />
9570                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
9571                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
9572                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
9573                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
9574                         <field reporter:label="Note Value" name="value" reporter:datatype="text" />
9575                         <field reporter:label="Alert Text" name="alert_text" reporter:datatype="link" />
9576                         <field reporter:label="Vendor Public" name="vendor_public" reporter:datatype="bool" />
9577                 </fields>
9578                 <links>
9579                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9580                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
9581                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
9582                         <link field="alert_text" reltype="has_a" key="id" map="" class="acqliat"/>
9583                 </links>
9584         </class>
9585
9586         <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">
9587                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_id_seq">
9588                         <field reporter:label="Attribute Value ID" name="id" reporter:datatype="id" />
9589                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link" />
9590                         <field reporter:label="Type" name="attr_type" reporter:datatype="text" />
9591                         <field reporter:label="Name" name="attr_name" reporter:datatype="text" />
9592                         <field reporter:label="Value" name="attr_value" reporter:datatype="text" />
9593                         <field reporter:label="Definition" name="definition" reporter:datatype="text" />
9594                         <field reporter:label="Order Identifier" name="order_ident" reporter:datatype="bool" />
9595                 </fields>
9596                 <links>
9597                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
9598                         <link field="definition" reltype="has_a" key="id" map="" class="acqliad"/>
9599                 </links>
9600         </class>
9601
9602         <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">
9603                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_detail_id_seq">
9604                         <field reporter:label="Item Detail ID" name="id" reporter:datatype="id" />
9605                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
9606                         <field reporter:label="Evergreen Copy ID" name="eg_copy_id" reporter:datatype="link" />
9607                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text" />
9608                         <field reporter:label="Call Number Label" name="cn_label" reporter:datatype="text" />
9609                         <field reporter:label="Actual Receive Date" name="recv_time" reporter:datatype="timestamp" />
9610                         <field reporter:label="Receiving User" name="receiver" reporter:datatype="link" />
9611                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
9612                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link" />
9613                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" />
9614                         <field reporter:label="Copy Location" name="location" reporter:datatype="link" />
9615                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="link" />
9616                         <field reporter:label="Note" name="note" reporter:datatype="text" />
9617                         <field reporter:label="Collection Code" name="collection_code" reporter:datatype="text" />
9618                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
9619                         <field reporter:label="Claims" name="claims" reporter:datatype="link" oils_persist:virtual="true" />
9620                 </fields>
9621                 <links>
9622                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
9623                         <link field="eg_copy_id" reltype="has_a" key="id" map="" class="acp"/>
9624                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9625                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
9626                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9627                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
9628                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
9629                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
9630                         <link field="claims" reltype="has_many" key="lineitem_detail" map="" class="acqcl"/>
9631                         <link field="receiver" reltype="has_a" key="id" map="" class="au"/>
9632                 </links>
9633         </class>
9634
9635         <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">
9636                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
9637                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
9638                         <field reporter:label="Code" name="code" reporter:datatype="text" />
9639                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
9640                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
9641                 </fields>
9642                 <links/>
9643                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9644                         <actions>
9645                                 <retrieve />
9646                         </actions>
9647                 </permacrud>
9648         </class>
9649
9650         <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">
9651                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
9652                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
9653                         <field reporter:label="Code" name="code" reporter:datatype="text" />
9654                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
9655                         <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
9656                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
9657             <field reporter:label="Remove" name="remove" reporter:datatype="text" />
9658                 </fields>
9659                 <links/>
9660         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9661             <actions>
9662                 <create permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
9663                 <retrieve />
9664                 <update permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
9665                 <delete permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
9666             </actions>
9667         </permacrud>
9668         </class>
9669
9670         <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">
9671                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
9672                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
9673                         <field reporter:label="Code" name="code" reporter:datatype="text" />
9674                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
9675                         <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
9676                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
9677                 </fields>
9678                 <links/>
9679         </class>
9680         <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">
9681                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
9682                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
9683                         <field reporter:label="Code" name="code" reporter:datatype="text" />
9684                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
9685                         <field reporter:label="User" name="usr" reporter:datatype="link" />
9686                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
9687                 </fields>
9688                 <links>
9689                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
9690                 </links>
9691         </class>
9692
9693         <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">
9694             <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
9695                 <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
9696                 <field reporter:label="Code" name="code" reporter:datatype="text" />
9697                 <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
9698                 <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
9699                 <field reporter:label="Provider" name="provider" reporter:datatype="link" />
9700                 <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
9701         <field reporter:label="Remove" name="remove" reporter:datatype="text" />
9702
9703             </fields>
9704             <links>
9705                 <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
9706             </links>
9707             <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9708                 <actions>
9709                     <create permission="ADMIN_PROVIDER">
9710                         <context link="provider" field="owner"/>
9711                     </create>
9712                     <retrieve permission="ADMIN_PROVIDER">
9713                         <context link="provider" field="owner"/>
9714                     </retrieve>
9715                     <update permission="ADMIN_PROVIDER">
9716                         <context link="provider" field="owner"/>
9717                     </update>
9718                     <delete permission="ADMIN_PROVIDER">
9719                         <context link="provider" field="owner"/>
9720                     </delete>
9721                 </actions>
9722             </permacrud>
9723         </class>
9724         
9725         <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">
9726             <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_holding_subfield_map_id_seq">
9727                 <field reporter:label="ID" name="id" reporter:datatype="id" />
9728                 <field reporter:label="Provider" name="provider" reporter:datatype="link" />
9729                 <field reporter:label="Name" name="name" reporter:datatype="text" />
9730                 <field reporter:label="Subfield" name="subfield" reporter:datatype="text" />
9731             </fields>
9732             <links>
9733                 <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
9734             </links>
9735             <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9736                 <actions>
9737                     <create permission="ADMIN_PROVIDER">
9738                         <context link="provider" field="owner"/>
9739                     </create>
9740                     <retrieve permission="ADMIN_PROVIDER">
9741                         <context link="provider" field="owner"/>
9742                     </retrieve>
9743                     <update permission="ADMIN_PROVIDER">
9744                         <context link="provider" field="owner"/>
9745                     </update>
9746                     <delete permission="ADMIN_PROVIDER">
9747                         <context link="provider" field="owner"/>
9748                     </delete>
9749                 </actions>
9750             </permacrud>
9751         </class>
9752         
9753         <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">
9754             <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
9755                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
9756                         <field reporter:label="Code" name="code" reporter:datatype="text" />
9757                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
9758                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
9759                 </fields>
9760                 <links/>
9761         </class>
9762
9763         <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">
9764                 <fields oils_persist:primary="id" oils_persist:sequence="config.remote_account_id_seq"><!-- edi_account inherits from config.remote_account, hence the seq -->
9765                         <field name="id"            reporter:datatype="id"        reporter:label="EDI Account ID" reporter:selector="label"/>
9766                         <field name="label"         reporter:datatype="text"      reporter:label="Label"/>
9767                         <field name="host"          reporter:datatype="text"      reporter:label="Host"/>
9768                         <field name="username"      reporter:datatype="text"      reporter:label="Username"/>
9769                         <field name="password"      reporter:datatype="text"      reporter:label="Password"/>
9770                         <field name="account"       reporter:datatype="text"      reporter:label="Account"/>
9771                         <field name="path"          reporter:datatype="text"      reporter:label="Path"/>
9772                         <field name="owner"         reporter:datatype="link"      reporter:label="Owner"/>
9773                         <field name="last_activity" reporter:datatype="timestamp" reporter:label="Last Activity"/>
9774                         <field name="provider"      reporter:datatype="link"      reporter:label="Provider"/>
9775                         <field name="in_dir"        reporter:datatype="text"      reporter:label="Incoming Directory"/>
9776                         <field name="vendacct"      reporter:datatype="text"      reporter:label="Vendor Account Number"/>
9777                         <field name="vendcode"      reporter:datatype="text"      reporter:label="Vendor Assigned Code"/>
9778                         <field name="attr_set"      reporter:datatype="link"      reporter:label="EDI Attribute Set"/>
9779                         <field name="use_attrs"     reporter:datatype="bool"      reporter:label="Use EDI Attributes"/>
9780                 </fields>
9781                 <links>
9782                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
9783                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
9784                         <link field="attr_set" reltype="has_a" key="id" map="" class="aeas"/>
9785                 </links>
9786         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9787             <actions>
9788                 <create permission="ADMIN_PROVIDER">
9789                     <context link="provider" field="owner"/>
9790                 </create>
9791                 <retrieve permission="ADMIN_PROVIDER">
9792                     <context link="provider" field="owner"/>
9793                 </retrieve>
9794                 <update permission="ADMIN_PROVIDER">
9795                     <context link="provider" field="owner"/>
9796                 </update>
9797                 <delete permission="ADMIN_PROVIDER">
9798                     <context link="provider" field="owner"/>
9799                 </delete>
9800             </actions>
9801         </permacrud>
9802         </class>
9803
9804         <class id="aea" controller="open-ils.cstore open-ils.pcrud" 
9805                 oils_obj:fieldmapper="acq::edi_attr" 
9806                 oils_persist:tablename="acq.edi_attr" reporter:label="EDI Attribute">
9807                 <fields oils_persist:primary="key">
9808                         <field name="key"   reporter:datatype="text" reporter:label="Key" reporter:selector="label"/>
9809                         <field name="label" reporter:datatype="text" reporter:label="Label"/>
9810                 </fields>
9811         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9812             <actions>
9813                 <create permission="ADMIN_PROVIDER" global_required="true"/>
9814                 <retrieve/>
9815                 <update permission="ADMIN_PROVIDER" global_required="true"/>
9816                 <delete permission="ADMIN_PROVIDER" global_required="true"/>
9817             </actions>
9818         </permacrud>
9819         </class>
9820         <class id="aeas" controller="open-ils.cstore open-ils.pcrud" 
9821                 oils_obj:fieldmapper="acq::edi_attr_set" 
9822                 oils_persist:tablename="acq.edi_attr_set" reporter:label="EDI Attribute Set">
9823                 <fields oils_persist:primary="id" oils_persist:sequence="acq.edi_attr_set_id_seq">
9824                         <field name="id"    reporter:datatype="id"   reporter:label="ID" reporter:selector="label"/>
9825                         <field name="label" reporter:datatype="text" reporter:label="Label"/>
9826                         <field name="attr_maps" reporter:datatype="link" oils_persist:virtual="true" reporter:label="Mapped EDI Attributes"/>
9827                 </fields>
9828                 <links>
9829                         <link field="attr_maps" reltype="has_many" key="attr_set" map="" class="aeasm"/>
9830                 </links>
9831         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9832             <actions>
9833                 <create permission="ADMIN_PROVIDER" global_required="true"/>
9834                 <retrieve/>
9835                 <update permission="ADMIN_PROVIDER" global_required="true"/>
9836                 <delete permission="ADMIN_PROVIDER" global_required="true"/>
9837             </actions>
9838         </permacrud>
9839         </class>
9840         <class id="aeasm" controller="open-ils.cstore open-ils.pcrud" 
9841                 oils_obj:fieldmapper="acq::edi_attr_set_map" 
9842                 oils_persist:tablename="acq.edi_attr_set_map" reporter:label="EDI Attribute Set Map">
9843                 <fields oils_persist:primary="id" oils_persist:sequence="acq.edi_attr_set_map_id_seq">
9844                         <field name="id"       reporter:datatype="id"   reporter:label="ID" reporter:selector="label"/>
9845                         <field name="attr_set" reporter:datatype="link" reporter:label="Attribute Set"/>
9846                         <field name="attr"     reporter:datatype="link" reporter:label="Attribute"/>
9847                 </fields>
9848                 <links>
9849                         <link field="attr_set" reltype="has_a" key="id" map="" class="aeas"/>
9850                         <link field="attr" reltype="has_a" key="id" map="" class="aea"/>
9851                 </links>
9852         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9853             <actions>
9854                 <create permission="ADMIN_PROVIDER" global_required="true"/>
9855                 <retrieve/>
9856                 <update permission="ADMIN_PROVIDER" global_required="true"/>
9857                 <delete permission="ADMIN_PROVIDER" global_required="true"/>
9858             </actions>
9859         </permacrud>
9860         </class>
9861
9862
9863         <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">
9864                 <fields oils_persist:primary="id" oils_persist:sequence="acq.edi_message_id_seq">
9865                         <field name="id"               reporter:datatype="id"        reporter:label="EDI Message ID"/>
9866                         <field name="account"          reporter:datatype="link"      reporter:label="EDI Account"/>
9867                         <field name="remote_file"      reporter:datatype="text"      reporter:label="Filename"/>
9868                         <field name="create_time"      reporter:datatype="timestamp" reporter:label="Time Created"/>
9869                         <field name="translate_time"   reporter:datatype="timestamp" reporter:label="Time Translated"/>
9870                         <field name="process_time"     reporter:datatype="timestamp" reporter:label="Time Processed"/>
9871                         <field name="error_time"       reporter:datatype="timestamp" reporter:label="Time of Error"/>
9872                         <field name="status"           reporter:datatype="text"      reporter:label="Status"/>
9873                         <field name="edi"              reporter:datatype="text"      reporter:label="EDI Message Body"/>
9874                         <field name="jedi"             reporter:datatype="text"      reporter:label="JEDI Message Body"/>
9875                         <field name="error"            reporter:datatype="text"      reporter:label="Error"/>
9876                         <field name="purchase_order"   reporter:datatype="link"      reporter:label="Purchase Order"/>
9877                         <field name="message_type"     reporter:datatype="text"      reporter:label="Message Type"/>
9878                 </fields>
9879                 <links>
9880                         <link field="account" reltype="has_a" key="id" map="" class="acqedi"/>
9881                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
9882                 </links>
9883         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9884             <actions>
9885                 <retrieve permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
9886                     <context link="account" jump="provider" field="owner"/>
9887                 </retrieve>
9888                 <update   permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
9889                     <context link="account" jump="provider" field="owner"/>
9890                 </update>
9891                 <delete   permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
9892                     <context link="account" jump="provider" field="owner"/>
9893                 </delete>
9894             </actions>
9895         </permacrud>
9896         </class>
9897
9898
9899         <class id="rof" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::output_folder" oils_persist:tablename="reporter.output_folder" reporter:label="Output Folder">
9900                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.output_folder_id_seq">
9901                         <field name="id" reporter:datatype="id" />
9902                         <field name="parent" reporter:datatype="link"/>
9903                         <field name="owner" reporter:datatype="link"/>
9904                         <field name="create_time" reporter:datatype="timestamp"/>
9905                         <field name="name" reporter:datatype="text"/>
9906                         <field name="shared" reporter:datatype="bool"/>
9907                         <field name="share_with" reporter:datatype="link"/>
9908                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
9909                         <field name="outputs" oils_persist:virtual="true" reporter:datatype="link"/>
9910                 </fields>
9911                 <links>
9912                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
9913                         <link field="parent" reltype="has_a" key="id" map="" class="rof"/>
9914                         <link field="children" reltype="has_many" key="parent" map="" class="rof"/>
9915                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
9916                         <link field="outputs" reltype="has_many" key="folder" map="" class="rs"/>
9917                 </links>
9918         </class>
9919         <class id="rtf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::template_folder" oils_persist:tablename="reporter.template_folder" reporter:label="Template Folder">
9920                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_folder_id_seq">
9921                         <field name="id" reporter:datatype="id" />
9922                         <field name="parent" reporter:datatype="link"/>
9923                         <field name="owner" reporter:datatype="link"/>
9924                         <field name="create_time" reporter:datatype="timestamp"/>
9925                         <field name="name" reporter:datatype="text"/>
9926                         <field name="shared" reporter:datatype="bool"/>
9927                         <field name="share_with" reporter:datatype="link"/>
9928                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
9929                         <field name="templates" oils_persist:virtual="true" reporter:datatype="link"/>
9930                 </fields>
9931                 <links>
9932                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
9933                         <link field="parent" reltype="has_a" key="id" map="" class="rtf"/>
9934                         <link field="children" reltype="has_many" key="parent" map="" class="rtf"/>
9935                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
9936                         <link field="templates" reltype="has_many" key="folder" map="" class="rt"/>
9937                 </links>
9938         </class>
9939         <class id="rrf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report_folder" oils_persist:tablename="reporter.report_folder" reporter:label="Report Folder">
9940                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_folder_id_seq">
9941                         <field name="id" reporter:datatype="id" />
9942                         <field name="parent" reporter:datatype="link"/>
9943                         <field name="owner" reporter:datatype="link"/>
9944                         <field name="create_time" reporter:datatype="timestamp"/>
9945                         <field name="name" reporter:datatype="text"/>
9946                         <field name="shared" reporter:datatype="bool"/>
9947                         <field name="share_with" reporter:datatype="link"/>
9948                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
9949                         <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>
9950                 </fields>
9951                 <links>
9952                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
9953                         <link field="parent" reltype="has_a" key="id" map="" class="rrf"/>
9954                         <link field="children" reltype="has_many" key="parent" map="" class="rrf"/>
9955                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
9956                         <link field="reports" reltype="has_many" key="folder" map="" class="rr"/>
9957                 </links>
9958         </class>
9959         <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">
9960                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_id_seq">
9961                         <field name="id" reporter:datatype="id" />
9962                         <field name="owner" reporter:datatype="link"/>
9963                         <field name="create_time" reporter:datatype="timestamp"/>
9964                         <field name="name" reporter:datatype="text"/>
9965                         <field name="data" reporter:datatype="text"/>
9966                         <field name="folder" reporter:datatype="link"/>
9967                         <field name="description" reporter:datatype="text"/>
9968                         <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>
9969                 </fields>
9970                 <links>
9971                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
9972                         <link field="folder" reltype="has_a" key="id" map="" class="rtf"/>
9973                         <link field="reports" reltype="has_many" key="template" map="" class="rr"/>
9974                 </links>
9975         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9976             <actions>
9977                 <create   permission="RUN_REPORTS" owning_user="owner" global_required="true"/>
9978                 <retrieve permission="RUN_REPORTS" owning_user="owner" global_required="true"/>
9979                 <update   permission="RUN_REPORTS" owning_user="owner" global_required="true"/>
9980                 <delete   permission="RUN_REPORTS" owning_user="owner" global_required="true"/>
9981             </actions>
9982         </permacrud>
9983         </class>
9984         <class id="rr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report" oils_persist:tablename="reporter.report" reporter:label="Report">
9985                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_id_seq">
9986                         <field name="id" reporter:datatype="id" />
9987                         <field name="owner" reporter:datatype="link"/>
9988                         <field name="create_time" reporter:datatype="timestamp"/>
9989                         <field name="template" reporter:datatype="link"/>
9990                         <field name="data" reporter:datatype="text"/>
9991                         <field name="folder" reporter:datatype="link"/>
9992                         <field name="recur" reporter:datatype="bool"/>
9993                         <field name="recurrence" reporter:datatype="interval"/>
9994                         <field name="name" reporter:datatype="text"/>
9995                         <field name="description" reporter:datatype="text"/>
9996                         <field name="runs" oils_persist:virtual="true" reporter:datatype="link"/>
9997                 </fields>
9998                 <links>
9999                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
10000                         <link field="template" reltype="has_a" key="id" map="" class="rt"/>
10001                         <link field="folder" reltype="has_a" key="id" map="" class="rrf"/>
10002                         <link field="runs" reltype="has_many" key="report" map="" class="rs"/>
10003                 </links>
10004         </class>
10005         <class id="rs" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::schedule" oils_persist:tablename="reporter.schedule" reporter:label="Schedule">
10006                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.schedule_id_seq">
10007                         <field name="id" reporter:datatype="id" />
10008                         <field name="runner" reporter:datatype="link"/>
10009                         <field name="start_time" reporter:datatype="timestamp"/>
10010                         <field name="complete_time" reporter:datatype="timestamp"/>
10011                         <field name="run_time" reporter:datatype="timestamp"/>
10012                         <field name="email" reporter:datatype="text"/>
10013                         <field name="excel_format" reporter:datatype="bool"/>
10014                         <field name="csv_format" reporter:datatype="bool"/>
10015                         <field name="html_format" reporter:datatype="bool"/>
10016                         <field name="error_code" reporter:datatype="int"/>
10017                         <field name="error_text" reporter:datatype="text"/>
10018                         <field name="report" reporter:datatype="link"/>
10019                         <field name="folder" reporter:datatype="link"/>
10020                         <field name="chart_pie" reporter:datatype="bool"/>
10021                         <field name="chart_bar" reporter:datatype="bool"/>
10022                         <field name="chart_line" reporter:datatype="bool"/>
10023                 </fields>
10024                 <links>
10025                         <link field="runner" reltype="has_a" key="id" map="" class="au"/>
10026                         <link field="report" reltype="has_a" key="id" map="" class="rr"/>
10027                         <link field="folder" reltype="has_a" key="id" map="" class="rof"/>
10028                 </links>
10029         </class>
10030         <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">
10031                 <fields oils_persist:primary="id">
10032                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
10033                         <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>
10034                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
10035                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
10036                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
10037                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
10038                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
10039                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
10040                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
10041                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
10042                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
10043                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
10044                 </fields>
10045                 <links>
10046                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
10047                 </links>
10048                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10049                         <actions>
10050                                 <retrieve />
10051                         </actions>
10052                 </permacrud>
10053         </class>
10054         <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">
10055                 <fields oils_persist:primary="id">
10056                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
10057                         <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>
10058                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
10059                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
10060                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
10061                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
10062                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
10063                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
10064                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
10065                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
10066                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
10067                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
10068                 </fields>
10069                 <links>
10070                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
10071                 </links>
10072         </class>
10073         <class id="rsr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::simple_record" oils_persist:tablename="reporter.simple_record" reporter:label="Simple Record">
10074                 <fields oils_persist:primary="id">
10075                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
10076                         <field reporter:label="Metarecord" name="metarecord" reporter:datatype="link"/>
10077                         <field reporter:label="Fingerprint" name="fingerprint" />
10078                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
10079                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
10080                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
10081                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
10082                         <field reporter:label="Uniform Title (normalized)" name="uniform_title" reporter:datatype="text"/>
10083                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
10084                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
10085                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
10086                         <field reporter:label="Series Title (normalized)" name="series_title" reporter:datatype="text"/>
10087                         <field reporter:label="Series Statement (normalized)" name="series_statement" reporter:datatype="text"/>
10088                         <field reporter:label="Summary (normalized)" name="summary" reporter:datatype="text"/>
10089                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
10090                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
10091                         <field reporter:label="Topic Subjects (normalized)" name="topic_subject" reporter:datatype="text"/>
10092                         <field reporter:label="Geographic Subjects (normalized)" name="geographic_subject" reporter:datatype="text"/>
10093                         <field reporter:label="Genres (normalized)" name="genre" reporter:datatype="text"/>
10094                         <field reporter:label="Personal Name Subjects (normalized)" name="name_subject" reporter:datatype="text"/>
10095                         <field reporter:label="Corporate Name Subjects (normalized)" name="corporate_subject" reporter:datatype="text"/>
10096                         <field reporter:label="External URI List (normalized)" name="external_uri" reporter:datatype="text"/>
10097                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
10098                 </fields>
10099                 <links>
10100                         <link field="metarecord" reltype="has_a" key="id" map="" class="mmr"/>
10101                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
10102                 </links>
10103         </class>
10104         <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">
10105                 <fields oils_persist:primary="id">
10106                         <field reporter:label="User ID" name="id" reporter:datatype="id" />
10107                         <field reporter:label="Date of Birth" name="dob" reporter:datatype="timestamp"/>
10108                         <field reporter:label="General Demographic Division" name="general_division" reporter:datatype="text"/>
10109                 </fields>
10110                 <links>
10111                         <link field="id" reltype="might_have" key="id" map="" class="au"/>
10112                 </links>
10113         </class>
10114         <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">
10115                 <fields oils_persist:primary="id">
10116                         <field reporter:label="Circulation ID" name="id" reporter:datatype="id" />
10117                         <field reporter:label="Circulation Type" name="type" reporter:datatype="text"/>
10118                 </fields>
10119                 <links>
10120                         <link field="id" reltype="might_have" key="id" map="" class="circ"/>
10121                 </links>
10122         </class>
10123         <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">
10124                 <fields oils_persist:primary="id">
10125                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
10126                         <field reporter:label="Hold Target" name="target" reporter:datatype="int" />
10127                         <field reporter:label="Hold Request Type" name="hold_type" reporter:datatype="text"/>
10128                         <field reporter:label="Target Bib Record" name="bib_record" reporter:datatype="link"/>
10129                 </fields>
10130                 <links>
10131                         <link field="id" reltype="might_have" key="id" map="" class="ahr"/>
10132                         <link field="bib_record" reltype="has_a" key="id" map="" class="bre"/>
10133                 </links>
10134         </class>
10135         <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">
10136                 <fields oils_persist:primary="xact">
10137                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />
10138                         <field reporter:label="Unvoided Billing Amount" name="unvoided" reporter:datatype="int" />
10139                         <field reporter:label="Voided Billing Amount" name="voided" reporter:datatype="money"/>
10140                         <field reporter:label="Total Billing Amount" name="total" reporter:datatype="money"/>
10141                 </fields>
10142                 <links>
10143                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
10144                 </links>
10145         </class>
10146         <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">
10147                 <fields oils_persist:primary="xact">
10148                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />
10149                         <field reporter:label="Unvoided Paid Amount" name="unvoided" reporter:datatype="int" />
10150                         <field reporter:label="Voided (Returned) Paid Amount" name="voided" reporter:datatype="money"/>
10151                         <field reporter:label="Total Paid Amount" name="total" reporter:datatype="money"/>
10152                 </fields>
10153                 <links>
10154                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
10155                 </links>
10156         </class>
10157         <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)">
10158                 <fields oils_persist:primary="id">
10159                         <field reporter:label="Bib ID" name="id" reporter:datatype="id" />
10160                         <field reporter:label="Update Time" name="holding_update" reporter:datatype="timestamp" />
10161                         <field reporter:label="Update Type" name="update_type" reporter:datatype="text" />
10162                 </fields>
10163                 <links>
10164                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
10165                 </links>
10166         </class>
10167         <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">
10168                 <fields oils_persist:primary="id">
10169                         <field reporter:label="Copy ID" name="id" reporter:datatype="int" />
10170                         <field reporter:label="Total Circulation Count" name="circ_count" reporter:datatype="int" />
10171                 </fields>
10172                 <links>
10173                         <link field="id" reltype="has_a" key="id" map="" class="acp"/>
10174                 </links>
10175         </class>
10176         <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">
10177                 <fields oils_persist:primary="bibid">
10178                         <field reporter:label="Bib Record" name="bibid" reporter:datatype="id" />
10179                         <field reporter:label="Circulation Library" name="circ_lib" reporter:datatype="link" />
10180                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link" />
10181                         <field reporter:label="Last Edit Date" name="last_edit_time" reporter:datatype="timestamp" />
10182                         <field reporter:label="Has Only Deleted Copies 0/1" name="has_only_deleted_copies" reporter:datatype="int" />
10183                         <field reporter:label="Total deleted copies" name="deleted_count" reporter:datatype="int" />
10184                         <field reporter:label="Total visible copies" name="visible_count" reporter:datatype="int" />
10185                         <field reporter:label="Total copies attached" name="total_count" reporter:datatype="int" />
10186                 </fields>
10187                 <links>
10188                         <link field="bibid" reltype="has_a" key="id" map="" class="bre"/>
10189                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
10190                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10191                 </links>
10192         </class>
10193         <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">
10194                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_id_seq">
10195                         <field reporter:label="Formula ID" name="id" reporter:datatype="id" reporter:selector="name" />
10196                         <field reporter:label="Formula Owner" name="owner" reporter:datatype="org_unit"/>
10197                         <field reporter:label="Formula Name" name="name" reporter:datatype="text"/>
10198                         <field reporter:label="Skip Count" name="skip_count" reporter:datatype="int"/>
10199                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
10200                         <field reporter:label="Use Count" name="use_count" oils_persist:virtual="true" reporter:datatype="int"/>
10201                 </fields>
10202                 <links>
10203                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
10204                         <link field="entries" reltype="has_many" key="formula" map="" class="acqdfe"/>
10205                 </links>
10206                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10207                         <actions>
10208                                 <create permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
10209                                 <retrieve permission="CREATE_PURCHASE_ORDER ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
10210                                 <update permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
10211                                 <delete permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
10212                         </actions>
10213                 </permacrud>
10214         </class>
10215         <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">
10216                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_entry_id_seq">
10217                         <field reporter:label="Entry ID" name="id" reporter:datatype="id"/>
10218                         <field reporter:label="Formula ID" name="formula" reporter:datatype="link"/>
10219                         <field reporter:label="Position" name="position" reporter:datatype="int"/>
10220                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
10221                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
10222                         <field reporter:label="Location" name="location" reporter:datatype="link"/>
10223                         <field reporter:label="Fund" name="fund" reporter:datatype="link"/>
10224                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
10225                         <field reporter:label="Collection Code" name="collection_code" reporter:datatype="text"/>
10226                 </fields>
10227                 <links>
10228                         <link field="formula" reltype="has_a" key="id" map="" class="acqdf"/>
10229                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10230                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
10231                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
10232                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
10233                 </links>
10234                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10235                         <actions>
10236                                 <create permission="ADMIN_ACQ_DISTRIB_FORMULA">
10237                                         <context link="formula" field="owner"/>
10238                                 </create>
10239                                 <retrieve permission="ADMIN_ACQ_DISTRIB_FORMULA">
10240                                         <context link="formula" field="owner"/>
10241                                 </retrieve>
10242                                 <update permission="ADMIN_ACQ_DISTRIB_FORMULA">
10243                                         <context link="formula" field="owner"/>
10244                                 </update>
10245                                 <delete permission="ADMIN_ACQ_DISTRIB_FORMULA">
10246                                         <context link="formula" field="owner"/>
10247                                 </delete>
10248                         </actions>
10249                 </permacrud>
10250         </class>
10251
10252         <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">
10253                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_application_id_seq">
10254                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
10255                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
10256                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
10257                         <field reporter:label="Distribution Formula" name="formula" reporter:datatype="link"/>
10258                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
10259                 </fields>
10260                 <links>
10261                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
10262                         <link field="formula" reltype="has_a" key="id" map="" class="acqdf"/>
10263                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
10264                 </links>
10265                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10266                         <actions>
10267                                 <create permission="CREATE_PURCHASE_ORDER">
10268                                         <context link="formula" field="owner"/>
10269                 </create>
10270                                 <retrieve permission="CREATE_PURCHASE_ORDER">
10271                                         <context link="formula" field="owner"/>
10272                 </retrieve>
10273                                 <update permission="CREATE_PURCHASE_ORDER">
10274                                         <context link="formula" field="owner"/>
10275                 </update>
10276                                 <delete permission="CREATE_PURCHASE_ORDER">
10277                                         <context link="formula" field="owner"/>
10278                 </delete>
10279                         </actions>
10280                 </permacrud>
10281         </class>
10282
10283         <class id="acqda" controller="open-ils.cstore" oils_obj:fieldmapper="acq::debit_attribution" oils_persist:tablename="acq.debit_attribution" reporter:label="Debit Attribution">
10284                 <fields oils_persist:primary="id">
10285                         <field reporter:label="Debit Attribution ID" name="id" reporter:datatype="id"/>
10286                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
10287                         <field reporter:label="Debit Amount" name="debit_amount" reporter:datatype="money"/>
10288                         <field reporter:label="Funding Source Credit" name="funding_source_credit" reporter:datatype="link"/>
10289                         <field reporter:label="Credit Amount" name="credit_amount" reporter:datatype="money"/>
10290                 </fields>
10291                 <links>
10292                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
10293                         <link field="funding_source_credit" reltype="has_a" key="id" map="" class="acqfscred"/>
10294                 </links>
10295         </class>
10296
10297         <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">
10298                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_type_id_seq">
10299                         <field reporter:label="Claim Type ID" name="id" reporter:datatype="id" reporter:selector="code" />
10300                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
10301                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
10302                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
10303                 </fields>
10304                 <links>
10305                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
10306                 </links>
10307                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10308                         <actions>
10309                                 <create permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
10310                                 <retrieve permission="ADMIN_ACQ_CLAIM_TYPE ADMIN_ACQ_CLAIM VIEW_CLAIM MANAGE_CLAIM" context_field="org_unit"/>
10311                                 <update permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
10312                                 <delete permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
10313                         </actions>
10314                 </permacrud>
10315         </class>
10316
10317         <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">
10318                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_event_type_id_seq">
10319                         <field reporter:label="Claim Event Type ID" name="id" reporter:datatype="id" reporter:selector="code" />
10320                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
10321                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
10322                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
10323                         <field reporter:label="Library Initiated" name="library_initiated" reporter:datatype="bool"/>
10324                 </fields>
10325                 <links>
10326                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
10327                 </links>
10328                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10329                         <actions>
10330                                 <create permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
10331                                 <retrieve permission="ADMIN_ACQ_CLAIM_EVENT_TYPE ADMIN_ACQ_CLAIM VIEW_CLAIM MANAGE_CLAIM" context_field="org_unit"/>
10332                                 <update permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
10333                                 <delete permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
10334                         </actions>
10335                 </permacrud>
10336         </class>
10337
10338         <class id="acqcl" controller="open-ils.cstore" oils_obj:fieldmapper="acq::claim" oils_persist:tablename="acq.claim" reporter:label="Claim">
10339                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_id_seq">
10340                         <field reporter:label="Claim ID" name="id" reporter:datatype="id"/>
10341                         <field reporter:label="Claim Type" name="type" reporter:datatype="link"/>
10342                         <field reporter:label="Lineitem Detail" name="lineitem_detail" reporter:datatype="link"/>
10343                 </fields>
10344                 <links>
10345                         <link field="type" reltype="has_a" key="id" map="" class="acqclt"/>
10346                         <link field="lineitem_detail" reltype="has_a" key="id" map="" class="acqlid"/>
10347                 </links>
10348         </class>
10349
10350         <class id="acqcle" controller="open-ils.cstore" oils_obj:fieldmapper="acq::claim_event" oils_persist:tablename="acq.claim_event" reporter:label="Claim Event">
10351                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_event_id_seq">
10352                         <field reporter:label="Claim Event ID" name="id" reporter:datatype="id"/>
10353                         <field reporter:label="Claim Event Type" name="type" reporter:datatype="link"/>
10354                         <field reporter:label="Claim ID" name="claim" reporter:datatype="link"/>
10355                         <field reporter:label="Event Date" name="event_date" reporter:datatype="timestamp"/>
10356                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
10357                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
10358                 </fields>
10359                 <links>
10360                         <link field="type" reltype="has_a" key="id" map="" class="acqclet"/>
10361                         <link field="claim" reltype="has_a" key="id" map="" class="acqcl"/>
10362                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
10363                 </links>
10364         </class>
10365
10366         <class id="acqscl" controller="open-ils.cstore" oils_obj:fieldmapper="acq::serial_claim" oils_persist:tablename="acq.serial_claim" reporter:label="Serial Claim">
10367                 <fields oils_persist:primary="id" oils_persist:sequence="acq.serial_claim_id_seq">
10368                         <field reporter:label="Claim ID" name="id" reporter:datatype="id"/>
10369                         <field reporter:label="Claim Type" name="type" reporter:datatype="link"/>
10370                         <field reporter:label="Serial Item" name="item" reporter:datatype="link"/>
10371                 </fields>
10372                 <links>
10373                         <link field="type" reltype="has_a" key="id" map="" class="acqclt"/>
10374                         <link field="item" reltype="has_a" key="id" map="" class="sitem"/>
10375                 </links>
10376         </class>
10377
10378         <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">
10379                 <fields oils_persist:primary="id" oils_persist:sequence="acq.serial_claim_event_id_seq">
10380                         <field reporter:label="Claim Event ID" name="id" reporter:datatype="id"/>
10381                         <field reporter:label="Claim Event Type" name="type" reporter:datatype="link"/>
10382                         <field reporter:label="Claim ID" name="claim" reporter:datatype="link"/>
10383                         <field reporter:label="Event Date" name="event_date" reporter:datatype="timestamp"/>
10384                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
10385                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
10386                 </fields>
10387                 <links>
10388                         <link field="type" reltype="has_a" key="id" map="" class="acqclet"/>
10389                         <link field="claim" reltype="has_a" key="id" map="" class="acqscl"/>
10390                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
10391                 </links>
10392         </class>
10393
10394         <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">
10395                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_policy_id_seq">
10396                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
10397                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
10398                         <field reporter:label="Claim Policy Name" name="name" reporter:datatype="text"/>
10399                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
10400                 </fields>
10401                 <links>
10402                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
10403                 </links>
10404                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10405             <actions>
10406                 <create   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
10407                 <retrieve permission="ADMIN_CLAIM_POLICY VIEW_PROVIDER" context_field="org_unit"/>
10408                 <update   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
10409                 <delete   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
10410             </actions>
10411                 </permacrud>
10412         </class>
10413
10414         <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">
10415                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_policy_action_id_seq">
10416                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="action"/>
10417                         <field reporter:label="Claim Policy ID" name="claim_policy" reporter:datatype="link"/>
10418                         <field reporter:label="Action Interval" name="action_interval" reporter:datatype="interval"/>
10419                         <field reporter:label="Action (Event Type)" name="action" reporter:datatype="link"/>
10420                 </fields>
10421                 <links>
10422                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
10423                         <link field="action" reltype="has_a" key="id" map="" class="acqclet"/>
10424                 </links>
10425                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10426                         <actions>
10427                                 <create permission="ADMIN_CLAIM_POLICY">
10428                                         <context link="claim_policy" field="org_unit"/>
10429                 </create>
10430                                 <retrieve permission="ADMIN_CLAIM_POLICY VIEW_PROVIDER">
10431                                         <context link="claim_policy" field="org_unit"/>
10432                 </retrieve>
10433                                 <update permission="ADMIN_CLAIM_POLICY">
10434                                         <context link="claim_policy" field="org_unit"/>
10435                 </update>
10436                                 <delete permission="ADMIN_CLAIM_POLICY">
10437                                         <context link="claim_policy" field="org_unit"/>
10438                 </delete>
10439                         </actions>
10440                 </permacrud>
10441         </class>
10442
10443     <class id="stgu" controller="open-ils.cstore" oils_obj:fieldmapper="staging::user_stage" oils_persist:tablename="staging.user_stage" reporter:label="User Stage">
10444         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.user_stage_row_id_seq">
10445             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
10446             <field reporter:label="Create Date" name="row_date" reporter:datatype="timestamp"/>
10447             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
10448             <field reporter:label="Main (Profile) Permission Group" name="profile" reporter:datatype="text"/>
10449             <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
10450             <field reporter:label="Password" name="passwd" reporter:datatype="text"/>
10451             <field reporter:label="Primary Identification Type" name="ident_type" reporter:datatype="int"/>
10452             <field reporter:label="First Name" name="first_given_name" reporter:datatype="text"/>
10453             <field reporter:label="Middle Name" name="second_given_name" reporter:datatype="text"/>
10454             <field reporter:label="Last Name" name="family_name" reporter:datatype="text"/>
10455             <field reporter:label="Daytime Phone" name="day_phone" reporter:datatype="text"/>
10456             <field reporter:label="Evening Phone" name="evening_phone" reporter:datatype="text"/>
10457             <field reporter:label="Home Library" name="home_ou" reporter:datatype="int"/>
10458             <field reporter:label="Date of Birth" name="dob" reporter:datatype="text"/>
10459             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
10460             <field reporter:label="Requesting User" name="requesting_usr" reporter:datatype="link"/>
10461                                                 <field reporter:label="Preferred First Name" name="pref_first_given_name" reporter:datatype="text"/>
10462                                                 <field reporter:label="Preferred Middle Name" name="pref_second_given_name" reporter:datatype="text"/>
10463                                                 <field reporter:label="Preferred Last Name" name="pref_family_name"  reporter:datatype="text"/>
10464         </fields>
10465         <links>
10466             <link field="requesting_usr" reltype="has_a" key="id" map="" class="au"/>
10467         </links>
10468     </class>
10469
10470     <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">
10471         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.card_stage_row_id_seq">
10472             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
10473             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
10474             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
10475             <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
10476             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
10477         </fields>
10478     </class>
10479
10480     <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">
10481         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.mailing_address_stage_row_id_seq">
10482             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
10483             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
10484             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
10485             <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
10486             <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
10487             <field reporter:label="City" name="city" reporter:datatype="text"/>
10488             <field reporter:label="County" name="county"  reporter:datatype="text"/>
10489             <field reporter:label="State" name="state" reporter:datatype="text"/>
10490             <field reporter:label="Country" name="country" reporter:datatype="text"/>
10491             <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
10492             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
10493         </fields>
10494     </class>
10495
10496     <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">
10497         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.mailing_address_stage_row_id_seq">
10498             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
10499             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
10500             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
10501             <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
10502             <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
10503             <field reporter:label="City" name="city" reporter:datatype="text"/>
10504             <field reporter:label="County" name="county"  reporter:datatype="text"/>
10505             <field reporter:label="State" name="state" reporter:datatype="text"/>
10506             <field reporter:label="Country" name="country" reporter:datatype="text"/>
10507             <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
10508             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
10509         </fields>
10510     </class>
10511
10512     <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">
10513         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.statcat_stage_row_id_seq">
10514             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
10515             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
10516             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
10517             <field reporter:label="Stat Cat ID" name="statcat" reporter:datatype="text"/>
10518             <field reporter:label="Stat Cat Value" name="value" reporter:datatype="text"/>
10519             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
10520         </fields>
10521     </class>
10522
10523     <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">
10524         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.setting_stage_row_id_seq">
10525             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
10526             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
10527             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
10528             <field reporter:label="User Setting Code" name="setting" reporter:datatype="text"/>
10529             <field reporter:label="User Setting Value" name="value" reporter:datatype="text"/>
10530             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
10531         </fields>
10532     </class>
10533
10534         <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">
10535                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_group_id_seq">
10536                         <field reporter:label="Fieldset Group ID" name="id" reporter:datatype="id"/>
10537                         <field reporter:label="Fieldset Group Name" name="name" reporter:datatype="text" oils_obj:required="true"/>
10538                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp"/>
10539                         <field reporter:label="Complete Time" name="complete_time" reporter:datatype="timestamp"/>
10540                         <field reporter:label="Container ID" name="container" reporter:datatype="int" oils_obj:required="true"/> <!-- not an fkey because could be on multiple tables -->
10541                         <field reporter:label="Container Type" name="container_type" reporter:datatype="text" oils_obj:required="true"/>
10542                         <field reporter:label="Rollback Group" name="rollback_group" reporter:datatype="link"/>
10543                         <field reporter:label="Rollback Time" name="rollback_time" reporter:datatype="timestamp"/>
10544                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
10545                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
10546                 </fields>
10547                 <links>
10548                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
10549                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10550                         <link field="rollback_group" reltype="has_a" key="id" map="" class="afsg"/>
10551                 </links>
10552                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10553                         <actions>
10554                                 <create permission="CREATE_FIELDSET_GROUP ADMIN_FIELDSET_GROUP" context_field="owning_lib" owning_user="creator"/>
10555                                 <retrieve permission="RETRIEVE_FIELDSET_GROUP ADMIN_FIELDSET_GROUP" context_field="owning_lib" owning_user="creator"/>
10556                                 <update permission="UPDATE_FIELDSET_GROUP ADMIN_FIELDSET_GROUP" context_field="owning_lib" owning_user="creator"/>
10557                                 <delete permission="DELETE_FIELDSET_GROUP ADMIN_FIELDSET_GROUP" context_field="owning_lib" owning_user="creator"/>
10558                         </actions>
10559                 </permacrud>
10560         </class>
10561
10562         <class id="afs" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::fieldset" oils_persist:tablename="action.fieldset" reporter:label="Fieldset">
10563                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_id_seq">
10564                         <field reporter:label="Fieldset ID" name="id" reporter:datatype="id"/>
10565                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
10566                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link"/>
10567                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
10568                         <field reporter:label="Creation Time" name="creation_time" reporter:datatype="timestamp"/>
10569                         <field reporter:label="Scheduled Time" name="scheduled_time" reporter:datatype="timestamp"/>
10570                         <field reporter:label="Applied Time" name="applied_time" reporter:datatype="timestamp"/>
10571                         <field reporter:label="Class Name" name="classname" reporter:datatype="text"/>
10572                         <field reporter:label="Fieldset Name" name="name" reporter:datatype="text"/>
10573                         <field reporter:label="Stored Query" name="stored_query" reporter:datatype="link"/>
10574                         <field reporter:label="Primary Key Value" name="pkey_value" reporter:datatype="text"/>
10575                         <field reporter:label="Fieldset Group" name="fieldset_group" reporter:datatype="link"/>
10576                         <field reporter:label="Error Message" name="error_msg" reporter:datatype="text"/>
10577                 </fields>
10578                 <links>
10579                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
10580                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10581                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
10582                         <link field="fieldset_group" reltype="has_a" key="id" map="" class="afsg"/>
10583                 </links>
10584                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10585                         <actions>
10586                                 <create permission="CREATE_FIELDSET ADMIN_FIELDSET" context_field="owning_lib" owning_user="owner"/>
10587                                 <retrieve permission="RETRIEVE_FIELDSET ADMIN_FIELDSET" context_field="owning_lib" owning_user="owner"/>
10588                                 <update permission="UPDATE_FIELDSET ADMIN_FIELDSET" context_field="owning_lib" owning_user="owner"/>
10589                                 <delete permission="DELETE_FIELDSET ADMIN_FIELDSET" context_field="owning_lib" owning_user="owner"/>
10590                         </actions>
10591                 </permacrud>
10592         </class>
10593
10594         <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">
10595                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_col_val_id_seq">
10596                         <field reporter:label="Column Value ID" name="id" reporter:datatype="id"/>
10597                         <field reporter:label="Fieldset ID" name="fieldset" reporter:datatype="link"/>
10598                         <field reporter:label="Column Name" name="col" reporter:datatype="text"/>
10599                         <field reporter:label="Column Value" name="val" reporter:datatype="text"/>
10600                 </fields>
10601                 <links>
10602                         <link field="fieldset" reltype="has_a" key="id" map="" class="afs"/>
10603                 </links>
10604                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1"> <!-- NOTE: foreign context does not support owning_user today -->
10605                         <actions>
10606                                 <create permission="CREATE_FIELDSET_ENTRY ADMIN_FIELDSET_ENTRY">
10607                     <context link="fieldset" field="owning_lib"/>
10608                 </create>
10609                                 <retrieve permission="RETRIEVE_FIELDSET_ENTRY ADMIN_FIELDSET_ENTRY">
10610                     <context link="fieldset" field="owning_lib"/>
10611                 </retrieve>
10612                                 <update permission="UPDATE_FIELDSET_ENTRY ADMIN_FIELDSET_ENTRY">
10613                     <context link="fieldset" field="owning_lib"/>
10614                 </update>
10615                                 <delete permission="DELETE_FIELDSET_ENTRY ADMIN_FIELDSET_ENTRY">
10616                     <context link="fieldset" field="owning_lib"/>
10617                 </delete>
10618                         </actions>
10619                 </permacrud>
10620         </class>
10621
10622     <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">
10623         <fields>
10624             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
10625             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
10626             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
10627         </fields>
10628                 <links>
10629                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
10630                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
10631                 </links>
10632     </class>
10633
10634     <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">
10635         <fields>
10636             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
10637             <field reporter:label="Min Loop" name="min" reporter:datatype="int"/>
10638         </fields>
10639                 <links>
10640                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
10641                 </links>
10642     </class>
10643
10644     <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">
10645         <fields>
10646             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
10647             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
10648             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
10649         </fields>
10650                 <links>
10651                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
10652                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
10653                 </links>
10654     </class>
10655
10656     <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">
10657         <fields>
10658             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
10659             <field reporter:label="Max Loop" name="max" reporter:datatype="int"/>
10660         </fields>
10661                 <links>
10662                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
10663                 </links>
10664     </class>
10665
10666     <class id="aufhol" controller="open-ils.cstore" oils_obj:fieldmapper="action::unfulfilled_hold_outermost_loop" oils_persist:readonly="true">
10667                 <oils_persist:source_definition>
10668
10669             SELECT  DISTINCT l.*
10670               FROM  action.unfulfilled_hold_loops l
10671                     JOIN action.unfulfilled_hold_max_loop m USING (hold)
10672               WHERE l.count = m.max
10673
10674                 </oils_persist:source_definition>
10675         <fields>
10676             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
10677             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
10678             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
10679         </fields>
10680                 <links>
10681                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
10682                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
10683                 </links>
10684     </class>
10685
10686         <class id="qsq" controller="open-ils.cstore" oils_obj:fieldmapper="query::stored_query" oils_persist:tablename="query.stored_query" reporter:label="Stored Query">
10687                 <fields oils_persist:primary="id" oils_persist:sequence="query.stored_query_id_seq">
10688                         <field reporter:label="Query ID" name="id" reporter:datatype="id"/>
10689                         <field reporter:label="Query type" name="type" reporter:datatype="text"/>
10690                         <field reporter:label="Use ALL" name="use_all" reporter:datatype="bool"/>
10691                         <field reporter:label="Use DISTINCT" name="use_distinct" reporter:datatype="bool"/>
10692                         <field reporter:label="FROM Clause" name="from_clause" reporter:datatype="link"/>
10693                         <field reporter:label="WHERE Clause" name="where_clause" reporter:datatype="link"/>
10694                         <field reporter:label="HAVING Clause" name="having_clause" reporter:datatype="link"/>
10695                         <field reporter:label="LIMIT count" name="limit_count" reporter:datatype="link"/>
10696                         <field reporter:label="OFFSET count" name="offset_count" reporter:datatype="link"/>
10697                 </fields>
10698                 <links>
10699                         <link field="from_clause" reltype="has_a" key="id" map="" class="qfr"/>
10700                         <link field="having_clause" reltype="has_a" key="id" map="" class="qxp"/>
10701                         <link field="where_clause" reltype="has_a" key="id" map="" class="qxp"/>
10702                         <link field="limit_count" reltype="has_a" key="id" map="" class="qxp"/>
10703                         <link field="offset_count" reltype="has_a" key="id" map="" class="qxp"/>
10704                 </links>
10705         </class>
10706
10707         <class id="qseq" controller="open-ils.cstore" oils_obj:fieldmapper="query::query_sequence" oils_persist:tablename="query.query_sequence" reporter:label="Query Sequence">
10708                 <fields oils_persist:primary="id" oils_persist:sequence="query.query_sequence_id_seq">
10709                         <field reporter:label="Query Seq ID" name="id" reporter:datatype="id"/>
10710                         <field reporter:label="Parent Query" name="parent_query" reporter:datatype="link"/>
10711                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10712                         <field reporter:label="Child Query" name="child_query" reporter:datatype="link"/>
10713                 </fields>
10714                 <links>
10715                         <link field="parent_query" reltype="has_a" key="id" map="" class="qsq"/>
10716                         <link field="child_query" reltype="has_a" key="id" map="" class="qsq"/>
10717                 </links>
10718         </class>
10719
10720         <class id="qdt" controller="open-ils.cstore" oils_obj:fieldmapper="query::datatype" oils_persist:tablename="query.datatype" reporter:label="Datatype">
10721                 <fields oils_persist:primary="id" oils_persist:sequence="query.datatype_id_seq">
10722                         <field reporter:label="Datatype ID" name="id" reporter:datatype="id"/>
10723                         <field reporter:label="Datatype Name" name="datatype_name" reporter:datatype="text"/>
10724                         <field reporter:label="Is Numeric" name="is_numeric" reporter:datatype="bool"/>
10725                         <field reporter:label="Is Composite" name="is_composite" reporter:datatype="bool"/>
10726                 </fields>
10727                 <links>
10728                 </links>
10729         </class>
10730
10731         <class id="qsf" controller="open-ils.cstore" oils_obj:fieldmapper="query::subfield" oils_persist:tablename="query.subfield" reporter:label="Subfield">
10732                 <fields oils_persist:primary="id" oils_persist:sequence="query.subfield_id_seq">
10733                         <field reporter:label="Subfield ID" name="id" reporter:datatype="id"/>
10734                         <field reporter:label="Composite Type" name="composite_type" reporter:datatype="link"/>
10735                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10736                         <field reporter:label="Subfield Type" name="subfield_type" reporter:datatype="link"/>
10737                 </fields>
10738                 <links>
10739                         <link field="composite_type" reltype="has_a" key="id" map="" class="qdt"/>
10740                         <link field="subfield_type" reltype="has_a" key="id" map="" class="qdt"/>
10741                 </links>
10742         </class>
10743         
10744         <class id="qfs" controller="open-ils.cstore" oils_obj:fieldmapper="query::function_sig" oils_persist:tablename="query.function_sig" reporter:label="Function Signature">
10745                 <fields oils_persist:primary="id" oils_persist:sequence="query.function_sig_id_seq">
10746                         <field reporter:label="Function Signature ID" name="id" reporter:datatype="id"/>
10747                         <field reporter:label="Function Name" name="function_name" reporter:datatype="text"/>
10748                         <field reporter:label="Return Type" name="return_type" reporter:datatype="link"/>
10749                         <field reporter:label="Is Aggregate" name="is_aggregate" reporter:datatype="bool"/>
10750                 </fields>
10751                 <links>
10752                         <link field="return_type" reltype="has_a" key="id" map="" class="qdt"/>
10753                 </links>
10754         </class>
10755         
10756         <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">
10757                 <fields oils_persist:primary="id" oils_persist:sequence="query.function_param_def_id_seq">
10758                         <field reporter:label="Function Param Def ID" name="id" reporter:datatype="id"/>
10759                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
10760                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10761                         <field reporter:label="Datatype" name="datatype" reporter:datatype="link"/>
10762                 </fields>
10763                 <links>
10764                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
10765                         <link field="datatype" reltype="has_a" key="id" map="" class="qdt"/>
10766                 </links>
10767         </class>
10768
10769         <class id="qbv" controller="open-ils.cstore" oils_obj:fieldmapper="query::bind_variable" oils_persist:tablename="query.bind_variable" reporter:label="Bind Variable">
10770                 <fields oils_persist:primary="name">
10771                         <field reporter:label="Name" name="name" reporter:datatype="id"/>
10772                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
10773                         <field reporter:label="Type" name="type" reporter:datatype="text"/>
10774                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
10775                         <field reporter:label="Default Value" name="default_value" reporter:datatype="text"/>
10776                         <field reporter:label="Actual Value" name="actual_value" oils_persist:virtual="true" reporter:datatype="text"/>
10777                 </fields>
10778                 <links>
10779                 </links>
10780         </class>
10781
10782         <class id="qxp" controller="open-ils.cstore" oils_obj:fieldmapper="query::expression" oils_persist:tablename="query.expression" reporter:label="Expression">
10783                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10784                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10785                         <field reporter:label="Expression Type" name="type" reporter:datatype="text"/>
10786                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10787                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10788                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10789                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
10790                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
10791                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
10792                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
10793                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
10794                         <field reporter:label="Right Operand" name="right_operand" reporter:datatype="link"/>
10795                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
10796                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
10797                         <field reporter:label="Cast Type" name="cast_type" reporter:datatype="link"/>
10798                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
10799                         <field reporter:label="Bind Variable" name="bind_variable" reporter:datatype="link"/>
10800                 </fields>
10801                 <links>
10802                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10803                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
10804                         <link field="right_operand" reltype="has_a" key="id" map="" class="qxp"/>
10805                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
10806                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
10807                         <link field="cast_type" reltype="has_a" key="id" map="" class="qdt"/>
10808                         <link field="bind_variable" reltype="has_a" key="name" map="" class="qbv"/>
10809                 </links>
10810         </class>
10811
10812         <class id="qcb" controller="open-ils.cstore" oils_obj:fieldmapper="query::case_branch" oils_persist:tablename="query.case_branch" reporter:label="Case Branch">
10813                 <fields oils_persist:primary="id" oils_persist:sequence="query.case_branch_id_seq">
10814                         <field reporter:label="Case Branch ID" name="id" reporter:datatype="id"/>
10815                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10816                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10817                         <field reporter:label="Condition" name="condition" reporter:datatype="link"/>
10818                         <field reporter:label="Result" name="result" reporter:datatype="link"/>
10819                 </fields>
10820                 <links>
10821                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10822                         <link field="condition" reltype="has_a" key="id" map="" class="qxp"/>
10823                         <link field="result" reltype="has_a" key="id" map="" class="qxp"/>
10824                 </links>
10825         </class>
10826
10827         <class id="qfr" controller="open-ils.cstore" oils_obj:fieldmapper="query::from_relation" oils_persist:tablename="query.from_relation" reporter:label="From Relation">
10828                 <fields oils_persist:primary="id" oils_persist:sequence="query.from_relation_id_seq">
10829                         <field reporter:label="From Relation ID" name="id" reporter:datatype="id"/>
10830                         <field reporter:label="From Relation Type" name="type" reporter:datatype="text"/>
10831                         <field reporter:label="Table Name" name="table_name" reporter:datatype="text"/>
10832                         <field reporter:label="Class Name" name="class_name" reporter:datatype="text"/>
10833                         <field reporter:label="Subquery ID" name="subquery" reporter:datatype="link"/>
10834                         <field reporter:label="Function Call ID" name="function_call" reporter:datatype="link"/>
10835                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
10836                         <field reporter:label="Parent Relation ID" name="parent_relation" reporter:datatype="link"/>
10837                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10838                         <field reporter:label="Join Type" name="join_type" reporter:datatype="text"/>
10839                         <field reporter:label="On Clause ID" name="on_clause" reporter:datatype="link"/>
10840                 </fields>
10841                 <links>
10842                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
10843                         <link field="function_call" reltype="has_a" key="id" map="" class="qxp"/>
10844                         <link field="parent_relation" reltype="has_a" key="id" map="" class="qfr"/>
10845                         <link field="on_clause" reltype="has_a" key="id" map="" class="qxp"/>
10846                 </links>
10847         </class>
10848
10849         <class id="qrc" controller="open-ils.cstore" oils_obj:fieldmapper="query::record_column" oils_persist:tablename="query.record_column" reporter:label="Record Column">
10850                 <fields oils_persist:primary="id" oils_persist:sequence="query.record_column_id_seq">
10851                         <field reporter:label="Record Column ID" name="id" reporter:datatype="id"/>
10852                         <field reporter:label="From Relation ID" name="from_relation" reporter:datatype="link"/>
10853                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10854                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
10855                         <field reporter:label="Column Type" name="column_type" reporter:datatype="link"/>
10856                 </fields>
10857                 <links>
10858                         <link field="from_relation" reltype="has_a" key="id" map="" class="qfr"/>
10859                         <link field="column_type" reltype="has_a" key="id" map="" class="qdt"/>
10860                 </links>
10861         </class>
10862
10863         <class id="qsi" controller="open-ils.cstore" oils_obj:fieldmapper="query::select_item" oils_persist:tablename="query.select_item" reporter:label="Select Item">
10864                 <fields oils_persist:primary="id" oils_persist:sequence="query.select_item_id_seq">
10865                         <field reporter:label="Select Item ID" name="id" reporter:datatype="id"/>
10866                         <field reporter:label="Stored Query ID" name="stored_query" reporter:datatype="link"/>
10867                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10868                         <field reporter:label="Expression" name="expression" reporter:datatype="link"/>
10869                         <field reporter:label="Column Alias" name="column_alias" reporter:datatype="text"/>
10870                         <field reporter:label="Is Grouped By" name="grouped_by" reporter:datatype="bool"/>
10871                 </fields>
10872                 <links>
10873                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
10874                         <link field="expression" reltype="has_a" key="id" map="" class="qxp"/>
10875                 </links>
10876         </class>
10877
10878         <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">
10879                 <fields oils_persist:primary="id" oils_persist:sequence="query.order_by_item_id_seq">
10880                         <field reporter:label="Order By Item ID" name="id" reporter:datatype="id"/>
10881                         <field reporter:label="Stored Query ID" name="stored_query" reporter:datatype="link"/>
10882                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10883                         <field reporter:label="Expression" name="expression" reporter:datatype="link"/>
10884                 </fields>
10885                 <links>
10886                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
10887                         <link field="expression" reltype="has_a" key="id" map="" class="qxp"/>
10888                 </links>
10889         </class>
10890
10891         <class id="xbet" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbet" oils_persist:tablename="query.expr_xbet" reporter:label="Between Expression">
10892                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10893                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10894                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10895                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10896                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10897                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
10898                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
10899                 </fields>
10900                 <links>
10901                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10902                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
10903                 </links>
10904         </class>
10905
10906         <class id="xbind" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbind" oils_persist:tablename="query.expr_xbind" reporter:label="Bind Variable Expression">
10907                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10908                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10909                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10910                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10911                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10912                         <field reporter:label="Bind Variable" name="bind_variable" reporter:datatype="link"/>
10913                 </fields>
10914                 <links>
10915                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10916                         <link field="bind_variable" reltype="has_a" key="name" map="" class="qbv"/>
10917                 </links>
10918         </class>
10919
10920         <class id="xbool" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbool" oils_persist:tablename="query.expr_xbool" reporter:label="Boolean Expression">
10921                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10922                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10923                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10924                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10925                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10926                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
10927                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
10928                 </fields>
10929                 <links>
10930                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10931                 </links>
10932         </class>
10933
10934         <class id="xcase" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcase" oils_persist:tablename="query.expr_xcase" reporter:label="Case Expression">
10935                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10936                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10937                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10938                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10939                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10940                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
10941                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
10942                 </fields>
10943                 <links>
10944                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10945                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
10946                 </links>
10947         </class>
10948
10949         <class id="xcast" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcast" oils_persist:tablename="query.expr_xcast" reporter:label="Cast Expression">
10950                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10951                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10952                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10953                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10954                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10955                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
10956                         <field reporter:label="Cast Type" name="cast_type" reporter:datatype="link"/>
10957                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
10958                 </fields>
10959                 <links>
10960                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10961                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
10962                         <link field="cast_type" reltype="has_a" key="id" map="" class="qdt"/>
10963                 </links>
10964         </class>
10965
10966         <class id="xcol" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcol" oils_persist:tablename="query.expr_xcol" reporter:label="Column Expression">
10967                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10968                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10969                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10970                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10971                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10972                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
10973                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
10974                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
10975                 </fields>
10976                 <links>
10977                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10978                 </links>
10979         </class>
10980
10981         <class id="xex" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xex" oils_persist:tablename="query.expr_xex" reporter:label="Exists Expression">
10982                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10983                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10984                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10985                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10986                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10987                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
10988                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
10989                 </fields>
10990                 <links>
10991                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10992                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
10993                 </links>
10994         </class>
10995
10996         <class id="xfunc" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xfunc" oils_persist:tablename="query.expr_xfunc" reporter:label="Function Expression">
10997                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10998                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10999                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11000                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11001                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11002                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
11003                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
11004                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
11005                 </fields>
11006                 <links>
11007                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11008                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
11009                 </links>
11010         </class>
11011
11012         <class id="xin" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xin" oils_persist:tablename="query.expr_xin" reporter:label="In Expression">
11013                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11014                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11015                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11016                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11017                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11018                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
11019                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
11020                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
11021                 </fields>
11022                 <links>
11023                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11024                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
11025                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
11026                 </links>
11027         </class>
11028
11029         <class id="xisnull" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xisnull" oils_persist:tablename="query.expr_xisnull" reporter:label="IS NULL Expression">
11030                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11031                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11032                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11033                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11034                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11035                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
11036                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
11037                 </fields>
11038                 <links>
11039                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11040                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
11041                 </links>
11042         </class>
11043
11044         <class id="xnull" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xnull" oils_persist:tablename="query.expr_xnull" reporter:label="Null Expression">
11045                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11046                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11047                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11048                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11049                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11050                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
11051                 </fields>
11052                 <links>
11053                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11054                 </links>
11055         </class>
11056
11057         <class id="xnum" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xnum" oils_persist:tablename="query.expr_xnum" reporter:label="Number Expression">
11058                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11059                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11060                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11061                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11062                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11063                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
11064                 </fields>
11065                 <links>
11066                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11067                 </links>
11068         </class>
11069
11070         <class id="xop" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xop" oils_persist:tablename="query.expr_xop" reporter:label="Operator Expression">
11071                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11072                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11073                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11074                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11075                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11076                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
11077                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
11078                         <field reporter:label="Right Operand" name="right_operand" reporter:datatype="link"/>
11079                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
11080                 </fields>
11081                 <links>
11082                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11083                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
11084                         <link field="right_operand" reltype="has_a" key="id" map="" class="qxp"/>
11085                 </links>
11086         </class>
11087
11088         <class id="xser" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xser" oils_persist:tablename="query.expr_xser" reporter:label="Operator Expression">
11089                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11090                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11091                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11092                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11093                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11094                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
11095                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
11096                 </fields>
11097                 <links>
11098                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11099                 </links>
11100         </class>
11101
11102         <class id="xstr" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xstr" oils_persist:tablename="query.expr_xstr" reporter:label="String Expression">
11103                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11104                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11105                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11106                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11107                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11108                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
11109                 </fields>
11110                 <links>
11111                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11112                 </links>
11113         </class>
11114
11115         <class id="xsubq" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xsubq" oils_persist:tablename="query.expr_xsubq" reporter:label="Subquery Expression">
11116                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11117                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11118                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11119                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11120                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11121                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
11122                 </fields>
11123                 <links>
11124                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11125                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
11126                 </links>
11127         </class>
11128
11129         <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">
11130                 <fields oils_persist:primary="id">
11131                         <field reporter:label="Temp ID" name="id" reporter:datatype="id"/>
11132                         <field reporter:label="Type" name="ptype" reporter:datatype="link"/>
11133                         <field reporter:label="Subfield" name="subfield" reporter:datatype="link"/>
11134                         <field reporter:label="Value" name="value" reporter:datatype="link"/>
11135                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
11136                 </fields>
11137                 <links>
11138                         <link field="ptype" reltype="has_a" key="id" map="" class="cmpctm"/>
11139                         <link field="subfield" reltype="has_a" key="id" map="" class="cmpcsm"/>
11140                         <link field="value" reltype="has_a" key="id" map="" class="cmpcvm"/>
11141                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
11142                 </links>
11143         </class>
11144
11145         <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">
11146                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_ff_pos_map_id_seq">
11147                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
11148                         <field reporter:label="Fixed Field" name="fixed_field" reporter:datatype="text"/>
11149                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
11150                         <field reporter:label="Record Type" name="rec_type" reporter:datatype="text"/>
11151                         <field reporter:label="Start Postion" name="start_pos" reporter:datatype="int"/>
11152                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
11153                         <field reporter:label="Default Value" name="default_val" reporter:datatype="text"/>
11154                 </fields>
11155                 <links/>
11156                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11157                         <actions>
11158                                 <retrieve/>
11159                         </actions>
11160                 </permacrud>
11161         </class>
11162
11163         <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">
11164                 <fields oils_persist:primary="ptype_key">
11165                         <field reporter:label="Type Key" name="ptype_key" reporter:datatype="id"/>
11166                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
11167                 </fields>
11168                 <links/>
11169                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11170                         <actions>
11171                                 <retrieve/>
11172                         </actions>
11173                 </permacrud>
11174         </class>
11175
11176         <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">
11177                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_physical_characteristic_subfield_map_id_seq">
11178                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
11179                         <field reporter:label="Type Key" name="ptype_key" reporter:datatype="link"/>
11180                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
11181                         <field reporter:label="Start Postion" name="start_pos" reporter:datatype="int"/>
11182                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
11183                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
11184                 </fields>
11185                 <links>
11186                         <link field="ptype_key" reltype="has_a" key="id" map="" class="cmpctm"/>
11187                 </links>
11188                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11189                         <actions>
11190                                 <retrieve/>
11191                         </actions>
11192                 </permacrud>
11193         </class>
11194
11195         <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">
11196                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_physical_characteristic_value_map_id_seq">
11197                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
11198                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
11199                         <field reporter:label="Subfield" name="ptype_subfield" reporter:datatype="link"/>
11200                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
11201                 </fields>
11202                 <links>
11203                         <link field="ptype_subfield" reltype="has_a" key="id" map="" class="cmpcsm"/>
11204                 </links>
11205                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11206                         <actions>
11207                                 <retrieve/>
11208                         </actions>
11209                 </permacrud>
11210         </class>
11211
11212     <class
11213         id="uvs"
11214         controller="open-ils.cstore open-ils.pcrud"
11215         oils_obj:fieldmapper="url_verify::session"
11216         oils_persist:tablename="url_verify.session"
11217         reporter:label="URL Verification Session"
11218     >
11219         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.session_id_seq">
11220             <field reporter:label="Session ID" name="id" reporter:datatype="id"/>
11221             <field reporter:label="Name" name="name" reporter:datatype="text" oils_obj:required="true"/>
11222                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" oils_obj:required="true"/>
11223             <field reporter:label="Creator" name="creator" reporter:datatype="link" oils_obj:required="true"/>
11224             <field reporter:label="Record Container" name="container" reporter:datatype="link" oils_obj:required="true"/>
11225             <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
11226             <field reporter:label="Search Constraints" name="search" reporter:datatype="text" oils_obj:required="true"/>
11227             <field reporter:label="URL Selectors" name="selectors" reporter:datatype="link" oils_persist:virtual="true"/>
11228             <field reporter:label="Verification Attempts" name="attempts" reporter:datatype="link" oils_persist:virtual="true"/>
11229         </fields>
11230
11231         <links>
11232             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
11233             <link field="creator" reltype="has_a" key="id" map="" class="au"/>
11234             <link field="container" reltype="has_a" key="id" map="" class="cbreb"/>
11235             <link field="selectors" reltype="has_many" key="session" map="" class="uvus"/>
11236             <link field="attempts" reltype="has_many" key="session" map="" class="uvva"/>
11237         </links>
11238
11239         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11240             <actions>
11241                 <retrieve permission="URL_VERIFY" context_field="owning_lib"/>
11242             </actions>
11243         </permacrud>
11244
11245     </class>
11246
11247     <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">
11248         <oils_persist:source_definition>
11249             SELECT
11250                 cbrebi.id AS id,  -- so we can have a pkey in our view
11251                 uvs.id AS session,
11252                 uvs.owning_lib,
11253                 cbrebi.target_biblio_record_entry
11254             FROM url_verify.session uvs
11255             JOIN container.biblio_record_entry_bucket cbreb
11256                 ON (uvs.container = cbreb.id)
11257             JOIN container.biblio_record_entry_bucket_item cbrebi
11258                 ON (cbrebi.bucket = cbreb.id)
11259         </oils_persist:source_definition>
11260         <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_id_seq">
11261             <field reporter:label="Bucket Item ID" name="id" reporter:datatype="id" />
11262             <field reporter:label="Session" name="session" reporter:datatype="link" />
11263             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" />
11264             <field reporter:label="Target Biblio Record Entry" name="target_biblio_record_entry" reporter:datatype="link" />
11265         </fields>
11266         <links>
11267             <link field="target_biblio_record_entry" reltype="has_a" key="id" map="" class="bre" />
11268             <link field="session" reltype="has_a" key="id" map="" class="uvs" />
11269             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou" />
11270         </links>
11271         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11272             <actions>
11273                 <retrieve permission="URL_VERIFY" context_field="owning_lib" />
11274             </actions>
11275         </permacrud>
11276     </class>
11277
11278     <class
11279         id="uvus"
11280         controller="open-ils.cstore open-ils.pcrud"
11281         oils_obj:fieldmapper="url_verify::url_selector"
11282         oils_persist:tablename="url_verify.url_selector"
11283         reporter:label="URL Verification URL Selector"
11284     >
11285         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.url_selector_id_seq">
11286             <field reporter:label="URL Selector ID" name="id" reporter:datatype="id"/>
11287             <field reporter:label="XPath" name="xpath" reporter:datatype="text" oils_obj:required="true"/>
11288                         <field reporter:label="Session" name="session" reporter:datatype="link" oils_obj:required="true"/>
11289             <field reporter:label="URLs" name="urls" reporter:datatype="link" oils_persist:virtual="true"/>
11290         </fields>
11291
11292         <links>
11293             <link field="session" reltype="has_a" key="id" map="" class="uvs"/>
11294             <link field="urls" reltype="has_many" key="id" map="" class="uvu"/>
11295         </links>
11296
11297         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11298             <actions>
11299                 <create permission="URL_VERIFY">
11300                     <context link="session" field="owning_lib"/>
11301                 </create>
11302                 <retrieve permission="URL_VERIFY">
11303                     <context link="session" field="owning_lib"/>
11304                 </retrieve>
11305                 <update permission="URL_VERIFY">
11306                     <context link="session" field="owning_lib"/>
11307                 </update>
11308                 <delete permission="URL_VERIFY">
11309                     <context link="session" field="owning_lib"/>
11310                 </delete>
11311             </actions>
11312         </permacrud>
11313
11314     </class>
11315
11316     <class
11317         id="uvu"
11318         controller="open-ils.cstore open-ils.pcrud"
11319         oils_obj:fieldmapper="url_verify::url"
11320         oils_persist:tablename="url_verify.url"
11321         reporter:label="URL Verification URL"
11322     >
11323         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.url_id_seq">
11324             <field reporter:label="URL ID" name="id" reporter:datatype="id"/>
11325                         <field reporter:label="Redirected From" name="redirect_from" reporter:datatype="link"/>
11326                         <field reporter:label="Container Item" name="item" reporter:datatype="link" oils_obj:required="true"/>
11327                         <field reporter:label="Session" name="session" reporter:datatype="link" oils_obj:required="true"/>
11328                         <field reporter:label="URL Selector" name="url_selector" reporter:datatype="link"/>
11329             <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
11330             <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
11331             <field reporter:label="Ordinal Position" name="ord" reporter:datatype="int"/>
11332             <field reporter:label="URL" name="full_url" reporter:datatype="text"/>
11333             <field reporter:label="Scheme" name="scheme" reporter:datatype="text"/>
11334             <field reporter:label="Host" name="host" reporter:datatype="text"/>
11335             <field reporter:label="Domain" name="domain" reporter:datatype="text"/>
11336             <field reporter:label="TLD" name="tld" reporter:datatype="text"/>
11337             <field reporter:label="Path" name="path" reporter:datatype="text"/>
11338             <field reporter:label="Page" name="page" reporter:datatype="text"/>
11339             <field reporter:label="Query" name="query" reporter:datatype="text"/>
11340             <field reporter:label="Fragment" name="fragment" reporter:datatype="text"/>
11341             <field reporter:label="Verifications" name="verifications" reporter:datatype="link" oils_persist:virtual="true" />
11342         </fields>
11343
11344         <links>
11345             <link field="redirect_from" reltype="has_a" key="id" map="" class="uvu"/>
11346             <link field="item" reltype="has_a" key="id" map="" class="uvsbrem" />
11347             <link field="session" reltype="has_a" key="id" map="" class="uvs"/>
11348             <link field="url_selector" reltype="has_a" key="id" map="" class="uvus"/>
11349             <link field="verifications" reltype="has_many" key="url" map="" class="uvuv"/>
11350         </links>
11351
11352         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11353             <actions>
11354                 <create permission="URL_VERIFY">
11355                     <context link="session" field="owning_lib"/>
11356                 </create>
11357                 <retrieve permission="URL_VERIFY">
11358                     <context link="session" field="owning_lib"/>
11359                 </retrieve>
11360                 <update permission="URL_VERIFY">
11361                     <context link="session" field="owning_lib"/>
11362                 </update>
11363                 <delete permission="URL_VERIFY">
11364                     <context link="session" field="owning_lib"/>
11365                 </delete>
11366             </actions>
11367         </permacrud>
11368
11369     </class>
11370
11371     <class
11372         id="uvva"
11373         controller="open-ils.cstore open-ils.pcrud"
11374         oils_obj:fieldmapper="url_verify::verification_attempt"
11375         oils_persist:tablename="url_verify.verification_attempt"
11376         reporter:label="URL Verification Attempt"
11377     >
11378         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.verification_attempt_id_seq">
11379             <field reporter:label="Attempt ID" name="id" reporter:datatype="id"/>
11380                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
11381                         <field reporter:label="Session" name="session" reporter:datatype="link"/>
11382             <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
11383             <field reporter:label="Finish Time" name="finish_time" reporter:datatype="timestamp"/>
11384         </fields>
11385
11386         <links>
11387             <link field="session" reltype="has_a" key="id" map="" class="uvs"/>
11388             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
11389         </links>
11390
11391         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11392             <actions>
11393                 <create permission="URL_VERIFY">
11394                     <context link="session" field="owning_lib"/>
11395                 </create>
11396                 <retrieve permission="URL_VERIFY">
11397                     <context link="session" field="owning_lib"/>
11398                 </retrieve>
11399                 <update permission="URL_VERIFY">
11400                     <context link="session" field="owning_lib"/>
11401                 </update>
11402                 <delete permission="URL_VERIFY">
11403                     <context link="session" field="owning_lib"/>
11404                 </delete>
11405             </actions>
11406         </permacrud>
11407
11408     </class>
11409
11410     <class
11411         id="uvuv"
11412         controller="open-ils.cstore open-ils.pcrud"
11413         oils_obj:fieldmapper="url_verify::url_verification"
11414         oils_persist:tablename="url_verify.url_verification"
11415         reporter:label="URL Verification"
11416     >
11417         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.url_verification_id_seq">
11418             <field reporter:label="Verification ID" name="id" reporter:datatype="id"/>
11419                         <field reporter:label="URL" name="url" reporter:datatype="link"/>
11420                         <field reporter:label="Attempt" name="attempt" reporter:datatype="link"/>
11421             <field reporter:label="Request Time" name="req_time" reporter:datatype="timestamp"/>
11422             <field reporter:label="Result Time" name="res_time" reporter:datatype="timestamp"/>
11423             <field reporter:label="Result Code" name="res_code" reporter:datatype="int"/>
11424             <field reporter:label="Result Text" name="res_text" reporter:datatype="text"/>
11425                         <field reporter:label="Redirected To" name="redirect_to" reporter:datatype="link"/>
11426         </fields>
11427
11428         <links>
11429             <link field="url" reltype="has_a" key="id" map="" class="uvu"/>
11430             <link field="attempt" reltype="has_a" key="id" map="" class="uvva"/>
11431             <link field="redirect_to" reltype="has_a" key="id" map="" class="uvu"/>
11432         </links>
11433
11434         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11435             <actions>
11436                 <create permission="URL_VERIFY">
11437                     <context link="attempt" jump="session" field="owning_lib"/>
11438                 </create>
11439                 <retrieve permission="URL_VERIFY">
11440                     <context link="attempt" jump="session" field="owning_lib"/>
11441                 </retrieve>
11442                 <update permission="URL_VERIFY">
11443                     <context link="attempt" jump="session" field="owning_lib"/>
11444                 </update>
11445                 <delete permission="URL_VERIFY">
11446                     <context link="attempt" jump="session" field="owning_lib"/>
11447                 </delete>
11448             </actions>
11449         </permacrud>
11450
11451     </class>
11452
11453         <class
11454                 id="cfdi"
11455                 controller="open-ils.cstore open-ils.pcrud"
11456                 oils_obj:fieldmapper="config::filter_dialog_interface"
11457                 oils_persist:tablename="config.filter_dialog_interface"
11458                 reporter:label="FilterDialog Interface">
11459                 <fields oils_persist:primary="key" oils_persist:sequence="config.filter_dialog_interface_pkey">
11460                         <field reporter:label="Interface Key" name="key" reporter:datatype="text" />
11461                         <field reporter:label="Description" name="description" reporter:datatype="text" />
11462                 </fields>
11463                 <links>
11464                         <link field="filter_sets" reltype="has_many" key="interface" map="" class="cfdfs"/>
11465                 </links>
11466                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11467                         <actions>
11468                                 <retrieve />
11469                         </actions>
11470                 </permacrud>
11471         </class>
11472
11473         <class
11474                 id="cfdfs"
11475                 controller="open-ils.cstore open-ils.pcrud"
11476                 oils_obj:fieldmapper="config::filter_dialog_filter_set"
11477                 oils_persist:tablename="config.filter_dialog_filter_set"
11478                 reporter:label="FilterDialog Filter Set">
11479                 <fields oils_persist:primary="id" oils_persist:sequence="config.filter_dialog_filter_set_id_seq">
11480                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
11481                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
11482                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
11483                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
11484                         <field reporter:label="Interface" name="interface" reporter:datatype="link"/>
11485                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
11486                         <field reporter:label="Filters" name="filters" reporter:datatype="text"/>
11487                 </fields>
11488                 <links>
11489                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
11490                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
11491                         <link field="interface" reltype="has_a" key="key" map="" class="cfdi"/>
11492                 </links>
11493                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11494                         <actions>
11495                                 <create permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
11496                                 <retrieve permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
11497                                 <update permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
11498                                 <delete permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
11499                         </actions>
11500                 </permacrud>
11501
11502         </class>
11503
11504         <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">
11505                 <fields oils_persist:primary="code">
11506                         <field reporter:label="Code" name="code" reporter:datatype="id"/>
11507                         <field reporter:label="Type Value" name="type_val" reporter:datatype="text"/>
11508                         <field reporter:label="BLvl Value" name="blvl_val" reporter:datatype="text"/>
11509                 </fields>
11510                 <links/>
11511                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11512                         <actions>
11513                                 <retrieve/>
11514                         </actions>
11515                 </permacrud>
11516         </class>
11517
11518         <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">
11519                 <oils_persist:source_definition>
11520
11521             SELECT  b.id,
11522                     MAX(dcp.edit_date) AS last_delete_date
11523              FROM   biblio.record_entry b
11524                     JOIN asset.call_number cn ON (cn.record = b.id)
11525                     JOIN asset.copy dcp ON (cn.id = dcp.call_number)
11526              WHERE  NOT b.deleted
11527              GROUP BY b.id
11528              HAVING SUM( CASE WHEN NOT dcp.deleted THEN 1 ELSE 0 END) = 0 
11529
11530                 </oils_persist:source_definition>
11531                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
11532                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
11533                         <field reporter:label="Delete Date/Time" name="last_delete_date" reporter:datatype="timestamp"/>
11534                 </fields>
11535                 <links>
11536                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
11537                 </links>
11538                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11539                         <actions>
11540                                 <retrieve/>
11541                         </actions>
11542                 </permacrud>
11543         </class>
11544
11545         <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">
11546                 <oils_persist:source_definition>
11547
11548             -- -- 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.
11549             -- -- 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
11550             -- -- may not.
11551             -- SELECT
11552             --     bre.id AS bib_id,
11553             --     COALESCE( z.copy_count, 0 ) AS copy_count,
11554             --     COALESCE( z.hold_count, 0 ) AS hold_count,
11555             --     COALESCE( z.copy_hold_ratio, 0 ) AS hold_copy_ratio
11556             -- FROM (
11557                 SELECT
11558                     y.bre AS id,
11559                     COALESCE( x.copy_count, 0 ) AS copy_count,
11560                     y.hold_count AS hold_count,
11561                     (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
11562                 FROM (
11563                         SELECT
11564                             (SELECT bib_record FROM reporter.hold_request_record r WHERE r.id = h.id LIMIT 1) AS bre,
11565                             COUNT(*) AS hold_count
11566                         FROM action.hold_request h
11567                         WHERE
11568                             cancel_time IS NULL
11569                             AND fulfillment_time IS NULL
11570                             -- AND NOT frozen  -- a frozen hold is still a desired hold, eh?
11571                         GROUP BY 1
11572                     )y LEFT JOIN (
11573                         SELECT 
11574                             (SELECT id
11575                                 FROM biblio.record_entry 
11576                                 WHERE id = (SELECT record FROM asset.call_number WHERE id = call_number and deleted is false)
11577                             ) AS bre, 
11578                             COUNT(*) AS copy_count
11579                         FROM asset.copy
11580                             JOIN asset.copy_location loc ON (copy.location = loc.id AND loc.holdable)
11581                         WHERE copy.holdable 
11582                             AND NOT copy.deleted 
11583                             AND copy.status IN ( SELECT id FROM config.copy_status WHERE holdable ) 
11584                         GROUP BY 1
11585                     )x ON x.bre = y.bre
11586                 -- )z RIGHT JOIN (
11587                 --     SELECT id
11588                 --     FROM biblio.record_entry
11589                 --     WHERE NOT deleted
11590                 -- )bre ON (z.bib_id = bre.id)
11591                 
11592
11593                 </oils_persist:source_definition>
11594                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
11595                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
11596                         <field reporter:label="Holdable Copy Count" name="copy_count" reporter:datatype="int"/>
11597                         <field reporter:label="Active Holds" name="hold_count" reporter:datatype="int"/>
11598                         <field reporter:label="Hold/Copy Ratio" name="hold_copy_ratio" reporter:datatype="float"/>
11599                 </fields>
11600                 <links>
11601                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
11602                 </links>
11603                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11604                         <actions>
11605                                 <retrieve/>
11606                         </actions>
11607                 </permacrud>
11608         </class>
11609
11610         <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">
11611                 <oils_persist:source_definition>
11612             SELECT *,
11613                 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,
11614                 CASE WHEN copy_count_everywhere = 0 THEN 'Infinity'::FLOAT ELSE holds_everywhere::FLOAT/copy_count_everywhere END AS everywhere_ratio
11615             FROM
11616                 (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
11617                     FROM
11618                         action.hold_request ahr
11619                         JOIN reporter.hold_request_record rhrr USING (id)
11620                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
11621                         LEFT JOIN asset.copy ac ON (ahcm.target_copy = ac.id AND ahr.pickup_lib = ac.circ_lib)
11622                     WHERE
11623                         ahr.cancel_time IS NULL
11624                         AND ahr.fulfillment_time IS NULL
11625                     GROUP BY bib_record, pickup_lib
11626                 )x
11627                 JOIN
11628                 (SELECT bib_record as id, count(DISTINCT ahr.id) AS holds_everywhere, COALESCE(count(DISTINCT target_copy),0) as copy_count_everywhere
11629                     FROM
11630                         action.hold_request ahr
11631                         JOIN reporter.hold_request_record rhrr USING (id)
11632                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
11633                     WHERE
11634                         ahr.cancel_time IS NULL
11635                         AND ahr.fulfillment_time IS NULL
11636                     GROUP BY bib_record
11637                 )y
11638                 USING (id)
11639                 </oils_persist:source_definition>
11640                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
11641                         <field reporter:label="Record ID" name="id" reporter:datatype="link"/>
11642                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
11643                         <field reporter:label="Active Holds at Pickup Library" name="holds_at_pickup_library" reporter:datatype="int"/>
11644                         <field reporter:label="Holdable Copy Count at Pickup Library" name="copy_count_at_pickup_library" reporter:datatype="int"/>
11645                         <field reporter:label="Active Holds Everywhere" name="holds_everywhere" reporter:datatype="int"/>
11646                         <field reporter:label="Holdable Copy Count Everywhere" name="copy_count_everywhere" reporter:datatype="int"/>
11647                         <field reporter:label="Hold/Copy Ratio at Pickup Library" name="pickup_library_ratio" reporter:datatype="float"/>
11648                         <field reporter:label="Hold/Copy Ratio Everywhere" name="everywhere_ratio" reporter:datatype="float"/>
11649                 </fields>
11650                 <links>
11651                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
11652                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
11653                 </links>
11654                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11655                         <actions>
11656                                 <retrieve/>
11657                         </actions>
11658                 </permacrud>
11659         </class>
11660
11661         <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) ">
11662                 <oils_persist:source_definition>
11663             WITH counts_at_ou AS (
11664                 SELECT  rhrr.bib_record AS id,
11665                         aou.id AS pickup_lib_or_desc,
11666                         COUNT(DISTINCT ahr.id) AS holds_at_or_below,
11667                         COALESCE(COUNT(DISTINCT ac.id),0) AS copy_count_at_or_below
11668                   FROM  actor.org_unit aou
11669                         JOIN actor.org_unit_type aout ON (aou.ou_type = aout.id),
11670                         action.hold_request ahr
11671                         JOIN reporter.hold_request_record rhrr USING (id)
11672                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
11673                         LEFT JOIN asset.copy ac ON (ahcm.target_copy = ac.id)
11674                   WHERE ahr.cancel_time IS NULL AND ahr.fulfillment_time IS NULL
11675                         AND ac.circ_lib IN (SELECT id FROM actor.org_unit_descendants(aou.id))
11676                         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
11677                   GROUP BY 1, 2
11678             )
11679             SELECT x.id, x.pickup_lib_or_desc, x.holds_at_or_below, x.copy_count_at_or_below,
11680                    y.holds_everywhere, y.copy_count_everywhere,
11681                 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,
11682                 CASE WHEN copy_count_everywhere = 0 THEN 'Infinity'::FLOAT ELSE y.holds_everywhere::FLOAT/y.copy_count_everywhere END AS everywhere_ratio
11683             FROM counts_at_ou x
11684                 JOIN (SELECT bib_record AS id, count(DISTINCT ahr.id) AS holds_everywhere, COALESCE(count(DISTINCT target_copy),0) as copy_count_everywhere
11685                     FROM
11686                         action.hold_request ahr
11687                         JOIN reporter.hold_request_record rhrr USING (id)
11688                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
11689                     WHERE
11690                         ahr.cancel_time IS NULL
11691                         AND ahr.fulfillment_time IS NULL
11692                     GROUP BY bib_record
11693                 )y
11694                 USING (id)
11695                 </oils_persist:source_definition>
11696                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
11697                         <field reporter:label="Record ID" name="id" reporter:datatype="link"/>
11698                         <field reporter:label="Pickup Library" name="pickup_lib_or_desc" reporter:datatype="org_unit"/>
11699                         <field reporter:label="Active Holds at Pickup Library and its Descendants" name="holds_at_or_below" reporter:datatype="int"/>
11700                         <field reporter:label="Holdable Copy Count at Pickup Library and its Descendants" name="copy_count_at_or_below" reporter:datatype="int"/>
11701                         <field reporter:label="Active Holds Everywhere" name="holds_everywhere" reporter:datatype="int"/>
11702                         <field reporter:label="Holdable Copy Count Everywhere" name="copy_count_everywhere" reporter:datatype="int"/>
11703                         <field reporter:label="Hold/Copy Ratio at Pickup Library and its Descendants" name="hold_copy_ratio_at_or_below_ou" reporter:datatype="float"/>
11704                         <field reporter:label="Hold/Copy Ratio Everywhere" name="everywhere_ratio" reporter:datatype="float"/>
11705                 </fields>
11706                 <links>
11707                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
11708                         <link field="pickup_lib_or_desc" reltype="has_a" key="id" map="" class="aou"/>
11709                 </links>
11710                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11711                         <actions>
11712                                 <retrieve/>
11713                         </actions>
11714                 </permacrud>
11715         </class>
11716
11717         <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">
11718                 <oils_persist:source_definition>
11719             SELECT
11720                 ac.id,
11721                 COALESCE(MAX(actac.xact_start), ac.create_date) AS last_circ_or_create,
11722                 MAX(actac.xact_start) AS last_circ
11723             FROM asset.copy ac
11724                  LEFT JOIN action.all_circulation actac ON ac.id = actac.target_copy
11725             GROUP BY ac.id
11726
11727             -- Alternate version, say if you have migrated last checkout information in extend_reporter.legacy_circ_timestamp:
11728             --SELECT
11729             --    ac.id,
11730             --    GREATEST(MAX(actac.xact_start), erlct.last_cko_ts, ac.create_date) AS last_circ_or_create,
11731             --    GREATEST(MAX(actac.xact_start), erlct.last_cko_ts) AS last_circ
11732             --FROM asset.copy ac
11733             --     LEFT JOIN action.all_circulation actac ON ac.id = actac.target_copy
11734             --     LEFT JOIN extend_reporter.legacy_circ_timestamp erlct ON ac.id = erlct.id
11735             --GROUP BY ac.id, ac.create_date, erlct.last_cko_ts
11736                 </oils_persist:source_definition>
11737                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
11738                         <field reporter:label="Copy ID" name="id" reporter:datatype="link"/>
11739                         <field reporter:label="Last Circulation or Creation Date" name="last_circ_or_create" reporter:datatype="timestamp"/>
11740                         <field reporter:label="Last Circulation Date" name="last_circ" reporter:datatype="timestamp"/>
11741                 </fields>
11742                 <links>
11743                         <link field="id" reltype="has_a" key="id" map="" class="acp"/>
11744                 </links>
11745                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11746                         <actions>
11747                                 <retrieve/>
11748                         </actions>
11749                 </permacrud>
11750         </class>
11751
11752         <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">
11753                 <fields oils_persist:primary="id">
11754                         <field reporter:label="Text Search Config" reporter:selector="name" reporter:datatype="text" name="id"/>
11755                         <field reporter:label="Text Search Config Name" reporter:datatype="text" name="name"/>
11756                 </fields>
11757                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11758                         <actions>
11759                                 <retrieve/>
11760                         </actions>
11761                 </permacrud>
11762         </class>
11763
11764         <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">
11765                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_class_ts_map_id_seq">
11766                         <field reporter:label="Map ID" reporter:datatype="id" name="id"/>
11767                         <field reporter:label="Metabib Class" reporter:datatype="text" name="field_class"/>
11768                         <field reporter:label="Text Search Config" reporter:datatype="text" name="ts_config"/>
11769                         <field reporter:label="Active?" reporter:datatype="bool" name="active"/>
11770                         <field reporter:label="Index Weight" reporter:datatype="text" name="index_weight"/>
11771                         <field reporter:label="Index Language" reporter:datatype="text" name="index_lang"/>
11772                         <field reporter:label="Search Language" reporter:datatype="text" name="search_lang"/>
11773                         <field reporter:label="Always Apply?" reporter:datatype="bool" name="always"/>
11774                 </fields>
11775                 <links>
11776                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
11777                         <link field="ts_config" reltype="has_a" key="id" map="" class="ctcl"/>
11778                 </links>
11779                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11780                         <actions>
11781                                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
11782                                 <retrieve/>
11783                                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
11784                                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
11785                         </actions>
11786                 </permacrud>
11787         </class>
11788
11789         <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">
11790                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_ts_map_id_seq">
11791                         <field reporter:label="Map ID" reporter:datatype="id" name="id"/>
11792                         <field reporter:label="Metabib Field" reporter:datatype="text" name="metabib_field"/>
11793                         <field reporter:label="Text Search Config" reporter:datatype="text" name="ts_config"/>
11794                         <field reporter:label="Active?" reporter:datatype="bool" name="active"/>
11795                         <field reporter:label="Index Weight" reporter:datatype="text" name="index_weight"/>
11796                         <field reporter:label="Index Language" reporter:datatype="text" name="index_lang"/>
11797                         <field reporter:label="Search Language" reporter:datatype="text" name="search_lang"/>
11798                 </fields>
11799                 <links>
11800                         <link field="metabib_field" reltype="has_a" key="id" map="" class="cmf"/>
11801                         <link field="ts_config" reltype="has_a" key="id" map="" class="ctcl"/>
11802                 </links>
11803                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11804                         <actions>
11805                                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
11806                                 <retrieve/>
11807                                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
11808                                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
11809                         </actions>
11810                 </permacrud>
11811         </class>
11812
11813
11814         <!-- ********************************************************************************************************************* -->
11815         <!-- What follows is a set of example extensions that are useful for PINES.  Comment out or remove if you don't want them. -->
11816         <!-- ********************************************************************************************************************* -->
11817         <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">
11818                 <fields oils_persist:primary="id">
11819                         <field reporter:label="Circulation" name="id" reporter:datatype="id" />
11820                         <field reporter:label="Library Circulation Location Short (Policy) Name" name="circ_lib" reporter:datatype="text"/>
11821                         <field reporter:label="Library Circulation Location Link" name="circ_lib_id" reporter:datatype="org_unit"/>
11822                         <field reporter:label="Circulation Date/Time" name="xact_start" reporter:datatype="timestamp"/>
11823                         <field reporter:label="Circulation Type" name="circ_type" reporter:datatype="text"/>
11824                         <field reporter:label="Copy Link" name="copy_id" reporter:datatype="link"/>
11825                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
11826                         <field reporter:label="Owning Library Short (Policy) Name" name="owning_lib_name" reporter:datatype="text"/>
11827                         <field reporter:label="Item Language" name="language" reporter:datatype="text"/>
11828                         <field reporter:label="Literary Form" name="lit_form" reporter:datatype="text"/>
11829                         <field reporter:label="MARC Form" name="item_form" reporter:datatype="text"/>
11830                         <field reporter:label="MARC Type" name="item_type" reporter:datatype="text"/>
11831                         <field reporter:label="Shelving Location" name="shelving_location" reporter:datatype="text"/>
11832                         <field reporter:label="Patron Profile Group" name="profile_group" reporter:datatype="text"/>
11833                         <field reporter:label="Patron Age Demographic" name="demographic_general_division" reporter:datatype="text"/>
11834                         <field reporter:label="Call Number Link" name="call_number" reporter:datatype="link"/>
11835                         <field reporter:label="Call Number Label" name="call_number_label" reporter:datatype="text"/>
11836                         <field reporter:label="Call Number Dewey/Prefix" name="dewey" reporter:datatype="text"/>
11837                         <field reporter:label="Patron Link" name="patron_id" reporter:datatype="link"/>
11838                         <field reporter:label="Patron Home Library Link" name="patron_home_lib" reporter:datatype="link"/>
11839                         <field reporter:label="Patron Home Library Short (Policy) Name" name="patron_home_lib_shortname" reporter:datatype="text"/>
11840                         <field reporter:label="Patron County" name="patron_county" reporter:datatype="text"/>
11841                         <field reporter:label="Patron City" name="patron_city" reporter:datatype="text"/>
11842                         <field reporter:label="Patron ZIP Code" name="patron_zip" reporter:datatype="text"/>
11843                         <field reporter:label="Legacy CAT1 Link" name="stat_cat_1" reporter:datatype="link"/>
11844                         <field reporter:label="Legacy CAT2 Link" name="stat_cat_2" reporter:datatype="link"/>
11845                         <field reporter:label="Dewey Range - Tens" name="dewey_range_tens" reporter:datatype="text"/>
11846                         <field reporter:label="Dewey Range - Hundreds" name="dewey_range_hundreds" reporter:datatype="text"/>
11847                         <field reporter:label="Dewey Block - Tens" name="dewey_block_tens" reporter:datatype="text"/>
11848                         <field reporter:label="Dewey Block - Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
11849                         <field reporter:label="Legacy CAT1 Value" name="stat_cat_1_value" reporter:datatype="text"/>
11850                         <field reporter:label="Legacy CAT2 Value" name="stat_cat_2_value" reporter:datatype="text"/>
11851                 </fields>
11852                 <links>
11853                         <link field="id" reltype="has_a" key="id" map="" class="circ"/>
11854                         <link field="copy_id" reltype="has_a" key="id" map="" class="acp"/>
11855                         <link field="patron_id" reltype="has_a" key="id" map="" class="au"/>
11856                         <link field="circ_lib_id" reltype="has_a" key="id" map="" class="aou"/>
11857                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
11858                         <link field="patron_home_lib" reltype="has_a" key="id" map="" class="aou"/>
11859                         <link field="stat_cat_1" reltype="has_a" key="id" map="" class="rsce1"/>
11860                         <link field="stat_cat_2" reltype="has_a" key="id" map="" class="rsce2"/>
11861                 </links>
11862         </class>
11863
11864         <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">
11865                 <fields oils_persist:primary="id">
11866                         <field reporter:label="Entry ID" name="id" reporter:selector="value" reporter:datatype="id" />
11867                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
11868                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
11869                 </fields>
11870                 <links>
11871                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
11872                 </links>
11873         </class>
11874
11875         <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">
11876                 <fields oils_persist:primary="id">
11877                         <field reporter:label="Entry ID" name="id" reporter:selector="value" reporter:datatype="id" />
11878                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
11879                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
11880                 </fields>
11881                 <links>
11882                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
11883                 </links>
11884         </class>
11885
11886         <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">
11887                 <fields oils_persist:primary="id">
11888                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
11889
11890                         <field reporter:label="Billing Location Short (Policy) Name" name="billing_location_shortname" reporter:datatype="text"/>
11891                         <field reporter:label="Billing Location Name" name="billing_location_name" reporter:datatype="text"/>
11892                         <field reporter:label="Billing Location Link" name="billing_location" reporter:datatype="org_unit"/>
11893
11894                         <field reporter:label="User Home Library Short (Policy) Name" name="usr_home_ou_shortname" reporter:datatype="text"/>
11895                         <field reporter:label="User Home Library Name" name="usr_home_ou_name" reporter:datatype="text"/>
11896                         <field reporter:label="User Home Library Link" name="usr_home_ou" reporter:datatype="org_unit"/>
11897
11898                         <field reporter:label="User Barcode" name="barcode" reporter:datatype="text"/>
11899                         <field reporter:label="User Link" name="usr" reporter:datatype="link"/>
11900
11901                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
11902                         <field reporter:label="Transaction End Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
11903                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
11904
11905                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
11906                         <field reporter:label="Total Billed" name="total_owed" reporter:datatype="money"/>
11907
11908                         <field reporter:label="Last Payment Date/Time" name="last_payment_ts" reporter:datatype="timestamp"/>
11909                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
11910                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
11911
11912                         <field reporter:label="Last Billing Date/Time" name="last_billing_ts" reporter:datatype="timestamp"/>
11913                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
11914                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
11915
11916                         <field reporter:label="User Age Demographic" name="demographic_general_division" reporter:datatype="text"/>
11917                         <field reporter:label="User County" name="patron_county" reporter:datatype="text"/>
11918                         <field reporter:label="User City" name="patron_city" reporter:datatype="text"/>
11919                         <field reporter:label="User ZIP Code" name="patron_zip" reporter:datatype="text"/>
11920
11921                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
11922                         <field reporter:label="User Profile Group" name="profile_group" reporter:datatype="text"/>
11923
11924                 </fields>
11925                 <links>
11926                         <link field="id" reltype="has_a" key="id" map="" class="mbt"/>
11927                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
11928                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
11929                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
11930                 </links>
11931         </class>
11932
11933         <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">
11934                 <oils_persist:source_definition>
11935
11936             SELECT
11937                 po.ordering_agency AS ordering_agency,
11938                 po.id AS purchase_order,
11939                 li.id AS lineitem,
11940                 lid.id AS lineitem_detail,
11941                 cpa.id AS claim_policy_action
11942             FROM
11943                 acq.lineitem_detail lid
11944                 JOIN acq.lineitem li ON (li.id = lid.lineitem)
11945                 JOIN acq.purchase_order po ON (po.id = li.purchase_order)
11946                 JOIN acq.claim_policy cp ON (li.claim_policy = cp.id)
11947                 JOIN acq.claim_policy_action cpa ON (
11948                     cpa.claim_policy = cp.id
11949
11950                     -- we only care about claim policy actions whose claim
11951                     -- interval we'd reached or exceeded
11952                     AND (NOW() - cpa.action_interval) &gt; po.order_date
11953
11954                     -- filter out all claim policy actions where claim events
11955                     -- have occurred on or after the action's action_interval
11956                     AND NOT EXISTS (
11957                         SELECT 1
11958                         FROM
11959                             acq.claim_event evt
11960                             JOIN acq.claim claim ON (
11961                                 claim.id = evt.claim
11962                                 AND claim.lineitem_detail = lid.id
11963                             )
11964                         WHERE
11965                             evt.event_date &gt;= (po.order_date + cpa.action_interval)
11966                     )
11967                 )
11968             WHERE
11969                 lid.cancel_reason IS NULL
11970                 AND li.cancel_reason IS NULL -- belt/suspenders
11971                 AND po.cancel_reason IS NULL -- belt/suspenders
11972                 AND lid.recv_time IS NULL
11973                 AND po.state = 'on-order'
11974             ORDER BY 1, 2, 3, 4, 5
11975
11976                 </oils_persist:source_definition>
11977                 <fields>
11978                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="link"/>
11979                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
11980                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
11981                         <field reporter:label="Lineitem Detail" name="lineitem_detail" reporter:datatype="link"/>
11982                         <field reporter:label="Claim Policy Action" name="claim_policy_action" reporter:datatype="link"/>
11983                 </fields>
11984                 <links>
11985                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
11986                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
11987                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
11988                         <link field="lineitem_detail" reltype="has_a" key="id" map="" class="acqlid"/>
11989                         <link field="claim_policy_action" reltype="has_a" key="id" map="" class="acqclpa"/>
11990                 </links>
11991         </class>
11992         <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">
11993                 <fields oils_persist:primary="lineitem" oils_persist:sequence="acq.lineitem_id_seq">
11994                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
11995                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
11996                         <field reporter:label="Receive Count" name="recv_count" reporter:datatype="int"/>
11997                         <field reporter:label="Cancel Count" name="cancel_count" reporter:datatype="int"/>
11998                         <field reporter:label="Delay Count" name="delay_count" reporter:datatype="int"/>
11999                         <field reporter:label="Invoice Count" name="invoice_count" reporter:datatype="int"/>
12000                         <field reporter:label="Claim Count" name="claim_count" reporter:datatype="int"/>
12001                         <field reporter:label="Estimated Amount" name="estimated_amount" reporter:datatype="money"/>
12002                         <field reporter:label="Encumbrance Amount" name="encumbrance_amount" reporter:datatype="money"/>
12003                         <field reporter:label="Paid Amount" name="paid_amount" reporter:datatype="money"/>
12004                 </fields>
12005                 <links>
12006                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
12007                 </links>
12008     </class>
12009         <class id="acqlisumi" controller="open-ils.cstore" oils_obj:fieldmapper="acq::lineitem_summary_invoiceable" oils_persist:readonly="true" reporter:label="Invoiceable Lineitem Summary">
12010                 <oils_persist:source_definition>
12011             SELECT * FROM acq.lineitem_summary 
12012                                 WHERE item_count > (invoice_count + cancel_count)
12013         </oils_persist:source_definition>
12014                 <fields oils_persist:primary="lineitem" oils_persist:sequence="acq.lineitem_id_seq">
12015                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
12016                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
12017                         <field reporter:label="Receive Count" name="recv_count" reporter:datatype="int"/>
12018                         <field reporter:label="Cancel Count" name="cancel_count" reporter:datatype="int"/>
12019                         <field reporter:label="Delay Count" name="delay_count" reporter:datatype="int"/>
12020                         <field reporter:label="Invoice Count" name="invoice_count" reporter:datatype="int"/>
12021                         <field reporter:label="Claim Count" name="claim_count" reporter:datatype="int"/>
12022                         <field reporter:label="Estimated Amount" name="estimated_amount" reporter:datatype="money"/>
12023                         <field reporter:label="Encumbrance Amount" name="encumbrance_amount" reporter:datatype="money"/>
12024                         <field reporter:label="Paid Amount" name="paid_amount" reporter:datatype="money"/>
12025                 </fields>
12026                 <links>
12027                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
12028                 </links>
12029     </class>
12030         <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">
12031                 <oils_persist:source_definition>
12032
12033                         SELECT  t.*
12034                           FROM  action.transit_copy t
12035                                 JOIN actor.org_unit AS s ON (t.source = s.id)
12036                                 JOIN actor.org_unit AS d ON (t.dest = d.id)
12037                           WHERE s.parent_ou &lt;&gt; d.parent_ou
12038
12039                 </oils_persist:source_definition>
12040                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
12041                         <field reporter:label="Pretransit Copy Status" name="copy_status" reporter:datatype="link"/>
12042                         <field reporter:label="Destination" name="dest" reporter:datatype="link"/>
12043                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
12044                         <field reporter:label="Transit ID" name="id" reporter:datatype="id"/>
12045                         <field reporter:label="Is Persistent? (unused)" name="persistant_transfer" reporter:datatype="bool"/>
12046                         <field reporter:label="Previous Hop (unused)" name="prev_hop" reporter:datatype="link"/>
12047                         <field reporter:label="Source" name="source" reporter:datatype="link"/>
12048                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
12049                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
12050                         <field reporter:label="Hold Transit" name="hold_transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
12051                         <field reporter:label="Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
12052                 </fields>
12053                 <links>
12054                         <link field="hold_transit_copy" reltype="might_have" key="id" map="" class="ahtc"/>
12055                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
12056                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
12057                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
12058                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
12059                         <link field="prev_hop" reltype="has_a" key="id" map="" class="atc"/>
12060                 </links>
12061         </class>
12062
12063     <class id="circbyyr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::circ_counts_by_year" oils_persist:readonly="true">
12064                 <oils_persist:source_definition>
12065
12066         SELECT copy, SUM(count) AS count, year, is_renewal FROM (
12067                 SELECT
12068                         cp.id as copy,
12069                         COUNT(circ.id),
12070                         EXTRACT(YEAR FROM circ.xact_start) AS year,
12071                         (phone_renewal OR desk_renewal OR opac_renewal) as is_renewal
12072                 FROM
12073                         asset.copy cp
12074                                 JOIN action.circulation circ ON (cp.id = circ.target_copy)
12075                 GROUP BY 1, 3, 4
12076                 UNION ALL
12077                 SELECT
12078                         cp.id as copy,
12079                         COUNT(circ.id),
12080                         EXTRACT(YEAR FROM circ.xact_start) AS year,
12081                         (phone_renewal OR desk_renewal OR opac_renewal) as is_renewal
12082                 FROM
12083                         asset.copy cp
12084                                 JOIN action.aged_circulation circ ON (cp.id = circ.target_copy)
12085                 GROUP BY 1, 3, 4
12086                 UNION ALL
12087                 SELECT
12088                         id as copy,
12089                         circ_count,
12090                         -1 AS year,
12091                         false as is_renewal
12092                 FROM
12093                         extend_reporter.legacy_circ_count
12094         )x GROUP BY 1, 3, 4
12095
12096                 </oils_persist:source_definition>
12097         <fields>
12098             <field reporter:label="Copy ID" name="copy" reporter:datatype="link"/>
12099             <field reporter:label="Count" name="count" reporter:datatype="int"/>
12100             <field reporter:label="Year" name="year" reporter:datatype="int"/>
12101             <field reporter:label="Renewal" name="is_renewal" reporter:datatype="bool"/>
12102         </fields>
12103                 <links>
12104                         <link field="copy" reltype="has_a" key="id" map="" class="acp"/>
12105                 </links>
12106                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12107                         <actions>
12108                                 <retrieve/>
12109                         </actions>
12110                 </permacrud>
12111     </class>
12112
12113         <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">
12114                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
12115                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
12116                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
12117                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
12118                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
12119                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
12120                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
12121                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
12122                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
12123                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
12124                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
12125                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
12126                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
12127                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
12128                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
12129                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
12130                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
12131                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
12132                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
12133                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
12134                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
12135                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
12136                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
12137                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
12138                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
12139                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
12140                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
12141                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
12142                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="link"/>
12143                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="link"/>
12144                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="link"/>
12145                 </fields>
12146                 <links>
12147                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
12148                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
12149                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
12150                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
12151                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
12152                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
12153                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
12154                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
12155                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
12156                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
12157                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
12158                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
12159                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
12160                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
12161                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
12162                 </links>
12163         </class>
12164
12165     <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">
12166         <fields oils_persist:primary="id">
12167             <field reporter:label="Title" name="title" reporter:datatype="text"/>
12168             <field reporter:label="Author" name="author" reporter:datatype="text"/>
12169             <field reporter:label="Pubdate" name="pubdate" reporter:datatype="text"/>
12170             <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
12171             <field reporter:label="Price" name="price" reporter:datatype="money"/>
12172             <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
12173             <field reporter:label="Callnumber Label" name="call_number_label" reporter:datatype="text"/>
12174             <field reporter:label="Dewy Tens" name="dewey_block_tens" reporter:datatype="text"/>
12175             <field reporter:label="Dewy Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
12176             <field reporter:label="Use Count" name="use_count" reporter:datatype="int"/>
12177             <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
12178             <field reporter:label="Shelving Location Name" name="shelving_location" reporter:datatype="text"/>
12179             <field reporter:label="Legacy Stat Cat 1" name="stat_cat_1" reporter:datatype="link"/>
12180             <field reporter:label="Legacy Stat Cat 2" name="stat_cat_2" reporter:datatype="link"/>
12181             <field reporter:label="Legacy Stat Cat 1 Value" name="stat_cat_1_value" reporter:datatype="text"/>
12182             <field reporter:label="Legacy Stat Cat 2 Value" name="stat_cat_2_value" reporter:datatype="text"/>
12183             <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
12184             <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
12185             <field reporter:label="Owning Lib Name" name="owning_lib_name" reporter:datatype="text"/>
12186             <field reporter:label="Circ Lib Name" name="circ_lib_name" reporter:datatype="text"/>
12187             <field reporter:label="Owning Lib" name="owning_lib" reporter:datatype="link"/>
12188             <field reporter:label="Circ Lib" name="circ_lib" reporter:datatype="link"/>
12189             <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
12190             <field reporter:label="Age Protection" name="age_protect" reporter:datatype="link"/>
12191             <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
12192             <field reporter:label="Reference" name="ref" reporter:datatype="bool"/>
12193             <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="text"/>
12194             <field reporter:label="Deleted" name="deleted" reporter:datatype="bool"/>
12195             <field reporter:label="TCN" name="tcn_value" reporter:datatype="text"/>
12196             <field reporter:label="Status" name="status" reporter:datatype="link"/>
12197             <field reporter:label="Stop Fines Reason" name="stop_fines" reporter:datatype="text"/>
12198             <field reporter:label="Due Date" name="due_date" reporter:datatype="timestamp"/>
12199             <field reporter:label="Patron Barcode" name="patron_barcode" reporter:datatype="text"/>
12200             <field reporter:label="Patron Name" name="patron_name" reporter:datatype="text"/>
12201         </fields>
12202         <links>
12203             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
12204             <link field="id" reltype="has_a" key="id" map="" class="acp"/>
12205             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
12206             <link field="creator" reltype="has_a" key="id" map="" class="au"/>
12207             <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
12208             <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
12209             <link field="stat_cat_1" reltype="might_have" key="id" map="" class="rsce1"/>
12210             <link field="stat_cat_2" reltype="might_have" key="id" map="" class="rsce2"/>
12211         </links>
12212     </class>
12213
12214     <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">
12215         <fields oils_persist:primary="id">
12216             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
12217             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
12218             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
12219             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
12220         </fields>
12221         <links>
12222             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
12223             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
12224         </links>
12225     </class>
12226
12227     <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">
12228         <fields oils_persist:primary="owning_lib">
12229             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
12230             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
12231             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
12232         </fields>
12233         <links>
12234             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
12235         </links>
12236     </class>
12237
12238     <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">
12239         <fields oils_persist:primary="id">
12240             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
12241             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
12242             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
12243             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
12244             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
12245         </fields>
12246         <links>
12247             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
12248             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
12249             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
12250         </links>
12251     </class>
12252
12253     <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">
12254         <fields oils_persist:primary="circ_lib">
12255             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
12256             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
12257             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
12258             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
12259         </fields>
12260         <links>
12261             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
12262             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
12263         </links>
12264     </class>
12265
12266     <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">
12267         <fields oils_persist:primary="id">
12268             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
12269             <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
12270             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
12271             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
12272             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
12273         </fields>
12274         <links>
12275             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
12276             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
12277             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
12278         </links>
12279     </class>
12280
12281     <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">
12282         <fields oils_persist:primary="home_ou">
12283             <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
12284             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
12285             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
12286             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
12287         </fields>
12288         <links>
12289             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
12290             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
12291         </links>
12292     </class>
12293         <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">
12294                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_id_seq">
12295                         <field reporter:label="Fund Tag ID" name="id" reporter:datatype="id"/>
12296                         <field reporter:label="Fund Tag Owner" name="owner" reporter:datatype="org_unit"/>
12297                         <field reporter:label="Fund Tag Name" name="name" reporter:datatype="text"/>
12298                         <field reporter:label="Map Entries" name="map_entries" oils_persist:virtual="true" reporter:datatype="link"/>
12299                 </fields>
12300                 <links>
12301                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
12302                         <link field="map_entries" reltype="has_many" key="fund" map="" class="acqftm"/>
12303                 </links>
12304                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12305                         <actions>
12306                                 <create permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
12307                                 <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="owner"/>
12308                                 <update permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
12309                         <delete permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
12310                         </actions>
12311                 </permacrud>
12312         </class>
12313         <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">
12314                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_map_id_seq">
12315                         <field reporter:label="Map Entry ID" name="id" reporter:datatype="id"/>
12316                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link"/>
12317                         <field reporter:label="Tag ID" name="tag" reporter:datatype="link"/>
12318                 </fields>
12319                 <links>
12320                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
12321                         <link field="tag" reltype="has_a" key="id" map="" class="acqft"/>
12322                         </links>
12323                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12324                 <actions>
12325                                 <create permission="ADMIN_ACQ_FUND_TAG">
12326                                         <context link="tag" field="owner"/>
12327                                 </create>
12328                                 <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
12329                                         <context link="tag" field="owner"/>
12330                                 </retrieve>
12331                                 <update permission="ADMIN_ACQ_FUND_TAG">
12332                                         <context link="tag" field="owner"/>
12333                                 </update>
12334                                 <delete permission="ADMIN_ACQ_FUND_TAG">
12335                                         <context link="tag" field="owner"/>
12336                                 </delete>
12337                         </actions>
12338                 </permacrud>
12339         </class>
12340         <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">
12341                 <oils_persist:source_definition><![CDATA[
12342                 SELECT
12343                         poi.purchase_order AS purchase_order,
12344                         ii.invoice AS invoice,
12345                         NULL AS lineitem,
12346                         poi.id AS po_item,
12347                         NULL AS picklist
12348                 FROM
12349                         acq.po_item poi
12350                         JOIN acq.invoice_item ii ON (ii.po_item = poi.id)
12351                 UNION SELECT
12352                         jub.purchase_order AS purchase_order,
12353                         ie.invoice AS invoice,
12354                         jub.id AS lineitem,
12355                         NULL AS po_item,
12356                         jub.picklist AS picklist
12357                 FROM
12358                         acq.lineitem jub
12359                         JOIN acq.invoice_entry ie ON (ie.lineitem = jub.id)
12360                 UNION SELECT
12361                         ii.purchase_order AS purchase_order,
12362                         ii.invoice AS invoice,
12363                         NULL AS lineitem,
12364                         NULL AS po_item,
12365                         NULL AS picklist
12366                 FROM
12367                         acq.invoice_item ii
12368                 WHERE ii.po_item IS NULL
12369                 UNION SELECT
12370                         ie.purchase_order AS purchase_order,
12371                         ie.invoice AS invoice,
12372                         NULL AS lineitem,
12373                         NULL AS po_item,
12374                         NULL AS picklist
12375                 FROM
12376                         acq.invoice_entry ie
12377                 WHERE ie.lineitem IS NULL
12378                 UNION SELECT
12379                         NULL AS purchase_order,
12380                         NULL AS invoice,
12381                         jub.id AS lineitem,
12382                         NULL AS po_item,
12383                         jub.picklist AS picklist
12384                 FROM
12385                         acq.lineitem jub
12386                 WHERE jub.purchase_order IS NULL
12387                 ]]></oils_persist:source_definition>
12388                 <fields>
12389                         <field reporter:label="Purchase Order ID" name="purchase_order" reporter:datatype="link"/>
12390                         <field reporter:label="Lineitem ID" name="lineitem" reporter:datatype="link"/>
12391                         <field reporter:label="Invoice ID" name="invoice" reporter:datatype="link"/>
12392                         <field reporter:label="Purchase Order Item ID" name="po_item" reporter:datatype="link"/>
12393                         <field reporter:label="Picklist ID" name="picklist" reporter:datatype="link"/>
12394                 </fields>
12395                 <links>
12396                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo" />
12397                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub" />
12398                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv" />
12399                         <link field="po_item" reltype="has_a" key="id" map="" class="acqpoi" />
12400                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl" />
12401                 </links>
12402         </class>
12403         <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">
12404                 <fields oils_persist:primary="id" oils_persist:sequence="config.barcode_completion_id_seq">
12405                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
12406                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
12407                         <field reporter:label="Owner" name="org_unit" reporter:datatype="org_unit"/>
12408                         <field reporter:label="Prefix" name="prefix" reporter:datatype="text"/>
12409                         <field reporter:label="Suffix" name="suffix" reporter:datatype="text"/>
12410                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
12411                         <field reporter:label="Padding" name="padding" reporter:datatype="text"/>
12412                         <field reporter:label="Padding At End" name="padding_end" reporter:datatype="bool"/>
12413                         <field reporter:label="Applies to Items" name="asset" reporter:datatype="bool"/>
12414                         <field reporter:label="Applies to Users" name="actor" reporter:datatype="bool"/>
12415                 </fields>
12416                 <links>
12417                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
12418                 </links>
12419                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12420                         <actions>
12421                                 <create permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
12422                                 <retrieve/>
12423                                 <update permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
12424                                 <delete permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
12425                         </actions>
12426                 </permacrud>
12427         </class>
12428
12429         <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">
12430                 <fields oils_persist:primary="id" oils_persist:sequence="config.org_unit_setting_type_log_id_seq">
12431                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
12432                         <field name="date_applied" reporter:datatype="timestamp"/>
12433                         <field name="org" reporter:datatype="org_unit"/>
12434                         <field name="original_value" reporter:datatype="text"/>
12435                         <field name="new_value" reporter:datatype="text"/>
12436                         <field name="field_name" reporter:datatype="link"/>
12437                 </fields>
12438                 <links>
12439                         <link field="field_name" reltype="has_a" key="name" map="" class="coust"/>
12440                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
12441                 </links>
12442                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12443                         <actions>
12444                                 <create permission="ADMIN_ORG_UNIT_SETTING_TYPE" context_field="org"/>
12445                                 <retrieve permission="STAFF_LOGIN" context_field="org"/>
12446                                 <update permission="ADMIN_ORG_UNIT_SETTING_TYPE_LOG" context_field="org"/>
12447                                 <delete permission="ADMIN_ORG_UNIT_SETTING_TYPE_LOG" context_field="org"/>
12448                         </actions>
12449                 </permacrud>
12450         </class>
12451         <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">
12452                 <fields oils_persist:primary="id" oils_persist:sequence="action.archive_actor_stat_cat_id_seq">
12453                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
12454                         <field reporter:label="Circ" name="xact" reporter:datatype="link"/>
12455                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
12456                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
12457                 </fields>
12458                 <links>
12459                         <link field="xact" reltype="has_a" key="id" map="" class="combcirc"/>
12460                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
12461                 </links>
12462         </class>
12463         <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">
12464                 <fields oils_persist:primary="id" oils_persist:sequence="action.archive_actor_stat_cat_id_seq">
12465                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
12466                         <field reporter:label="Circ" name="xact" reporter:datatype="link"/>
12467                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
12468                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
12469                 </fields>
12470                 <links>
12471                         <link field="xact" reltype="has_a" key="id" map="" class="combcirc"/>
12472                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
12473                 </links>
12474         </class>
12475         <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">
12476                 <fields oils_persist:primary="id" oils_persist:sequence="config.floating_group_id_seq">
12477                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
12478                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
12479                         <field reporter:label="Manual" name="manual" reporter:datatype="bool"/>
12480                         <field reporter:label="Group Members" name="members" oils_persist:virtual="true" reporter:datatype="link"/>
12481                 </fields>
12482                 <links>
12483                         <link field="members" reltype="has_many" key="floating_group" class="cfgm"/>
12484                 </links>
12485                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12486                         <actions>
12487                                 <create permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
12488                                 <retrieve/>
12489                                 <update permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
12490                                 <delete permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
12491                         </actions>
12492                 </permacrud>
12493         </class>
12494         <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">
12495                 <fields oils_persist:primary="id" oils_persist:sequence="config.floating_group_member_id_seq">
12496                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
12497                         <field reporter:label="Floating Group" name="floating_group" reporter:datatype="link"/>
12498                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="link"/>
12499                         <field reporter:label="Stop Depth" name="stop_depth" reporter:datatype="int"/>
12500                         <field reporter:label="Max Depth" name="max_depth" reporter:datatype="int"/>
12501                         <field reporter:label="Exclude" name="exclude" reporter:datatype="bool"/>
12502                 </fields>
12503                 <links>
12504                         <link field="floating_group" reltype="has_a" key="id" class="cfg"/>
12505                         <link field="org_unit" reltype="has_a" key="id" class="aou"/>
12506                 </links>
12507                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12508                         <actions>
12509                                 <create permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
12510                                 <retrieve/>
12511                                 <update permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
12512                                 <delete permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
12513                         </actions>
12514                 </permacrud>
12515         </class>
12516         <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">
12517                 <fields oils_persist:primary="code">
12518                         <field reporter:label="Code" name="code" reporter:selector="label" reporter:datatype="id" oils_obj:required="true"/>
12519                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_obj:required="true"/>
12520                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" oils_obj:required="true"/>
12521                 </fields>
12522                 <links>
12523                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
12524                 </links>
12525                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12526                         <actions>
12527                                 <create permission="ADMIN_COPY_TAG_TYPES" context_field="owner"/>
12528                                 <retrieve/>
12529                                 <update permission="ADMIN_COPY_TAG_TYPES" context_field="owner"/>
12530                                 <delete permission="ADMIN_COPY_TAG_TYPES" context_field="owner"/>
12531                         </actions>
12532                 </permacrud>
12533         </class>
12534         <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">
12535                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_tag_id_seq">
12536                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
12537                         <field reporter:label="Copy Tag Type" name="tag_type" reporter:datatype="link"/>
12538                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
12539                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
12540                         <field reporter:label="Staff Note" name="staff_note" reporter:datatype="text"/>
12541                         <field reporter:label="Is OPAC Visible?" name="pub" reporter:datatype="bool"/>
12542                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" oils_obj:required="true"/>
12543                 </fields>
12544                 <links>
12545                         <link field="tag_type" reltype="has_a" key="code" map="" class="cctt"/>
12546                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
12547                 </links>
12548                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12549                         <actions>
12550                                 <create permission="ADMIN_COPY_TAG" context_field="owner"/>
12551                                 <retrieve/>
12552                                 <update permission="ADMIN_COPY_TAG" context_field="owner"/>
12553                                 <delete permission="ADMIN_COPY_TAG" context_field="owner"/>
12554                         </actions>
12555                 </permacrud>
12556         </class>
12557         <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">
12558                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_tag_copy_map_id_seq">
12559                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
12560                         <field reporter:label="Copy" name="copy" reporter:datatype="link"/>
12561                         <field reporter:label="Tag" name="tag" reporter:datatype="link"/>
12562                 </fields>
12563                 <links>
12564                         <link field="copy" reltype="has_a" key="id" map="" class="acp"/>
12565                         <link field="tag" reltype="has_a" key="id" map="" class="acpt"/>
12566                 </links>
12567                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12568                         <actions>
12569                                 <create permission="UPDATE_COPY">
12570                     <context link="copy" field="circ_lib"/>
12571                 </create>
12572                                 <retrieve/>
12573                                 <update permission="UPDATE_COPY">
12574                     <context link="copy" field="circ_lib"/>
12575                 </update>
12576                                 <delete permission="UPDATE_COPY">
12577                     <context link="copy" field="circ_lib"/>
12578                 </delete>
12579                         </actions>
12580                 </permacrud>
12581         </class>
12582         <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">
12583         <oils_persist:source_definition>
12584         SELECT ahcm.target_copy AS id,count(*) AS count
12585          FROM
12586          action.hold_request ahr,
12587          action.hold_copy_map ahcm
12588          WHERE
12589          ahr.cancel_time IS NULL AND
12590          ahr.fulfillment_time IS NULL AND
12591          ahr.capture_time IS NULL AND
12592          ahr.id = ahcm.hold
12593          GROUP BY ahcm.target_copy
12594         </oils_persist:source_definition>
12595         <fields oils_persist:primary="id">
12596             <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
12597             <field reporter:label="Holds Count" name="count" reporter:datatype="text"/>
12598         </fields>
12599         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12600             <actions>
12601                <retrieve/>
12602             </actions>
12603         </permacrud>
12604         </class>
12605
12606         <class id="cwst" controller="open-ils.cstore open-ils.pcrud"
12607                 oils_obj:fieldmapper="config::workstation_setting_type" 
12608                 oils_persist:tablename="config.workstation_setting_type" 
12609                 reporter:label="Workstation Setting Type">
12610                 <fields oils_persist:primary="name">
12611                         <field name="name" reporter:datatype="text"/>
12612                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
12613                         <field name="description" reporter:datatype="text" oils_persist:i18n="true"/>
12614                         <field name="datatype" reporter:datatype="text"/>
12615                         <field name="fm_class" reporter:datatype="text"/>
12616                         <field name="grp" reporter:datatype="link"/>
12617                 </fields>
12618                 <links>
12619                         <link field="name" reltype="has_many" key="name" map="" class="aous"/>
12620                         <link field="grp" reltype="has_a" key="name" map="" class="csg"/>
12621                 </links>
12622                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12623                         <actions>
12624                                 <create permission="ADMIN_WORKSTATION_SETTING_TYPE" global_required="true"/>
12625                                 <retrieve/>
12626                                 <update permission="ADMIN_WORKSTATION_SETTING_TYPE" global_required="true"/>
12627                                 <delete permission="ADMIN_WORKSTATION_SETTING_TYPE" global_required="true"/>
12628                         </actions>
12629                 </permacrud>
12630         </class>
12631
12632         <!-- no pcrud access is granted for now, because it's assumed these
12633                          setting values will be applied and retrived via the API. -->
12634         <class id="awss" 
12635                 controller="open-ils.cstore"
12636                 oils_obj:fieldmapper="actor::workstation_setting" 
12637                 oils_persist:tablename="actor.workstation_setting" 
12638                 reporter:label="Workstation Setting">
12639                 <fields oils_persist:primary="id" oils_persist:sequence="actor.workstation_setting_id_seq">
12640                         <field reporter:label="Setting ID" name="id" reporter:datatype="id" />
12641                         <field reporter:label="Name" name="name" reporter:datatype="link"/>
12642                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
12643                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
12644                 </fields>
12645                 <links>
12646                         <link field="name" reltype="has_a" key="name" map="" class="cwst"/>
12647                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
12648                 </links>
12649         </class>
12650
12651         <!-- ********************************************************************************************************************* -->
12652 </IDL>
12653
12654 <!--
12655     vim:noet:ts=4:sw=4:
12656 -->