]> git.evergreen-ils.org Git - Evergreen.git/blob - Open-ILS/examples/fm_IDL.xml
LP1928363 Item circ info for Holdings tab
[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                         <field name="debit_card_payment" oils_persist:virtual="true" />
98                 </fields>
99                 <links>
100                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
101                 </links>
102         </class>
103
104         <class id="brn" controller="open-ils.cstore" oils_obj:fieldmapper="biblio::record_node" oils_persist:virtual="true" reporter:label="Record Node">
105                 <fields>
106                         <field name="id" oils_persist:virtual="true" />
107                         <field name="children" oils_persist:virtual="true" />
108                         <field name="owner_doc" oils_persist:virtual="true" />
109                         <field name="intra_doc_id" oils_persist:virtual="true" />
110                         <field name="parent_node" oils_persist:virtual="true" />
111                         <field name="node_type" oils_persist:virtual="true" />
112                         <field name="namespace_uri" oils_persist:virtual="true" />
113                         <field name="name" oils_persist:virtual="true" />
114                         <field name="value" oils_persist:virtual="true" />
115                 </fields>
116         </class>
117
118         <class id="mvr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::virtual_record" oils_persist:virtual="true" reporter:label="Virtual Record">
119                 <fields>
120                         <field name="title" oils_persist:virtual="true" />
121                         <field name="author" oils_persist:virtual="true" />
122                         <field name="doc_id" oils_persist:virtual="true" />
123                         <field name="doc_type" oils_persist:virtual="true" />
124                         <field name="pubdate" oils_persist:virtual="true" />
125                         <field name="isbn" oils_persist:virtual="true" />
126                         <field name="publisher" oils_persist:virtual="true" />
127                         <field name="tcn" oils_persist:virtual="true" />
128                         <field name="subject" oils_persist:virtual="true" />
129                         <field name="types_of_resource" oils_persist:virtual="true" />
130                         <field name="call_numbers" oils_persist:virtual="true" />
131                         <field name="edition" oils_persist:virtual="true" />
132                         <field name="online_loc" oils_persist:virtual="true" />
133                         <field name="synopsis" oils_persist:virtual="true" />
134                         <field name="physical_description" oils_persist:virtual="true" />
135                         <field name="toc" oils_persist:virtual="true" />
136                         <field name="copy_count" oils_persist:virtual="true" />
137                         <field name="series" oils_persist:virtual="true" />
138                         <field name="serials" oils_persist:virtual="true" />
139                         <field name="foreign_copy_maps" oils_persist:virtual="true" />
140                 </fields>
141         </class>
142
143         <class id="ex" controller="open-ils.cstore" oils_obj:fieldmapper="ex" oils_persist:virtual="true">
144                 <fields>
145                         <field name="err_msg" oils_persist:virtual="true" />
146                         <field name="type" oils_persist:virtual="true" />
147                 </fields>
148         </class>
149
150         <class id="perm_ex" controller="open-ils.cstore" oils_obj:fieldmapper="perm_ex" oils_persist:virtual="true">
151                 <fields>
152                         <field name="err_msg" oils_persist:virtual="true" />
153                         <field name="type" oils_persist:virtual="true" />
154                 </fields>
155         </class>
156
157         <class id="amtr" controller="open-ils.cstore" oils_obj:fieldmapper="action::matrix_test_result" oils_persist:virtual="true" reporter:label="Matrix Test Result">
158                 <fields oils_persist:primary="matchpoint">
159                         <field reporter:label="Matchpoint ID" name="matchpoint" reporter:datatype="id"/>
160                         <field reporter:label="Success" name="success" reporter:datatype="bool"/>
161                         <field reporter:label="Failure Part" name="fail_part" reporter:datatype="text"/>
162                 </fields>
163                 <links>
164                         <link field="matchpoint" reltype="has_a" key="id" map="" class="ccmm"/>
165                 </links>
166         </class>
167
168         <class id="accs" controller="open-ils.cstore" oils_obj:fieldmapper="action::circ_chain_summary" oils_persist:virtual="true" reporter:label="Circulation Chain Summary">
169         <!-- when the time is right, turn me into a view.  -->
170                 <fields>
171             <field reporter:label="Total Circs" name="num_circs" reporter:datatype="int"/>
172             <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
173             <field reporter:label="Checkout Workstation" name="checkout_workstation" reporter:datatype="text"/>
174             <field reporter:label="Last Renewal Time" name="last_renewal_time" reporter:datatype="timestamp"/>
175             <field reporter:label="Last Stop Fines" name="last_stop_fines" reporter:datatype="text"/>
176             <field reporter:label="Last Stop Fines Time" name="last_stop_fines_time" reporter:datatype="timestamp"/>
177             <field reporter:label="Last Renewal Workstation" name="last_renewal_workstation" reporter:datatype="text"/>
178             <field reporter:label="Last Checkin Workstation" name="last_checkin_workstation" reporter:datatype="text"/>
179             <field reporter:label="Last Checkin Time" name="last_checkin_time" reporter:datatype="timestamp"/>
180             <field reporter:label="Last Checkin Scan Time" name="last_checkin_scan_time" reporter:datatype="timestamp"/>
181                 </fields>
182         </class>
183
184         <class id="rhr" oils_obj:fieldmapper="resolver::holdings_record" oils_persist:virtual="true">
185                 <fields>
186                         <field name="public_name" oils_persist:virtual="true" />
187                         <field name="target_url" oils_persist:virtual="true" />
188                         <field name="target_coverage" oils_persist:virtual="true" />
189                         <field name="target_embargo" oils_persist:virtual="true" />
190                 </fields>
191         </class>
192
193         <!-- Actually in the DB -->
194         <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">
195                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.merge_profile_id_seq">
196                         <field reporter:label="Field ID" name="id" reporter:selector="name" reporter:datatype="id"/>
197                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
198                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
199                         <field reporter:label="Add Specification" name="add_spec" reporter:datatype="text"/>
200                         <field reporter:label="Replace Specification" name="replace_spec" reporter:datatype="text"/>
201                         <field reporter:label="Remove Specification" name="strip_spec" reporter:datatype="text"/>
202                         <field reporter:label="Preserve Specification" name="preserve_spec" reporter:datatype="text"/>
203                         <field reporter:label="Min. Quality Ratio" name="lwm_ratio" reporter:datatype="float"/>
204                         <field reporter:label="Update Bib. Source" name="update_bib_source" reporter:datatype="bool"/>
205                 </fields>
206                 <links>
207                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
208                 </links>
209                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
210                         <actions>
211                                 <create permission="ADMIN_MERGE_PROFILE CREATE_MERGE_PROFILE" context_field="owner"/>
212                                 <retrieve permission="ADMIN_MERGE_PROFILE CREATE_MERGE_PROFILE UPDATE_MERGE_PROFILE DELETE_MERGE_PROFILE VIEW_MERGE_PROFILE" context_field="owner"/>
213                                 <update permission="ADMIN_MERGE_PROFILE UPDATE_MERGE_PROFILE" context_field="owner"/>
214                                 <delete permission="ADMIN_MERGE_PROFILE DELETE_MERGE_PROFILE" context_field="owner"/>
215                         </actions>
216                 </permacrud>
217         </class>
218
219         <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">
220                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.import_bib_trash_fields_id_seq">
221                         <field reporter:label="Field ID" name="id" reporter:datatype="id" reporter:selector="field"/>
222                         <field reporter:label="Group" name="grp" reporter:datatype="link" config_field="true"/>
223                         <field reporter:label="Field" name="field" reporter:datatype="text"/>
224                 </fields>
225                 <links>
226                         <link field="grp" reltype="has_a" key="id" map="" class="vibtg"/>
227                 </links>
228                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
229                         <actions>
230                                 <create permission="CREATE_IMPORT_TRASH_FIELD">
231                     <context link="grp" field="owner"/>
232                 </create>
233                                 <retrieve/>
234                                 <update permission="UPDATE_IMPORT_TRASH_FIELD">
235                     <context link="grp" field="owner"/>
236                 </update>
237                                 <delete permission="DELETE_IMPORT_TRASH_FIELD">
238                     <context link="grp" field="owner"/>
239                 </delete>
240                         </actions>
241                 </permacrud>
242         </class>
243
244         <class  id="rrbs" 
245             controller="open-ils.cstore open-ils.pcrud" 
246             oils_obj:fieldmapper="rating::record_badge_score" 
247             oils_persist:tablename="rating.record_badge_score" 
248             reporter:label="Statistical Popularity Badge">
249                 <fields oils_persist:primary="id" 
250                 oils_persist:sequence="rating.record_badge_score_id_seq">
251                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
252                         <field reporter:label="Badge" name="badge" reporter:datatype="link"/>
253                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
254                         <field reporter:label="Score" name="score" reporter:datatype="int"/>
255                 </fields>
256         <links>
257             <link field="badge" reltype="has_a" key="id" map="" class="rb"/>
258             <link field="record" reltype="has_a" key="id" map="" class="bre"/>
259         </links>
260                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
261                         <actions>
262                                 <retrieve/>
263                         </actions>
264                 </permacrud>
265         </class>
266
267         <class  id="rp" 
268             controller="open-ils.cstore open-ils.pcrud" 
269             oils_obj:fieldmapper="rating::popularity_parameter" 
270             oils_persist:tablename="rating.popularity_parameter" 
271             reporter:label="Statistical Popularity Parameter">
272                 <fields oils_persist:primary="id" 
273                 oils_persist:sequence="rating.popularity_parameter_id_seq">
274                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
275                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
276                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
277                         <field reporter:label="Population Function" name="func" reporter:datatype="text"/>
278                         <field reporter:label="Require Horizon" name="require_horizon" reporter:datatype="bool"/>
279                         <field reporter:label="Require Percentile" name="require_percentile" reporter:datatype="bool"/>
280                         <field reporter:label="Require Importance" name="require_importance" reporter:datatype="bool"/>
281                 </fields>
282                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
283                         <actions>
284                                 <create permission="CREATE_POP_PARAMETER" global_required="true"/>
285                                 <retrieve/>
286                                 <update permission="UPDATE_POP_PARAMETER" global_required="true"/>
287                                 <delete permission="DELETE_POP_PARAMETER" global_required="true"/>
288                         </actions>
289                 </permacrud>
290         </class>
291
292         <class  id="rb" 
293             controller="open-ils.cstore open-ils.pcrud" 
294             oils_obj:fieldmapper="rating::badge" 
295             oils_persist:tablename="rating.badge" 
296             reporter:label="Statistical Popularity Badge">
297                 <fields oils_persist:primary="id" 
298                 oils_persist:sequence="rating.badge_id_seq">
299                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
300                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
301                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
302                         <field reporter:label="Scope" name="scope" reporter:datatype="org_unit"/>
303                         <field reporter:label="Weight" name="weight" reporter:datatype="int"/>
304                         <field reporter:label="Age Horizon" name="horizon_age" reporter:datatype="text"/>
305                         <field reporter:label="Importance Horizon" name="importance_age" reporter:datatype="text"/>
306                         <field reporter:label="Importance Interval" name="importance_interval" reporter:datatype="text"/>
307                         <field reporter:label="Importance Scale" name="importance_scale" reporter:datatype="text"/>
308                         <field reporter:label="Percentile" name="percentile" reporter:datatype="float"/>
309                         <field reporter:label="Attribute Filter" name="attr_filter" reporter:datatype="text"/>
310                         <field reporter:label="Circ Mod Filter" name="circ_mod_filter" reporter:datatype="link"/>
311                         <field reporter:label="Bib Source Filter" name="src_filter" reporter:datatype="link"/>
312                         <field reporter:label="Location Group Filter" name="loc_grp_filter" reporter:datatype="link"/>
313                         <field reporter:label="Recalculation Interval" name="recalc_interval" reporter:datatype="text"/>
314                         <field reporter:label="Fixed Rating" name="fixed_rating" reporter:datatype="int"/>
315                         <field reporter:label="Discard Value Count" name="discard" reporter:datatype="int"/>
316                         <field reporter:label="Last Refresh Time" name="last_calc" reporter:datatype="timestamp"/>
317                         <field reporter:label="Popularity Parameter" name="popularity_parameter" reporter:datatype="link"/>
318                 </fields>
319                 <links>
320                         <link field="scope" reltype="has_a" key="id" map="" class="aou"/>
321                         <link field="popularity_parameter" reltype="has_a" key="id" map="" class="rp"/>
322                         <link field="src_filter" reltype="has_a" key="id" map="" class="cbs"/>
323                         <link field="circ_mod_filter" reltype="has_a" key="code" map="" class="ccm"/>
324                         <link field="loc_grp_filter" reltype="has_a" key="id" map="" class="acplg"/>
325                 </links>
326                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
327                         <actions>
328                                 <create permission="CREATE_POP_BADGE" global_required="true"/>
329                                 <retrieve/>
330                                 <update permission="UPDATE_POP_BADGE" global_required="true"/>
331                                 <delete permission="DELETE_POP_BADGE" global_required="true"/>
332                         </actions>
333                 </permacrud>
334         </class>
335
336         <class  id="vibtg" 
337             controller="open-ils.cstore open-ils.pcrud" 
338             oils_obj:fieldmapper="vandelay::import_bib_trash_group" 
339             oils_persist:tablename="vandelay.import_bib_trash_group" 
340             reporter:label="Import/Overlay Field Groups for Removal">
341                 <fields oils_persist:primary="id" 
342                 oils_persist:sequence="vandelay.import_bib_trash_group_id_seq">
343                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="label"/>
344                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
345                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
346                         <field reporter:label="Always Apply" name="always_apply" reporter:datatype="bool"/>
347                         <field reporter:label="Fields" name="import_bib_trash_fields" oils_persist:virtual="true" reporter:datatype="link" config_field="true"/>
348                 </fields>
349                 <links>
350                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
351                         <link field="import_bib_trash_fields" reltype="has_many" key="grp" map="" class="vibtf"/>
352                 </links>
353                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
354                         <actions>
355                                 <create permission="CREATE_IMPORT_TRASH_FIELD" context_field="owner"/>
356                                 <retrieve/>
357                                 <update permission="UPDATE_IMPORT_TRASH_FIELD" context_field="owner"/>
358                                 <delete permission="DELETE_IMPORT_TRASH_FIELD" context_field="owner"/>
359                         </actions>
360                 </permacrud>
361         </class>
362
363
364         <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">
365                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.import_item_id_seq">
366                         <field reporter:label="Import Item ID" name="id" reporter:datatype="id"/>
367                         <field reporter:label="Import Record" name="record" reporter:datatype="link"/>
368                         <field reporter:label="Attribute Definition" name="definition" reporter:datatype="link"/>
369                         <field reporter:label="Import Error" name="import_error" reporter:datatype="link"/>
370                         <field reporter:label="Import Error Detail" name="error_detail" reporter:datatype="text"/>
371                         <field reporter:label="Final Target Copy" name="imported_as" reporter:datatype="link"/>
372                         <field reporter:label="Import Time" name="import_time" reporter:datatype="timestamp"/>
373                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="int"/>
374                         <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="int"/>
375                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
376                         <field reporter:label="Copy Number" name="copy_number" reporter:datatype="int"/>
377                         <field reporter:label="Status" name="status" reporter:datatype="int"/>
378                         <field reporter:label="Shelving Location" name="location" reporter:datatype="int"/>
379                         <field reporter:label="Circulate" name="circulate" reporter:datatype="bool"/>
380                         <field reporter:label="Deposit" name="deposit" reporter:datatype="bool"/>
381                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
382                         <field reporter:label="Reference" name="ref" reporter:datatype="bool"/>
383                         <field reporter:label="Holdable" name="holdable" reporter:datatype="bool"/>
384                         <field reporter:label="Price" name="price" reporter:datatype="money"/>
385                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
386                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="text"/>
387                         <field reporter:label="Circulate As MARC Type" name="circ_as_type" reporter:datatype="text"/>
388                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
389                         <field reporter:label="Public Note" name="pub_note" reporter:datatype="text"/>
390                         <field reporter:label="Private Note" name="priv_note" reporter:datatype="text"/>
391                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
392                         <field reporter:label="Overlay Match ID" name="internal_id" reporter:datatype="int"/>
393                         <field reporter:label="Stat Cat Data" name="stat_cat_data" reporter:datatype="text"/>
394                         <field reporter:label="Parts Data" name="parts_data" reporter:datatype="text"/>
395                 </fields>
396                 <links>
397                         <link field="import_error" reltype="has_a" key="code" map="" class="vie"/>
398                         <link field="record" reltype="has_a" key="id" map="" class="vqbr"/>
399                         <link field="definition" reltype="has_a" key="id" map="" class="viiad"/>
400                         <link field="imported_as" reltype="has_a" key="id" map="" class="acp"/>
401                 </links>
402                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
403                         <actions>
404                                 <create permission="CREATE_IMPORT_ITEM">
405                     <context link="definition" field="owner"/>
406                                 </create>
407                                 <retrieve permission="CREATE_IMPORT_ITEM UPDATE_IMPORT_ITEM DELETE_IMPORT_ITEM">
408                     <context link="definition" field="owner"/>
409                                 </retrieve>
410                                 <update permission="UPDATE_IMPORT_ITEM">
411                     <context link="definition" field="owner"/>
412                                 </update>
413                                 <delete permission="DELETE_IMPORT_ITEM">
414                     <context link="definition" field="owner"/>
415                                 </delete>
416                         </actions>
417                 </permacrud>
418         </class>
419
420         <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">
421                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.import_item_attr_definition_id_seq">
422                         <field reporter:label="Definition ID" name="id" reporter:datatype="id"/>
423                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
424                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
425                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
426                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="text"/>
427                         <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="text"/>
428                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
429                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
430                         <field reporter:label="Shelving Location" name="location" reporter:datatype="text"/>
431                         <field reporter:label="Circulate" name="circulate" reporter:datatype="text"/>
432                         <field reporter:label="Deposit" name="deposit" reporter:datatype="text"/>
433                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="text"/>
434                         <field reporter:label="Reference" name="ref" reporter:datatype="text"/>
435                         <field reporter:label="Holdable" name="holdable" reporter:datatype="text"/>
436                         <field reporter:label="Price" name="price" reporter:datatype="text"/>
437                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
438                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="text"/>
439                         <field reporter:label="Circulate As MARC Type" name="circ_as_type" reporter:datatype="text"/>
440                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
441                         <field reporter:label="Public Note" name="pub_note" reporter:datatype="text"/>
442                         <field reporter:label="Private Note" name="priv_note" reporter:datatype="text"/>
443                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="text"/>
444                         <field reporter:label="Copy Number" name="copy_number" reporter:datatype="text"/>
445                         <field reporter:label="Overlay Match ID" name="internal_id" reporter:datatype="text"/>
446                         <field reporter:label="Stat Cat Data" name="stat_cat_data" reporter:datatype="text"/>
447                         <field reporter:label="Parts Data" name="parts_data" reporter:datatype="text"/>
448                 </fields>
449                 <links>
450                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
451                 </links>
452                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
453                         <actions>
454                                 <create permission="CREATE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
455                                 <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"/>
456                                 <update permission="UPDATE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
457                                 <delete permission="DELETE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
458                         </actions>
459                 </permacrud>
460         </class>
461
462         <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">
463                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queue_id_seq">
464                         <field reporter:label="Queue ID" name="id" reporter:selector="name" reporter:datatype="id"/>
465                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
466                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
467                         <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
468                         <field reporter:label="Type" name="queue_type" reporter:datatype="text"/>
469                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
470                         <field reporter:label="Item Import Attribute Definition" name="item_attr_def" reporter:datatype="link"/>
471                         <field reporter:label="Match Bucket" name="match_bucket" reporter:datatype="link"/>
472                 </fields>
473                 <links>
474                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
475                         <link field="item_attr_def" reltype="has_a" key="id" map="" class="viiad"/>
476                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
477                         <link field="match_bucket" reltype="has_a" key="id" map="" class="cbreb"/>
478                 </links>
479                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
480                         <actions>
481                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
482                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
483                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
484                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
485                         </actions>
486                 </permacrud>
487         </class>
488
489         <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">
490                 <fields oils_persist:primary="code">
491                         <field reporter:label="Error Code" name="code" reporter:selector="description" reporter:datatype="id"/>
492                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
493                 </fields>
494                 <links>
495                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
496                         <link field="item_attr_def" reltype="has_a" key="id" map="" class="viiad"/>
497                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
498                 </links>
499                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
500                         <actions>
501                                 <retrieve/>
502                         </actions>
503                 </permacrud>
504         </class>
505
506         <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">
507                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_record_id_seq">
508                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
509                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
510                         <field reporter:label="Import Time" name="import_time" reporter:datatype="timestamp"/>
511                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
512                         <field reporter:label="Queue" name="queue" reporter:datatype="link"/>
513                         <field reporter:label="Bib Source" name="bib_source" reporter:datatype="link"/>
514                         <field reporter:label="Final Target Record" name="imported_as" reporter:datatype="link"/>
515                         <field reporter:label="Import Error" name="import_error" reporter:datatype="link"/>
516                         <field reporter:label="Import Error Detail" name="error_detail" reporter:datatype="text"/>
517                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
518                         <field reporter:label="Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link"/>
519                         <field reporter:label="Matches" name="matches" oils_persist:virtual="true" reporter:datatype="link"/>
520                         <field reporter:label="Import Items" name="import_items" oils_persist:virtual="true" reporter:datatype="link"/>
521                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
522                 </fields>
523                 <links>
524                         <link field="import_error" reltype="has_a" key="code" map="" class="vie"/>
525                         <link field="queue" reltype="has_a" key="id" map="" class="vbq"/>
526                         <link field="bib_source" reltype="has_a" key="id" map="" class="cbs"/>
527                         <link field="imported_as" reltype="has_a" key="id" map="" class="bre"/>
528             <link field="attributes" reltype="has_many" key="record" map="" class="vqbra"/>
529             <link field="matches" reltype="has_many" key="queued_record" map="" class="vbm"/>
530             <link field="import_items" reltype="has_many" key="record" map="" class="vii"/>
531                 </links>
532                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
533                         <actions>
534                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
535                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
536                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
537                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
538                         </actions>
539                 </permacrud>
540         </class>
541
542         <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">
543                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.bib_attr_definition_id_seq">
544                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
545                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
546                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
547                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
548                         <field reporter:label="Remove RegExp" name="remove" reporter:datatype="text"/>
549                 </fields>
550                 <links/>
551                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
552                         <actions>
553                                 <create permission="CREATE_BIB_IMPORT_FIELD_DEF" global_required="true"/>
554                 <retrieve/>
555                                 <update permission="UPDATE_BIB_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
556                                 <delete permission="DELETE_BIB_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
557                         </actions>
558                 </permacrud>
559         </class>
560
561         <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">
562                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_bib_record_attr_id_seq">
563                         <field reporter:label="Attribute ID" name="id" reporter:datatype="id"/>
564                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
565                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
566                         <field reporter:label="Value" name="attr_value" reporter:datatype="text"/>
567                 </fields>
568                 <links>
569                         <link field="record" reltype="has_a" key="id" map="" class="vqbr"/>
570                         <link field="field" reltype="has_a" key="id" map="" class="vqbrad"/>
571                 </links>
572                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
573                         <actions>
574                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
575                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
576                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
577                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
578                         </actions>
579                 </permacrud>
580         </class>
581
582         <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">
583                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.bib_match_id_seq">
584                         <field reporter:label="Match ID" name="id" reporter:datatype="id"/>
585                         <field reporter:label="Queued Record" name="queued_record" reporter:datatype="link"/>
586                         <field reporter:label="Evergreen Record" name="eg_record" reporter:datatype="link"/>
587                         <field reporter:label="Quality" name="quality" reporter:datatype="text"/>
588                         <field reporter:label="Match Score" name="match_score" reporter:datatype="text"/>
589                 </fields>
590                 <links>
591                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
592                         <link field="eg_record" reltype="has_a" key="id" map="" class="bre"/>
593                 </links>
594                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
595                         <actions>
596                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
597                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
598                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
599                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
600                         </actions>
601                 </permacrud>
602         </class>
603
604         <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">
605                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queue_id_seq">
606                         <field reporter:label="Queue ID" name="id" reporter:selector="name" reporter:datatype="id"/>
607                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
608                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
609                         <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
610                         <field reporter:label="Type" name="queue_type" reporter:datatype="text"/>
611                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
612                 </fields>
613                 <links>
614                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
615                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
616                 </links>
617                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
618                         <actions>
619                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
620                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
621                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
622                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
623                         </actions>
624                 </permacrud>
625         </class>
626
627         <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">
628                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_record_id_seq">
629                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
630                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
631                         <field reporter:label="Import Time" name="import_time" reporter:datatype="timestamp"/>
632                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
633                         <field reporter:label="Queue" name="queue" reporter:datatype="link"/>
634                         <field reporter:label="Final Target Record" name="imported_as" reporter:datatype="link"/>
635                         <field reporter:label="Import Error" name="import_error" reporter:datatype="link"/>
636                         <field reporter:label="Import Error Detail" name="error_detail" reporter:datatype="text"/>
637                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
638                         <field reporter:label="Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link"/>
639                         <field reporter:label="Matches" name="matches" oils_persist:virtual="true" reporter:datatype="link"/>
640                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
641                 </fields>
642                 <links>
643                         <link field="import_error" reltype="has_a" key="code" map="" class="vie"/>
644                         <link field="queue" reltype="has_a" key="id" map="" class="vaq"/>
645                         <link field="imported_as" reltype="has_a" key="id" map="" class="are"/>
646             <link field="attributes" reltype="has_many" key="record" map="" class="vqara"/>
647             <link field="matches" reltype="has_many" key="queued_record" map="" class="vam"/>
648                 </links>
649                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
650                         <actions>
651                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
652                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
653                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
654                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
655                         </actions>
656                 </permacrud>
657         </class>
658
659         <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">
660                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.authority_attr_definition_id_seq">
661                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
662                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
663                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
664                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
665                         <field reporter:label="Remove RegExp" name="remove" reporter:datatype="text"/>
666                 </fields>
667                 <links/>
668                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
669                         <actions>
670                                 <create permission="CREATE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
671                 <retrieve/>
672                                 <update permission="UPDATE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
673                                 <delete permission="DELETE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
674                         </actions>
675                 </permacrud>
676         </class>
677
678         <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">
679                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_authority_record_attr_id_seq">
680                         <field reporter:label="Attribute ID" name="id" reporter:datatype="id"/>
681                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
682                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
683                         <field reporter:label="Value" name="attr_value" reporter:datatype="text"/>
684                 </fields>
685                 <links>
686                         <link field="record" reltype="has_a" key="id" map="" class="vqar"/>
687                         <link field="field" reltype="has_a" key="id" map="" class="vqarad"/>
688                 </links>
689                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
690                         <actions>
691                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
692                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
693                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
694                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
695                         </actions>
696                 </permacrud>
697         </class>
698
699         <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">
700                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.authority_match_id_seq">
701                         <field reporter:label="Match ID" name="id" reporter:datatype="id"/>
702                         <field reporter:label="Queued Record" name="queued_record" reporter:datatype="link"/>
703                         <field reporter:label="Evergreen Record" name="eg_record" reporter:datatype="link"/>
704                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
705                         <field reporter:label="Match Score" name="match_score" reporter:datatype="text"/>
706                 </fields>
707                 <links>
708                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqar"/>
709                         <link field="eg_record" reltype="has_a" key="id" map="" class="are"/>
710                 </links>
711                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
712                         <actions>
713                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
714                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
715                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
716                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
717                         </actions>
718                 </permacrud>
719         </class>
720
721         <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">
722                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.match_set_id_seq">
723                         <field reporter:label="Match Set ID" name="id" reporter:datatype="id" reporter:selector="name"/>
724                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
725                         <field reporter:label="Owning Library" name="owner" reporter:datatype="link"/>
726                         <field reporter:label="Match Set Type" name="mtype" reporter:datatype="text"/>
727                 </fields>
728                 <links>
729                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
730                 </links>
731                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
732                         <actions>
733                                 <create permission="ADMIN_IMPORT_MATCH_SET" context_field="owner"/>
734                                 <retrieve permission="ADMIN_IMPORT_MATCH_SET VIEW_IMPORT_MATCH_SET" context_field="owner"/>
735                                 <update permission="ADMIN_IMPORT_MATCH_SET" context_field="owner"/>
736                                 <delete permission="ADMIN_IMPORT_MATCH_SET" context_field="owner"/>
737                         </actions>
738                 </permacrud>
739         </class>
740
741         <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">
742                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.match_set_point_id_seq">
743                         <field reporter:label="Match Definition ID" name="id" reporter:datatype="id"/>
744                         <field reporter:label="Expression Tree Parent" name="parent" reporter:datatype="link"/>
745                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
746                         <field reporter:label="Boolean Operator" name="bool_op" reporter:datatype="text"/>
747                         <field reporter:label="Coded Field" name="svf" reporter:datatype="link"/>
748                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
749                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
750             <field reporter:label="Negate" name="negate"  reporter:datatype="bool"/>
751                         <field reporter:label="Importance" name="quality" reporter:datatype="int"/>
752                         <field reporter:label="Expression Tree Children" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
753                         <field reporter:label="Authority Heading" name="heading" reporter:datatype="bool"/>
754                 </fields>
755                 <links>
756                         <link field="parent" reltype="has_a" key="id" map="" class="vmsp"/>
757                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
758                         <link field="svf" reltype="has_a" key="id" map="" class="crad"/>
759                         <link field="children" reltype="has_many" key="parent" map="" class="vmsp"/>
760                 </links>
761                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
762                         <actions>
763                                 <create permission="ADMIN_IMPORT_MATCH_SET">
764                     <context link="match_set" field="owner"/>
765                                 </create>
766                                 <retrieve permission="ADMIN_IMPORT_MATCH_SET VIEW_IMPORT_MATCH_SET">
767                     <context link="match_set" field="owner"/>
768                                 </retrieve>
769                                 <update permission="ADMIN_IMPORT_MATCH_SET">
770                     <context link="match_set" field="owner"/>
771                                 </update>
772                                 <delete permission="ADMIN_IMPORT_MATCH_SET">
773                     <context link="match_set" field="owner"/>
774                                 </delete>
775                         </actions>
776                 </permacrud>
777         </class>
778
779         <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">
780                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.match_set_quality_id_seq">
781                         <field reporter:label="Quality Metric ID" name="id" reporter:datatype="id"/>
782                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
783                         <field reporter:label="Record Attribute" name="svf" reporter:datatype="text"/>
784                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
785                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
786                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
787                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
788                 </fields>
789                 <links>
790                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
791                 </links>
792                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
793                         <actions>
794                                 <create permission="ADMIN_IMPORT_MATCH_SET">
795                     <context link="match_set" field="owner"/>
796                                 </create>
797                                 <retrieve permission="ADMIN_IMPORT_MATCH_SET">
798                     <context link="match_set" field="owner"/>
799                                 </retrieve>
800                                 <update permission="ADMIN_IMPORT_MATCH_SET">
801                     <context link="match_set" field="owner"/>
802                                 </update>
803                                 <delete permission="ADMIN_IMPORT_MATCH_SET">
804                     <context link="match_set" field="owner"/>
805                                 </delete>
806                         </actions>
807                 </permacrud>
808         </class>
809
810         <class id="vst" controller="open-ils.cstore open-ils.pcrud" 
811                 oils_obj:fieldmapper="vandelay::session_tracker" 
812                 oils_persist:tablename="vandelay.session_tracker" 
813                 reporter:label="Vandelay Session Tracker">
814                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.session_tracker_id_seq">
815                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
816                         <field reporter:label="Session Key" name="session_key" reporter:datatype="text"/>
817                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
818                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
819                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
820                         <field reporter:label="Record Type" name="record_type" reporter:datatype="text"/>
821                         <!-- queue doesn't use datatype 'link' because it may refer to a bib
822                                          queue or an auth queue and there's no IDL class for vandelay.queue .
823                                          parent table.
824                         -->
825                         <field reporter:label="Source Queue" name="queue" reporter:datatype="int"/>
826                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestsamp"/>
827                         <field reporter:label="Update Time" name="update_time" reporter:datatype="timestsamp"/>
828                         <field reporter:label="State" name="state" reporter:datatype="text"/>
829                         <field reporter:label="Action Type" name="action_type" reporter:datatype="text"/>
830                         <field reporter:label="Total Actions" name="total_actions" reporter:datatype="int"/>
831                         <field reporter:label="Actions Performed" name="actions_performed" reporter:datatype="int"/>
832                 </fields>
833                 <links>
834                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
835                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
836                 </links>
837                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
838                         <actions>
839                                 <!-- created by the API -->
840                                 <retrieve global_required="true"
841                                         permission="CREATE_BIB_IMPORT_QUEUE CREATE_AUTHORITY_IMPORT_QUEUE"/>
842                                 <update global_required="true"
843                                         permission="UPDATE_BIB_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE">
844                                         <context link="workstation" field="owning_lib"/>
845                                 </update>
846                                 <delete 
847                                         permission="DELETE_BIB_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE">
848                                         <context link="workstation" field="owning_lib"/>
849                                 </delete>
850                         </actions>
851                 </permacrud>
852         </class>
853
854         <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">
855                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_org_unit_opt_in_id_seq">
856                         <field reporter:label="Opt-in ID" name="id" reporter:datatype="id"/>
857                         <field reporter:label="Workstation" name="opt_in_ws" reporter:datatype="link"/>
858                         <field reporter:label="Staff Member" name="staff" reporter:datatype="link"/>
859                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
860                         <field reporter:label="Allowed Org Unit" name="org_unit" reporter:datatype="link"/>
861                         <field reporter:label="Opt-in Date/Time" name="opt_in_ts" reporter:datatype="timestamp"/>
862                 </fields>
863                 <links>
864                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
865                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
866                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
867                         <link field="opt_in_ws" reltype="has_a" key="id" map="" class="aws"/>
868                 </links>
869         </class>
870
871     <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">
872         <fields oils_persist:primary="name">
873             <field reporter:label="Name" name="name" reporter:datatype="text"/>
874             <field reporter:label="Label" name="label"  reporter:datatype="text" oils_persist:i18n="true"/>
875             <field reporter:label="Value" name="value"  reporter:datatype="text"/>
876             <field reporter:label="Enabled" name="enabled"  reporter:datatype="bool"/>
877         </fields>
878         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
879             <actions>
880                 <create   permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
881                 <retrieve permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
882                 <update   permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
883                 <delete   permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
884             </actions>
885         </permacrud>
886     </class>
887
888     <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">
889         <fields oils_persist:primary="id">
890             <field reporter:label="ID" name="id" reporter:datatype="id"/>
891             <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
892             <field reporter:label="Description" name="description"  reporter:datatype="text" oils_persist:i18n="true"/>
893             <field reporter:label="Function" name="func"  reporter:datatype="text"/>
894             <field reporter:label="Required Parameter Count" name="param_count"  reporter:datatype="int"/>
895         </fields>
896         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
897             <actions>
898                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
899                 <retrieve/>
900                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
901                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
902             </actions>
903         </permacrud>
904     </class>
905
906         <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">
907                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_index_norm_map_id_seq">
908                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
909                         <field reporter:label="Metabib Field" name="field" reporter:datatype="link"/>
910                         <field reporter:label="Normalizer" name="norm" reporter:datatype="link"/>
911                         <field reporter:label="Parameters (JSON Array)" name="params" reporter:datatype="text"/>
912                         <field reporter:label="Order of Application" name="pos" reporter:datatype="int"/>
913                 </fields>
914                 <links>
915                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
916                         <link field="norm" reltype="has_a" key="id" map="" class="cin"/>
917                 </links>
918         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
919             <actions>
920                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
921                 <retrieve/>
922                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
923                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
924             </actions>
925         </permacrud>
926         </class>
927
928         <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">
929                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc_format_id_seq">
930                         <field reporter:label="ID"   name="id" reporter:datatype="id" reporter:selector="name" />
931                         <field reporter:label="Code" name="code" reporter:datatype="text" oils_obj:required="true"/>
932                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true"/>
933         </fields>
934         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
935             <actions>
936                 <create permission="ADMIN_TAG_TABLE" global_required="true"/>
937                 <retrieve/>
938                 <update permission="ADMIN_TAG_TABLE" global_required="true"/>
939                 <delete permission="ADMIN_TAG_TABLE" global_required="true"/>
940             </actions>
941         </permacrud>
942         </class>
943
944         <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">
945                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc_field_id_seq">
946                         <field reporter:label="ID"   name="id" reporter:datatype="id"/>
947                         <field reporter:label="MARC Format" name="marc_format" reporter:datatype="link" oils_obj:required="true"/>
948                         <field reporter:label="MARC Record Type" name="marc_record_type" reporter:datatype="text" oils_obj:required="true" />
949                         <field reporter:label="MARC Tag" name="tag" reporter:datatype="text" oils_obj:required="true"/>
950                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
951                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
952                         <field reporter:label="Fixed Field?" name="fixed_field" reporter:datatype="bool"/>
953                         <field reporter:label="Repeatable?" name="repeatable" reporter:datatype="bool"/>
954                         <field reporter:label="Mandatory?" name="mandatory" reporter:datatype="bool"/>
955                         <field reporter:label="Hidden?" name="hidden" reporter:datatype="bool"/>
956                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit"/>
957         </fields>
958                 <links>
959                         <link field="marc_format" reltype="has_a" key="id" map="" class="cmrcfmt"/>
960                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
961         </links>
962         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
963             <actions>
964                 <create permission="ADMIN_TAG_TABLE" context_field="owner"/>
965                 <retrieve/>
966                 <update permission="ADMIN_TAG_TABLE" context_field="owner"/>
967                 <delete permission="ADMIN_TAG_TABLE" context_field="owner"/>
968             </actions>
969         </permacrud>
970         </class>
971
972         <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">
973                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc_subfield_id_seq">
974                         <field reporter:label="ID"   name="id" reporter:datatype="id"/>
975                         <field reporter:label="MARC Format" name="marc_format" reporter:datatype="link" oils_obj:required="true"/>
976                         <field reporter:label="MARC Record Type" name="marc_record_type" reporter:datatype="text" oils_obj:required="true"/>
977                         <field reporter:label="MARC Tag" name="tag" reporter:datatype="text" oils_obj:required="true"/>
978                         <field reporter:label="MARC Subfield" name="code" reporter:datatype="text" oils_obj:required="true"/>
979                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
980                         <field reporter:label="Repeatable?" name="repeatable" reporter:datatype="bool"/>
981                         <field reporter:label="Mandatory?" name="mandatory" reporter:datatype="bool"/>
982                         <field reporter:label="Hidden?" name="hidden" reporter:datatype="bool"/>
983                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit"/>
984         </fields>
985                 <links>
986                         <link field="marc_format" reltype="has_a" key="id" map="" class="cmrcfmt"/>
987                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
988         </links>
989         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
990             <actions>
991                 <create permission="ADMIN_TAG_TABLE" context_field="owner"/>
992                 <retrieve/>
993                 <update permission="ADMIN_TAG_TABLE" context_field="owner"/>
994                 <delete permission="ADMIN_TAG_TABLE" context_field="owner"/>
995             </actions>
996         </permacrud>
997         </class>
998
999         <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">
1000                 <fields oils_persist:primary="name">
1001                         <field reporter:label="Name" name="name" reporter:datatype="id" reporter:selector="label"  oils_obj:required="true"/>
1002                         <field reporter:label="Label" name="label" reporter:datatype="text"  oils_obj:required="true" oils_persist:i18n="true"/>
1003                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
1004                         <field reporter:label="Multi-valued?" name="multi" reporter:datatype="bool"/>
1005                         <field reporter:label="Filter?" name="filter" reporter:datatype="bool"/>
1006                         <field reporter:label="Sorter?" name="sorter" reporter:datatype="bool"/>
1007                         <field reporter:label="Composite attribute?" name="composite" reporter:datatype="bool"/>
1008                         <field reporter:label="MARC Tag" name="tag" reporter:datatype="text"/>
1009                         <field reporter:label="MARC Subfields" name="sf_list" reporter:datatype="text"/>
1010                         <field reporter:label="Joiner" name="joiner" reporter:datatype="text"/>
1011                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
1012                         <field reporter:label="Format" name="format" reporter:datatype="link"/>
1013                         <field reporter:label="Starting Position" name="start_pos" reporter:datatype="int"/>
1014                         <field reporter:label="String Length" name="string_len" reporter:datatype="int"/>
1015                         <field reporter:label="Fixed Field" name="fixed_field" reporter:datatype="text"/>
1016                         <field reporter:label="Physical Characteristic" name="phys_char_sf" reporter:datatype="text"/>
1017                         <field reporter:label="Vocabulary URI" name="vocabulary" reporter:datatype="text"/>
1018                         <field reporter:label="Normalizers" name="normalizers" reporter:datatype="link" oils_persist:virtual="true"/>
1019                 </fields>
1020                 <links>
1021                         <link field="format" reltype="has_a" key="name" map="" class="cxt"/>
1022                         <link field="normalizers" reltype="has_many" key="name" map="" class="crainm"/>
1023                 </links>
1024         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1025             <actions>
1026                 <create permission="ADMIN_SVF" global_required="true"/>
1027                 <retrieve/>
1028                 <update permission="ADMIN_SVF" global_required="true"/>
1029                 <delete permission="ADMIN_SVF" global_required="true"/>
1030             </actions>
1031         </permacrud>
1032         </class>
1033
1034         <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">
1035                 <fields oils_persist:primary="id" oils_persist:sequence="config.sms_carrier_id_seq">
1036                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
1037                         <field reporter:label="Region" name="region" reporter:datatype="text" oils_persist:i18n="true"/>
1038                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1039             <field reporter:label="Active" name="active" reporter:datatype="bool"/>
1040                         <field reporter:label="Email Gateway" name="email_gateway" reporter:datatype="text" oils_persist:i18n="true"/>
1041                 </fields>
1042                 <links/>
1043         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1044             <actions>
1045                 <create permission="ADMIN_SMS_CARRIER" global_required="true"/>
1046                 <retrieve/>
1047                 <update permission="ADMIN_SMS_CARRIER" global_required="true"/>
1048                 <delete permission="ADMIN_SMS_CARRIER" global_required="true"/>
1049             </actions>
1050         </permacrud>
1051         </class>
1052
1053         <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">
1054                 <fields oils_persist:primary="coded_value">
1055                         <field reporter:label="Coded Value" name="coded_value" reporter:datatype="id" oils_obj:required="true"/>
1056                         <field reporter:label="Defintion" name="definition" reporter:datatype="text"  oils_obj:required="true"/>
1057                 </fields>
1058                 <links>
1059                         <link field="coded_value" reltype="has_a" key="id" map="" class="ccvm"/>
1060                 </links>
1061         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1062             <actions>
1063                 <create permission="ADMIN_CODED_VALUE" global_required="true"/>
1064                 <retrieve/>
1065                 <update permission="ADMIN_CODED_VALUE" global_required="true"/>
1066                 <delete permission="ADMIN_CODED_VALUE" global_required="true"/>
1067             </actions>
1068         </permacrud>
1069         </class>
1070
1071         <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">
1072                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.uncontrolled_record_attr_value_id_seq">
1073                         <field reporter:label="ID" name="id" reporter:datatype="id" oils_obj:required="true"/>
1074                         <field reporter:label="Attribute" name="attr" reporter:datatype="text"  oils_obj:required="true"/>
1075                         <field reporter:label="Value" name="value" reporter:datatype="text"  oils_obj:required="true"/>
1076                 </fields>
1077                 <links>
1078                         <link field="attr" reltype="has_a" key="name" map="" class="crad"/>
1079                 </links>
1080         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1081             <actions>
1082                 <retrieve/>
1083             </actions>
1084         </permacrud>
1085         </class>
1086
1087
1088         <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">
1089                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.record_sorter_id_seq">
1090                         <field reporter:label="ID" name="id" reporter:datatype="id" oils_obj:required="true"/>
1091                         <field reporter:label="Bib Record ID" name="source" reporter:datatype="int" oils_obj:required="true"/>
1092                         <field reporter:label="Attribute" name="attr" reporter:datatype="text"  oils_obj:required="true"/>
1093                         <field reporter:label="Value" name="value" reporter:datatype="text"  oils_obj:required="true"/>
1094                 </fields>
1095                 <links>
1096                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
1097                         <link field="attr" reltype="has_a" key="name" map="" class="crad"/>
1098                 </links>
1099         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1100             <actions>
1101                 <retrieve/>
1102             </actions>
1103         </permacrud>
1104         </class>
1105
1106
1107         <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">
1108                 <fields oils_persist:primary="source">
1109                         <field reporter:label="Record ID" name="source" reporter:datatype="id" oils_obj:required="true"/>
1110                         <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 -->
1111                 </fields>
1112                 <links>
1113                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
1114                 </links>
1115         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1116             <actions>
1117                 <retrieve/>
1118             </actions>
1119         </permacrud>
1120         </class>
1121
1122         <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">
1123                 <fields>
1124                         <field reporter:label="Record ID" name="id" reporter:datatype="id" oils_obj:required="true"/>
1125                         <field reporter:label="Attribute" name="attr" reporter:datatype="text"  oils_obj:required="true"/>
1126                         <field reporter:label="Value" name="value" reporter:datatype="text"  oils_obj:required="true"/>
1127                 </fields>
1128                 <links>
1129                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
1130                 </links>
1131         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1132             <actions>
1133                 <retrieve/>
1134             </actions>
1135         </permacrud>
1136         </class>
1137
1138         <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">
1139                 <fields oils_persist:primary="id">
1140                         <field reporter:label="Record ID" name="id" reporter:datatype="id" oils_obj:required="true"/>
1141                         <field reporter:label="Attributes" name="attrs" reporter:datatype="text"  oils_obj:required="true"/>
1142                 </fields>
1143                 <links>
1144                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
1145                 </links>
1146         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1147             <actions>
1148                 <retrieve/>
1149             </actions>
1150         </permacrud>
1151         </class>
1152
1153         <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">
1154                 <fields oils_persist:primary="id" oils_persist:sequence="config.record_attr_index_norm_map_id_seq">
1155                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
1156                         <field reporter:label="SVF Attribute" name="attr" reporter:datatype="link"/>
1157                         <field reporter:label="Normalizer" name="norm" reporter:datatype="link"/>
1158                         <field reporter:label="Parameters (JSON Array)" name="params" reporter:datatype="text"/>
1159                         <field reporter:label="Order of Application" name="pos" reporter:datatype="int"/>
1160                 </fields>
1161                 <links>
1162                         <link field="attr" reltype="has_a" key="name" map="" class="crad"/>
1163                         <link field="norm" reltype="has_a" key="id" map="" class="cin"/>
1164                 </links>
1165         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1166             <actions>
1167                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
1168                 <retrieve/>
1169                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
1170                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
1171             </actions>
1172         </permacrud>
1173         </class>
1174
1175         <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">
1176                 <fields oils_persist:primary="id" oils_persist:sequence="config.coded_value_map_id_seq">
1177                         <field reporter:label="ID" name="id" reporter:datatype="id"  oils_obj:required="true" reporter:selector="value"/>
1178                         <field reporter:label="SVF Attribute" name="ctype" reporter:datatype="link"  oils_obj:required="true"/>
1179                         <field reporter:label="Code" name="code" reporter:datatype="text"  oils_obj:required="true"/>
1180                         <field reporter:label="Value" name="value" reporter:datatype="text"  oils_obj:required="true" oils_persist:i18n="true"/>
1181                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1182                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
1183                         <field reporter:label="Search Label" name="search_label" reporter:datatype="text" oils_persist:i18n="true"/>
1184             <field reporter:label="Is Simple Selector" name="is_simple" reporter:datatype="bool"/>
1185             <field reporter:label="Concept URI" name="concept_uri" reporter:datatype="text"/>
1186             <field reporter:label="Composite Definition" name="composite_def" oils_persist:virtual="true" reporter:datatype="link"/>
1187                 </fields>
1188                 <links>
1189                         <link field="ctype" reltype="has_a" key="name" map="" class="crad"/>
1190                         <link field="composite_def" reltype="might_have" key="coded_value" map="" class="ccraed"/>
1191                 </links>
1192         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1193             <actions>
1194                 <create permission="ADMIN_CODED_VALUE" global_required="true"/>
1195                 <retrieve/>
1196                 <update permission="ADMIN_CODED_VALUE" global_required="true"/>
1197                 <delete permission="ADMIN_CODED_VALUE" global_required="true"/>
1198             </actions>
1199         </permacrud>
1200         </class>
1201
1202         <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">
1203                 <fields oils_persist:primary="id" oils_persist:sequence="config.remote_account_id_seq">
1204                         <field name="id"            reporter:datatype="id"   reporter:label="ID"/>
1205                         <field name="label"         reporter:datatype="text" reporter:label="Label"/>
1206                         <field name="host"          reporter:datatype="text" reporter:label="Host"/>
1207                         <field name="username"      reporter:datatype="text" reporter:label="Username"/>
1208                         <field name="password"      reporter:datatype="text" reporter:label="Password"/>
1209                         <field name="account"       reporter:datatype="text" reporter:label="Account"/>
1210                         <field name="path"          reporter:datatype="text" reporter:label="Path"/>
1211                         <field name="owner"         reporter:datatype="link" reporter:label="Owner"/>
1212                         <field name="last_activity" reporter:datatype="timestamp" reporter:label="Last Activity"/>
1213                 </fields>
1214                 <links>
1215                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
1216                 </links>
1217         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1218             <actions>
1219                 <create   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
1220                 <retrieve permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
1221                 <update   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
1222                 <delete   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
1223             </actions>
1224         </permacrud>
1225         </class>
1226
1227     <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">
1228         <fields oils_persist:primary="name">
1229             <field reporter:label="Z39.50 Source" name="name" reporter:datatype="id"/>
1230             <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1231             <field reporter:label="Host" name="host"  reporter:datatype="text"/>
1232             <field reporter:label="Port" name="port"  reporter:datatype="int"/>
1233             <field reporter:label="DB" name="db"  reporter:datatype="text"/>
1234             <field reporter:label="Record Format" name="record_format"  reporter:datatype="text"/>
1235             <field reporter:label="Transmission Format" name="transmission_format"  reporter:datatype="text"/>
1236             <field reporter:label="Auth" name="auth"  reporter:datatype="bool"/>
1237             <field reporter:label="Attrs" name="attrs" oils_persist:virtual="true"  reporter:datatype="link" config_field="true"/>
1238             <field reporter:label="Use Permission" name="use_perm"  reporter:datatype="link"/>
1239         </fields>
1240         <links>
1241             <link field="attrs" reltype="has_many" key="source" map="" class="cza"/>
1242             <link field="use_perm" reltype="has_a" key="id" map="" class="ppl"/>
1243         </links>
1244         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1245             <actions>
1246                 <create permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1247                 <retrieve/>
1248                 <update permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1249                 <delete permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1250             </actions>
1251         </permacrud>
1252     </class>
1253
1254     <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">
1255         <fields oils_persist:primary="id" oils_persist:sequence="config.z3950_attr_id_seq">
1256             <field reporter:label="Z39.50 Attribute ID" name="id" reporter:datatype="id" reporter:selector="label"/>
1257             <field reporter:label="Z39.50 Source" name="source" reporter:datatype="link" config_field="true"/>
1258             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1259             <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1260             <field reporter:label="Code" name="code"  reporter:datatype="int"/>
1261             <field reporter:label="Format" name="format"  reporter:datatype="int"/>
1262             <field reporter:label="Truncation" name="truncation"  reporter:datatype="int"/>
1263         </fields>
1264         <links>
1265             <link field="source" reltype="has_a" key="name" map="" class="czs"/>
1266         </links>
1267         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1268             <actions>
1269                 <create permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1270                 <retrieve/>
1271                 <update permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1272                 <delete permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1273             </actions>
1274         </permacrud>
1275     </class>
1276
1277     <class id="czifm" controller="open-ils.cstore open-ils.pcrud" 
1278                         oils_obj:fieldmapper="config::z3950_index_field_map" 
1279                         oils_persist:tablename="config.z3950_index_field_map" 
1280                         reporter:label="Z39.50 Index Field Map">
1281         <fields oils_persist:primary="id" oils_persist:sequence="config.z3950_index_field_map_id_seq">
1282             <field reporter:label="Map ID" name="id" reporter:datatype="id"/>
1283             <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1284             <field reporter:label="Metabib Field" name="metabib_field" reporter:datatype="link"/>
1285             <field reporter:label="Record Attribute" name="record_attr" reporter:datatype="link"/>
1286             <field reporter:label="Z39.50 Attribute" name="z3950_attr"  reporter:datatype="link"/>
1287             <field reporter:label="Z39.50 Attribute Type" name="z3950_attr_type" reporter:datatype="text"/>
1288         </fields>
1289         <links>
1290             <link field="metabib_field" reltype="has_a" key="id" map="" class="cmf"/>
1291             <link field="record_attr" reltype="has_a" key="name" map="" class="crad"/>
1292             <link field="z3950_attr" reltype="has_a" key="id" map="" class="cza"/>
1293         </links>
1294         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1295             <actions>
1296                 <create permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1297                 <retrieve/>
1298                 <update permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1299                 <delete permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1300             </actions>
1301         </permacrud>
1302     </class>
1303
1304
1305         <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">
1306                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_output_id_seq">
1307                         <field reporter:label="Output ID" name="id" reporter:datatype="id"/>
1308                         <field reporter:label="Create Date/Time" name="create_time" reporter:datatype="timestamp"/>
1309                         <field reporter:label="Data" name="data" reporter:datatype="text"/>
1310                         <field reporter:label="Is Error" name="is_error" reporter:datatype="bool"/>
1311                         <field reporter:label="Events" name="events" oils_persist:virtual="true"  reporter:datatype="link"/>
1312                         <field reporter:label="Error Events" name="error_events" oils_persist:virtual="true"  reporter:datatype="link"/>
1313                 </fields>
1314                 <links>
1315             <link field="events" reltype="has_many" key="template_output" map="" class="atev"/>
1316             <link field="error_events" reltype="has_many" key="error_output" map="" class="atev"/>
1317                 </links>
1318                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1319                         <actions>
1320                                 <retrieve/>
1321                                 <delete permission="ADMIN_TRIGGER_TEMPLATE_OUTPUT DELETE_TRIGGER_TEMPLATE_OUTPUT" global_required="true"/>
1322                         </actions>
1323                 </permacrud>
1324         </class>
1325
1326         <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">
1327                 <fields oils_persist:primary="key">
1328                         <field reporter:label="Hook Key" name="key" reporter:datatype="text" reporter:selector="key"/>
1329                         <field reporter:label="Core Type" name="core_type" reporter:datatype="text"/>
1330                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1331                         <field reporter:label="Passive" name="passive"  reporter:datatype="bool"/>
1332                 </fields>
1333                 <links/>
1334                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1335                         <actions>
1336                                 <create permission="ADMIN_TRIGGER_HOOK CREATE_TRIGGER_HOOK" global_required="true"/>
1337                                 <retrieve/>
1338                                 <update permission="ADMIN_TRIGGER_HOOK UPDATE_TRIGGER_HOOK" global_required="true"/>
1339                                 <delete permission="ADMIN_TRIGGER_HOOK DELETE_TRIGGER_HOOK" global_required="true"/>
1340                         </actions>
1341                 </permacrud>
1342         </class>
1343
1344         <class id="atcol" controller="open-ils.cstore" oils_obj:fieldmapper="action_trigger::collector" oils_persist:tablename="action_trigger.collector" reporter:label="Trigger Environment Collector">
1345                 <fields oils_persist:primary="module">
1346                         <field reporter:label="Module Name" name="module" reporter:datatype="text" reporter:selector="module"/>
1347                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1348                 </fields>
1349                 <links/>
1350         </class>
1351
1352         <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">
1353                 <fields oils_persist:primary="module">
1354                         <field reporter:label="Module Name" name="module" reporter:datatype="text" reporter:selector="module"/>
1355                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1356                 </fields>
1357                 <links/>
1358                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1359                         <actions>
1360                                 <create permission="ADMIN_TRIGGER_VALIDATOR CREATE_TRIGGER_VALIDATOR" global_required="true"/>
1361                                 <retrieve/>
1362                                 <update permission="ADMIN_TRIGGER_VALIDATOR UPDATE_TRIGGER_VALIDATOR" global_required="true"/>
1363                                 <delete permission="ADMIN_TRIGGER_VALIDATOR DELETE_TRIGGER_VALIDATOR" global_required="true"/>
1364                         </actions>
1365                 </permacrud>
1366         </class>
1367
1368         <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">
1369                 <fields oils_persist:primary="module">
1370                         <field reporter:label="Module Name" name="module" reporter:datatype="text" reporter:selector="module"/>
1371                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1372                 </fields>
1373                 <links/>
1374                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1375                         <actions>
1376                                 <create permission="ADMIN_TRIGGER_REACTOR CREATE_TRIGGER_REACTOR" global_required="true"/>
1377                                 <retrieve/>
1378                                 <update permission="ADMIN_TRIGGER_REACTOR UPDATE_TRIGGER_REACTOR" global_required="true"/>
1379                                 <delete permission="ADMIN_TRIGGER_REACTOR DELETE_TRIGGER_REACTOR" global_required="true"/>
1380                         </actions>
1381                 </permacrud>
1382         </class>
1383
1384         <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">
1385                 <fields oils_persist:primary="module">
1386                         <field reporter:label="Module Name" name="module" reporter:datatype="text" reporter:selector="module"/>
1387                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1388                 </fields>
1389                 <links/>
1390                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1391                         <actions>
1392                                 <create permission="ADMIN_TRIGGER_CLEANUP CREATE_TRIGGER_CLEANUP" global_required="true"/>
1393                                 <retrieve/>
1394                                 <update permission="ADMIN_TRIGGER_CLEANUP UPDATE_TRIGGER_CLEANUP" global_required="true"/>
1395                                 <delete permission="ADMIN_TRIGGER_CLEANUP DELETE_TRIGGER_CLEANUP" global_required="true"/>
1396                         </actions>
1397                 </permacrud>
1398         </class>
1399
1400         <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">
1401                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.environment_id_seq">
1402                         <field reporter:label="Environment ID" name="id" reporter:datatype="id"/>
1403                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
1404                         <field reporter:label="Field Path" name="path" reporter:datatype="text"/>
1405                         <field reporter:label="Collector" name="collector" reporter:datatype="link"/>
1406                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
1407                 </fields>
1408                 <links>
1409                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
1410                         <link field="collector" reltype="has_a" key="id" map="" class="atcol"/>
1411                 </links>
1412                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1413                         <actions>
1414                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF">
1415                     <context link="event_def" field="owner"/>
1416                 </create>
1417                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF">
1418                     <context link="event_def" field="owner"/>
1419                 </retrieve>
1420                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF">
1421                     <context link="event_def" field="owner"/>
1422                 </update>
1423                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF">
1424                     <context link="event_def" field="owner"/>
1425                 </delete>
1426                         </actions>
1427                 </permacrud>
1428         </class>
1429
1430         <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">
1431                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_definition_id_seq">
1432                         <field reporter:label="Definition ID" name="id" reporter:datatype="id"/>
1433                         <field reporter:label="Enabled" name="active" reporter:datatype="bool"/>
1434                         <field reporter:label="Owning Library" name="owner"  reporter:datatype="org_unit"/>
1435                         <field reporter:label="Hook" name="hook"  reporter:datatype="link"/>
1436                         <field reporter:label="Validator" name="validator"  reporter:datatype="link"/>
1437                         <field reporter:label="Reactor" name="reactor"  reporter:datatype="link"/>
1438                         <field reporter:label="Success Cleanup" name="cleanup_success"  reporter:datatype="link"/>
1439                         <field reporter:label="Failure Cleanup" name="cleanup_failure"  reporter:datatype="link"/>
1440                         <field reporter:label="Processing Delay" name="delay"  reporter:datatype="interval"/>
1441                         <field reporter:label="Max Event Validity Delay" name="max_delay"  reporter:datatype="interval"/>
1442                         <field reporter:label="Processing Delay Context Field" name="delay_field"  reporter:datatype="text"/>
1443                         <field reporter:label="Processing Group Context Field" name="group_field"  reporter:datatype="text"/>
1444                         <field reporter:label="Template" name="template"  reporter:datatype="text"/>
1445                         <field reporter:label="Name" name="name"  reporter:datatype="text"/>
1446                         <field reporter:label="Granularity" name="granularity"  reporter:datatype="text"/>
1447                         <field reporter:label="Opt-In User Field" name="usr_field"  reporter:datatype="text"/>
1448                         <field reporter:label="Opt-In Setting Type" name="opt_in_setting"  reporter:datatype="link"/>
1449                         <field reporter:label="Event Repeatability Delay" name="repeat_delay"  reporter:datatype="interval"/>
1450                         <field reporter:label="Message Template" name="message_template" reporter:datatype="text"/>
1451                         <field reporter:label="Message Title" name="message_title" reporter:datatype="text"/>
1452                         <field reporter:label="Message User Path" name="message_usr_path" reporter:datatype="text"/>
1453                         <field reporter:label="Message Library Path" name="message_library_path" reporter:datatype="text"/>
1454                         <field reporter:label="Environment Entries" name="env" oils_persist:virtual="true"  reporter:datatype="link"/>
1455                         <field reporter:label="Parameters" name="params" oils_persist:virtual="true"  reporter:datatype="link"/>
1456                         <field reporter:label="Retention Interval" name="retention_interval" reporter:datatype="interval"/>
1457                 </fields>
1458                 <links>
1459                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
1460                         <link field="hook" reltype="has_a" key="key" map="" class="ath"/>
1461                         <link field="validator" reltype="has_a" key="module" map="" class="atval"/>
1462                         <link field="reactor" reltype="has_a" key="module" map="" class="atreact"/>
1463                         <link field="cleanup_success" reltype="has_a" key="module" map="" class="atclean"/>
1464                         <link field="cleanup_failure" reltype="has_a" key="module" map="" class="atclean"/>
1465                         <link field="env" reltype="has_many" key="event_def" map="" class="atenv"/>
1466                         <link field="params" reltype="has_many" key="event_def" map="" class="atevparam"/>
1467                         <link field="opt_in_setting" reltype="has_a" key="name" map="" class="cust"/>
1468                 </links>
1469                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1470                         <actions>
1471                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF" context_field="owner"/>
1472                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF" context_field="owner"/>
1473                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF" context_field="owner"/>
1474                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF" context_field="owner"/>
1475                         </actions>
1476                 </permacrud>
1477         </class>
1478
1479         <class id="atevdefg" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action_trigger::event_def_group" oils_persist:tablename="action_trigger.event_def_group" reporter:label="Trigger Event Definition Group" oils_persist:restrict_primary="100">
1480                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_def_group_id_seq">
1481                         <field reporter:label="Group ID" name="id" reporter:datatype="id"/>
1482                         <field reporter:label="Enabled" name="active" reporter:datatype="bool"/>
1483                         <field reporter:label="Owning Library" name="owner"  reporter:datatype="org_unit"/>
1484                         <field reporter:label="Hook" name="hook"  reporter:datatype="link"/>
1485                         <field reporter:label="Name" name="name"  reporter:datatype="text"/>
1486                         <field reporter:label="Members" name="members" oils_persist:virtual="true" reporter:datatype="link"/>
1487                 </fields>
1488                 <links>
1489                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
1490                         <link field="hook" reltype="has_a" key="key" map="" class="ath"/>
1491                         <link field="members" reltype="has_many" key="grp" map="" class="atevdefgm"/>
1492                 </links>
1493                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1494                         <actions>
1495                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF" context_field="owner"/>
1496                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF" context_field="owner"/>
1497                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF" context_field="owner"/>
1498                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF" context_field="owner"/>
1499                         </actions>
1500                 </permacrud>
1501         </class>
1502
1503         <class id="atevdefgm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action_trigger::event_def_group_member" oils_persist:tablename="action_trigger.event_def_group_member" reporter:label="Trigger Event Definition Group Member">
1504                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_def_group_member_id_seq">
1505                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
1506                         <field reporter:label="Name" name="name"  reporter:datatype="text"/>
1507                         <field reporter:label="Group" name="grp"  reporter:datatype="link"/>
1508                         <field reporter:label="Event Definition" name="event_def"  reporter:datatype="link"/>
1509                         <field reporter:label="Sortable" name="sortable" reporter:datatype="bool"/>
1510                         <field reporter:label="Include Holdings" name="holdings" reporter:datatype="bool"/>
1511                         <field reporter:label="Externally Processed" name="external" reporter:datatype="bool"/>
1512                 </fields>
1513                 <links>
1514                         <link field="grp" reltype="has_a" key="id" map="" class="atevdefg"/>
1515                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
1516                 </links>
1517                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1518                         <actions>
1519                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF">
1520                     <context link="grp" field="owner"/>
1521                 </create>
1522                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF">
1523                     <context link="grp" field="owner"/>
1524                 </retrieve>
1525                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF">
1526                     <context link="grp" field="owner"/>
1527                 </update>
1528                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF">
1529                     <context link="grp" field="owner"/>
1530                 </delete>
1531                         </actions>
1532                 </permacrud>
1533         </class>
1534
1535         <class id="atev" controller="open-ils.cstore" oils_obj:fieldmapper="action_trigger::event" oils_persist:tablename="action_trigger.event" reporter:label="Trigger Event Entry">
1536                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_id_seq">
1537                         <field reporter:label="Event ID" name="id" reporter:datatype="id"/>
1538                         <field reporter:label="Target ID" name="target" reporter:datatype="int"/>
1539                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
1540                         <field reporter:label="Add Time" name="add_time" reporter:datatype="timestamp"/>
1541                         <field reporter:label="Run Time" name="run_time" reporter:datatype="timestamp"/>
1542                         <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
1543                         <field reporter:label="Update Time" name="update_time" reporter:datatype="timestamp"/>
1544                         <field reporter:label="Complete Time" name="complete_time" reporter:datatype="timestamp"/>
1545                         <field reporter:label="State" name="state" reporter:datatype="text"/>
1546                         <field reporter:label="User Data" name="user_data" reporter:datatype="text"/>
1547                         <field reporter:label="Template Output" name="template_output" reporter:datatype="link"/>
1548                         <field reporter:label="Error Output" name="error_output" reporter:datatype="text"/>
1549                         <field reporter:label="Asynchronous Output" name="async_output" reporter:datatype="link"/>
1550                         <field reporter:label="Update Process" name="update_process" reporter:datatype="int"/>
1551                 </fields>
1552                 <links>
1553                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
1554                         <link field="template_output" reltype="has_a" key="id" map="" class="ateo"/>
1555                         <link field="error_output" reltype="has_a" key="id" map="" class="ateo"/>
1556                         <link field="async_output" reltype="has_a" key="id" map="" class="ateo"/>
1557                 </links>
1558         </class>
1559
1560         <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">
1561                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_params_id_seq">
1562                         <field reporter:label="Parameter ID" name="id" reporter:datatype="id"/>
1563                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
1564                         <field reporter:label="Parameter Name" name="param" reporter:datatype="text"/>
1565                         <field reporter:label="Parameter Value" name="value" reporter:datatype="text"/>
1566                 </fields>
1567                 <links>
1568                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
1569                 </links>
1570                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1571                         <actions>
1572                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF">
1573                     <context link="event_def" field="owner"/>
1574                 </create>
1575                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF">
1576                     <context link="event_def" field="owner"/>
1577                 </retrieve>
1578                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF">
1579                     <context link="event_def" field="owner"/>
1580                 </update>
1581                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF">
1582                     <context link="event_def" field="owner"/>
1583                 </delete>
1584                         </actions>
1585                 </permacrud>
1586         </class>
1587
1588         <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">
1589                 <oils_persist:source_definition><![CDATA[
1590                 SELECT  atevdef.hook,
1591                         atevdef.name,
1592                         atevdef.reactor,
1593                         atev.id,
1594                         atev.event_def,
1595                         atev.add_time,
1596                         atev.run_time,
1597                         atev.start_time,
1598                         atev.update_time,
1599                         atev.complete_time,
1600                         atev.update_process,
1601                         atev.state,
1602                         atev.user_data,
1603                         atev.template_output,
1604                         atev.error_output,
1605                         atev.async_output,
1606                         targ_circ.id AS target_circ,
1607                         targ_ahr.id AS target_hold,
1608                         COALESCE(
1609                                 targ_circ.circ_lib,
1610                                 targ_ahr.pickup_lib
1611                         ) AS perm_lib
1612                 FROM action_trigger.event atev
1613                 JOIN action_trigger.event_definition atevdef ON
1614                         (atevdef.id = atev.event_def)
1615                 JOIN action_trigger.hook ath ON
1616                         (ath.key = atevdef.hook)
1617                 LEFT JOIN action.circulation targ_circ ON
1618                         (ath.core_type = 'circ' AND targ_circ.id = atev.target)
1619                 LEFT JOIN action.hold_request targ_ahr ON
1620                         (ath.core_type = 'ahr' AND targ_ahr.id = atev.target)
1621                 WHERE atev.add_time > NOW() - (SELECT MIN(value) FROM (
1622                         SELECT value::INTERVAL FROM actor.org_unit_ancestor_setting(
1623                                 'circ.staff.max_visible_event_age',
1624                                 COALESCE(targ_circ.circ_lib, targ_ahr.pickup_lib)
1625                         ) UNION
1626                         SELECT '1000 YEARS'::INTERVAL AS value
1627                 ) ous)
1628                 ]]></oils_persist:source_definition>
1629                 <fields oils_persist:primary="id">
1630                         <field reporter:label="Hook" name="hook" reporter:datatype="link" />
1631                         <field reporter:label="Name" name="name" reporter:datatype="text" />
1632                         <field reporter:label="Reactor" name="reactor" reporter:datatype="text" />
1633                         <field reporter:label="Event ID" name="id" reporter:datatype="id" />
1634                         <field reporter:label="Event Definition ID" name="event_def" reporter:datatype="int" />
1635                         <field reporter:label="Event Add Time" name="add_time" reporter:datatype="timestamp" />
1636                         <field reporter:label="Event Run Time" name="run_time" reporter:datatype="timestamp" />
1637                         <field reporter:label="Event Start Time" name="start_time" reporter:datatype="timestamp" />
1638                         <field reporter:label="Event Update Time" name="update_time" reporter:datatype="timestamp" />
1639                         <field reporter:label="Event Complete Time" name="complete_time" reporter:datatype="timestamp" />
1640                         <field reporter:label="Event Update PID" name="update_process" reporter:datatype="int" />
1641                         <field reporter:label="Event State" name="state" reporter:datatype="text" />
1642                         <field reporter:label="Event User Data" name="user_data" reporter:datatype="text" />
1643                         <field reporter:label="Event Template Output" name="template_output" reporter:datatype="link" />
1644                         <field reporter:label="Event Error Output" name="error_output" reporter:datatype="link" />
1645                         <field reporter:label="Event Async Output" name="async_output" reporter:datatype="link" />
1646                         <field reporter:label="Target Circulation" name="target_circ" reporter:datatype="link" />
1647                         <field reporter:label="Target Hold" name="target_hold" reporter:datatype="link" />
1648                         <field reporter:label="Permission Context" name="perm_lib" reporter:datatype="org_unit" />
1649                 </fields>
1650                 <links>
1651                         <link field="hook" reltype="has_a" key="key" map="" class="ath" />
1652                         <link field="template_output" reltype="has_a" key="id" map="" class="ateo" />
1653                         <link field="error_output" reltype="has_a" key="id" map="" class="ateo" />
1654                         <link field="async_output" reltype="has_a" key="id" map="" class="ateo" />
1655                         <link field="target_circ" reltype="has_a" key="id" map="" class="circ" />
1656                         <link field="target_hold" reltype="has_a" key="id" map="" class="ahr" />
1657                         <link field="perm_lib" reltype="has_a" key="id" map="" class="aou" />
1658                 </links>
1659                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1660                         <actions>
1661                                 <retrieve permission="VIEW_TRIGGER_EVENT" context_field="perm_lib" />
1662                         </actions>
1663                 </permacrud>
1664         </class>
1665
1666         <class id="aws" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::workstation" oils_persist:tablename="actor.workstation" reporter:label="Workstation">
1667                 <fields oils_persist:primary="id" oils_persist:sequence="actor.workstation_id_seq">
1668                         <field reporter:label="Workstation ID" name="id" reporter:datatype="id"/>
1669                         <field reporter:label="Workstation Name" name="name" reporter:datatype="text"/>
1670                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
1671                         <field reporter:label="Toolbars" name="toolbars" oils_persist:virtual="true" reporter:datatype="link"/>
1672                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
1673                 </fields>
1674                 <links>
1675                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
1676                         <link field="toolbars" reltype="has_many" key="ws" map="" class="atb"/>
1677                         <link field="circulations" reltype="has_many" key="workstation" map="" class="circ"/>
1678                 </links>
1679                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1680                         <actions>
1681                                 <retrieve permission="STAFF_LOGIN" context_field="owning_lib" />
1682                         </actions>
1683                 </permacrud>
1684         </class>
1685
1686         <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">
1687                 <fields oils_persist:primary="code">
1688                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1689                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1690                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1691                         <field reporter:label="SIP2 Media Type" name="sip2_media_type" reporter:datatype="text" oils_persist:i18n="true"/>
1692                         <field reporter:label="Magnetic Media" name="magnetic_media" reporter:datatype="bool"/>
1693                         <field reporter:label="Average Wait Time" name="avg_wait_time" reporter:datatype="interval"/>
1694                 </fields>
1695                 <links/>
1696         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1697             <actions>
1698                 <create permission="ADMIN_CIRC_MOD" global_required="true"/>
1699                 <retrieve/>
1700                 <update permission="ADMIN_CIRC_MOD" global_required="true"/>
1701                 <delete permission="ADMIN_CIRC_MOD" global_required="true"/>
1702             </actions>
1703         </permacrud>
1704         </class>
1705
1706         <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">
1707                 <fields oils_persist:primary="code">
1708                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1709                         <field reporter:label="Label" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1710                         <field reporter:label="Prorate?" name="prorate" reporter:datatype="bool"/>
1711                         <field reporter:label="Blanket?" name="blanket" reporter:datatype="bool"/>
1712                 </fields>
1713                 <links/>
1714         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1715             <actions>
1716                 <create permission="CREATE_INVOICE_ITEM_TYPE" global_required="true"/>
1717                 <retrieve/>
1718                 <update permission="UPDATE_INVOICE_ITEM_TYPE" global_required="true"/>
1719                 <delete permission="DELETE_INVOICE_ITEM_TYPE" global_required="true"/>
1720             </actions>
1721         </permacrud>
1722         </class>
1723
1724         <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">
1725                 <fields oils_persist:primary="code">
1726                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1727                         <field reporter:label="Label" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1728                 </fields>
1729                 <links/>
1730         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1731             <actions>
1732                 <create permission="ADMIN_INVOICE_METHOD CREATE_INVOICE_METHOD" global_required="true"/>
1733                 <retrieve/>
1734                 <update permission="ADMIN_INVOICE_METHOD UPDATE_INVOICE_METHOD" global_required="true"/>
1735                 <delete permission="ADMIN_INVOICE_METHOD DELETE_INVOICE_METHOD" global_required="true"/>
1736             </actions>
1737         </permacrud>
1738         </class>
1739
1740         <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">
1741                 <fields oils_persist:primary="code">
1742                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1743                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1744                 </fields>
1745                 <links/>
1746         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1747             <actions>
1748                 <create permission="CREATE_COPY_BTYPE" global_required="true"/>
1749                 <retrieve/>
1750                 <update permission="UPDATE_COPY_BTYPE" global_required="true"/>
1751                 <delete permission="DELETE_COPY_BTYPE" global_required="true"/>
1752             </actions>
1753         </permacrud>
1754         </class>
1755
1756         <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">
1757                 <fields oils_persist:primary="code">
1758                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1759                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1760                 </fields>
1761                 <links/>
1762         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1763             <actions>
1764                 <create permission="CREATE_CN_BTYPE" global_required="true"/>
1765                 <retrieve/>
1766                 <update permission="UPDATE_CN_BTYPE" global_required="true"/>
1767                 <delete permission="DELETE_CN_BTYPE" global_required="true"/>
1768             </actions>
1769         </permacrud>
1770         </class>
1771
1772         <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">
1773                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.peer_type_id_seq">
1774                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
1775                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1776                 </fields>
1777                 <links/>
1778         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1779             <actions>
1780                 <create permission="CREATE_BIB_PTYPE" global_required="true"/>
1781                 <retrieve/>
1782                 <update permission="UPDATE_BIB_PTYPE" global_required="true"/>
1783                 <delete permission="DELETE_BIB_PTYPE" global_required="true"/>
1784             </actions>
1785         </permacrud>
1786         </class>
1787
1788         <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">
1789                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.peer_bib_copy_map_id_seq">
1790                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
1791                         <field reporter:label="Peer Type" name="peer_type" reporter:datatype="link"/>
1792                         <field reporter:label="Peer Record" name="peer_record" reporter:datatype="link"/>
1793                         <field reporter:label="Target Copy" name="target_copy" reporter:datatype="link"/>
1794                 </fields>
1795         <links>
1796             <link field="peer_type" reltype="has_a" key="id" map="" class="bpt"/>
1797             <link field="peer_record" reltype="has_a" key="id" map="" class="bre"/>
1798             <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
1799         </links>
1800         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1801             <actions>
1802                 <create permission="UPDATE_COPY">
1803                     <context link="target_copy" field="circ_lib"/>
1804                 </create>
1805                 <retrieve/>
1806                 <update permission="UPDATE_COPY">
1807                     <context link="target_copy" field="circ_lib"/>
1808                 </update>
1809                 <delete permission="UPDATE_COPY">
1810                     <context link="target_copy" field="circ_lib"/>
1811                 </delete>
1812             </actions>
1813         </permacrud>
1814         </class>
1815
1816         <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">
1817                 <fields oils_persist:primary="code">
1818                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1819                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1820                 </fields>
1821                 <links/>
1822         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1823             <actions>
1824                 <create permission="CREATE_BIB_BTYPE" global_required="true"/>
1825                 <retrieve/>
1826                 <update permission="UPDATE_BIB_BTYPE" global_required="true"/>
1827                 <delete permission="DELETE_BIB_BTYPE" global_required="true"/>
1828             </actions>
1829         </permacrud>
1830         </class>
1831
1832         <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">
1833                 <fields oils_persist:primary="code">
1834                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1835                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1836                 </fields>
1837                 <links/>
1838         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1839             <actions>
1840                 <create permission="CREATE_USER_BTYPE" global_required="true"/>
1841                 <retrieve/>
1842                 <update permission="UPDATE_USER_BTYPE" global_required="true"/>
1843                 <delete permission="DELETE_USER_BTYPE" global_required="true"/>
1844             </actions>
1845         </permacrud>
1846         </class>
1847
1848         <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">
1849                 <fields oils_persist:primary="code">
1850                         <field reporter:label="Code" name="code" reporter:selector="value" reporter:datatype="id"/>
1851                         <field reporter:label="Format" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
1852                 </fields>
1853                 <links/>
1854         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1855             <actions>
1856                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
1857                 <retrieve/>
1858                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
1859                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
1860             </actions>
1861         </permacrud>
1862         </class>
1863
1864     <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">
1865         <fields oils_persist:primary="id" oils_persist:sequence="config.hold_matrix_weights_id_seq">
1866             <field reporter:label="Hold Weights ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1867             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1868             <field reporter:label="User Home Library" name="user_home_ou" reporter:datatype="float"/>
1869             <field reporter:label="Request Library" name="request_ou" reporter:datatype="float"/>
1870             <field reporter:label="Pickup Library" name="pickup_ou" reporter:datatype="float"/>
1871             <field reporter:label="Owning Library" name="item_owning_ou" reporter:datatype="float"/>
1872             <field reporter:label="Item Circ Library" name="item_circ_ou" reporter:datatype="float"/>
1873             <field reporter:label="User Permission Group" name="usr_grp" reporter:datatype="float"/>
1874             <field reporter:label="Requestor Permission Group" name="requestor_grp" reporter:datatype="float"/>
1875             <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="float"/>
1876             <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="float"/>
1877             <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="float"/>
1878             <field reporter:label="MARC Bib Level" name="marc_bib_level" oils_persist:primitive="string" reporter:datatype="float"/>
1879             <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="float"/>
1880             <field reporter:label="Juvenile?" name="juvenile_flag" oils_persist:primitive="string" reporter:datatype="float"/>
1881             <field reporter:label="Reference?" name="ref_flag" reporter:datatype="float"/>
1882             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="float"/>
1883         </fields>
1884         <links/>
1885         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1886             <actions>
1887                 <create permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1888                 <retrieve/>
1889                 <update permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1890                 <delete permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1891             </actions>
1892         </permacrud>
1893     </class>
1894
1895     <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">
1896         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_weights_id_seq">
1897             <field reporter:label="Circ Weights ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1898             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1899             <field reporter:label="Renewal?" name="is_renewal" reporter:datatype="float"/>
1900             <field reporter:label="Org Unit" name="org_unit" reporter:datatype="float"/>
1901             <field reporter:label="Copy Circ Lib" name="copy_circ_lib" reporter:datatype="float"/>
1902             <field reporter:label="Copy Owning Lib" name="copy_owning_lib" reporter:datatype="float"/>
1903             <field reporter:label="User Home Lib" name="user_home_ou" reporter:datatype="float"/>
1904             <field reporter:label="Permission Group" name="grp" reporter:datatype="float"/>
1905             <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="float"/>
1906             <field reporter:label="Copy Location" name="copy_location" reporter:datatype="float"/>
1907             <field reporter:label="MARC Type" name="marc_type" reporter:datatype="float"/>
1908             <field reporter:label="MARC Form" name="marc_form" reporter:datatype="float"/>
1909             <field reporter:label="MARC Bib Level" name="marc_bib_level" reporter:datatype="float"/>
1910             <field reporter:label="Videorecording Format" name="marc_vr_format" reporter:datatype="float"/>
1911             <field reporter:label="Reference?" name="ref_flag" reporter:datatype="float"/>
1912             <field reporter:label="Juvenile?" name="juvenile_flag" reporter:datatype="float"/>
1913             <field reporter:label="User Age: Lower Bound" name="usr_age_lower_bound" reporter:datatype="float"/>
1914             <field reporter:label="User Age: Upper Bound" name="usr_age_upper_bound" reporter:datatype="float"/>
1915             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="float"/>
1916         </fields>
1917         <links/>
1918         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1919             <actions>
1920                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1921                 <retrieve/>
1922                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1923                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1924             </actions>
1925         </permacrud>
1926     </class>
1927
1928     <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">
1929         <fields oils_persist:primary="id" oils_persist:sequence="config.weight_assoc_id_seq">
1930             <field reporter:label="Assoc ID" name="id" reporter:datatype="id"/>
1931             <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
1932             <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
1933             <field reporter:label="Circ Weights" name="circ_weights" reporter:datatype="link"/>
1934             <field reporter:label="Hold Weights" name="hold_weights" reporter:datatype="link"/>
1935         </fields>
1936         <links>
1937             <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1938             <link field="circ_weights" reltype="has_a" key="id" map="" class="ccmw"/>
1939             <link field="hold_weights" reltype="has_a" key="id" map="" class="chmw"/>
1940         </links>
1941         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1942             <actions>
1943                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1944                 <retrieve permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT VIEW_CIRC_MATRIX_MATCHPOINT VIEW_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1945                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1946                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1947             </actions>
1948         </permacrud>
1949     </class>
1950
1951         <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">
1952                 <fields oils_persist:primary="id" oils_persist:sequence="config.hold_matrix_matchpoint_id_seq">
1953                         <field reporter:label="Matchpoint ID" name="id" reporter:datatype="id"/>
1954                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
1955                         <field reporter:label="Strict OU matches?" name="strict_ou_match" reporter:datatype="bool"/>
1956                         <field reporter:label="User Home Library" name="user_home_ou" reporter:datatype="org_unit"/>
1957                         <field reporter:label="Request Library" name="request_ou" reporter:datatype="org_unit"/>
1958                         <field reporter:label="Pickup Library" name="pickup_ou" reporter:datatype="org_unit"/>
1959                         <field reporter:label="Owning Library" name="item_owning_ou" reporter:datatype="org_unit"/>
1960                         <field reporter:label="Item Circ Library" name="item_circ_ou" reporter:datatype="org_unit"/>
1961                         <field reporter:label="User Permission Group" name="usr_grp" reporter:datatype="link"/>
1962                         <field reporter:label="Requestor Permission Group" name="requestor_grp" reporter:datatype="link"/>
1963                         <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="link"/>
1964                         <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="link"/>
1965                         <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="link"/>
1966                         <field reporter:label="MARC Bib Level" name="marc_bib_level" oils_persist:primitive="string" reporter:datatype="link"/>
1967                         <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="link"/>
1968                         <field reporter:label="Reference?" name="ref_flag" reporter:datatype="bool"/>
1969             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="text"/>
1970                         <field reporter:label="Holdable?" name="holdable" reporter:datatype="bool"/>
1971                         <field reporter:label="Range is from Owning Lib?" name="distance_is_from_owner" reporter:datatype="bool"/>
1972                         <field reporter:label="Transit Range" name="transit_range" reporter:datatype="link"/>
1973                         <field reporter:label="Max Holds" name="max_holds" reporter:datatype="int"/>
1974                         <field reporter:label="Max includes Frozen" name="include_frozen_holds" reporter:datatype="bool"/>
1975                         <field reporter:label="Copy Age Hold Protection Rule" name="age_hold_protect_rule" reporter:datatype="link"/>
1976                         <field name="description" reporter:datatype="text" reporter:label="Description"/>
1977                 </fields>
1978                 <links>
1979                         <link field="user_home_ou" reltype="has_a" key="id" map="" class="aou"/>
1980                         <link field="request_ou" reltype="has_a" key="id" map="" class="aou"/>
1981                         <link field="pickup_ou" reltype="has_a" key="id" map="" class="aou"/>
1982                         <link field="item_owning_ou" reltype="has_a" key="id" map="" class="aou"/>
1983                         <link field="item_circ_ou" reltype="has_a" key="id" map="" class="aou"/>
1984                         <link field="usr_grp" reltype="has_a" key="id" map="" class="pgt"/>
1985                         <link field="requestor_grp" reltype="has_a" key="id" map="" class="pgt"/>
1986                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
1987                         <link field="marc_type" reltype="has_a" key="code" map="" class="citm"/>
1988                         <link field="marc_form" reltype="has_a" key="code" map="" class="cifm"/>
1989                         <link field="marc_bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
1990                         <link field="marc_vr_format" reltype="has_a" key="code" map="" class="cvrfm"/>
1991                         <link field="age_hold_protect_rule" reltype="has_a" key="id" map="" class="crahp"/>
1992             <link field="transit_range" reltype="has_a" key="id" map="" class="aout"/>
1993                 </links>
1994         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1995             <actions>
1996                 <create permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1997                 <retrieve permission="ADMIN_HOLD_MATRIX_MATCHPOINT VIEW_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1998                 <update permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1999                 <delete permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
2000             </actions>
2001         </permacrud>
2002         </class>
2003
2004         <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">
2005                 <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_matchpoint_id_seq">
2006                         <field reporter:label="Matchpoint ID" name="id" reporter:datatype="id"/>
2007                         <field reporter:label="Renewal?" name="is_renewal" reporter:datatype="bool"/>
2008                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
2009                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit" oils_obj:required="true"/>
2010                         <field reporter:label="Copy Circ Lib" name="copy_circ_lib" reporter:datatype="org_unit"/>
2011                         <field reporter:label="Copy Owning Lib" name="copy_owning_lib" reporter:datatype="org_unit"/>
2012                         <field reporter:label="User Home Lib" name="user_home_ou" reporter:datatype="org_unit"/>
2013                         <field reporter:label="Permission Group" name="grp" reporter:datatype="link" oils_obj:required="true"/>
2014                         <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="link"/>
2015                         <field reporter:label="Copy Location" name="copy_location" reporter:datatype="link"/>
2016                         <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="link"/>
2017                         <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="link"/>
2018                         <field reporter:label="MARC Bib Level" name="marc_bib_level" oils_persist:primitive="string" reporter:datatype="link"/>
2019                         <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="link"/>
2020                         <field reporter:label="Reference?" name="ref_flag" reporter:datatype="bool"/>
2021             <field reporter:label="Juvenile?" name="juvenile_flag" reporter:datatype="bool"/>
2022                         <field reporter:label="User Age: Lower Bound" name="usr_age_lower_bound" reporter:datatype="text"/>
2023                         <field reporter:label="User Age: Upper Bound" name="usr_age_upper_bound" reporter:datatype="text"/>
2024             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="text"/>
2025                         <field reporter:label="Circulate?" name="circulate" reporter:datatype="bool"/>
2026                         <field reporter:label="Duration Rule" name="duration_rule" reporter:datatype="link"/>
2027                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
2028                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
2029             <field reporter:label="Hard Due Date" name="hard_due_date" reporter:datatype="link"/>
2030             <field reporter:label="Renewals Override" name="renewals" reporter:datatype="int"/>
2031             <field reporter:label="Grace Period Override" name="grace_period" reporter:datatype="interval"/>
2032                         <field reporter:label="Script Test" name="script_test" reporter:datatype="text"/>
2033                         <field name="total_copy_hold_ratio" reporter:datatype="float" reporter:label="Minimum Total Copy/Hold Ratio"/>
2034                         <field name="available_copy_hold_ratio" reporter:datatype="float" reporter:label="Minimum Available Copy/Hold Ratio"/>
2035                         <field name="description" reporter:datatype="text" reporter:label="Description"/>
2036                 </fields>
2037                 <links>
2038                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
2039                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
2040                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2041                         <link field="user_home_ou" reltype="has_a" key="id" map="" class="aou"/>
2042                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
2043                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
2044                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
2045                         <link field="marc_type" reltype="has_a" key="code" map="" class="citm"/>
2046                         <link field="marc_form" reltype="has_a" key="code" map="" class="cifm"/>
2047                         <link field="marc_bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
2048                         <link field="marc_vr_format" reltype="has_a" key="code" map="" class="cvrfm"/>
2049                         <link field="duration_rule" reltype="has_a" key="id" map="" class="crcd"/>
2050                         <link field="max_fine_rule" reltype="has_a" key="id" map="" class="crmf"/>
2051                         <link field="recurring_fine_rule" reltype="has_a" key="id" map="" class="crrf"/>
2052             <link field="hard_due_date" reltype="has_a" key="id" map="" class="chdd"/>
2053                 </links>
2054         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2055             <actions>
2056                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
2057                 <retrieve permission="ADMIN_CIRC_MATRIX_MATCHPOINT VIEW_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
2058                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
2059                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
2060             </actions>
2061         </permacrud>
2062         </class>
2063
2064     <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">
2065         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_group_id_seq">
2066             <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2067             <field reporter:label="Name" name="name" reporter:datatype="text"/>
2068             <field reporter:label="Description" name="description" reporter:datatype="text"/>
2069         </fields>
2070         <links/>
2071         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2072             <actions>
2073                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
2074                 <retrieve/>
2075                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
2076                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
2077             </actions>
2078         </permacrud>
2079     </class>
2080
2081     <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">
2082         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_id_seq">
2083             <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2084             <field reporter:label="Name" name="name" reporter:datatype="text"/>
2085             <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
2086             <field reporter:label="Items Out" name="items_out" reporter:datatype="int"/>
2087             <field reporter:label="Min Depth" name="depth" reporter:datatype="int"/>
2088             <field reporter:label="Global" name="global" reporter:datatype="bool"/>
2089             <field reporter:label="Description" name="description" reporter:datatype="text"/>
2090         </fields>
2091         <links>
2092             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2093         </links>
2094         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2095             <actions>
2096                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field="owning_lib"/>
2097                 <retrieve/>
2098                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field="owning_lib"/>
2099                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field="owning_lib"/>
2100             </actions>
2101         </permacrud>
2102     </class>
2103
2104     <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">
2105         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_limit_set_map_id_seq">
2106             <field reporter:label="ID" name="id" reporter:datatype="id"/>
2107             <field reporter:label="Matchpoint" name="matchpoint" reporter:datatype="link"/>
2108             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
2109             <field reporter:label="Fallthrough" name="fallthrough" reporter:datatype="bool"/>
2110             <field reporter:label="Active" name="active" reporter:datatype="bool"/>
2111         </fields>
2112         <links>
2113             <link field="matchpoint" reltype="has_a" key="id" map="" class="ccmm"/>
2114             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
2115         </links>
2116         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2117             <actions>
2118                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2119                     <context link="matchpoint" field="org_unit"/>
2120                 </create>
2121                 <retrieve/>
2122                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2123                     <context link="matchpoint" field="org_unit"/>
2124                 </update>
2125                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2126                     <context link="matchpoint" field="org_unit"/>
2127                 </delete>
2128             </actions>
2129         </permacrud>
2130     </class>
2131
2132     <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">
2133         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_circ_mod_map_id_seq">
2134             <field reporter:label="ID" name="id" reporter:datatype="id"/>
2135             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
2136             <field reporter:label="Circulation Modifier" name="circ_mod" reporter:datatype="link"/>
2137         </fields>
2138         <links>
2139             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
2140             <link field="circ_mod" reltype="has_a" key="code" map="" class="ccm"/>
2141         </links>
2142         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2143             <actions>
2144                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2145                     <context link="limit_set" field="owning_lib"/>
2146                 </create>
2147                 <retrieve/>
2148                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2149                     <context link="limit_set" field="owning_lib"/>
2150                 </update>
2151                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2152                     <context link="limit_set" field="owning_lib"/>
2153                 </delete>
2154             </actions>
2155         </permacrud>
2156     </class>
2157     <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">
2158         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_copy_loc_map_id_seq">
2159             <field reporter:label="ID" name="id" reporter:datatype="id"/>
2160             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
2161             <field reporter:label="Copy Location" name="copy_loc" reporter:datatype="link"/>
2162         </fields>
2163         <links>
2164             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
2165             <link field="copy_loc" reltype="has_a" key="id" map="" class="acpl"/>
2166         </links>
2167         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2168             <actions>
2169                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2170                     <context link="limit_set" field="owning_lib"/>
2171                 </create>
2172                 <retrieve/>
2173                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2174                     <context link="limit_set" field="owning_lib"/>
2175                 </update>
2176                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2177                     <context link="limit_set" field="owning_lib"/>
2178                 </delete>
2179             </actions>
2180         </permacrud>
2181     </class>
2182
2183     <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">
2184         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_group_map_id_seq">
2185             <field reporter:label="ID" name="id" reporter:datatype="id"/>
2186             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
2187             <field reporter:label="Limit Group" name="limit_group" reporter:datatype="link"/>
2188             <field reporter:label="Check Only" name="check_only" reporter:datatype="bool"/>
2189         </fields>
2190         <links>
2191             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
2192             <link field="limit_group" reltype="has_a" key="id" map="" class="cclg"/>
2193         </links>
2194         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2195             <actions>
2196                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2197                     <context link="limit_set" field="owning_lib"/>
2198                 </create>
2199                 <retrieve/>
2200                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2201                     <context link="limit_set" field="owning_lib"/>
2202                 </update>
2203                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2204                     <context link="limit_set" field="owning_lib"/>
2205                 </delete>
2206             </actions>
2207         </permacrud>
2208     </class>
2209
2210         <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">
2211                 <fields oils_persist:primary="id" oils_persist:sequence="config.identification_type_id_seq">
2212                         <field reporter:label="Identification ID" name="id" reporter:selector="name" reporter:datatype="id"/>
2213                         <field reporter:label="Identification Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
2214                 </fields>
2215                 <links/>
2216         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2217             <actions>
2218                 <create permission="ADMIN_IDENT_TYPE" global_required="true"/>
2219                 <retrieve/>
2220                 <update permission="ADMIN_IDENT_TYPE" global_required="true"/>
2221                 <delete permission="ADMIN_IDENT_TYPE" global_required="true"/>
2222             </actions>
2223         </permacrud>
2224         </class>
2225
2226         <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">
2227                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_question_id_seq">
2228                         <field reporter:label="Answers" name="answers" oils_persist:virtual="true" reporter:datatype="link"/>
2229                         <field reporter:label="Responses" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
2230                         <field reporter:label="Question ID" name="id" reporter:datatype="id" />
2231                         <field reporter:label="Question" name="question" reporter:datatype="text"/>
2232                         <field reporter:label="Survey" name="survey" reporter:datatype="link"/>
2233                 </fields>
2234                 <links>
2235                         <link field="survey" reltype="has_a" key="id" map="" class="asv"/>
2236                         <link field="responses" reltype="has_many" key="question" map="" class="asvr"/>
2237                         <link field="answers" reltype="has_many" key="question" map="" class="asva"/>
2238                 </links>
2239         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2240             <actions>
2241                 <create permission="ADMIN_SURVEY">
2242                     <context link="survey" field="owner"/>
2243                 </create>
2244                 <retrieve/>
2245                 <update permission="ADMIN_SURVEY">
2246                     <context link="survey" field="owner"/>
2247                 </update>
2248                 <delete permission="ADMIN_SURVEY">
2249                     <context link="survey" field="owner"/>
2250                 </delete>
2251             </actions>
2252         </permacrud>
2253         </class>
2254         <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">
2255                 <fields oils_persist:primary="id" oils_persist:sequence="">
2256                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
2257                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id"/>
2258                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
2259                         <field reporter:label="Last Billing Timestamp" name="last_billing_ts" reporter:datatype="timestamp"/>
2260                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
2261                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
2262                         <field reporter:label="Last Payment Timestamp" name="last_payment_ts" reporter:datatype="timestamp"/>
2263                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
2264                         <field reporter:label="Total Owed" name="total_owed" reporter:datatype="money"/>
2265                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
2266                         <field reporter:label="Billed User" name="usr" reporter:datatype="link"/>
2267                         <field reporter:label="Transaction Finish Time" name="xact_finish" reporter:datatype="timestamp" />
2268                         <field reporter:label="Transaction Start Time" name="xact_start" reporter:datatype="timestamp" />
2269                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
2270                 </fields>
2271                 <links>
2272                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2273                 </links>
2274                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2275                         <actions>
2276                                 <retrieve permission="VIEW_USER_TRANSACTIONS">
2277                                         <context link="usr" field="home_ou" />
2278                                 </retrieve>
2279                         </actions>
2280                 </permacrud>
2281         </class>
2282         <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">
2283                 <fields oils_persist:primary="id" oils_persist:sequence="">
2284                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
2285                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id"/>
2286                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
2287                         <field reporter:label="Last Billing Timestamp" name="last_billing_ts" reporter:datatype="timestamp"/>
2288                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
2289                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
2290                         <field reporter:label="Last Payment Timestamp" name="last_payment_ts" reporter:datatype="timestamp"/>
2291                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
2292                         <field reporter:label="Total Owed" name="total_owed" reporter:datatype="money"/>
2293                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
2294                         <field reporter:label="Billed User" name="usr" reporter:datatype="link"/>
2295                         <field reporter:label="Transaction Finish Time" name="xact_finish" reporter:datatype="timestamp" />
2296                         <field reporter:label="Transaction Start Time" name="xact_start" reporter:datatype="timestamp" />
2297                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
2298                         <field reporter:label="Billing Location" name="billing_location" reporter:datatype="link"/>
2299                 </fields>
2300                 <links>
2301                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2302                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
2303                 </links>
2304         </class>
2305         <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">
2306                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_message_id_seq">
2307                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2308                         <field reporter:label="Read Date/Time" name="read_date" reporter:datatype="timestamp"/>
2309                         <field reporter:label="Creating Library" name="sending_lib" reporter:datatype="link"/>
2310                         <field reporter:label="Message ID" name="id" reporter:datatype="id" />
2311                         <field reporter:label="Deleted?" name="deleted" reporter:datatype="bool"/>
2312                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
2313                         <field reporter:label="User" name="usr" reporter:datatype="link" />
2314                         <field reporter:label="Message" name="message" reporter:datatype="text"/>
2315                 </fields>
2316                 <links>
2317                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2318                         <link field="sending_lib" reltype="has_a" key="id" map="" class="aou"/>
2319                 </links>
2320                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2321                         <actions> <!-- created magically, so no create action -->
2322                                 <retrieve permission="VIEW_USER" context_field="sending_lib" />
2323                                 <update permission="UPDATE_USER" context_field="sending_lib" />
2324                                 <delete permission="UPDATE_USER" context_field="sending_lib" />
2325                         </actions>
2326                 </permacrud>
2327         </class>
2328         <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)">
2329                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_message_id_seq">
2330                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2331                         <field reporter:label="Read Date/Time" name="read_date" reporter:datatype="timestamp"/>
2332                         <field reporter:label="Creating Library" name="sending_lib" reporter:datatype="link"/>
2333                         <field reporter:label="Message ID" name="id" reporter:datatype="id" />
2334                         <field reporter:label="Deleted?" name="deleted" reporter:datatype="bool"/>
2335                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
2336                         <field reporter:label="User" name="usr" reporter:datatype="link" />
2337                         <field reporter:label="Message" name="message" reporter:datatype="text"/>
2338                 </fields>
2339                 <links>
2340                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2341                         <link field="sending_lib" reltype="has_a" key="id" map="" class="aou"/>
2342                 </links>
2343                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2344                         <actions> <!-- created magically, so no create action -->
2345                                 <retrieve permission="UPDATE_USER" context_field="sending_lib" owning_user="usr"/>
2346                                 <update   permission="UPDATE_USER" context_field="sending_lib" owning_user="usr"/>
2347                         </actions>
2348                 </permacrud>
2349         </class>
2350         <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">
2351                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_note_id_seq">
2352                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2353                         <field reporter:label="Creating Staff" name="creator" reporter:datatype="link"/>
2354                         <field reporter:label="Note ID" name="id" reporter:datatype="id" />
2355                         <field reporter:label="Is OPAC Visible?" name="pub" reporter:datatype="bool"/>
2356                         <field reporter:label="Note Title" name="title" reporter:datatype="text"/>
2357                         <field reporter:label="User" name="usr" reporter:datatype="link" />
2358                         <field reporter:label="Note Content" name="value" reporter:datatype="text"/>
2359                 </fields>
2360                 <links>
2361                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2362                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2363                 </links>
2364         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2365             <actions>
2366                 <create permission="UPDATE_USER" context_field="owner">
2367                     <context link="usr" field="home_ou"/>
2368                 </create>
2369                                 <!-- note: public notes are still accessible via API -->
2370                 <retrieve permission="UPDATE_USER">
2371                     <context link="usr" field="home_ou"/>
2372                                 </retrieve>
2373                 <update permission="UPDATE_USER">
2374                     <context link="usr" field="home_ou"/>
2375                                 </update>
2376                 <delete permission="UPDATE_USER">
2377                     <context link="usr" field="home_ou"/>
2378                                 </delete>
2379             </actions>
2380         </permacrud>
2381         </class>
2382         <class id="aupw" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::usr_privacy_waiver" oils_persist:tablename="actor.usr_privacy_waiver" reporter:label="Privacy Waiver">
2383                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_privacy_waiver_id_seq">
2384                         <field reporter:label="ID" name="id" reporter:datatype="id" />
2385                         <field reporter:label="User" name="usr" reporter:datatype="link" />
2386                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2387                         <field reporter:label="Place Holds?" name="place_holds" reporter:datatype="bool" />
2388                         <field reporter:label="Pick Up Holds?" name="pickup_holds" reporter:datatype="bool" />
2389                         <field reporter:label="View Borrowing History?" name="view_history" reporter:datatype="bool" />
2390                         <field reporter:label="Check Out Items?" name="checkout_items" reporter:datatype="bool" />
2391                 </fields>
2392                 <links>
2393                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2394                 </links>
2395                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2396                         <actions>
2397                                 <create permission="UPDATE_USER">
2398                                         <context link="usr" field="home_ou"/>
2399                                 </create>
2400                                 <retrieve permission="VIEW_USER">
2401                                         <context link="usr" field="home_ou"/>
2402                                 </retrieve>
2403                                 <update permission="UPDATE_USER">
2404                                         <context link="usr" field="home_ou"/>
2405                                 </update>
2406                                 <delete permission="UPDATE_USER">
2407                                         <context link="usr" field="home_ou"/>
2408                                 </delete>
2409                         </actions>
2410                 </permacrud>
2411         </class>
2412         <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">
2413                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_password_reset_id_seq">
2414                         <field reporter:label="Request ID" name="id" reporter:datatype="id"/>
2415                         <field reporter:label="UUID" name="uuid" reporter:datatype="text"/>
2416                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
2417                         <field reporter:label="Request Time" name="request_time" reporter:datatype="timestamp"/>
2418                         <field reporter:label="Was Reset?" name="has_been_reset" reporter:datatype="bool"/>
2419                 </fields>
2420                 <links>
2421                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2422                 </links>
2423         </class>
2424         <class id="aus" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::user_setting" oils_persist:tablename="actor.usr_setting" reporter:label="User Setting">
2425                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_setting_id_seq">
2426                         <field reporter:label="Setting ID" name="id" reporter:datatype="id" />
2427                         <field reporter:label="Name" name="name" reporter:datatype="link"/>
2428                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
2429                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
2430                 </fields>
2431                 <links>
2432                         <link field="name" reltype="has_a" key="name" map="" class="cust"/>
2433                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2434                 </links>
2435                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2436                         <actions>
2437                                 <retrieve permission="VIEW_USER">
2438                                         <context link="usr" field="home_ou" />
2439                                 </retrieve>
2440                         </actions>
2441                 </permacrud>
2442         </class>
2443         <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">
2444                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.author_field_entry_id_seq">
2445                         <field name="field" reporter:datatype="link"/>
2446                         <field name="id" reporter:datatype="id" />
2447                         <field name="source" reporter:datatype="link"/>
2448                         <field name="value" reporter:datatype="text"/>
2449                 </fields>
2450                 <links>
2451                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
2452                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
2453                 </links>
2454         </class>
2455         <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">
2456                 <fields oils_persist:primary="id" oils_persist:sequence="action.in_house_use_id_seq">
2457                         <field reporter:label="Use ID" name="id" reporter:datatype="id" />
2458                         <field reporter:label="Item" name="item" reporter:datatype="int" />
2459                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
2460                         <field reporter:label="Recording Staff" name="staff" reporter:datatype="link"/>
2461                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
2462                         <field reporter:label="Use Date/Time" name="use_time" reporter:datatype="timestamp"/>
2463                 </fields>
2464                 <links>
2465                         <link field="item" reltype="has_a" key="id" map="" class="acp"/>
2466                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
2467                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
2468                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
2469                 </links>
2470                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2471                         <actions>
2472                                 <retrieve/>
2473                         </actions>
2474                 </permacrud>
2475         </class>
2476         <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">
2477                 <fields oils_persist:primary="id" oils_persist:sequence="action.non_cat_in_house_use_id_seq">
2478                         <field reporter:label="Use ID" name="id" reporter:datatype="id" />
2479                         <field reporter:label="Item Type" name="item_type" reporter:datatype="link"/>
2480                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
2481                         <field reporter:label="Recording Staff" name="staff" reporter:datatype="link"/>
2482                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
2483                         <field reporter:label="Use Date/Time" name="use_time" reporter:datatype="timestamp"/>
2484                 </fields>
2485                 <links>
2486                         <link field="item_type" reltype="has_a" key="id" map="" class="cnct"/>
2487                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
2488                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
2489                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
2490                 </links>
2491                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2492                         <actions>
2493                                 <retrieve/>
2494                         </actions>
2495                 </permacrud>
2496         </class>
2497         <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">
2498                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
2499                         <field reporter:label="Pretransit Copy Status" name="copy_status" reporter:datatype="bool"/>
2500                         <field reporter:label="Destination" name="dest" reporter:datatype="link"/>
2501                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
2502                         <field reporter:label="Transit ID" name="id" reporter:datatype="id"/>
2503                         <field reporter:label="Is Persistent? (unused)" name="persistant_transfer" reporter:datatype="bool"/>
2504                         <field reporter:label="Previous Hop (unused)" name="prev_hop" reporter:datatype="link"/>
2505                         <field reporter:label="Source" name="source" reporter:datatype="link"/>
2506                         <field reporter:label="Prev Destination" name="prev_dest" reporter:datatype="org_unit"/>
2507                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
2508                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
2509                         <field reporter:label="Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
2510                         <field reporter:label="Hold Transit" name="hold_transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
2511                 </fields>
2512                 <links>
2513                         <link field="hold_transit_copy" reltype="might_have" key="id" map="" class="ahtc"/>
2514                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
2515                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
2516                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
2517                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
2518                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
2519                 </links>
2520         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2521             <actions>
2522                 <create permission="TRANSIT_COPY" context_field="owner">
2523                     <context link="target_copy" field="circ_lib"/>
2524                 </create>
2525                 <retrieve/>
2526                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
2527                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
2528             </actions>
2529         </permacrud>
2530         </class>
2531         <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">
2532                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_response_id_seq">
2533                         <field reporter:label="Answer" name="answer" reporter:datatype="link"/>
2534                         <field reporter:label="Answer Date/Time" name="answer_date" reporter:datatype="timestamp"/>
2535                         <field reporter:label="Effective Answer Date/Time" name="effective_date" reporter:datatype="timestamp"/>
2536                         <field reporter:label="Answer ID" name="id" reporter:datatype="id" />
2537                         <field reporter:label="Question" name="question" reporter:datatype="link"/>
2538                         <field reporter:label="Response Group ID" name="response_group_id" reporter:datatype="int" />
2539                         <field reporter:label="Survey" name="survey" reporter:datatype="link"/>
2540                         <field reporter:label="Responding User" name="usr" reporter:datatype="link"/>
2541                 </fields>
2542                 <links>
2543                         <link field="question" reltype="has_a" key="id" map="" class="asvq"/>
2544                         <link field="survey" reltype="has_a" key="id" map="" class="asv"/>
2545                         <link field="answer" reltype="has_a" key="id" map="" class="asva"/>
2546                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2547                 </links>
2548         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2549             <actions>
2550                 <create permission="ADMIN_SURVEY">
2551                     <context link="survey" field="owner"/>
2552                 </create>
2553                 <retrieve permission="VIEW_USER">
2554                     <context link="usr" field="home_ou"/>
2555                 </retrieve>
2556                 <update permission="ADMIN_SURVEY">
2557                     <context link="survey" field="owner"/>
2558                 </update>
2559                 <delete permission="ADMIN_SURVEY">
2560                     <context link="survey" field="owner"/>
2561                 </delete>
2562             </actions>
2563         </permacrud>
2564         </class>
2565         <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">
2566                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_item_id_seq">
2567                         <field name="bucket" />
2568                         <field name="id" reporter:datatype="id" />
2569                         <field name="target_copy" reporter:datatype="link"/>
2570                         <field name="create_time" reporter:datatype="timestamp" />
2571                         <field name="pos" reporter:datatype="int" />
2572                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
2573                 </fields>
2574                 <links>
2575                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
2576                         <link field="bucket" reltype="has_a" key="id" map="" class="ccb"/>
2577             <link field="notes" reltype="has_many" map="" key="item" class="ccbin"/>
2578                 </links>
2579                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2580                         <actions>
2581                                 <retrieve permission="ADMIN_COPY_BUCKET">
2582                     <context link="bucket" owning_lib="owning_lib"/>
2583                 </retrieve>
2584             </actions>
2585         </permacrud>
2586         </class>
2587         <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">
2588                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_item_note_id_seq">
2589                         <field name="id" reporter:datatype="id" />
2590                         <field name="item" reporter:datatype="link"/>
2591                         <field name="note" reporter:datatype="text" />
2592                 </fields>
2593                 <links>
2594                         <link field="item" reltype="has_a" key="id" map="" class="ccbi"/>
2595                 </links>
2596         </class>
2597
2598         <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">
2599                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_id_seq">
2600                         <field reporter:label="Control Set ID" name="id" reporter:datatype="id" reporter:selector="name"/>
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="Controlling Authority Fields" name="authority_fields" reporter:datatype="link" oils_persist:virtual="true" config_field="true"/>
2604                         <field reporter:label="Thesauri" name="thesauri" reporter:datatype="link" oils_persist:virtual="true" config_field="true"/>
2605                 </fields>
2606                 <links>
2607                         <link field="authority_fields" reltype="has_many" key="control_set" map="" class="acsaf"/>
2608                         <link field="thesauri" reltype="has_many" key="control_set" map="" class="at"/>
2609                 </links>
2610                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2611                         <actions>
2612                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2613                                 <retrieve/>
2614                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2615                                 <delete permission="DELETE_AUTHORITY_CONTROL_SET" global_required="true"/>
2616                         </actions>
2617                 </permacrud>
2618         </class>
2619
2620         <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">
2621                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_authority_field_id_seq">
2622                         <field reporter:label="Control Set Authority Field ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2623                         <field reporter:label="Main Entry" name="main_entry" reporter:datatype="link"/>
2624                         <field reporter:label="Control Set" name="control_set" reporter:datatype="link" config_field="true"/>
2625                         <field reporter:label="Tag" name="tag" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.{3}$"/>
2626                         <field reporter:label="Subfield List" name="sf_list" reporter:datatype="text" />
2627                         <field reporter:label="Subfield List for Display" name="display_sf_list" reporter:datatype="text" />
2628                         <field reporter:label="Non-filing Indicator" name="nfi" reporter:datatype="text" />
2629                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
2630                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2631                         <field reporter:label="Linking Subfield" name="linking_subfield" reporter:datatype="text" />
2632                         <field reporter:label="Subordinate Entries" name="sub_entries" reporter:datatype="link" oils_persist:virtual="true"/>
2633                         <field reporter:label="Controlled Bib Fields" name="bib_fields" reporter:datatype="link" oils_persist:virtual="true"/>
2634                         <field reporter:label="Thesauri" name="thesauri" reporter:datatype="link" oils_persist:virtual="true"/>
2635                         <field reporter:label="Browse Axis Maps" name="axis_maps" reporter:datatype="link" oils_persist:virtual="true"/>
2636                         <field reporter:label="Joiner" name="joiner" reporter:datatype="text" />
2637                         <field reporter:label="Heading Field" name="heading_field" reporter:datatype="link" />
2638                 </fields>
2639                 <links>
2640                         <link field="axis_maps" reltype="has_many" key="field" map="" class="abaafm"/>
2641                         <link field="control_set" reltype="has_a" key="id" map="" class="acs"/>
2642                         <link field="bib_fields" reltype="has_many" key="authority_field" map="" class="acsbf"/>
2643                         <link field="thesauri" reltype="has_many" key="control_set" map="" class="at"/>
2644                         <link field="main_entry" reltype="has_a" key="id" map="" class="acsaf"/>
2645                         <link field="sub_entries" reltype="has_many" key="main_entry" map="" class="acsaf"/>
2646                         <link field="heading_field" reltype="has_a" key="id" map="" class="ahf"/>
2647                 </links>
2648                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2649                         <actions>
2650                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2651                                 <retrieve/>
2652                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2653                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2654                         </actions>
2655                 </permacrud>
2656         </class>
2657
2658         <class id="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">
2659                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_bib_field_id_seq">
2660                         <field reporter:label="Controlled Bib Field ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2661                         <field reporter:label="Controlling Authority Field" name="authority_field" reporter:datatype="link"/>
2662                         <field reporter:label="Tag" name="tag" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.{3}$"/>
2663                 </fields>
2664                 <links>
2665                         <link field="authority_field" reltype="has_a" key="id" map="" class="acsaf"/>
2666                 </links>
2667                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2668                         <actions>
2669                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2670                                 <retrieve/>
2671                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2672                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2673                         </actions>
2674                 </permacrud>
2675         </class>
2676
2677         <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">
2678                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_bib_field_metabib_field_map_id_seq">
2679                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2680                         <field reporter:label="Bib Field" name="bib_field" reporter:datatype="link"/>
2681                         <field reporter:label="Metabib Field" name="metabib_field" reporter:datatype="link"/>
2682                 </fields>
2683                 <links>
2684                         <link field="bib_field" reltype="has_a" key="id" map="" class="acsbf"/>
2685                         <link field="metabib_field" reltype="has_a" key="id" map="" class="cmf"/>
2686                 </links>
2687                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2688                         <actions>
2689                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2690                                 <retrieve/>
2691                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2692                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2693                         </actions>
2694                 </permacrud>
2695         </class>
2696
2697         <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">
2698                 <fields oils_persist:primary="code">
2699                         <field reporter:label="Thesaurus Code" name="code" reporter:datatype="id" reporter:selector="name"/>
2700                         <field reporter:label="Control Set" name="control_set" reporter:datatype="link" config_field="true"/>
2701                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
2702                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2703                         <field reporter:label="Short Code" name="short_code" reporter:datatype="text" />
2704                         <field reporter:label="URI" name="uri" reporter:datatype="text" />
2705                 </fields>
2706                 <links>
2707                         <link field="control_set" reltype="has_a" key="id" map="" class="acs"/>
2708                 </links>
2709                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2710                         <actions>
2711                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2712                                 <retrieve/>
2713                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2714                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2715                         </actions>
2716                 </permacrud>
2717         </class>
2718
2719         <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">
2720                 <fields oils_persist:primary="code">
2721                         <field reporter:label="Code" name="code" reporter:datatype="id" reporter:selector="name" oils_obj:validate="^\S+$"/>
2722                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true"/>
2723                         <field reporter:label="Sorter Attribute" name="sorter" reporter:datatype="link"/>
2724                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
2725                         <field reporter:label="Authority Fields" name="fields" reporter:datatype="link" oils_persist:virtual="true"/>
2726                         <field reporter:label="Authority Field Maps" name="maps" reporter:datatype="link" oils_persist:virtual="true"/>
2727                 </fields>
2728                 <links>
2729                         <link field="sorter" reltype="has_a" key="name" map="" class="crad"/>
2730                         <link field="fields" reltype="has_many" key="axis" map="field" class="abaafm"/>
2731                         <link field="maps" reltype="has_many" key="axis" map="" class="abaafm"/>
2732                 </links>
2733                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2734                         <actions>
2735                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2736                                 <retrieve/>
2737                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2738                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2739                         </actions>
2740                 </permacrud>
2741         </class>
2742
2743     <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">
2744         <fields oils_persist:primary="id" oils_persist:sequence="authority.browse_axis_authority_field_map_id_seq">
2745             <field reporter:label="Axis Authority Field Map ID" name="id" reporter:datatype="id"/>
2746             <field reporter:label="Authority Field" name="field" oils_obj:required="true" reporter:datatype="link"/>
2747             <field reporter:label="Axis" name="axis" reporter:datatype="link" oils_obj:required="true"/>
2748         </fields>
2749         <links>
2750             <link field="field" reltype="has_a" key="id" map="" class="acsaf"/>
2751             <link field="axis" reltype="has_a" key="code" map="" class="aba"/>
2752         </links>
2753         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2754             <actions>
2755                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2756                 <retrieve/>
2757                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2758                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2759             </actions>
2760         </permacrud>
2761     </class>
2762
2763         <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">
2764                 <fields oils_persist:primary="id" oils_persist:sequence="authority.record_entry_id_seq">
2765                         <field name="active" reporter:datatype="bool"/>
2766                         <field name="create_date" reporter:datatype="timestamp"/>
2767                         <field name="creator" />
2768                         <field name="deleted" reporter:datatype="bool"/>
2769                         <field name="edit_date" reporter:datatype="timestamp"/>
2770                         <field name="editor" />
2771                         <field name="id" reporter:datatype="id" />
2772                         <field name="last_xact_id" />
2773                         <field name="marc" />
2774                         <field name="source" />
2775                         <field reporter:label="Control Set" name="control_set" reporter:datatype="link"/>
2776                         <field reporter:label="Owner" name="owner"  reporter:datatype="org_unit"/>
2777                         <field name="heading" />
2778                         <field name="simple_heading" />
2779                         <field name="fixed_fields" oils_persist:virtual="true" reporter:datatype="link"/>
2780                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
2781                         <field name="bib_links" oils_persist:virtual="true" reporter:datatype="link"/>
2782                 </fields>
2783                 <links>
2784                         <link field="control_set" reltype="has_a" key="id" map="" class="acs"/>
2785                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
2786                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
2787                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2788                         <link field="notes" reltype="has_many" key="record" map="" class="arn"/>
2789                         <link field="bib_links" reltype="has_many" key="authority" map="" class="abl"/>
2790                         <link field="fixed_fields" reltype="might_have" key="record" map="" class="ard"/>
2791                 </links>
2792                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2793                         <actions>
2794                                 <create permission="CREATE_AUTHORITY_RECORD IMPORT_MARC" global_required="true"/>
2795                                 <retrieve/>
2796                                 <update permission="UPDATE_AUTHORITY_RECORD" global_required="true"/>
2797                                 <delete permission="DELETE_AUTHORITY_RECORD" global_required="true"/>
2798                         </actions>
2799                 </permacrud>
2800         </class>
2801         <class id="ard" controller="open-ils.cstore" oils_obj:fieldmapper="authority::record_descriptor" oils_persist:tablename="authority.rec_descriptor" reporter:label="Authority Record Descriptor">
2802                 <fields oils_persist:primary="id" oils_persist:sequence="authority.rec_descriptor_id_seq">
2803                         <field name="char_encoding" />
2804                         <field name="id" />
2805                         <field name="record" />
2806                         <field name="record_status" />
2807                         <field name="thesaurus" />
2808                 </fields>
2809                 <links>
2810                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
2811                         <link field="thesaurus" reltype="might_have" key="code" map="" class="at"/>
2812                 </links>
2813         </class>
2814         <class id="abl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="authority::bib_linking" oils_persist:tablename="authority.bib_linking" reporter:label="Authority-Bibliographic Record Link">
2815                 <fields oils_persist:primary="id" oils_persist:sequence="authority.bib_linking_id_seq">
2816                         <field name="id" reporter:datatype="id" />
2817                         <field name="bib" reporter:datatype="link" />
2818                         <field name="authority" reporter:datatype="link" />
2819                 </fields>
2820                 <links>
2821                         <link field="bib" reltype="has_a" key="id" map="" class="bre"/>
2822                         <link field="authority" reltype="has_a" key="id" map="" class="are"/>
2823                 </links>
2824                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2825                         <actions>
2826                                 <retrieve/>
2827                         </actions>
2828                 </permacrud>
2829         </class>
2830         <class id="ash" controller="open-ils.cstore" oils_obj:fieldmapper="authority::simple_heading" oils_persist:tablename="authority.simple_heading" reporter:label="Authority Simple Heading">
2831                 <fields oils_persist:primary="id" oils_persist:sequence="authority.simple_heading_id_seq">
2832                         <field name="id" reporter:datatype="id" />
2833                         <field name="record" reporter:datatype="link" />
2834                         <field name="atag" reporter:datatype="link" />
2835                         <field name="value" reporter:datatype="text" />
2836                         <field name="thesaurus" reporter:datatype="text" />
2837                 </fields>
2838                 <links>
2839                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
2840                         <link field="atag" reltype="has_a" key="id" map="" class="acsaf"/>
2841                 </links>
2842         </class>
2843
2844         <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">
2845                 <fields oils_persist:primary="id" oils_persist:sequence="authority.heading_fields_id_seq">
2846                         <field name="id" reporter:datatype="id" reporter:selector="label" />
2847                         <field name="heading_type" reporter:datatype="text" reporter:label="Heading Type" />
2848                         <field name="heading_purpose" reporter:datatype="text" reporter:label="Heading Purpose" />
2849                         <field name="label" reporter:datatype="text" reporter:label="Heading Field Label" />
2850                         <field name="format" reporter:datatype="text" reporter:label="Heading XSLT Format" />
2851                         <field name="heading_xpath" reporter:datatype="text" reporter:label="Heading XPath" />
2852                         <field name="component_xpath" reporter:datatype="text" reporter:label="Heading Component XPath" />
2853                         <field name="type_xpath" reporter:datatype="text" reporter:label="Related/Variant Type XPath" />
2854                         <field name="thesaurus_xpath" reporter:datatype="text" reporter:label="Thesaurus XPath" />
2855                         <field name="thesaurus_override_xpath" reporter:datatype="text" reporter:label="Thesaurus Override XPath" />
2856                         <field name="joiner" reporter:datatype="text" reporter:label="Joiner string" />
2857                 </fields>
2858                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2859                         <actions>
2860                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2861                                 <retrieve/>
2862                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2863                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2864                         </actions>
2865                 </permacrud>
2866         </class>
2867
2868         <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">
2869                 <fields oils_persist:primary="code" oils_persist:sequence="">
2870                         <field reporter:label="Language Code" name="code" reporter:selector="value" reporter:datatype="text"/>
2871                         <field reporter:label="Language" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
2872                 </fields>
2873                 <links/>
2874         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2875             <actions>
2876                 <create permission="CREATE_MARC_CODE" global_required="true"/>
2877                 <retrieve/>
2878                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
2879                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
2880             </actions>
2881         </permacrud>
2882         </class>
2883         <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">
2884                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
2885                         <field name="accepting_usr" />
2886                         <field name="amount" reporter:datatype="money" />
2887                         <field name="amount_collected" reporter:datatype="money" />
2888                         <field name="approval_code" reporter:datatype="text"/>
2889                         <field name="cash_drawer" reporter:datatype="link"/>
2890                         <field name="cc_number" reporter:datatype="text"/>
2891                         <field name="cc_order_number" reporter:datatype="text"/>
2892                         <field name="cc_processor" reporter:datatype="text"/>
2893                         <field name="id" reporter:datatype="id" />
2894                         <field name="note" reporter:datatype="text"/>
2895                         <field name="payment_ts" reporter:datatype="timestamp"/>
2896                         <field name="xact" reporter:datatype="link"/>
2897                         <field name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
2898                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
2899                 </fields>
2900                 <links>
2901                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
2902                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
2903                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
2904                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
2905                 </links>
2906         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2907             <actions>
2908                 <retrieve permission="VIEW_USER_TRANSACTIONS">
2909                     <context link="xact" jump="usr" field="home_ou"/>
2910                 </retrieve>
2911                         </actions>
2912                 </permacrud>
2913         </class>
2914         <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">
2915                 <fields oils_persist:primary="name">
2916                         <field reporter:label="Name" name="name" reporter:datatype="text" />
2917                         <field reporter:label="Namespace URI" name="namespace_uri" reporter:datatype="text"/>
2918                         <field reporter:label="Namespace Prefix" name="prefix" reporter:datatype="text"/>
2919                         <field reporter:label="XSLT" name="xslt" reporter:datatype="text" />
2920                 </fields>
2921                 <links/>
2922         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2923             <actions>
2924                 <create permission="CREATE_XML_TRANSFORM" global_required="true"/>
2925                 <retrieve/>
2926                 <update permission="UPDATE_XML_TRANSFORM" global_required="true"/>
2927                 <delete permission="DELETE_XML_TRANSFORM" global_required="true"/>
2928             </actions>
2929         </permacrud>
2930         </class>
2931
2932         <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">
2933                 <fields oils_persist:primary="alias">
2934                         <field reporter:label="Alias (RegExp)" name="alias" reporter:datatype="text"/>
2935                         <field reporter:label="Class" name="field_class" reporter:datatype="link"/>
2936                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
2937                 </fields>
2938                 <links>
2939                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
2940                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
2941                 </links>
2942         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2943             <actions>
2944                 <create permission="CREATE_METABIB_SEARCH_ALIAS" global_required="true"/>
2945                 <retrieve/>
2946                 <update permission="UPDATE_METABIB_SEARCH_ALIAS" global_required="true"/>
2947                 <delete permission="DELETE_METABIB_SEARCH_ALIAS" global_required="true"/>
2948             </actions>
2949         </permacrud>
2950         </class>
2951
2952         <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">
2953                 <fields oils_persist:primary="name">
2954                         <field reporter:label="Name" name="name" reporter:datatype="text" reporter:selector="label"/>
2955                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
2956                         <field reporter:label="Buoyant?" name="buoyant" reporter:datatype="bool" />
2957                         <field reporter:label="Restrict?" name="restrict" reporter:datatype="bool" />
2958                         <field reporter:label="Combined?" name="combined" reporter:datatype="bool" />
2959                         <field reporter:label="A Weight" name="a_weight" reporter:datatype="float" />
2960                         <field reporter:label="B Weight" name="b_weight" reporter:datatype="float" />
2961                         <field reporter:label="C Weight" name="c_weight" reporter:datatype="float" />
2962                         <field reporter:label="D Weight" name="d_weight" reporter:datatype="float" />
2963                         <field reporter:label="Fields" name="fields" reporter:datatype="link" oils_persist:virtual="true"/>
2964                 </fields>
2965                 <links>
2966                         <link field="fields" reltype="has_many" key="name" map="" class="cmf"/>
2967                 </links>
2968         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2969             <actions>
2970                 <create permission="CREATE_METABIB_CLASS" global_required="true"/>
2971                 <retrieve/>
2972                 <update permission="UPDATE_METABIB_CLASS" global_required="true"/>
2973                 <delete permission="DELETE_METABIB_CLASS" global_required="true"/>
2974             </actions>
2975         </permacrud>
2976         </class>
2977
2978         <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">
2979                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_id_seq">
2980                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="label"/>
2981                         <field reporter:label="Class" name="field_class" reporter:datatype="link"/>
2982                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
2983                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2984                         <field reporter:label="Weight" name="weight" reporter:datatype="int" />
2985                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
2986                         <field reporter:label="Joiner" name="joiner" reporter:datatype="text"/>
2987                         <field reporter:label="Format" name="format" reporter:datatype="link"/>
2988                         <field reporter:label="Search Field" name="search_field" reporter:datatype="bool" />
2989                         <field reporter:label="Facet Field" name="facet_field" reporter:datatype="bool" />
2990                         <field reporter:label="Facet XPath" name="facet_xpath" reporter:datatype="text" />
2991                         <field reporter:label="Display Field?" name="display_field" reporter:datatype="bool" />
2992                         <field reporter:label="Display XPath" name="display_xpath" reporter:datatype="text" />
2993                         <field reporter:label="Browse Field" name="browse_field" reporter:datatype="bool" />
2994                         <field reporter:label="Browse XPath" name="browse_xpath" reporter:datatype="text" />
2995                         <field reporter:label="Browse Sort XPath" name="browse_sort_xpath" reporter:datatype="text" />
2996                         <field reporter:label="Authority XPath" name="authority_xpath" reporter:datatype="text" />
2997                         <field reporter:label="Restrict?" name="restrict" reporter:datatype="bool" />
2998                         <field reporter:label="Display Field Map" name="display_field_map" oils_persist:virtual="true" reporter:datatype="link"/>
2999                         <field reporter:label="Virtual Field Data Suppliers" name="data_sources" oils_persist:virtual="true" reporter:datatype="link" config_field="true"/>
3000                 </fields>
3001                 <links>
3002                         <link field="format" reltype="has_a" key="name" map="" class="cxt"/>
3003                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
3004                         <link field="display_field_map" reltype="might_have" key="field" map="" class="cdfm"/>
3005                         <link field="data_sources" reltype="has_many" key="virtual" map="" class="cmfvm"/>
3006                 </links>
3007         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3008             <actions>
3009                 <create permission="CREATE_METABIB_FIELD" global_required="true"/>
3010                 <retrieve/>
3011                 <update permission="UPDATE_METABIB_FIELD" global_required="true"/>
3012                 <delete permission="DELETE_METABIB_FIELD" global_required="true"/>
3013             </actions>
3014         </permacrud>
3015         </class>
3016
3017         <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">
3018                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_virtual_map_id_seq">
3019                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3020                         <field reporter:label="Real" name="real" reporter:datatype="link"/>
3021                         <field reporter:label="Virtual" name="virtual" reporter:datatype="link" config_field="true"/>
3022                         <field reporter:label="Weight" name="weight" reporter:datatype="int"/>
3023                 </fields>
3024                 <links>
3025                         <link field="real" reltype="has_a" key="id" map="" class="cmf"/>
3026                         <link field="virtual" reltype="has_a" key="id" map="" class="cmf"/>
3027                 </links>
3028         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3029             <actions>
3030                 <create permission="CREATE_METABIB_FIELD ADMIN_METABIB_FIELD" global_required="true"/>
3031                 <retrieve/>
3032                 <update permission="UPDATE_METABIB_FIELD ADMIN_METABIB_FIELD" global_required="true"/>
3033                 <delete permission="DELETE_METABIB_FIELD ADMIN_METABIB_FIELD" global_required="true"/>
3034             </actions>
3035         </permacrud>
3036         </class>
3037
3038         <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">
3039                 <fields oils_persist:primary="id" oils_persist:sequence="config.best_hold_order_id_seq">
3040                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name" />
3041                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
3042                         <field reporter:label="Capture Lib to Pickup Lib Proximity" name="pprox" reporter:datatype="int" />
3043                         <field reporter:label="Circ Lib to Request Lib Proximity" name="hprox" reporter:datatype="int" />
3044                         <field reporter:label="Owning Lib to Patron Home Lib Proximity" name="owning_lib_to_home_lib_prox" reporter:datatype="int" />
3045                         <field reporter:label="Adjusted Circ Lib to Pickup Lib Proximity" name="aprox" reporter:datatype="int" />
3046                         <field reporter:label="Adjusted Capture Location to Pickup Lib Proximity" name="approx" reporter:datatype="int" />
3047                         <field reporter:label="Hold Priority" name="priority" reporter:datatype="int" />
3048                         <field reporter:label="Hold Cut-in-line State" name="cut" reporter:datatype="int" />
3049                         <field reporter:label="Hold Selection Depth" name="depth" reporter:datatype="int" />
3050                         <field reporter:label="Copy Has Circulated From Home Lately" name="htime" reporter:datatype="int" />
3051                         <field reporter:label="Hold Request Time" name="rtime" reporter:datatype="int" />
3052                         <field reporter:label="Copy Has Been Home At All Lately" name="shtime" reporter:datatype="int" />
3053                 </fields>
3054                 <links>
3055                 </links>
3056                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3057                         <actions>
3058                                 <create permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
3059                                 <retrieve permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
3060                                 <update permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
3061                                 <delete permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
3062                         </actions>
3063                 </permacrud>
3064         </class>
3065         <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">
3066                 <fields oils_persist:primary="id" oils_persist:sequence="config.biblio_fingerprint_id_seq">
3067                         <field name="id" reporter:datatype="id" />
3068                         <field name="name" reporter:datatype="text"/>
3069                         <field name="xpath" reporter:datatype="text"/>
3070                         <field name="format" reporter:datatype="link"/>
3071                         <field name="first_word" reporter:datatype="bool" />
3072                 </fields>
3073                 <links/>
3074         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3075             <actions>
3076                 <create permission="CREATE_BIBLIO_FINGERPRINT" global_required="true"/>
3077                 <retrieve/>
3078                 <update permission="UPDATE_BIBLIO_FINGERPRINT" global_required="true"/>
3079                 <delete permission="DELETE_BIBLIO_FINGERPRINT" global_required="true"/>
3080             </actions>
3081         </permacrud>
3082         </class>
3083         <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">
3084                 <fields oils_persist:primary="code" oils_persist:sequence="">
3085                         <field reporter:label="Audience Code" name="code" reporter:selector="value" reporter:datatype="text"/>
3086                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
3087                         <field reporter:label="Audience" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
3088                 </fields>
3089                 <links/>
3090         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3091             <actions>
3092                 <create permission="CREATE_MARC_CODE" global_required="true"/>
3093                 <retrieve/>
3094                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
3095                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
3096             </actions>
3097         </permacrud>
3098         </class>
3099         <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">
3100                 <fields oils_persist:primary="code" oils_persist:sequence="">
3101                         <field reporter:label="Item Form Code" name="code" reporter:selector="value" reporter:datatype="text"/>
3102                         <field reporter:label="Item Form" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
3103                 </fields>
3104                 <links/>
3105         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3106             <actions>
3107                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
3108                 <retrieve/>
3109                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
3110                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
3111             </actions>
3112         </permacrud>
3113         </class>
3114     <class id="acmc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::course_module_course" oils_persist:tablename="asset.course_module_course" reporter:label="Course">
3115         <fields oils_persist:primary="id" oils_persist:sequence="asset.course_module_course_id_seq">
3116             <field reporter:label="ID" name="id" reporter:datatype="id" />
3117             <field reporter:label="Course Name" name="name" reporter:datatype="text" oils_obj:required="true" />
3118             <field reporter:label="Course Number" name="course_number" reporter:datatype="text" oils_obj:required="true" />
3119             <field reporter:label="Section Number" name="section_number" reporter:datatype="text" />
3120             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link" oils_obj:required="true" />
3121             <field reporter:label="Course Members" name="members" oils_persist:virtual="true" reporter:datatype="link" />
3122             <field reporter:label="Course Materials" name="materials" oils_persist:virtual="true" reporter:datatype="link" />
3123             <field reporter:label="Is Archived?" name="is_archived" reporter:datatype="bool" />
3124                         <field reporter:label="Terms Taught" name="terms_map" oils_persist:virtual="true" reporter:datatype="link" config_field="true" />
3125         </fields>
3126         <links>
3127             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou" />
3128             <link field="members" reltype="has_many" key="course" map="" class="acmcu" />
3129             <link field="materials" reltype="has_many" key="course" map="" class="acmcm" />
3130                         <link field="terms_map" reltype="has_many" key="course" map="" class="acmtcm" />
3131         </links>
3132         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3133             <actions>
3134                 <create permission="MANAGE_RESERVES" context_field="owning_lib"/>
3135                 <retrieve/>
3136                 <update permission="MANAGE_RESERVES" context_field="owning_lib"/>
3137                 <delete permission="MANAGE_RESERVES" context_field="owning_lib"/>
3138             </actions>
3139         </permacrud>
3140     </class>
3141     <class id="acmcu" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::course_module_course_users" oils_persist:tablename="asset.course_module_course_users" reporter:label="Course Users">
3142         <fields oils_persist:primary="id" oils_persist:sequence="asset.course_module_course_users_id_seq">
3143             <field reporter:label="ID" name="id" reporter:datatype="id" />
3144             <field reporter:label="Course" name="course" reporter:datatype="link" />
3145             <field reporter:label="User" name="usr" reporter:datatype="link" />
3146             <field reporter:label="User Role" name="usr_role" reporter:datatype="link" />
3147         </fields>
3148         <links>
3149             <link field="course" reltype="has_a" key="id" map="" class="acmc" />
3150             <link field="usr" reltype="has_a" key="id" map="" class="au" />
3151             <link field="usr_role" reltype="has_a" key="id" map="" class="acmr" />
3152         </links>
3153         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3154             <actions>
3155                 <create permission="MANAGE_RESERVES">
3156                                         <context link="course" field="owning_lib" />
3157                 </create>
3158                 <retrieve/>
3159                 <update permission="MANAGE_RESERVES">
3160                                         <context link="course" field="owning_lib" />
3161                 </update>
3162                 <delete permission="MANAGE_RESERVES">
3163                                         <context link="course" field="owning_lib" />
3164                 </delete>
3165             </actions>
3166         </permacrud>
3167     </class>
3168     <class id="acmcm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::course_module_course_materials" oils_persist:tablename="asset.course_module_course_materials" reporter:label="Course Materials" oils_persist:field_safe="true">
3169         <fields oils_persist:primary="id" oils_persist:sequence="asset.course_module_course_materials_id_seq">
3170             <field reporter:label="ID" name="id" reporter:datatype="id" />
3171             <field reporter:label="Course" name="course" reporter:datatype="link" />
3172             <field reporter:label="Item" name="item" reporter:datatype="link" />
3173             <field reporter:label="Record" name="record" reporter:datatype="link" />
3174             <field reporter:label="Record is temporary?" name="temporary_record" reporter:datatype="bool" />
3175             <field reporter:label="Item Relationship" name="relationship" reporter:datatype="text" />
3176             <field reporter:label="Original Status" name="original_status" reporter:datatype="link" />
3177             <field reporter:label="Original Circ Modifier" name="original_circ_modifier" reporter:datatype="link" />
3178             <field reporter:label="Original Shelving Location" name="original_location" reporter:datatype="link" />
3179             <field reporter:label="Original Callnumber" name="original_callnumber" reporter:datatype="link" />
3180         </fields>
3181         <links>
3182             <link field="course" reltype="has_a" key="id" map="" class="acmc" />
3183             <link field="item" reltype="has_a" key="id" map="" class="acp" />
3184             <link field="record" reltype="has_a" key="id" map="" class="bre" />
3185             <link field="original_callnumber" reltype="has_a" key="id" map="" class="acn" />
3186             <link field="original_status" reltype="has_a" key="id" map="" class="ccs" />
3187             <link field="original_circ_modifier" reltype="has_a" key="code" map="" class="ccm" />
3188             <link field="original_location" reltype="has_a" key="id" map="" class="acpl" />
3189         </links>
3190         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3191             <actions>
3192                 <create permission="MANAGE_RESERVES">
3193                                         <context link="course" field="owning_lib" />
3194                 </create>
3195                 <retrieve/>
3196                 <update permission="MANAGE_RESERVES">
3197                                         <context link="course" field="owning_lib" />
3198                 </update>
3199                 <delete permission="MANAGE_RESERVES">
3200                                         <context link="course" field="owning_lib" />
3201                 </delete>
3202             </actions>
3203         </permacrud>
3204     </class>
3205         <class id="acmt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::course_module_term" oils_persist:tablename="asset.course_module_term" reporter:label="Term" oils_persist:field_safe="true">
3206                 <fields oils_persist:primary="id" oils_persist:sequence="asset.course_module_term_id_seq">
3207                         <field reporter:label="Term ID" name="id" reporter:datatype="id" reporter:selector="name"/>
3208                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true"/>
3209             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link" oils_obj:required="true" />
3210                         <field reporter:label="Start Date" name="start_date" reporter:datatype="timestamp"/>
3211                         <field reporter:label="End Date" name="end_date" reporter:datatype="timestamp"/>
3212                         <field reporter:label="Courses" name="courses" reporter:datatype="link" oils_persist:virtual="true"/>
3213                         <field reporter:label="Course Maps" name="maps" reporter:datatype="link" oils_persist:virtual="true"/>
3214                 </fields>
3215                 <links>
3216             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou" />
3217                         <link field="courses" reltype="has_many" key="term" map="course" class="acmtcm"/>
3218                         <link field="maps" reltype="has_many" key="term" map="" class="acmtcm"/>
3219                 </links>
3220                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3221                         <actions>
3222                                 <create permission="MANAGE_RESERVES" context_field="owning_lib" />
3223                                 <retrieve/>
3224                                 <update permission="MANAGE_RESERVES" context_field="owning_lib" />
3225                                 <delete permission="MANAGE_RESERVES" context_field="owning_lib" />
3226                         </actions>
3227                 </permacrud>
3228         </class>
3229     <class id="acmtcm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::course_module_term_course_map" oils_persist:tablename="asset.course_module_term_course_map" reporter:label="Course Term Map" oils_persist:field_safe="true">
3230         <fields oils_persist:primary="id" oils_persist:sequence="asset.course_module_term_course_map_id_seq">
3231             <field reporter:label="Course Term Map ID" name="id" reporter:datatype="id"/>
3232             <field reporter:label="Term" name="term" oils_obj:required="true" reporter:datatype="link"/>
3233             <field reporter:label="Course" name="course" reporter:datatype="link" oils_obj:required="true"/>
3234         </fields>
3235         <links>
3236             <link field="term" reltype="has_a" key="id" map="" class="acmt"/>
3237             <link field="course" reltype="has_a" key="id" map="" class="acmc"/>
3238         </links>
3239         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3240             <actions>
3241                 <create permission="MANAGE_RESERVES">
3242                                         <context link="course" field="owning_lib" />
3243                 </create>
3244                 <retrieve/>
3245                 <update permission="MANAGE_RESERVES">
3246                                         <context link="course" field="owning_lib" />
3247                 </update>
3248                 <delete permission="MANAGE_RESERVES">
3249                                         <context link="course" field="owning_lib" />
3250                 </delete>
3251             </actions>
3252         </permacrud>
3253     </class>
3254         <class id="acmr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::course_module_role" oils_persist:tablename="asset.course_module_role" reporter:label="Course Role" oils_persist:field_safe="true">
3255                 <fields oils_persist:primary="id" oils_persist:sequence="asset.course_module_role_id_seq">
3256                         <field reporter:label="Role ID" name="id" reporter:datatype="id" reporter:selector="name"/>
3257                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true"/>
3258             <field reporter:label="OPAC Viewable?" name="is_public" reporter:datatype="bool" />
3259                 </fields>
3260                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3261                         <actions>
3262                                 <create permission="MANAGE_RESERVES" global_required="true" />
3263                                 <retrieve/>
3264                                 <update permission="MANAGE_RESERVES" global_required="true" />
3265                                 <delete permission="MANAGE_RESERVES" global_required="true" />
3266                         </actions>
3267                 </permacrud>
3268         </class>
3269         
3270     <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">
3271         <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_class_id_seq">
3272             <field reporter:label="Call number class ID" name="id" reporter:datatype="id"/>
3273             <field reporter:label="Name" name="name" reporter:datatype="text"/>
3274             <field reporter:label="Normalizer function" name="normalizer" reporter:datatype="text"/>
3275             <field reporter:label="Call number fields" name="field" reporter:datatype="text"/>
3276         </fields>
3277         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3278             <actions>
3279                 <retrieve/>
3280             </actions>
3281         </permacrud>
3282     </class>
3283         <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">
3284                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_suffix_id_seq">
3285                         <field reporter:label="ID" name="id" reporter:datatype="id" />
3286                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
3287                         <field reporter:label="Label Sort Key" name="label_sortkey" reporter:datatype="text"/>
3288                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
3289                 </fields>
3290                 <links>
3291                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
3292                 </links>
3293         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3294             <actions>
3295                 <create permission="CREATE_VOLUME_SUFFIX" context_field="owning_lib"/>
3296                 <retrieve/>
3297                 <update permission="UPDATE_VOLUME_SUFFIX" context_field="owning_lib"/>
3298                 <delete permission="DELETE_VOLUME_SUFFIX" context_field="owning_lib"/>
3299             </actions>
3300         </permacrud>
3301         </class>
3302         <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">
3303                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_prefix_id_seq">
3304                         <field reporter:label="ID" name="id" reporter:datatype="id" />
3305                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
3306                         <field reporter:label="Label Sort Key" name="label_sortkey" reporter:datatype="text"/>
3307                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
3308                 </fields>
3309                 <links>
3310                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
3311                 </links>
3312         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3313             <actions>
3314                 <create permission="CREATE_VOLUME_PREFIX" context_field="owning_lib"/>
3315                 <retrieve/>
3316                 <update permission="UPDATE_VOLUME_PREFIX" context_field="owning_lib"/>
3317                 <delete permission="DELETE_VOLUME_PREFIX" context_field="owning_lib"/>
3318             </actions>
3319         </permacrud>
3320         </class>
3321         <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">
3322                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_id_seq">
3323                         <field reporter:label="Copies" name="copies" oils_persist:virtual="true" reporter:datatype="link"/>
3324                         <field reporter:label="Create Date/Time" name="create_date" reporter:datatype="timestamp"/>
3325                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
3326                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
3327                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
3328                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
3329                         <field reporter:label="Call Number/Volume ID" name="id" reporter:datatype="id" />
3330                         <field reporter:label="Call Number Label" name="label" reporter:datatype="text"/>
3331                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
3332                         <field reporter:label="Bib Record" name="record" reporter:datatype="link"/>
3333                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
3334                         <field reporter:label="URI Maps" name="uri_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3335                         <field reporter:label="URIs" name="uris" oils_persist:virtual="true" reporter:datatype="link"/>
3336                         <field reporter:label="Call Number Sort Key" name="label_sortkey" reporter:datatype="text"/>
3337                         <field reporter:label="Classification Scheme" name="label_class" reporter:datatype="link"/>
3338                         <field reporter:label="Prefix" name="prefix" reporter:datatype="link"/>
3339                         <field reporter:label="Suffix" name="suffix" reporter:datatype="link"/>
3340                         <field reporter:label="Dewey Classification" name="dewey" oils_persist:virtual="true" reporter:datatype="link"/>
3341                 </fields>
3342                 <links>
3343                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
3344                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3345                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3346                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
3347                         <link field="notes" reltype="has_many" key="call_number" map="" class="acnn"/>
3348                         <link field="copies" reltype="has_many" key="call_number" map="" class="acp"/>
3349                         <link field="uris" reltype="has_many" key="call_number" map="uri" class="auricnm"/>
3350                         <link field="uri_maps" reltype="has_many" key="call_number" map="" class="auricnm"/>
3351                         <link field="label_class" reltype="has_a" key="id" map="" class="acnc"/>
3352                         <link field="prefix" reltype="has_a" key="id" map="" class="acnp"/>
3353                         <link field="suffix" reltype="has_a" key="id" map="" class="acns"/>
3354                         <link field="dewey" reltype="might_have" key="call_number" map="" class="racnd"/>
3355                 </links>
3356         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3357             <actions>
3358                 <create permission="CREATE_VOLUME" context_field="owning_lib"/>
3359                 <retrieve/>
3360                 <update permission="UPDATE_VOLUME" context_field="owning_lib"/>
3361                 <delete permission="DELETE_VOLUME" context_field="owning_lib"/>
3362             </actions>
3363         </permacrud>
3364         </class>
3365         <class id="racnd" controller="open-ils.cstore open-ils.reporter-store open-ils.pcrud" oils_obj:fieldmapper="reporter::asset_call_number_dewey" oils_persist:tablename="reporter.asset_call_number_dewey" reporter:label="Dewey Classification">
3366                 <fields oils_persist:primary="call_number">
3367                         <field reporter:label="Call Number" name="call_number" reporter:datatype="link" />
3368                         <field reporter:label="Dewey Number" name="dewey" reporter:datatype="text"/>
3369                         <field reporter:label="Dewey Range - Tens" name="dewey_range_tens" reporter:datatype="text"/>
3370                         <field reporter:label="Dewey Range - Hundreds" name="dewey_range_hundreds" reporter:datatype="text"/>
3371                         <field reporter:label="Dewey Block - Tens" name="dewey_block_tens" reporter:datatype="text"/>
3372                         <field reporter:label="Dewey Block - Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
3373                 </fields>
3374                 <links>
3375                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
3376                 </links>
3377         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3378             <actions>
3379                 <retrieve/>
3380             </actions>
3381         </permacrud>
3382         </class>
3383         <class id="auri" controller="open-ils.cstore" oils_obj:fieldmapper="asset::uri" oils_persist:tablename="asset.uri" reporter:label="Electronic Access URI">
3384                 <fields oils_persist:primary="id" oils_persist:sequence="asset.uri_id_seq">
3385                         <field reporter:label="URI ID" name="id" reporter:datatype="id"/>
3386                         <field reporter:label="URI" name="href" reporter:datatype="text"/>
3387                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
3388                         <field reporter:label="Use Information" name="use_restriction" reporter:datatype="text"/>
3389                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
3390                         <field reporter:label="Call Number Maps" name="call_number_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3391                         <field reporter:label="Call Numbers" name="call_numbers" oils_persist:virtual="true" reporter:datatype="link"/>
3392                 </fields>
3393                 <links>
3394                         <link field="call_numbers" reltype="has_many" key="uri" map="call_number" class="auricnm"/>
3395                         <link field="call_number_maps" reltype="has_many" key="uri" map="" class="auricnm"/>
3396         </links>
3397         </class>
3398         <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">
3399                 <fields oils_persist:primary="id" oils_persist:sequence="asset.uri_call_number_map_id_seq">
3400                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3401                         <field reporter:label="URI" name="uri" reporter:datatype="int"/>
3402                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
3403                 </fields>
3404                 <links>
3405                         <link field="uri" reltype="has_a" key="id" map="" class="auri"/>
3406                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
3407                 </links>
3408         </class>
3409         <class id="cst" controller="open-ils.cstore" oils_obj:fieldmapper="config::standing" oils_persist:tablename="config.standing" reporter:label="Standing Penalty">
3410                 <fields oils_persist:primary="id" oils_persist:sequence="config.standing_id_seq">
3411                         <field name="id" reporter:datatype="id" />
3412                         <field name="value" oils_persist:i18n="true" />
3413                 </fields>
3414                 <links/>
3415         </class>
3416         <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">
3417                 <fields oils_persist:primary="usr" oils_persist:sequence="">
3418                         <field name="balance_owed" reporter:datatype="money" />
3419                         <field name="total_owed" reporter:datatype="money" />
3420                         <field name="total_paid" reporter:datatype="money" />
3421                         <field name="usr" reporter:datatype="link"/>
3422                 </fields>
3423                 <links>
3424                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3425         </links>
3426         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3427             <actions>
3428                 <retrieve permission="VIEW_USER">
3429                     <context link="usr" field="home_ou"/>
3430                 </retrieve>
3431             </actions>
3432         </permacrud>
3433         </class>
3434         <class id="mowbus" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::open_with_balance_user_summary" oils_persist:tablename="money.open_with_balance_usr_summary" reporter:label="Open User Summary for transactions with balances">
3435                 <fields oils_persist:primary="usr" oils_persist:sequence="">
3436                         <field name="balance_owed" reporter:datatype="money" />
3437                         <field name="total_owed" reporter:datatype="money" />
3438                         <field name="total_paid" reporter:datatype="money" />
3439                         <field name="usr" reporter:datatype="link"/>
3440                 </fields>
3441                 <links>
3442                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3443         </links>
3444         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3445             <actions>
3446                 <retrieve permission="VIEW_USER">
3447                     <context link="usr" field="home_ou"/>
3448                 </retrieve>
3449             </actions>
3450         </permacrud>
3451         </class>
3452         <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">
3453                 <fields oils_persist:primary="id" oils_persist:sequence="money.collections_tracker_id_seq">
3454                         <field name="collector" />
3455                         <field name="enter_time" reporter:datatype="timestamp"/>
3456                         <field name="id" reporter:datatype="id" />
3457                         <field name="location" reporter:datatype="link"/>
3458                         <field name="usr" reporter:datatype="link"/>
3459                 </fields>
3460                 <links>
3461                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3462                         <link field="collector" reltype="has_a" key="id" map="" class="au"/>
3463                         <link field="location" reltype="has_a" key="id" map="" class="aou"/>
3464                 </links>
3465         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3466             <actions>
3467                 <create permission="money.collections_tracker.create" context_field="location"/>
3468                 <retrieve permission="money.collections_tracker.create" context_field="location"/> 
3469                 <delete permission="money.collections_tracker.create" context_field="location"/>
3470             </actions>
3471         </permacrud>
3472         </class>
3473         <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">
3474                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry_id_seq">
3475                         <field reporter:label="Call Numbers" name="call_numbers" oils_persist:virtual="true" reporter:datatype="link"/>
3476                         <field reporter:label="Fixed Field Entry" name="fixed_fields" oils_persist:virtual="true" reporter:datatype="link"/>
3477                         <field reporter:label="Is Active?" name="active" reporter:datatype="bool"/>
3478                         <field reporter:label="Record Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
3479                         <field reporter:label="Record Creator" name="creator" reporter:datatype="link"/>
3480                         <field reporter:label="Is Deleted?" name="deleted" reporter:datatype="bool"/>
3481                         <field reporter:label="Last Edit Data/Time" name="edit_date" reporter:datatype="timestamp"/>
3482                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
3483                         <field reporter:label="Fingerprint" name="fingerprint"  reporter:datatype="text"/>
3484                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
3485                         <field reporter:label="Last Transaction ID" name="last_xact_id"  reporter:datatype="text"/>
3486                         <field reporter:label="MARC21Slim" name="marc"  reporter:datatype="text"/>
3487                         <field reporter:label="Overall Quality" name="quality" reporter:datatype="int" />
3488                         <field reporter:label="Record Source" name="source" reporter:datatype="link"/>
3489                         <field reporter:label="TCN Source" name="tcn_source"  reporter:datatype="text"/>
3490                         <field reporter:label="TCN Value" name="tcn_value"  reporter:datatype="text"/>
3491                         <field reporter:label="Owner" name="owner"  reporter:datatype="org_unit"/>
3492                         <field reporter:label="Share Depth" name="share_depth"  reporter:datatype="int"/>
3493                         <field reporter:label="Metarecord" name="metarecord" oils_persist:virtual="true" reporter:datatype="link"/>
3494                         <field reporter:label="Language Code" name="language" oils_persist:virtual="true" reporter:datatype="link"/>
3495                         <field reporter:label="Non-MARC Record Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
3496                         <field reporter:label="Indexed Keyword Field Entries" name="keyword_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3497                         <field reporter:label="Indexed Subject Field Entries" name="subject_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3498                         <field reporter:label="Indexed Title Field Entries" name="title_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3499                         <field reporter:label="Indexed Identifier Field Entries" name="identifier_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3500                         <field reporter:label="Indexed Author Field Entries" name="author_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3501                         <field reporter:label="Indexed Series Field Entries" name="series_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3502                         <field reporter:label="Flattened MARC Fields " name="full_record_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3503                         <field reporter:label="Simple Record Extracts " name="simple_record" oils_persist:virtual="true" reporter:datatype="link"/>
3504                         <field reporter:label="Authority Links" name="authority_links" oils_persist:virtual="true" reporter:datatype="link"/>
3505                         <field reporter:label="Subscriptions" name="subscriptions" oils_persist:virtual="true" reporter:datatype="link"/>
3506                         <field reporter:label="SVF Attributes" name="attrs" oils_persist:virtual="true" reporter:datatype="link"/>
3507                         <field reporter:label="MVF Attributes" name="mattrs" oils_persist:virtual="true" reporter:datatype="link"/>
3508                         <field reporter:label="Display Fields" name="display_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3509                         <field reporter:label="Flat Display Entries" name="flat_display_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3510                         <field reporter:label="Compressed Display Entries" name="compressed_display_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3511                         <field reporter:label="Wide Display Entries" name="wide_display_entry" oils_persist:virtual="true" reporter:datatype="link"/>
3512                         <field reporter:label="Merge Date" name="merge_date" reporter:datatype="timestamp"/>
3513                         <field reporter:label="Merged To" name="merged_to" reporter:datatype="link"/>
3514                 </fields>
3515                 <links>
3516                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3517                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
3518                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3519                         <link field="simple_record" reltype="might_have" key="id" map="" class="rmsr"/>
3520                         <link field="metarecord" reltype="might_have" key="source" map="metarecord" class="mmrsm"/>
3521                         <link field="call_numbers" reltype="has_many" key="record" map="" class="acn"/>
3522                         <link field="keyword_field_entries" reltype="has_many" key="source" map="" class="mkfe"/>
3523                         <link field="fixed_fields" reltype="might_have" key="record" map="" class="mrd"/>
3524                         <link field="language" reltype="might_have" key="record" map="item_lang" class="mrd"/>
3525                         <link field="subject_field_entries" reltype="has_many" key="source" map="" class="msfe"/>
3526                         <link field="title_field_entries" reltype="has_many" key="source" map="" class="mtfe"/>
3527                         <link field="identifier_field_entries" reltype="has_many" key="source" map="" class="mife"/>
3528                         <link field="notes" reltype="has_many" key="record" map="" class="bren"/>
3529                         <link field="author_field_entries" reltype="has_many" key="source" map="" class="mafe"/>
3530                         <link field="series_field_entries" reltype="has_many" key="source" map="" class="msefe"/>
3531                         <link field="full_record_entries" reltype="has_many" key="record" map="" class="mfr"/>
3532                         <link field="authority_links" reltype="has_many" key="bib" map="" class="abl"/>
3533                         <link field="subscriptions" reltype="has_many" key="record_entry" map="" class="ssub"/>
3534                         <link field="attrs" reltype="might_have" key="id" map="" class="mra"/>
3535                         <link field="mattrs" reltype="has_many" key="id" map="" class="mraf"/>
3536                         <link field="source" reltype="has_a" key="id" map="" class="cbs"/>
3537                         <link field="display_entries" reltype="has_many" key="source" map="" class="mde"/>
3538                         <link field="flat_display_entries" reltype="has_many" key="source" map="" class="mfde"/>
3539                         <link field="compressed_display_entries" reltype="has_many" key="source" map="" class="mcde"/>
3540                         <link field="wide_display_entry" reltype="might_have" key="source" map="" class="mwde"/>
3541                         <link field="merged_to" reltype="has_a" key="id" map="" class="bre"/>
3542                 </links>
3543         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3544             <actions>
3545                 <create permission="CREATE_MARC IMPORT_MARC" global_required="true"/>
3546                 <retrieve/>
3547                 <update permission="UPDATE_MARC" global_required="true"/>
3548                 <!-- 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. -->
3549                 <delete permission="DELETE_RECORD" global_required="true"/>
3550             </actions>
3551         </permacrud>
3552         </class>
3553         <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">
3554                 <fields oils_persist:primary="id">
3555                         <field name="dow_0_close" />
3556                         <field name="dow_0_open" />
3557                         <field name="dow_1_close" />
3558                         <field name="dow_1_open" />
3559                         <field name="dow_2_close" />
3560                         <field name="dow_2_open" />
3561                         <field name="dow_3_close" />
3562                         <field name="dow_3_open" />
3563                         <field name="dow_4_close" />
3564                         <field name="dow_4_open" />
3565                         <field name="dow_5_close" />
3566                         <field name="dow_5_open" />
3567                         <field name="dow_6_close" />
3568                         <field name="dow_6_open" />
3569                         <field name="id" reporter:datatype="id" />
3570                         <field name="org_unit" oils_persist:virtual="true" reporter:datatype="org_unit"/>
3571                 </fields>
3572                 <links>
3573                         <link field="id" reltype="might_have" key="id" map="" class="aou"/>
3574                 </links>
3575         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3576             <actions>
3577                 <create permission="CREATE_HOURS_OF_OPERATION" context_field="id"/>
3578                 <retrieve/>
3579                 <update permission="UPDATE_HOURS_OF_OPERATION" context_field="id"/>
3580                 <delete permission="DELETE_HOURS_OF_OPERATION" context_field="id"/>
3581             </actions>
3582         </permacrud>
3583         </class>
3584         <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">
3585                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.monograph_part_id_seq">
3586                         <field name="id" reporter:datatype="id" />
3587                         <field name="record" reporter:datatype="link"/>
3588                         <field name="label" reporter:datatype="text"/>
3589                         <field name="label_sortkey" reporter:datatype="text"/>
3590                         <field name="deleted" reporter:datatype="bool"/>
3591                 </fields>
3592                 <links>
3593                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3594                 </links>
3595         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3596             <actions>
3597                 <create permission="CREATE_MONOGRAPH_PART" global_required="true"/>
3598                 <retrieve/>
3599                 <update permission="UPDATE_MONOGRAPH_PART" global_required="true"/>
3600                 <delete permission="DELETE_MONOGRAPH_PART" global_required="true"/>
3601             </actions>
3602         </permacrud>
3603         </class>
3604         <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">
3605                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_part_map_id_seq">
3606                         <field name="id" reporter:datatype="id" />
3607                         <field name="target_copy" reporter:datatype="link" />
3608                         <field name="part" reporter:datatype="link"/>
3609                 </fields>
3610                 <links>
3611                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
3612                         <link field="part" reltype="has_a" key="id" map="" class="bmp"/>
3613                 </links>
3614         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3615             <actions>
3616                 <create permission="MAP_MONOGRAPH_PART" global_required="true"/>
3617                 <retrieve/>
3618                 <update permission="MAP_MONOGRAPH_PART" global_required="true"/>
3619                 <delete permission="MAP_MONOGRAPH_PART" global_required="true"/>
3620             </actions>
3621         </permacrud>
3622         </class>
3623     <class  id="aecc"
3624             controller="open-ils.cstore open-ils.pcrud"
3625             oils_obj:fieldmapper="action::emergency_closing_circulation"
3626             oils_persist:tablename="action.emergency_closing_circulation"
3627             reporter:label="Emergency Closing Circulation Entry"
3628             oils_persist:readonly="true"
3629     > <!-- This is not a view, but is managed via functions, so it's readonly. -->
3630         <fields oils_persist:primary="id">
3631             <field name="id" reporter:datatype="id" />
3632             <field name="circulation" reporter:datatype="link" />
3633                         <field name="emergency_closing" reporter:datatype="link"/>
3634             <field name="original_due_date" reporter:datatype="timestamp" />
3635             <field name="process_time" reporter:datatype="timestamp" />
3636         </fields>
3637         <links>
3638             <link field="circulation" reltype="has_a" key="id" map="" class="circ"/>
3639             <link field="emergency_closing" reltype="has_a" key="id" map="" class="aec"/>
3640         </links>
3641         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3642             <actions>
3643                 <retrieve/>
3644             </actions>
3645         </permacrud>
3646     </class>
3647     <class  id="aecr"
3648             controller="open-ils.cstore open-ils.pcrud"
3649             oils_obj:fieldmapper="action::emergency_closing_reservation"
3650             oils_persist:tablename="action.emergency_closing_reservation"
3651             reporter:label="Emergency Closing Reservation Entry"
3652             oils_persist:readonly="true"
3653     > <!-- This is not a view, but is managed via functions, so it's readonly. -->
3654         <fields oils_persist:primary="id">
3655             <field name="id" reporter:datatype="id" />
3656             <field name="reservation" reporter:datatype="link" />
3657                         <field name="emergency_closing" reporter:datatype="link"/>
3658             <field name="original_end_time" reporter:datatype="timestamp" />
3659             <field name="process_time" reporter:datatype="timestamp" />
3660         </fields>
3661         <links>
3662             <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
3663             <link field="emergency_closing" reltype="has_a" key="id" map="" class="aec"/>
3664         </links>
3665         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3666             <actions>
3667                 <retrieve/>
3668             </actions>
3669         </permacrud>
3670     </class>
3671     <class  id="aech"
3672             controller="open-ils.cstore open-ils.pcrud"
3673             oils_obj:fieldmapper="action::emergency_closing_hold"
3674             oils_persist:tablename="action.emergency_closing_hold"
3675             reporter:label="Emergency Closing Hold Entry"
3676             oils_persist:readonly="true"
3677     > <!-- This is not a view, but is managed via functions, so it's readonly. -->
3678         <fields oils_persist:primary="id">
3679             <field name="id" reporter:datatype="id" />
3680             <field name="hold" reporter:datatype="link" />
3681                         <field name="emergency_closing" reporter:datatype="link"/>
3682             <field name="original_shelf_expire_time" reporter:datatype="timestamp" />
3683             <field name="process_time" reporter:datatype="timestamp" />
3684         </fields>
3685         <links>
3686             <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
3687             <link field="emergency_closing" reltype="has_a" key="id" map="" class="aec"/>
3688         </links>
3689         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3690             <actions>
3691                 <retrieve/>
3692             </actions>
3693         </permacrud>
3694     </class>
3695     <class  id="aecs"
3696             controller="open-ils.cstore open-ils.pcrud"
3697             oils_obj:fieldmapper="action::emergency_closing_status"
3698             oils_persist:tablename="action.emergency_closing_status"
3699             reporter:label="Emergency Closing Status"
3700             oils_persist:readonly="true"
3701     >
3702         <fields oils_persist:primary="id">
3703             <field name="id" reporter:datatype="id" />
3704             <field name="creator" reporter:datatype="link" />
3705             <field name="create_time" reporter:datatype="timestamp" />
3706             <field name="process_start_time" reporter:datatype="timestamp" />
3707             <field name="process_end_time" reporter:datatype="timestamp" />
3708             <field name="last_update_time" reporter:datatype="timestamp" />
3709             <field name="circulations" reporter:datatype="int" />
3710             <field name="circulations_complete" reporter:datatype="int" />
3711             <field name="reservations" reporter:datatype="int" />
3712             <field name="reservations_complete" reporter:datatype="int" />
3713             <field name="holds" reporter:datatype="int" />
3714             <field name="holds_complete" reporter:datatype="int" />
3715         </fields>
3716         <links>
3717             <link field="id" reltype="has_a" key="id" map="" class="aec"/>
3718         </links>
3719         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3720             <actions>
3721                 <retrieve/>
3722             </actions>
3723         </permacrud>
3724     </class>
3725     <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">
3726         <fields oils_persist:primary="id" oils_persist:sequence="action.emergency_closing_id_seq">
3727             <field name="id" reporter:datatype="id" />
3728             <field name="creator" reporter:datatype="link" />
3729             <field name="create_time" reporter:datatype="timestamp" />
3730             <field name="process_start_time" reporter:datatype="timestamp" />
3731             <field name="process_end_time" reporter:datatype="timestamp" />
3732             <field name="last_update_time" reporter:datatype="timestamp" />
3733             <field name="closing" oils_persist:virtual="true" reporter:datatype="link"/>
3734             <field name="status" oils_persist:virtual="true" reporter:datatype="link"/>
3735             <field name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
3736             <field name="reservations" oils_persist:virtual="true" reporter:datatype="link"/>
3737             <field name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
3738         </fields>
3739         <links>
3740             <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3741             <link field="closing" reltype="might_have" key="emergency_closing" map="" class="aoucd"/>
3742             <link field="status" reltype="might_have" key="id" map="" class="aecs"/>
3743             <link field="circulations" reltype="has_many" key="emergency_closing" map="" class="aecc"/>
3744             <link field="reservations" reltype="has_many" key="emergency_closing" map="" class="aecr"/>
3745             <link field="holds" reltype="has_many" key="emergency_closing" map="" class="aech"/>
3746         </links>
3747         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3748             <actions>
3749                 <create permission="EMERGENCY_CLOSING">
3750                     <context link="closing" field="org_unit" />
3751                 </create>
3752                 <retrieve/>
3753                 <update permission="EMERGENCY_CLOSING">
3754                     <context link="closing" field="org_unit" />
3755                 </update>
3756                 <delete permission="EMERGENCY_CLOSING">
3757                     <context link="closing" field="org_unit" />
3758                 </delete>
3759             </actions>
3760         </permacrud>
3761     </class>
3762         <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">
3763                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_closed_id_seq">
3764                         <field name="close_end" reporter:datatype="timestamp" />
3765                         <field name="close_start" reporter:datatype="timestamp" />
3766                         <field name="id" reporter:datatype="id" />
3767                         <field name="org_unit" reporter:datatype="org_unit"/>
3768                         <field name="reason" reporter:datatype="text"/>
3769                         <field name="full_day" reporter:datatype="bool"/>
3770                         <field name="multi_day" reporter:datatype="bool"/>
3771                         <field name="emergency_closing" reporter:datatype="link"/>
3772                 </fields>
3773                 <links>
3774                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3775                         <link field="emergency_closing" reltype="has_a" key="id" map="" class="aec"/>
3776                 </links>
3777         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3778             <actions>
3779                 <create permission="CREATE_ORG_UNIT_CLOSING" context_field="org_unit"/>
3780                 <retrieve/>
3781                 <update permission="UPDATE_ORG_UNIT_CLOSING" context_field="org_unit"/>
3782                 <delete permission="DELETE_ORG_UNIT_CLOSING" context_field="org_unit"/>
3783             </actions>
3784         </permacrud>
3785         </class>
3786         <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">
3787                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_circ_duration_id_seq">
3788                         <field name="extended" reporter:datatype="interval"/>
3789                         <field name="id" reporter:datatype="id" reporter:selector="name"/>
3790                         <field name="max_renewals" reporter:datatype="int" />
3791                         <field name="name" reporter:datatype="text"/>
3792                         <field name="normal" reporter:datatype="interval"/>
3793                         <field name="shrt" reporter:datatype="interval"/>
3794                         <field name="max_auto_renewals" reporter:datatype="int" />
3795                 </fields>
3796                 <links>
3797                 </links>
3798         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3799             <actions>
3800                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
3801                 <retrieve/>
3802                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
3803                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
3804             </actions>
3805         </permacrud>
3806         </class>
3807
3808         <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">
3809                 <fields oils_persist:primary="id" oils_persist:sequence="config.hard_due_date_id_seq">
3810                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
3811                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
3812             <field reporter:label="Always Use?" name="forceto" reporter:datatype="bool"/>
3813                         <field reporter:label="Current Ceiling Date" name="ceiling_date" reporter:datatype="timestamp"/>
3814             <field reporter:label="Owner" name="owner" reporter:datatype="org_unit"/>
3815                         <field reporter:label="Values" name="values" oils_persist:virtual="true" 
3816                                 reporter:datatype="link" config_field="true"/>
3817                 </fields>
3818                 <links>
3819             <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3820                         <link field="values" reltype="has_many" key="hard_due_date" map="" class="chddv"/>
3821                 </links>
3822                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3823             <actions>
3824                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
3825                 <retrieve/>
3826                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
3827                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
3828             </actions>
3829                 </permacrud>
3830         </class>
3831
3832         <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">
3833                 <fields oils_persist:primary="id" oils_persist:sequence="config.hard_due_date_values_id_seq">
3834                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3835                         <field reporter:label="Hard Due Date" name="hard_due_date" reporter:datatype="link" config_field="true"/>
3836                         <field reporter:label="Ceiling Date" name="ceiling_date" reporter:datatype="timestamp"/>
3837             <field reporter:label="Active Date" name="active_date" reporter:datatype="timestamp"/>
3838                 </fields>
3839                 <links>
3840                         <link field="hard_due_date" reltype="has_a" key="id" map="" class="chdd"/>
3841                 </links>
3842                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3843             <actions>
3844                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
3845                 <retrieve/>
3846                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
3847                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
3848             </actions>
3849                 </permacrud>
3850         </class>
3851
3852         <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">
3853                 <fields oils_persist:primary="id" oils_persist:sequence="">
3854                         <field name="balance_owed" reporter:datatype="money"/>
3855                         <field name="id" reporter:datatype="id" />
3856                         <field name="last_billing_note" reporter:datatype="text"/>
3857                         <field name="last_billing_ts" reporter:datatype="timestamp"/>
3858                         <field name="last_billing_type" reporter:datatype="text"/>
3859                         <field name="last_payment_note" reporter:datatype="text"/>
3860                         <field name="last_payment_ts" reporter:datatype="timestamp"/>
3861                         <field name="last_payment_type" reporter:datatype="text"/>
3862                         <field name="total_owed" reporter:datatype="money"/>
3863                         <field name="total_paid" reporter:datatype="money"/>
3864                         <field name="usr" reporter:datatype="link"/>
3865                         <field name="xact_finish" reporter:datatype="timestamp" />
3866                         <field name="xact_start" reporter:datatype="timestamp" />
3867                         <field name="xact_type" reporter:datatype="text"/>
3868                         <field name="xact" oils_persist:virtual="true" reporter:datatype="link"/>
3869                         <field name="grocery" oils_persist:virtual="true" reporter:datatype="link"/>
3870                         <field name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
3871                         <field name="reservation" oils_persist:virtual="true" reporter:datatype="link"/>
3872                         <field name="billing_location" reporter:datatype="link"/>
3873                 </fields>
3874                 <links>
3875                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3876                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
3877                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
3878                         <link field="grocery" reltype="might_have" key="id" map="" class="mg"/>
3879                         <link field="reservation" reltype="might_have" key="id" map="" class="bresv"/>
3880                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
3881                 </links>
3882                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3883                         <actions>
3884                                 <retrieve permission="VIEW_USER_TRANSACTIONS">
3885                                         <context link="usr" field="home_ou" />
3886                                 </retrieve>
3887                         </actions>
3888                 </permacrud>
3889         </class>
3890         <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">
3891                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_id_seq">
3892                         <field reporter:label="All Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>
3893                         <field reporter:label="All Library Cards" name="cards" oils_persist:virtual="true" reporter:datatype="link"/>
3894                         <field reporter:label="All Circulations" name="checkouts" oils_persist:virtual="true" reporter:datatype="link"/>
3895                         <field reporter:label="All Hold Requests" name="hold_requests" oils_persist:virtual="true" reporter:datatype="link"/>
3896                         <field reporter:label="All Permissions" name="permissions" oils_persist:virtual="true" reporter:datatype="link"/>
3897                         <field reporter:label="All User Settings" name="settings" oils_persist:virtual="true" reporter:datatype="link"/>
3898                         <field reporter:label="Standing Penalties" name="standing_penalties" oils_persist:virtual="true" reporter:datatype="link"/>
3899                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3900                         <field reporter:label="Survey Responses" name="survey_responses" oils_persist:virtual="true" reporter:datatype="link"/>
3901                         <field reporter:label="Privacy Waiver Entries" name = "waiver_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3902                         <field reporter:label="Workstation Org Unit" name="ws_ou" oils_persist:virtual="true" reporter:datatype="link"/>
3903                         <field reporter:label="Workstation ID" name="wsid" oils_persist:virtual="true" reporter:datatype="link"/>
3904                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
3905                         <field reporter:label="Alert Message" name="alert_message"  reporter:datatype="text"/>
3906                         <field reporter:label="Barred" name="barred" reporter:datatype="bool"/>
3907                         <field reporter:label="Physical Address" name="billing_address" reporter:datatype="link"/>
3908                         <field reporter:label="Current Library Card" name="card" reporter:datatype="link"/>
3909                         <field reporter:label="Claims-returned Count" name="claims_returned_count" reporter:datatype="int" />
3910                         <field reporter:label="Claims Never Checked Out Count" name="claims_never_checked_out_count" reporter:datatype="int" />
3911                         <field reporter:label="Record Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
3912                         <field reporter:label="User Credit Balance" name="credit_forward_balance" reporter:datatype="money" />
3913                         <field reporter:label="Daytime Phone" name="day_phone"  reporter:datatype="text"/>
3914                         <field reporter:label="Date of Birth" name="dob" reporter:datatype="timestamp"/>
3915                         <field reporter:label="Email Address" name="email"  reporter:datatype="text"/>
3916                         <field reporter:label="Evening Phone" name="evening_phone"  reporter:datatype="text"/>
3917                         <field reporter:label="Privilege Expiration Date" name="expire_date" reporter:datatype="timestamp"/>
3918                         <field reporter:label="Last Name" name="family_name"  reporter:datatype="text"/>
3919                         <field reporter:label="First Name" name="first_given_name"  reporter:datatype="text"/>
3920                         <field reporter:label="Home Library" name="home_ou" reporter:datatype="org_unit"/>
3921                         <field reporter:label="User ID" name="id" reporter:datatype="id" reporter:selector="usrname" />
3922                         <field reporter:label="Primary Identification Type" name="ident_type" reporter:datatype="link"/>
3923                         <field reporter:label="Secondary Identification Type" name="ident_type2" reporter:datatype="link"/>
3924                         <field reporter:label="Primary Identification" name="ident_value"  reporter:datatype="text"/>
3925                         <field reporter:label="Secondary Identification" name="ident_value2"  reporter:datatype="text"/>
3926                         <field reporter:label="Last Transaction ID" name="last_xact_id" reporter:datatype="text"/>
3927                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="link"/>
3928                         <field reporter:label="Is Group Lead Account" name="master_account" reporter:datatype="bool"/>
3929                         <field reporter:label="Internet Access Level" name="net_access_level" reporter:datatype="link"/>
3930                         <field reporter:label="Other Phone" name="other_phone"  reporter:datatype="text"/>
3931                         <field reporter:label="Password" name="passwd" suppress_controller="open-ils.pcrud open-ils.reporter-store" reporter:datatype="text"/>
3932                         <field reporter:label="Photo URL" name="photo_url"  reporter:datatype="text"/>
3933                         <field reporter:label="Prefix/Title" name="prefix"  reporter:datatype="text"/>
3934                         <field reporter:label="Main (Profile) Permission Group" name="profile" reporter:datatype="link"/>
3935                         <field reporter:label="Middle Name" name="second_given_name"  reporter:datatype="text"/>
3936                         <field reporter:label="Standing (unused)" name="standing" reporter:datatype="link"/>
3937                         <field reporter:label="Suffix" name="suffix"  reporter:datatype="text"/>
3938                         <field reporter:label="Is Super User" name="super_user" reporter:datatype="bool"/>
3939                         <field reporter:label="Family Linkage or other Group" name="usrgroup" reporter:datatype="int"/>
3940                         <field reporter:label="OPAC/Staff Client User Name" name="usrname"  reporter:datatype="text"/>
3941                         <field reporter:label="OPAC/Staff Client Holds Alias" name="alias"  reporter:datatype="text"/>
3942                         <field reporter:label="Juvenile" name="juvenile"  reporter:datatype="bool"/>
3943                         <field reporter:label="Record Last Update Time" name="last_update_time" reporter:datatype="timestamp"/>
3944                         <field reporter:label="Preferred Prefix" name="pref_prefix" reporter:datatype="text"/>
3945                         <field reporter:label="Preferred First Name" name="pref_first_given_name" reporter:datatype="text"/>
3946                         <field reporter:label="Preferred Middle Name" name="pref_second_given_name" reporter:datatype="text"/>
3947                         <field reporter:label="Preferred Last Name" name="pref_family_name"  reporter:datatype="text"/>
3948                         <field reporter:label="Preferred Suffix" name="pref_suffix" reporter:datatype="text"/>
3949                         <field reporter:label="Parent/Guardian" name="guardian" reporter:datatype="text"/>
3950                         <field reporter:label="Name Keywords" name="name_keywords" reporter:datatype="text"/>
3951                         <field reporter:label="Name Keyword internal tsvector" name="name_kw_tsvector" reporter:datatype="text"/>
3952                         <field reporter:label="Additional Permission Groups" name="groups" oils_persist:virtual="true" reporter:datatype="link"/>
3953                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
3954                         <field reporter:label="User Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
3955                         <field reporter:label="Demographic Info" name="demographic" oils_persist:virtual="true" reporter:datatype="link"/>
3956                         <field reporter:label="Billable Transactions" name="billable_transactions" oils_persist:virtual="true" reporter:datatype="link"/>
3957                         <field reporter:label="Money Summary" name="money_summary" oils_persist:virtual="true" reporter:datatype="link"/>
3958                         <field reporter:label="Open Billable Transactions" name="open_billable_transactions_summary" oils_persist:virtual="true" reporter:datatype="link"/>
3959                         <field reporter:label="Checkins" name="checkins" oils_persist:virtual="true" reporter:datatype="link"/>
3960                         <field reporter:label="Circulations Performed as Staff" name="performed_circulations" oils_persist:virtual="true" reporter:datatype="link"/>
3961                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
3962                         <field reporter:label="Reservations" name="reservations" oils_persist:virtual="true" reporter:datatype="link"/>
3963                         <field reporter:label="User Activity Entries" name="usr_activity" oils_persist:virtual="true" reporter:datatype="link"/>
3964                         <field reporter:label="User/Working Location Map" name="usr_work_ou_map" oils_persist:virtual="true" reporter:datatype="link"/>
3965                 </fields>
3966                 <links>
3967                         <link field="demographic" reltype="might_have" key="id" map="" class="rud"/>
3968                         <link field="net_access_level" reltype="has_a" key="id" map="" class="cnal"/>
3969                         <link field="profile" reltype="has_a" key="id" map="" class="pgt"/>
3970                         <link field="ident_type" reltype="has_a" key="id" map="" class="cit"/>
3971                         <link field="billing_address" reltype="has_a" key="id" map="" class="aua"/>
3972                         <link field="mailing_address" reltype="has_a" key="id" map="" class="aua"/>
3973                         <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
3974                         <link field="standing" reltype="has_a" key="id" map="" class="cst"/>
3975                         <link field="card" reltype="has_a" key="id" map="" class="ac"/>
3976                         <link field="ident_type2" reltype="has_a" key="id" map="" class="cit"/>
3977                         <link field="stat_cat_entries" reltype="has_many" key="target_usr" map="" class="actscecm"/>
3978                         <link field="waiver_entries" reltype="has_many" key="usr" map="" class="aupw"/>
3979                         <link field="groups" reltype="has_many" key="usr" map="grp" class="pugm"/>
3980                         <link field="usrgroup" reltype="has_many" key="usrgroup" map="" class="au"/>
3981                         <link field="checkouts" reltype="has_many" key="usr" map="" class="circ"/>
3982                         <link field="hold_requests" reltype="has_many" key="usr" map="" class="ahr"/>
3983                         <link field="permissions" reltype="has_many" key="usr" map="perm" class="pupm"/>
3984                         <link field="settings" reltype="has_many" key="usr" map="" class="aus"/>
3985                         <link field="billable_transactions" reltype="has_many" key="usr" map="" class="mbt"/>
3986                         <link field="open_billable_transactions_summary" reltype="has_many" key="usr" map="" class="mobts"/>
3987                         <link field="money_summary" reltype="might_have" key="usr" map="" class="mus"/>
3988                         <link field="standing_penalties" reltype="has_many" key="usr" map="" class="ausp"/>
3989                         <link field="addresses" reltype="has_many" key="usr" map="" class="aua"/>
3990                         <link field="survey_responses" reltype="has_many" key="usr" map="" class="asvr"/>
3991                         <link field="notes" reltype="has_many" key="usr" map="" class="aun"/>
3992                         <link field="checkins" reltype="has_many" key="checkin_staff" map="" class="circ"/>
3993                         <link field="cards" reltype="has_many" key="usr" map="" class="ac"/>
3994                         <link field="performed_circulations" reltype="has_many" key="circ_staff" map="" class="circ"/>
3995                         <link field="fund_alloc_pcts" reltype="has_many" key="allocator" map="" class="acqfap"/>
3996                         <link field="reservations" reltype="has_many" key="usr" map="" class="bresv"/>
3997                         <link field="usr_activity" reltype="has_many" key="usr" map="" class="auact"/>
3998                         <link field="usr_work_ou_map" reltype="has_many" key="usr" map="" class="puwoum"/>
3999                 </links>
4000                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4001                         <actions>
4002                                 <retrieve permission="VIEW_USER user_request.view" context_field="home_ou" />
4003                         </actions>
4004                 </permacrud>
4005         </class>
4006         <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">
4007                 <fields oils_persist:primary="id" oils_persist:sequence="config.usr_activity_type_id_seq">
4008                         <field name="id" reporter:label="ID" reporter:datatype="id" reporter:selector="label"/>
4009                         <field name="ewho" reporter:label="Event Caller" reporter:datatype="text"/>
4010                         <field name="ewhat" reporter:label="Event Type" reporter:datatype="text"/>
4011                         <field name="ehow" reporter:label="Event Mechanism" reporter:datatype="text"/>
4012                         <field name="label" reporter:label="Label" reporter:datatype="text"/>
4013                         <field name="egroup" reporter:label="Activity Group" reporter:datatype="text"/>
4014                         <field name="enabled" reporter:label="Enabled" reporter:datatype="bool"/>
4015                         <field name="transient" reporter:label="Transient" reporter:datatype="bool"/>
4016         </fields>
4017                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4018                         <actions>
4019                                 <create permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>
4020                                 <retrieve/>
4021                                 <update permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>
4022                                 <delete permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>
4023                         </actions>
4024                 </permacrud>
4025         </class>
4026         <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">
4027                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_activity_id_seq">
4028                         <field name="id" reporter:label="ID" reporter:datatype="id" />
4029                         <field name="usr" reporter:label="User" reporter:datatype="link" />
4030                         <field name="etype" reporter:label="Activity Type" reporter:datatype="link" />
4031                         <field name="event_time" reporter:label="Event Time" reporter:datatype="timestamp" />
4032         </fields>
4033         <links>
4034                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4035                         <link field="etype" reltype="has_a" key="id" map="" class="cuat"/>
4036                 </links>
4037                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4038                         <actions>
4039                                 <retrieve permission="RUN_REPORTS">
4040                                         <context link="usr" field="home_ou" />
4041                                 </retrieve>
4042                         </actions>
4043                 </permacrud>
4044         </class>
4045         <class id="atb" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::toolbar" oils_persist:tablename="actor.toolbar" reporter:label="Custom Toolbar">
4046                 <fields oils_persist:primary="id" oils_persist:sequence="actor.toolbar_id_seq">
4047                         <field name="id" reporter:label="ID" reporter:datatype="id" />
4048                         <field name="usr" reporter:label="Owning User" reporter:datatype="link" />
4049                         <field name="org" reporter:label="Owning Org Unit" reporter:datatype="link" />
4050                         <field name="ws" reporter:label="Owning Workstation" reporter:datatype="link" />
4051                         <field name="label" reporter:label="Label" reporter:datatype="text" oils_persist:i18n="true" />
4052                         <field name="layout" reporter:label="Layout" reporter:datatype="text" />
4053         </fields>
4054         <links>
4055                         <link field="usr" reltype="might_have" key="id" map="" class="au"/>
4056                         <link field="org" reltype="might_have" key="id" map="" class="aou"/>
4057                         <link field="ws" reltype="might_have" key="id" map="" class="aws"/>
4058                 </links>
4059                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4060                         <actions>
4061                                 <retrieve permission="ADMIN_TOOLBAR STAFF_LOGIN" context_field="org">
4062                                         <context link="usr" field="home_ou" />
4063                                         <context link="ws" field="owning_lib" />
4064                                 </retrieve>
4065                                 <create permission="ADMIN_TOOLBAR" context_field="org">
4066                                         <context link="usr" field="home_ou" />
4067                                         <context link="ws" field="owning_lib" />
4068                                 </create>
4069                                 <update permission="ADMIN_TOOLBAR" context_field="org">
4070                                         <context link="usr" field="home_ou" />
4071                                         <context link="ws" field="owning_lib" />
4072                                 </update>
4073                                 <delete permission="ADMIN_TOOLBAR" context_field="org">
4074                                         <context link="usr" field="home_ou" />
4075                                         <context link="ws" field="owning_lib" />
4076                                 </delete>
4077                         </actions>
4078                 </permacrud>
4079         </class>
4080         <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">
4081                 <fields oils_persist:primary="name">
4082                         <field name="name" reporter:datatype="text"/>
4083                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
4084                 </fields>
4085                 <links/>
4086                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4087                         <actions>
4088                                 <create permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
4089                                 <retrieve/>
4090                                 <update permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
4091                                 <delete permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
4092                         </actions>
4093                 </permacrud>
4094         </class>
4095         <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">
4096                 <fields oils_persist:primary="name">
4097                         <field name="name" reporter:label="Name" reporter:datatype="text"/>
4098                         <field name="label" reporter:label="Label" reporter:datatype="text" oils_persist:i18n="true"/>
4099                         <field name="description" reporter:label="Description" reporter:datatype="text" oils_persist:i18n="true"/>
4100                         <field name="datatype" reporter:label="Datatype" reporter:datatype="text"/>
4101                         <field name="fm_class" reporter:label="Fieldmapper Class" reporter:datatype="text"/>
4102                         <field name="grp" reporter:label="Settings Group" reporter:datatype="link"/>
4103                         <field name="opac_visible" reporter:label="OPAC/Patron Visible" reporter:datatype="bool"/>
4104                         <field name="reg_default" reporter:label="Registration Default" reporter:datatype="text"/>
4105                 </fields>
4106                 <links>
4107                         <link field="name" reltype="has_many" key="name" map="" class="aus"/>
4108                         <link field="grp" reltype="has_a" key="name" map="" class="csg"/>
4109                 </links>
4110                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4111                         <actions>
4112                                 <create permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
4113                                 <retrieve/>
4114                                 <update permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
4115                                 <delete permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
4116                         </actions>
4117                 </permacrud>
4118         </class>
4119         <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">
4120                 <fields oils_persist:primary="name">
4121                         <field name="name" reporter:datatype="text"/>
4122                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
4123                         <field name="description" reporter:datatype="text" oils_persist:i18n="true"/>
4124                         <field name="datatype" reporter:datatype="text"/>
4125                         <field name="view_perm" reporter:datatype="link"/>
4126                         <field name="update_perm" reporter:datatype="link"/>
4127                         <field name="fm_class" reporter:datatype="text"/>
4128                         <field name="grp" reporter:datatype="link"/>
4129                 </fields>
4130                 <links>
4131                         <link field="name" reltype="has_many" key="name" map="" class="aous"/>
4132                         <link field="view_perm" reltype="has_a" key="id" map="" class="ppl"/>
4133                         <link field="update_perm" reltype="has_a" key="id" map="" class="ppl"/>
4134                         <link field="grp" reltype="has_a" key="name" map="" class="csg"/>
4135                 </links>
4136                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4137                         <actions>
4138                                 <create permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
4139                                 <retrieve/>
4140                                 <update permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
4141                                 <delete permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
4142                         </actions>
4143                 </permacrud>
4144         </class>
4145         <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">
4146                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_setting_id_seq">
4147                         <field name="id" />
4148                         <field name="name"  reporter:datatype="text"/>
4149                         <field name="org_unit" reporter:datatype="org_unit"/>
4150                         <field name="value"  reporter:datatype="text"/>
4151                 </fields>
4152                 <links>
4153                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
4154                         <link field="name" reltype="has_a" key="name" map="" class="coust"/>
4155                 </links>
4156         </class>
4157         <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">
4158                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_note_id_seq">
4159                         <field reporter:label="Note Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
4160                         <field reporter:label="Note Creator" name="creator" reporter:datatype="link"/>
4161                         <field reporter:label="Note ID" name="id" reporter:datatype="id" />
4162                         <field reporter:label="Copy" name="owning_copy" reporter:datatype="link"/>
4163                         <field reporter:label="Is OPAC Visible?" name="pub" reporter:datatype="bool"/>
4164                         <field reporter:label="Note Title" name="title"  reporter:datatype="text"/>
4165                         <field reporter:label="Note Content" name="value"  reporter:datatype="text"/>
4166                 </fields>
4167                 <links>
4168                         <link field="owning_copy" reltype="has_a" key="id" map="" class="acp"/>
4169                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4170                 </links>
4171         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4172             <actions>
4173                 <create permission="CREATE_COPY_NOTE">
4174                     <context link="owning_copy" field="circ_lib"/>
4175                 </create>
4176                 <retrieve permission="VIEW_COPY_NOTES">
4177                     <context link="owning_copy" field="circ_lib"/>
4178                 </retrieve>
4179                 <update permission="UPDATE_COPY_NOTE">
4180                     <context link="owning_copy" field="circ_lib"/>
4181                 </update>
4182                 <delete permission="DELETE_COPY_NOTE">
4183                     <context link="owning_copy" field="circ_lib"/>
4184                 </delete>
4185             </actions>
4186         </permacrud>
4187         </class>
4188         <class id="mfr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::full_rec" oils_persist:tablename="metabib.full_rec" reporter:label="Flattened MARC Fields">
4189                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.full_rec_id_seq">
4190                         <field reporter:label="Field ID" name="id" reporter:datatype="id" />
4191                         <field reporter:label="Indicator 1" name="ind1" oils_persist:primitive="string"  reporter:datatype="text"/>
4192                         <field reporter:label="Indicator 2" name="ind2" oils_persist:primitive="string"  reporter:datatype="text"/>
4193                         <field reporter:label="Bib Record Entry" name="record" reporter:datatype="link"/>
4194                         <field reporter:label="Subfield" name="subfield" oils_persist:primitive="string"  reporter:datatype="text"/>
4195                         <field reporter:label="Tag" name="tag"  reporter:datatype="text"/>
4196                         <field reporter:label="Normalized Value" name="value"  reporter:datatype="text"/>
4197                 </fields>
4198                 <links>
4199                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
4200                 </links>
4201         </class>
4202         <class id="mmr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="metabib::metarecord" oils_persist:tablename="metabib.metarecord" reporter:label="Metarecord">
4203                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.metarecord_id_seq">
4204                         <field name="fingerprint"  reporter:datatype="text"/>
4205                         <field name="id" reporter:datatype="id" reporter:selector="fingerprint" />
4206                         <field name="master_record" reporter:datatype="link"/>
4207                         <field name="mods"  reporter:datatype="text"/>
4208                         <field name="source_records" oils_persist:virtual="true" reporter:datatype="link"/>
4209                         <field name="source_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4210                 </fields>
4211                 <links>
4212                         <link field="master_record" reltype="has_a" key="id" map="" class="bre"/>
4213                         <link field="source_records" reltype="has_many" key="metarecord" map="source" class="mmrsm"/>
4214                         <link field="source_maps" reltype="has_many" key="metarecord" class="mmrsm"/>
4215                 </links>
4216                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4217                         <actions>
4218                                 <retrieve/>
4219                         </actions>
4220                 </permacrud>
4221         </class>
4222         <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">
4223                 <fields oils_persist:primary="id" oils_persist:sequence="config.net_access_level_id_seq">
4224                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
4225                         <field name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
4226                 </fields>
4227                 <links/>
4228         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4229             <actions>
4230                 <create permission="CREATE_NET_ACCESS_LEVEL" global_required="true"/>
4231                 <retrieve/>
4232                 <update permission="UPDATE_NET_ACCESS_LEVEL" global_required="true"/>
4233                 <delete permission="DELETE_NET_ACCESS_LEVEL" global_required="true"/>
4234             </actions>
4235         </permacrud>
4236         </class>
4237         <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">
4238                 <fields oils_persist:primary="id" oils_persist:sequence="permission.perm_list_id_seq">
4239                         <field name="code"  reporter:datatype="text"/>
4240                         <field name="description"  reporter:datatype="text" oils_persist:i18n="true"/>
4241                         <field name="id" reporter:selector="code" reporter:datatype="id"/>
4242                 </fields>
4243                 <links/>
4244         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4245             <actions>
4246                 <create permission="CREATE_PERM" global_required="true"/>
4247                 <retrieve permission="CREATE_PERM UPDATE_PERM DELETE_PERM" global_required="true"/>
4248                 <update permission="UPDATE_PERM" global_required="true"/>
4249                 <delete permission="DELETE_PERM" global_required="true"/>
4250             </actions>
4251         </permacrud>
4252         </class>
4253         <class id="mmrsm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="metabib::metarecord_source_map" oils_persist:tablename="metabib.metarecord_source_map" oils_persist:field_safe="true" reporter:label="Metarecord Source Map">
4254                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.metarecord_source_map_id_seq">
4255                         <field name="id" reporter:datatype="id" />
4256                         <field name="metarecord" reporter:datatype="link"/>
4257                         <field name="source" reporter:datatype="link"/>
4258                 </fields>
4259                 <links>
4260                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
4261                         <link field="metarecord" reltype="has_a" key="id" map="" class="mmr"/>
4262                 </links>
4263                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4264                         <actions>
4265                                 <retrieve/>
4266                         </actions>
4267                 </permacrud>
4268         </class>
4269         <class id="mde" controller="open-ils.cstore open-ils.pcrud" 
4270                         oils_obj:fieldmapper="metabib::display_entry" 
4271                         oils_persist:tablename="metabib.display_entry" 
4272                         oils_persist:field_safe="true"
4273                         reporter:label="Display Field Entry" oils_persist:readonly="true">
4274                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.display_entry_id_seq">
4275                         <field name="id" reporter:datatype="id" />
4276                         <field name="field" reporter:datatype="link"/>
4277                         <field name="source" reporter:datatype="link"/>
4278                         <field name="value"  reporter:datatype="text"/>
4279                         <field name="highlight" oils_persist:virtual="true"  reporter:datatype="text"/>
4280                 </fields>
4281                 <links>
4282                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
4283                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
4284                 </links>
4285                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4286                         <actions>
4287                                 <retrieve/>
4288                         </actions>
4289                 </permacrud>
4290         </class>
4291         <class id="mfde" controller="open-ils.cstore open-ils.pcrud" 
4292                 oils_persist:tablename="metabib.flat_display_entry"
4293                 oils_obj:fieldmapper="metabib::flat_display_entry" 
4294                 oils_persist:field_safe="true"
4295                 reporter:label="Flat Display Entry" 
4296                 oils_persist:readonly="true">
4297                 <fields>
4298                         <field name="source" reporter:datatype="id" />
4299                         <field name="name" reporter:datatype="text"/>
4300                         <field name="multi" reporter:datatype="bool"/>
4301                         <field name="label" reporter:datatype="text"/>
4302                         <field name="field" reporter:datatype="link"/>
4303                         <field name="value" reporter:datatype="text"/>
4304                 </fields>
4305                 <links>
4306                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
4307                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
4308                         <link field="name" reltype="has_a" key="name" map="" class="cdfm"/>
4309                 </links>
4310                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4311                         <actions>
4312                                 <retrieve/>
4313                         </actions>
4314                 </permacrud>
4315         </class>
4316         <class id="mcde" controller="open-ils.cstore open-ils.pcrud" 
4317                 oils_persist:tablename="metabib.compressed_display_entry"
4318                 oils_obj:fieldmapper="metabib::compressed_display_entry" 
4319                 oils_persist:field_safe="true"
4320                 reporter:label="Compressed Display Entry" 
4321                 oils_persist:readonly="true">
4322                 <fields>
4323                         <field name="source" reporter:datatype="id" />
4324                         <field name="name" reporter:datatype="text"/>
4325                         <field name="multi" reporter:datatype="bool"/>
4326                         <field name="label" reporter:datatype="text"/>
4327                         <field name="field" reporter:datatype="link"/>
4328                         <field name="value" reporter:datatype="text"/>
4329                 </fields>
4330                 <links>
4331                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
4332                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
4333                         <link field="name" reltype="has_a" key="name" map="" class="cdfm"/>
4334                 </links>
4335                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4336                         <actions>
4337                                 <retrieve/>
4338                         </actions>
4339                 </permacrud>
4340         </class>
4341         <class id="mwde" controller="open-ils.cstore open-ils.pcrud" 
4342                 oils_persist:tablename="metabib.wide_display_entry"
4343                 oils_obj:fieldmapper="metabib::wide_display_entry" 
4344                 oils_persist:field_safe="true"
4345                 reporter:label="Wide Display Entry" 
4346                 oils_persist:readonly="true">
4347                 <fields oils_persist:primary="source">
4348                         <field name="source" reporter:label="Record ID" reporter:datatype="id" />
4349                         <field name="title" reporter:label="Title" reporter:datatype="text"/>
4350                         <field name="author" reporter:label="Author" reporter:datatype="text"/>
4351                         <field name="creators" reporter:label="Creators" reporter:datatype="text"/>
4352                         <field name="isbn" reporter:label="ISBN" reporter:datatype="text"/>
4353                         <field name="issn" reporter:label="ISSN" reporter:datatype="text"/>
4354                         <field name="upc" reporter:label="UPC" reporter:datatype="text"/>
4355                         <field name="tcn" reporter:label="TCN" reporter:datatype="text"/>
4356                         <field name="edition" reporter:label="Edition" reporter:datatype="text"/>
4357                         <field name="physical_description" reporter:label="Physical Description" reporter:datatype="text"/>
4358                         <field name="publisher" reporter:label="Publisher" reporter:datatype="text"/>
4359                         <field name="series_title" reporter:label="Series Title" reporter:datatype="text"/>
4360                         <field name="subject_geographic" reporter:label="Geographic Subject" reporter:datatype="text"/>
4361                         <field name="subject_name" reporter:label="Name Subject" reporter:datatype="text"/>
4362                         <field name="subject_temporal" reporter:label="Temporal Subject" reporter:datatype="text"/>
4363                         <field name="subject_topic" reporter:label="Topic Subject" reporter:datatype="text"/>
4364                         <field name="abstract" reporter:label="Abstract" reporter:datatype="text"/>
4365                         <field name="toc" reporter:label="Table of Contents" reporter:datatype="text"/>
4366                         <field name="pubdate" reporter:label="Publication Date" reporter:datatype="text"/>
4367                         <field name="type_of_resource" reporter:label="Type of Resource" reporter:datatype="text"/>
4368                 </fields>
4369                 <links>
4370                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
4371                 </links>
4372                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4373                         <actions>
4374                                 <retrieve/>
4375                         </actions>
4376                 </permacrud>
4377         </class>
4378
4379         <class id="cdfm" controller="open-ils.cstore open-ils.pcrud" 
4380                 oils_persist:tablename="config.display_field_map"
4381                 oils_obj:fieldmapper="config::display_field_map"
4382                 oils_persist:field_safe="true"
4383                 reporter:label="Display Field Map">
4384                 <fields oils_persist:primary="name">
4385                         <field name="name" reporter:datatype="text"/>
4386                         <field name="field" reporter:datatype="link"/>
4387                         <field name="multi" reporter:datatype="bool"/>
4388                 </fields>
4389                 <links>
4390                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
4391                 </links>
4392                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4393                         <actions>
4394                                 <retrieve/>
4395                                 <create permission="CREATE_METABIB_FIELD" global_required="true"/>
4396                                 <update permission="UPDATE_METABIB_FIELD" global_required="true"/>
4397                                 <delete permission="DELETE_METABIB_FIELD" global_required="true"/>
4398                         </actions>
4399                 </permacrud>
4400         </class>
4401
4402         <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">
4403                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.facet_entry_id_seq">
4404                         <field name="id" reporter:datatype="id" />
4405                         <field name="field" reporter:datatype="link"/>
4406                         <field name="source" reporter:datatype="link"/>
4407                         <field name="value"  reporter:datatype="text"/>
4408                 </fields>
4409                 <links>
4410                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
4411                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
4412                 </links>
4413         </class>
4414         <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">
4415                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.browse_entry_id_seq">
4416                         <field name="id" reporter:datatype="id" />
4417                         <field name="value" reporter:datatype="text"/>
4418                         <field name="def_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4419                 </fields>
4420                 <links>
4421                         <link field="def_maps" reltype="has_many" key="entry" map="" class="mbedm"/>
4422                 </links>
4423                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4424                         <actions>
4425                                 <retrieve/>
4426                         </actions>
4427                 </permacrud>
4428         </class>
4429         <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">
4430                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.browse_entry_def_map_id_seq">
4431                         <field name="id" reporter:datatype="id" />
4432                         <field name="entry" reporter:datatype="link"/>
4433                         <field name="def" reporter:datatype="link"/>
4434                         <field name="source" reporter:datatype="link"/>
4435                 </fields>
4436                 <links>
4437                         <link field="entry" reltype="has_a" key="id" map="" class="mbe"/>
4438                         <link field="def" reltype="has_a" key="id" map="" class="cmf"/>
4439                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
4440                 </links>
4441         </class>
4442         <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">
4443                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.browse_entry_simple_heading_map_id_seq">
4444                         <field name="id" reporter:datatype="id" />
4445                         <field name="entry" reporter:datatype="link"/>
4446                         <field name="simple_heading" reporter:datatype="link"/>
4447                 </fields>
4448                 <links>
4449                         <link field="entry" reltype="has_a" key="id" map="" class="mbe"/>
4450                         <link field="simple_heading" reltype="has_a" key="id" map="" class="ash"/>
4451                 </links>
4452         </class>
4453         <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">
4454                 <oils_persist:source_definition><![CDATA[
4455                         SELECT * FROM metabib.author_field_entry
4456                                                 UNION ALL
4457                         SELECT * FROM metabib.keyword_field_entry
4458                                                 UNION ALL
4459                         SELECT * FROM metabib.identifier_field_entry
4460                                                 UNION ALL
4461                         SELECT * FROM metabib.title_field_entry
4462                                                 UNION ALL
4463                         SELECT * FROM metabib.subject_field_entry
4464                                                 UNION ALL
4465                         SELECT * FROM metabib.series_field_entry
4466                 ]]></oils_persist:source_definition>
4467                 <fields>
4468                         <field name="field" reporter:datatype="link"/>
4469                         <field name="id" reporter:datatype="id" />
4470                         <field name="source" reporter:datatype="link"/>
4471                         <field name="value"  reporter:datatype="text"/>
4472                 </fields>
4473                 <links>
4474                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
4475                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
4476                 </links>
4477         </class>
4478         <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">
4479                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.keyword_field_entry_id_seq">
4480                         <field name="field" reporter:datatype="link"/>
4481                         <field name="id" reporter:datatype="id" />
4482                         <field name="source" reporter:datatype="link"/>
4483                         <field name="value"  reporter:datatype="text"/>
4484                 </fields>
4485                 <links>
4486                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
4487                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
4488                 </links>
4489         </class>
4490         <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">
4491                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
4492                         <field name="accepting_usr" reporter:datatype="link"/>
4493                         <field name="amount" reporter:datatype="money" />
4494                         <field name="amount_collected" reporter:datatype="money" />
4495                         <field name="cash_drawer" reporter:datatype="link"/>
4496                         <field name="id" reporter:datatype="id" />
4497                         <field name="note"  reporter:datatype="text"/>
4498                         <field name="payment_ts" reporter:datatype="timestamp"/>
4499                         <field name="xact" reporter:datatype="link"/>
4500                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
4501                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
4502                 </fields>
4503                 <links>
4504                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
4505                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
4506                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
4507                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
4508                 </links>
4509         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4510             <actions>
4511                 <retrieve permission="VIEW_USER_TRANSACTIONS">
4512                     <context link="xact" jump="usr" field="home_ou"/>
4513                 </retrieve>
4514                         </actions>
4515                 </permacrud>
4516         </class>
4517         <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">
4518                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
4519                         <field name="accepting_usr" reporter:datatype="link"/>
4520                         <field name="amount" reporter:datatype="money" />
4521                         <field name="amount_collected" reporter:datatype="money" />
4522                         <field name="id" reporter:datatype="id" />
4523                         <field name="note"  reporter:datatype="text"/>
4524                         <field name="payment_ts" reporter:datatype="timestamp"/>
4525                         <field name="xact" reporter:datatype="link"/>
4526                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
4527                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
4528                 </fields>
4529                 <links>
4530                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
4531                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
4532                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
4533                 </links>
4534         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4535             <actions>
4536                 <retrieve permission="VIEW_USER_TRANSACTIONS">
4537                     <context link="xact" jump="usr" field="home_ou"/>
4538                 </retrieve>
4539                         </actions>
4540                 </permacrud>
4541         </class>
4542         <class id="maa" controller="open-ils.cstore" oils_obj:fieldmapper="money::account_adjustment" oils_persist:tablename="money.account_adjustment" reporter:label="Account Adjustment">
4543                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
4544                         <field name="accepting_usr" reporter:datatype="link"/>
4545                         <field name="amount" reporter:datatype="money" />
4546                         <field name="amount_collected" reporter:datatype="money" />
4547                         <field name="id" reporter:datatype="id" />
4548                         <field name="note"  reporter:datatype="text"/>
4549                         <field name="payment_ts" reporter:datatype="timestamp"/>
4550                         <field name="xact" reporter:datatype="link"/>
4551                         <field name="billing" reporter:datatype="link"/>
4552                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
4553                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
4554                 </fields>
4555                 <links>
4556                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
4557                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
4558                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
4559                         <link field="billing" reltype="might_have" key="id" class="mb"/>
4560                 </links>
4561         </class>
4562         <class id="mrd" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::record_descriptor" oils_persist:tablename="metabib.rec_descriptor" reporter:label="Basic Record Descriptor">
4563                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.rec_descriptor_id_seq">
4564                         <field reporter:label="Audn" name="audience" oils_persist:primitive="string"  reporter:datatype="text"/>
4565                         <field reporter:label="BLvl" name="bib_level" oils_persist:primitive="string"  reporter:datatype="text"/>
4566                         <field reporter:label="Cat Form" name="cat_form" oils_persist:primitive="string"  reporter:datatype="text"/>
4567                         <field reporter:label="Character Encoding" name="char_encoding" oils_persist:primitive="string"  reporter:datatype="text"/>
4568                         <field reporter:label="Ctrl" name="control_type" oils_persist:primitive="string"  reporter:datatype="text"/>
4569                         <field reporter:label="ELvl" name="enc_level" oils_persist:primitive="string"  reporter:datatype="text"/>
4570                         <field reporter:label="Descriptor ID" name="id" reporter:datatype="id" />
4571                         <field reporter:label="Form" name="item_form" oils_persist:primitive="string"  reporter:datatype="text"/>
4572                         <field reporter:label="Lang" name="item_lang" oils_persist:primitive="string"  reporter:datatype="text"/>
4573                         <field reporter:label="Type" name="item_type" oils_persist:primitive="string"  reporter:datatype="text"/>
4574                         <field reporter:label="LitF" name="lit_form" oils_persist:primitive="string"  reporter:datatype="text"/>
4575                         <field reporter:label="Pub Status" name="pub_status" oils_persist:primitive="string"  reporter:datatype="text"/>
4576                         <field reporter:label="Bib Record Entry" name="record" reporter:datatype="link"/>
4577                         <field reporter:label="TMat" name="type_mat" oils_persist:primitive="string"  reporter:datatype="text"/>
4578                         <field reporter:label="Video Recording Format" name="vr_format" oils_persist:primitive="string"  reporter:datatype="text"/>
4579                         <field reporter:label="Date1" name="date1" oils_persist:primitive="string"  reporter:datatype="text"/>
4580                         <field reporter:label="Date2" name="date2" oils_persist:primitive="string"  reporter:datatype="text"/>
4581                 </fields>
4582                 <links>
4583                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
4584                         <link field="item_lang" reltype="has_a" key="code" map="" class="clm"/>
4585                         <link field="item_type" reltype="has_a" key="code" map="" class="citm"/>
4586                         <link field="bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
4587                         <link field="item_form" reltype="has_a" key="code" map="" class="cifm"/>
4588                         <link field="audience" reltype="has_a" key="code" map="" class="cam"/>
4589                         <link field="lit_form" reltype="has_a" key="code" map="" class="clfm"/>
4590                 </links>
4591         </class>
4592
4593         <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">
4594                 <fields oils_persist:primary="id" oils_persist:sequence="config.standing_penalty_id_seq">
4595                         <field reporter:label="Penalty ID" name="id" reporter:selector="name" reporter:datatype="id"/>
4596                         <field reporter:label="Name" name="name"  reporter:datatype="text"/>
4597                         <field reporter:label="Label" name="label"  reporter:datatype="text" oils_persist:i18n="true"/>
4598                         <field reporter:label="Block List" name="block_list" reporter:datatype="text"/>
4599                         <field reporter:label="Staff Alert" name="staff_alert" reporter:datatype="bool"/>
4600                         <field reporter:label="Org Depth" name="org_depth" reporter:datatype="int"/>
4601                         <field reporter:label="Ignore Proximity" name="ignore_proximity" reporter:datatype="int"/>
4602                 </fields>
4603                 <links/>
4604         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4605             <actions>
4606                 <create permission="ADMIN_STANDING_PENALTY" global_required="true"/>
4607                 <retrieve permission="ADMIN_STANDING_PENALTY VIEW_STANDING_PENALTY" global_required="true"/>
4608                 <update permission="ADMIN_STANDING_PENALTY" global_required="true"/>
4609                 <delete permission="ADMIN_STANDING_PENALTY" global_required="true"/>
4610             </actions>
4611         </permacrud>
4612         </class>
4613         <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">
4614                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_penalty_threshold_id_seq">
4615                         <field name="id" reporter:selector="name" reporter:datatype="id" reporter:label="ID"/>
4616                         <field name="grp"  reporter:datatype="link" reporter:label="Group"/>
4617                         <field name="penalty"  reporter:datatype="link" reporter:label="Penalty"/>
4618                         <field name="threshold" reporter:datatype="float" reporter:label="Threshold"/>
4619                         <field name="org_unit" reporter:datatype="org_unit" reporter:label="Org Unit"/>
4620                 </fields>
4621                 <links>
4622                         <link field="penalty" reltype="has_a" key="id" map="" class="csp"/>
4623                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
4624                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
4625         </links>
4626         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4627             <actions>
4628                 <create permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
4629                 <retrieve permission="VIEW_GROUP_PENALTY_THRESHOLD ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
4630                 <update permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
4631                 <delete permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
4632             </actions>
4633         </permacrud>
4634         </class>
4635         <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="Item Status" oils_persist:field_safe="true">
4636                 <fields oils_persist:primary="id" oils_persist:sequence="config.copy_status_id_seq">
4637                         <field name="holdable" reporter:datatype="bool" reporter:label="Holdable"/>
4638                         <field name="id" reporter:selector="name" reporter:datatype="id" reporter:label="ID"/>
4639                         <field name="name"  reporter:datatype="text" oils_persist:i18n="true" reporter:label="Name"/>
4640                         <field name="opac_visible" reporter:datatype="bool" reporter:label="OPAC Visible"/>
4641             <field name="copy_active" reporter:datatype="bool" reporter:label="Sets Item Active"/>
4642             <field name="restrict_copy_delete" reporter:datatype="bool" reporter:label="Restrict Deletion"/>
4643             <field name="is_available" reporter:datatype="bool" reporter:label="Available"/>
4644             <field name="hopeless_prone" reporter:datatype="bool" reporter:label="Prone to Hopeless Holds?"/>
4645                 </fields>
4646                 <links/>
4647         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4648             <actions>
4649                 <create permission="CREATE_COPY_STATUS" global_required="true"/>
4650                 <retrieve/>
4651                 <update permission="UPDATE_COPY_STATUS" global_required="true"/>
4652                 <delete permission="DELETE_COPY_STATUS" global_required="true"/>
4653             </actions>
4654         </permacrud>
4655         </class>
4656         <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">
4657                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_standing_penalty_id_seq">
4658                         <field name="id" reporter:datatype="id" reporter:label="ID" />
4659                         <field name="set_date" reporter:datatype="timestamp" reporter:label="Set Date"/>
4660                         <field name="usr" reporter:datatype="link" reporter:label="User"/>
4661                         <field name="staff" reporter:datatype="link" reporter:label="Staff"/>
4662                         <field name="standing_penalty" reporter:datatype="link" reporter:label="Standing Penalty"/>
4663                         <field name="org_unit" reporter:datatype="link" reporter:label="Org Unit"/>
4664                         <field name="stop_date" reporter:datatype="timestamp" reporter:label="Stop Date"/>
4665                         <field name="note" reporter:datatype="text" reporter:label="Note"/>
4666                 </fields>
4667                 <links>
4668                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4669                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
4670                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
4671                         <link field="standing_penalty" reltype="has_a" key="id" map="" class="csp"/>
4672                 </links>
4673                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4674                         <actions>
4675                                 <create permission="UPDATE_USER"><context link="usr" field="home_ou"/></create>
4676                                 <retrieve permission="VIEW_USER"><context link="usr" field="home_ou"/></retrieve>
4677                                 <update permission="UPDATE_USER"><context link="usr" field="home_ou"/></update>
4678                                 <delete permission="UPDATE_USER"><context link="usr" field="home_ou"/></delete>
4679                         </actions>
4680                 </permacrud>
4681         </class>
4682         <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">
4683                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_address_id_seq">
4684                         <field reporter:label="Type" name="address_type"  reporter:datatype="text"/>
4685                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
4686                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
4687                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
4688                         <field reporter:label="Address ID" name="id" reporter:datatype="id" />
4689                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
4690                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
4691                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
4692                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
4693                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
4694                         <field reporter:label="Valid Address?" name="valid" reporter:datatype="bool"/>
4695                         <field reporter:label="Within City Limits?" name="within_city_limits" reporter:datatype="bool"/>
4696                         <field reporter:label="Replaces" name="replaces" reporter:datatype="link"/>
4697                         <field reporter:label="Pending" name="pending" reporter:datatype="bool"/>
4698                 </fields>
4699                 <links>
4700                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4701                         <link field="replaces" reltype="has_a" key="id" map="" class="aua"/>
4702                 </links>
4703                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4704                         <actions>
4705                                 <create permission="UPDATE_USER"><context link="usr" field="home_ou"/></create>
4706                                 <retrieve permission="VIEW_USER"><context link="usr" field="home_ou"/></retrieve>
4707                                 <update permission="UPDATE_USER"><context link="usr" field="home_ou"/></update>
4708                                 <delete permission="UPDATE_USER"><context link="usr" field="home_ou"/></delete>
4709                         </actions>
4710                 </permacrud>
4711         </class>
4712         <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">
4713                 <fields oils_persist:primary="id" oils_persist:sequence="actor.address_alert_id_seq">
4714                         <field reporter:label="Address Alert ID" name="id" reporter:datatype="id" />
4715                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" oils_obj:required="true"/>
4716                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
4717                         <field reporter:label="Match All Fields" name="match_all" reporter:datatype="bool" />
4718                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text" oils_obj:required="true"/>
4719                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
4720                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
4721                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
4722                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
4723                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
4724                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
4725                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
4726                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="bool"/>
4727                         <field reporter:label="Billing Address" name="billing_address" reporter:datatype="bool"/>
4728                 </fields>
4729                 <links>
4730                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4731                 </links>
4732                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4733                         <actions>
4734                                 <create   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
4735                                 <retrieve context_field='owner' permission="ADMIN_ADDRESS_ALERT VIEW_ADDRESS_ALERT CREATE_USER"/>
4736                                 <update   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
4737                                 <delete   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
4738                         </actions>
4739                 </permacrud>
4740         </class>
4741
4742
4743         <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">
4744                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_saved_search_id_seq">
4745                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4746                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
4747                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
4748                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4749                         <field reporter:label="Query Text" name="query_text" reporter:datatype="text"/>
4750                         <field reporter:label="Query Type" name="query_type" reporter:datatype="text"/>
4751                         <field reporter:label="Target" name="target" reporter:datatype="text"/>
4752                 </fields>
4753                 <links>
4754                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
4755                 </links>
4756         </class>
4757
4758         <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">
4759                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_note_id_seq">
4760                         <field name="call_number" />
4761                         <field name="create_date" reporter:datatype="timestamp"/>
4762                         <field name="creator" reporter:datatype="link"/>
4763                         <field name="id" reporter:datatype="id" />
4764                         <field name="pub" reporter:datatype="bool"/>
4765                         <field name="title"  reporter:datatype="text"/>
4766                         <field name="value"  reporter:datatype="text"/>
4767                 </fields>
4768                 <links>
4769                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
4770                 </links>
4771         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4772             <actions>
4773                 <create permission="CREATE_VOLUME_NOTE">
4774                     <context link="call_number" field="owning_lib"/>
4775                 </create>
4776                 <retrieve permission="VIEW_VOLUME_NOTES">
4777                     <context link="call_number" field="owning_lib"/>
4778                 </retrieve>
4779                 <update permission="UPDATE_VOLUME_NOTE">
4780                     <context link="call_number" field="owning_lib"/>
4781                 </update>
4782                 <delete permission="DELETE_VOLUME_NOTE">
4783                     <context link="call_number" field="owning_lib"/>
4784                 </delete>
4785             </actions>
4786         </permacrud>
4787         </class>
4788         <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">
4789                 <fields oils_persist:primary="id" oils_persist:sequence="authority.record_note_id_seq">
4790                         <field name="create_date" reporter:datatype="timestamp"/>
4791                         <field name="creator" reporter:datatype="link"/>
4792                         <field name="edit_date" reporter:datatype="timestamp"/>
4793                         <field name="editor" reporter:datatype="link"/>
4794                         <field name="id" reporter:datatype="id" />
4795                         <field name="record" reporter:datatype="link"/>
4796                         <field name="value" reporter:datatype="text"/>
4797                 </fields>
4798                 <links>
4799                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
4800                 </links>
4801         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4802             <actions>
4803                 <create permission="CREATE_AUTHORITY_RECORD_NOTE" global_required='true'/>
4804                 <retrieve/>
4805                 <update permission="UPDATE_AUTHORITY_RECORD_NOTE" global_required='true'/>
4806                 <delete permission="DELETE_AUTHORITY_RECORD_NOTE" global_required='true'/>
4807             </actions>
4808         </permacrud>
4809         </class>
4810         <class id="ocirccount" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circ_count" reporter:label="Open Circulation Count" oils_persist:readonly="true">
4811         <oils_persist:source_definition><![CDATA[
4812 SELECT  usr,
4813         SUM(
4814             CASE
4815                 WHEN (
4816                     ((fine_interval >= '1 day' AND due_date >= 'today') OR (fine_interval < '1 day'  AND due_date > 'now'))
4817                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
4818                 ) THEN 1
4819                 ELSE 0
4820             END
4821         ) AS out,
4822
4823         SUM(
4824             CASE
4825                 WHEN (
4826                     ((fine_interval >= '1 day' AND due_date < 'today') OR (fine_interval < '1 day'  AND due_date < 'now'))
4827                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
4828                 ) THEN 1
4829                 ELSE 0
4830             END
4831         ) AS overdue,
4832
4833         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LOST') THEN 1 ELSE 0 END) AS lost,
4834         SUM( CASE WHEN stop_fines = 'CLAIMSRETURNED' THEN 1 ELSE 0 END) AS claims_returned,
4835         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LONGOVERDUE') THEN 1 ELSE 0 END) AS long_overdue
4836   FROM  action.circulation
4837   WHERE checkin_time IS NULL
4838   GROUP BY 1
4839         ]]></oils_persist:source_definition>
4840         <fields oils_persist:primary="usr">
4841             <field reporter:label="User ID" name="usr" reporter:datatype="link"/>
4842             <field reporter:label="Out" name="out" reporter:datatype="text"/>
4843             <field reporter:label="Overdue" name="overdue" reporter:datatype="text"/>
4844             <field reporter:label="Lost" name="lost" reporter:datatype="text"/>
4845             <field reporter:label="Claims Returned" name="claims_returned" reporter:datatype="text"/>
4846             <field reporter:label="Long Overdue" name="long_overdue" reporter:datatype="text"/>
4847         </fields>
4848         <links>
4849             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4850         </links>
4851         </class>
4852         <class id="ocirclist" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circ_list" reporter:label="Open Circulation List" oils_persist:readonly="true">
4853         <oils_persist:source_definition><![CDATA[
4854 SELECT  usr,
4855         STRING_AGG(
4856             CASE
4857                 WHEN (
4858                     ((fine_interval >= '1 day' AND due_date >= 'today') OR (fine_interval < '1 day'  AND due_date > 'now'))
4859                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
4860                 ) THEN id::TEXT
4861                 ELSE '0'
4862             END
4863         ,',') AS out,
4864
4865         STRING_AGG(
4866             CASE
4867                 WHEN (
4868                     ((fine_interval >= '1 day' AND due_date < 'today') OR (fine_interval < '1 day'  AND due_date < 'now'))
4869                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
4870                 ) THEN id::TEXT
4871                 ELSE '0'
4872             END
4873         ,',') AS overdue,
4874
4875         STRING_AGG( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LOST') THEN id::TEXT ELSE '0' END,',') AS lost,
4876         STRING_AGG( CASE WHEN stop_fines = 'CLAIMSRETURNED' THEN id::TEXT ELSE '0' END,',') AS claims_returned,
4877         STRING_AGG( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LONGOVERDUE') THEN id::TEXT ELSE '0' END,',') AS long_overdue
4878   FROM  action.circulation
4879   WHERE checkin_time IS NULL
4880   GROUP BY 1
4881         ]]></oils_persist:source_definition>
4882         <fields oils_persist:primary="usr">
4883             <field reporter:label="User ID" name="usr" reporter:datatype="link"/>
4884             <field reporter:label="Out" name="out" reporter:datatype="text"/>
4885             <field reporter:label="Overdue" name="overdue" reporter:datatype="text"/>
4886             <field reporter:label="Lost" name="lost" reporter:datatype="text"/>
4887             <field reporter:label="Claims Returned" name="claims_returned" reporter:datatype="text"/>
4888             <field reporter:label="Long Overdue" name="long_overdue" reporter:datatype="text"/>
4889         </fields>
4890         <links>
4891             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4892         </links>
4893         </class>
4894         <class id="acsp" controller="open-ils.cstore" oils_obj:fieldmapper="action::curbside" oils_persist:tablename="action.curbside" reporter:label="Curbside Appointment Slot">
4895                 <fields oils_persist:primary="id" oils_persist:sequence="action.curbside_id_seq">
4896                         <field reporter:label="Appointment ID" name="id" reporter:datatype="id" />
4897                         <field reporter:label="Patron" name="patron" reporter:datatype="link"/>
4898                         <field reporter:label="Pickup Library" name="org" reporter:datatype="org_unit"/>
4899                         <field reporter:label="Appointment Date/Time" name="slot" reporter:datatype="timestamp"/>
4900                         <field reporter:label="Staged" name="staged" reporter:datatype="timestamp"/>
4901                         <field reporter:label="Staging Staff" name="stage_staff" reporter:datatype="link"/>
4902                         <field reporter:label="Arrival Date/Time" name="arrival" reporter:datatype="timestamp"/>
4903                         <field reporter:label="Delivery Date/Time" name="delivered" reporter:datatype="timestamp"/>
4904                         <field reporter:label="Delivery Staff" name="delivery_staff" reporter:datatype="link"/>
4905                         <field reporter:label="Notes" name="notes" reporter:datatype="text"/>
4906                 </fields>
4907                 <links>
4908                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
4909                         <link field="patron" reltype="has_a" key="id" map="" class="au"/>
4910                         <link field="stage_staff" reltype="has_a" key="id" map="" class="au"/>
4911                         <link field="delivery_staff" reltype="has_a" key="id" map="" class="au"/>
4912                 </links>
4913         </class>
4914         <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">
4915                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
4916                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
4917                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
4918                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
4919                         <field reporter:label="Checkout / Renewal Library" name="circ_lib"  reporter:datatype="org_unit"/>
4920                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
4921                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
4922                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
4923                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
4924                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
4925                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4926                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
4927                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
4928                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
4929                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
4930                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
4931                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
4932                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
4933                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
4934                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
4935                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
4936                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
4937                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
4938                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
4939                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
4940                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
4941                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
4942                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
4943                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
4944                         <field reporter:label="Checkin Scan Date/Time" name="checkin_scan_time" reporter:datatype="timestamp" />
4945                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
4946                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4947                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4948                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
4949                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
4950                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4951                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4952                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
4953                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
4954                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4955                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4956                         <field reporter:label="Auto Renewal" name="auto_renewal" reporter:datatype="bool"/>
4957                         <field reporter:label="Remaining Auto Renewals" name="auto_renewal_remaining" reporter:datatype="int" />
4958                 </fields>
4959                 <links>
4960                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
4961                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
4962                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
4963                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4964                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
4965                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4966                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4967                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
4968                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
4969                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
4970                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
4971                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
4972                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
4973                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4974                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4975                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
4976                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
4977                         <link field="parent_circ" reltype="has_a" key="id" map="" class="circ"/>
4978                         <link field="renewals" reltype="has_many" key="parent_circ" map="" class="circ"/>
4979                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
4980                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
4981                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
4982                 </links>
4983                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4984                         <actions>
4985                                 <retrieve permission="VIEW_CIRCULATIONS" context_field="circ_lib" />
4986                         </actions>
4987                 </permacrud>
4988         </class>
4989         <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">
4990                 <fields>
4991                         <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
4992                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
4993                         <field reporter:label="Circ ID" name="id" reporter:datatype="int" />
4994                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
4995                         <field reporter:label="Create Date/Time" name="create_time" reporter:datatype="timestamp" />
4996                         <field reporter:label="Circulation Type" name="circ_type" reporter:datatype="text"/>
4997                         <field reporter:label="Item Type" name="item_type" reporter:datatype="text"/>
4998                 </fields>
4999                 <links>
5000                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
5001                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5002                 </links>
5003                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5004                         <actions>
5005                                 <retrieve permission="VIEW_CIRCULATIONS" context_field="circ_lib" />
5006                         </actions>
5007                 </permacrud>
5008         </class>
5009         <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="false" reporter:label="Combined Aged and Active Circulations (Slim Version)" oils_persist:readonly="true">
5010                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
5011                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
5012                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
5013                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
5014                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
5015                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
5016                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
5017                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
5018                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
5019                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
5020                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
5021                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
5022                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
5023                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
5024                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
5025                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
5026                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
5027                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
5028                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
5029                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
5030                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
5031                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
5032                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
5033                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
5034                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
5035                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
5036                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
5037                         <field reporter:label="Checkin Scan Time" name="checkin_scan_time" reporter:datatype="timestamp"/>
5038                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
5039                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
5040                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
5041                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
5042                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
5043                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
5044                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
5045                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
5046                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
5047                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
5048                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
5049                         <field reporter:label="Linked Active Circulation" name="active_circ" oils_persist:virtual="true" reporter:datatype="link"/>
5050                         <field reporter:label="Linked Aged Circulation" name="aged_circ" oils_persist:virtual="true" reporter:datatype="link"/>
5051                         <field reporter:label="Auto Renewal" name="auto_renewal" reporter:datatype="bool"/>
5052                         <field reporter:label="Remaining Auto Renewals" name="auto_renewal_remaining" reporter:datatype="int" />
5053                 </fields>
5054                 <links>
5055                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
5056                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
5057                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
5058                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
5059                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
5060                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5061                         <link field="payments" reltype="has_many" key="xact" map="" class="mallp"/>
5062                         <link field="billings" reltype="has_many" key="xact" map="" class="mallb"/>
5063                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
5064                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
5065                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
5066                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
5067                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
5068                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
5069                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
5070                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
5071                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
5072                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
5073                         <link field="active_circ" reltype="might_have" key="id" map="" class="circ"/>
5074                         <link field="aged_circ" reltype="might_have" key="id" map="" class="acirc"/>
5075                         <link field="parent_circ" reltype="might_have" key="id" map="" class="acirc"/>
5076                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5077                 </links>
5078                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5079                         <actions>
5080                                 <retrieve permission="VIEW_CIRCULATIONS" context_field="circ_lib" />
5081                         </actions>
5082                 </permacrud>
5083         </class>
5084
5085         <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">
5086                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
5087                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
5088                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
5089                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
5090                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
5091                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
5092                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
5093                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
5094                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
5095                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
5096                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
5097                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
5098                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
5099                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
5100                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
5101                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
5102                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
5103                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
5104                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
5105                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
5106                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
5107                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
5108                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
5109                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
5110                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
5111                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
5112                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
5113                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
5114                         <field reporter:label="Checkin Scan Time" name="checkin_scan_time" reporter:datatype="timestamp"/>
5115                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
5116                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
5117                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
5118                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
5119                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
5120                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
5121                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
5122                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
5123                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
5124                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
5125                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
5126                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
5127                         <field reporter:label="Call Number" name="copy_call_number" reporter:datatype="link"/>
5128                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
5129                         <field reporter:label="Copy Owning Library" name="copy_owning_lib" reporter:datatype="link"/>
5130                         <field reporter:label="Copy Circulating Library" name="copy_circ_lib" reporter:datatype="link"/>
5131                         <field reporter:label="Bib Record" name="copy_bib_record" reporter:datatype="link"/>
5132                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
5133                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
5134                         <field reporter:label="Linked Active Circulation" name="active_circ" oils_persist:virtual="true" reporter:datatype="link"/>
5135                         <field reporter:label="Linked Aged Circulation" name="aged_circ" oils_persist:virtual="true" reporter:datatype="link"/>
5136                         <field reporter:label="Auto Renewal" name="auto_renewal" reporter:datatype="bool"/>
5137                         <field reporter:label="Remaining Auto Renewals" name="auto_renewal_remaining" reporter:datatype="int" />
5138                 </fields>
5139                 <links>
5140                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
5141                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
5142                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
5143                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
5144                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
5145                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5146                         <link field="payments" reltype="has_many" key="xact" map="" class="mallp"/>
5147                         <link field="billings" reltype="has_many" key="xact" map="" class="mallb"/>
5148                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
5149                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
5150                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
5151                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
5152                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
5153                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
5154                         <link field="copy_call_number" reltype="has_a" key="id" map="" class="acn"/>
5155                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
5156                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5157                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5158                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
5159                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
5160                         <link field="copy_bib_record" reltype="has_a" key="id" map="" class="bre"/>
5161                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
5162                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
5163                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
5164                         <link field="usr_profile" reltype="has_a" key="id" map="" class="pgt"/>
5165                         <link field="active_circ" reltype="might_have" key="id" map="" class="circ"/>
5166                         <link field="aged_circ" reltype="might_have" key="id" map="" class="acirc"/>
5167                         <link field="parent_circ" reltype="might_have" key="id" map="" class="acirc"/>
5168                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5169                 </links>
5170                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5171                         <actions>
5172                                 <retrieve permission="VIEW_CIRCULATIONS" context_field="circ_lib" />
5173                         </actions>
5174                 </permacrud>
5175         </class>
5176         <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">
5177                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
5178                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
5179                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
5180                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
5181                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
5182                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
5183                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
5184                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
5185                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
5186                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
5187                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
5188                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
5189                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
5190                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
5191                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
5192                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
5193                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
5194                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
5195                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
5196                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
5197                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
5198                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
5199                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
5200                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
5201                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
5202                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
5203                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
5204                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
5205                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
5206                         <field reporter:label="Checkin Scan Date/Time" name="checkin_scan_time" reporter:datatype="timestamp" />
5207                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
5208                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
5209                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
5210                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
5211                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
5212                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
5213                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
5214                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
5215                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
5216                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
5217                         <field reporter:label="Call Number" name="copy_call_number" reporter:datatype="link"/>
5218                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
5219                         <field reporter:label="Copy Owning Library" name="copy_owning_lib" reporter:datatype="link"/>
5220                         <field reporter:label="Copy Circulating Library" name="copy_circ_lib" reporter:datatype="link"/>
5221                         <field reporter:label="Bib Record" name="copy_bib_record" reporter:datatype="link"/>
5222                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
5223                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
5224                         <field reporter:label="Auto Renewal" name="auto_renewal" reporter:datatype="bool"/>
5225                         <field reporter:label="Remaining Auto Renewals" name="auto_renewal_remaining" reporter:datatype="int" />
5226                 </fields>
5227                 <links>
5228                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
5229                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
5230                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
5231                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
5232                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
5233                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5234                         <link field="payments" reltype="has_many" key="xact" map="" class="mallp"/>
5235                         <link field="billings" reltype="has_many" key="xact" map="" class="mallb"/>
5236                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
5237                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
5238                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
5239                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
5240                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
5241                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
5242                         <link field="copy_call_number" reltype="has_a" key="id" map="" class="acn"/>
5243                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
5244                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5245                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5246                         <link field="copy_bib_record" reltype="has_a" key="id" map="" class="bre"/>
5247                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
5248                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
5249                         <link field="parent_circ" reltype="might_have" key="id" map="" class="circ"/>
5250                         <link field="renewals" reltype="has_many" key="parent_circ" map="" class="circ"/>
5251                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
5252                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
5253                 </links>
5254         </class>
5255         <class id="auch" 
5256                 controller="open-ils.cstore" 
5257                 oils_obj:fieldmapper="action::user_circ_history" 
5258                 oils_persist:tablename="action.usr_circ_history" 
5259                 reporter:label="User Checkout History">
5260                 <fields oils_persist:primary="id" oils_persist:sequence="action.usr_circ_history_id_seq">
5261                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5262                         <!-- prevent reporting on the user that owns the checkout history -->
5263                         <field reporter:label="User" name="usr" reporter:datatype="link" suppress_controller="open-ils.reporter-store"/>
5264                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
5265                         <field reporter:label="Checkin Time" name="checkin_time" reporter:datatype="timestamp" />
5266                         <field reporter:label="Due Date" name="due_date" reporter:datatype="timestamp" />
5267                         <field reporter:label="Checkout Time" name="xact_start" reporter:datatype="timestamp" />
5268                         <field reporter:label="Source Circulation" name="source_circ" reporter:datatype="link" />
5269                 </fields>
5270                 <links>
5271                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5272                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
5273                         <link field="source_circ" reltype="has_a" key="id" map="" class="circ"/>
5274                 </links>
5275         </class>
5276         <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">
5277                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_type_id_seq">
5278                         <field reporter:label="Resource Type ID" name="id" reporter:datatype="id" reporter:selector="name"/>
5279                         <field reporter:label="Resource Type Name" name="name" reporter:datatype="text" oils_obj:required="true"/>
5280                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
5281                         <field reporter:label="Fine Amount" name="fine_amount" reporter:datatype="money"/>
5282                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money"/>
5283                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit" oils_obj:required="true"/>
5284                         <field reporter:label="Catalog Item" name="catalog_item" reporter:datatype="bool"/>
5285                         <field reporter:label="Bibliographic Record" name="record" reporter:datatype="link"/>
5286                         <field reporter:label="Transferable" name="transferable" reporter:datatype="bool"/>
5287                         <field reporter:label="Inter-booking and Inter-circulation Interval" name="elbow_room" reporter:datatype="interval"/>
5288                         <field reporter:label="Resources" name="resources" oils_persist:virtual="true" reporter:datatype="link"/>
5289                         <field reporter:label="Resource Attributes" name="resource_attrs" oils_persist:virtual="true" reporter:datatype="link"/>
5290                         <field reporter:label="Target Resource Types" name="tgt_rsrc_types" oils_persist:virtual="true" reporter:datatype="link"/>
5291                 </fields>
5292                 <links>
5293                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5294                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
5295                         <link field="resources" reltype="has_many" key="type" map="" class="brsrc"/>
5296                         <link field="resource_attrs" reltype="has_many" key="type" map="" class="bra"/>
5297                         <link field="tgt_rsrc_types" reltype="has_many" key="type" map="" class="bresv"/>
5298                 </links>
5299                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5300                         <actions>
5301                                 <create permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
5302                                 <retrieve permission="VIEW_BOOKING_RESOURCE_TYPE" context_field='owner'/>
5303                                 <update permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
5304                                 <delete permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
5305                         </actions>
5306                 </permacrud>
5307         </class>
5308
5309         <class id="brsrc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::resource" oils_persist:tablename="booking.resource" reporter:label="Resource">
5310                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_id_seq">
5311                         <field reporter:label="Resource ID" name="id" reporter:datatype="id" reporter:selector="barcode" />
5312                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit" oils_obj:required="true"/>
5313                         <field reporter:label="Resource Type" name="type" reporter:datatype="link" oils_obj:required="true"/>
5314                         <field reporter:label="Overbook" name="overbook" reporter:datatype="bool"/>
5315                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text" oils_obj:required="true"/>
5316                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
5317                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
5318                         <field reporter:label="User Fee" name="user_fee" reporter:datatype="money"/>
5319                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
5320                         <field reporter:label="Reservation Target Resources" name="tgt_rsrcs" oils_persist:virtual="true" reporter:datatype="link"/>
5321                         <field reporter:label="Reservation Current Resources" name="curr_rsrcs" oils_persist:virtual="true" reporter:datatype="link"/>
5322                         <field reporter:label="Catalog Item" name="catalog_item" oils_persist:virtual="true" reporter:datatype="link"/>
5323                 </fields>
5324                 <links>
5325                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5326                         <link field="type" reltype="has_a" key="id" map="" class="brt"/>
5327                         <link field="attr_maps" reltype="has_many" key="resource" map="" class="bram"/>
5328                         <link field="tgt_rsrcs" reltype="has_many" key="targeted_resource" map="" class="bresv"/>
5329                         <link field="curr_rsrcs" reltype="has_many" key="current_resource" map="" class="bresv"/>
5330                 </links>
5331                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5332                         <actions>
5333                                 <create permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
5334                                 <retrieve permission="VIEW_BOOKING_RESOURCE" context_field='owner'/>
5335                                 <update permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
5336                                 <delete permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
5337                         </actions>
5338                 </permacrud>
5339         </class>
5340         
5341         <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">
5342                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_id_seq">
5343                         <field reporter:label="Resource Attribute ID" name="id" reporter:datatype="id" reporter:selector="name" />
5344                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit" oils_obj:required="true"/>
5345                         <field reporter:label="Resource Attribute Name" name="name" reporter:datatype="text" oils_obj:required="true"/>
5346                         <field reporter:label="Resource Type" name="resource_type" reporter:datatype="link"/>
5347                         <field reporter:label="Is Required" name="required" reporter:datatype="bool"/>
5348                         <field reporter:label="Valid Values" name="valid_values" oils_persist:virtual="true" reporter:datatype="link"/>
5349                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
5350                 </fields>
5351                 <links>
5352                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5353                         <link field="resource_type" reltype="has_a" key="id" map="" class="brt"/>
5354                         <link field="valid_values" reltype="has_many" key="attr" map="" class="brav"/>
5355                         <link field="attr_maps" reltype="has_many" key="attr" map="" class="bram"/>
5356                 </links>
5357                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5358                         <actions>
5359                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
5360                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
5361                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
5362                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
5363                         </actions>
5364                 </permacrud>
5365         </class>
5366         
5367         <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">
5368                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_value_id_seq">
5369                         <field reporter:label="Resource Attribute Value ID" name="id" reporter:datatype="id" reporter:selector="valid_value" />
5370                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit" oils_obj:required="true"/>
5371                         <field reporter:label="Resource Attribute" name="attr" reporter:datatype="link" oils_obj:required="true"/>
5372                         <field reporter:label="Valid Value" name="valid_value" reporter:datatype="text" oils_obj:required="true"/>
5373                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
5374                         <field reporter:label="Resource Attribute Value Maps" name="attr_val_maps" oils_persist:virtual="true" reporter:datatype="link"/>
5375                 </fields>
5376                 <links>
5377                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5378                         <link field="attr" reltype="has_a" key="id" map="" class="bra"/>
5379                         <link field="attr_maps" reltype="has_many" key="id" map="" class="bram"/>
5380                         <link field="attr_val_maps" reltype="has_many" key="attr_value" map="" class="bravm"/>
5381                 </links>
5382                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5383                         <actions>
5384                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
5385                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
5386                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
5387                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
5388                         </actions>
5389                 </permacrud>
5390         </class>
5391         
5392         <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">
5393                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_map_id_seq">
5394                         <field reporter:label="Resource Attribute Map ID" name="id" reporter:datatype="id"/>
5395                         <field reporter:label="Resource" name="resource" reporter:datatype="link" oils_obj:required="true"/>
5396                         <field reporter:label="Resource Attribute" name="resource_attr" reporter:datatype="link" oils_obj:required="true"/>
5397                         <field reporter:label="Attribute Value" name="value" reporter:datatype="link" oils_obj:required="true"/>
5398                 </fields>
5399                 <links>
5400                         <link field="resource" reltype="has_a" key="id" map="" class="brsrc"/>
5401                         <link field="resource_attr" reltype="has_a" key="id" map="" class="bra"/>
5402                         <link field="value" reltype="has_a" key="id" map="" class="brav"/>
5403                 </links>
5404                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5405                         <actions>
5406                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
5407                     <context link="resource" field="owner" />
5408                 </create>
5409                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
5410                     <context link="resource" field="owner" />
5411                 </retrieve>
5412                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
5413                     <context link="resource" field="owner" />
5414                 </update>
5415                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
5416                     <context link="resource" field="owner" />
5417                 </delete>
5418                         </actions>
5419                 </permacrud>
5420         </class>
5421         
5422         <class id="bresv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::reservation" oils_persist:tablename="booking.reservation" reporter:label="Reservation">
5423                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
5424                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
5425                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
5426                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
5427                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
5428                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
5429                         <field reporter:label="Billing Line Items" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
5430                         <field reporter:label="Payment Line Items" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
5431                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
5432                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
5433                         <field reporter:label="Payment Summary" name="summary" oils_persist:virtual="true" reporter:datatype="link"/>
5434                         <field reporter:label="Request Time" name="request_time" reporter:datatype="timestamp"/>
5435                         <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp" oils_obj:required="true"/>
5436                         <field reporter:label="End Time" name="end_time" reporter:datatype="timestamp" oils_obj:required="true"/>
5437                         <field reporter:label="Capture Time" name="capture_time" reporter:datatype="timestamp"/>
5438                         <field reporter:label="Cancel Time" name="cancel_time" reporter:datatype="timestamp"/>
5439                         <field reporter:label="Pickup Time" name="pickup_time" reporter:datatype="timestamp"/>
5440                         <field reporter:label="Return Time" name="return_time" reporter:datatype="timestamp"/>
5441                         <field reporter:label="Booking Interval" name="booking_interval" reporter:datatype="interval"/>
5442                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
5443                         <field reporter:label="Fine Amount" name="fine_amount" reporter:datatype="money"/>
5444                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money"/>
5445                         <field reporter:label="Target Resource Type" name="target_resource_type" reporter:datatype="link"/>
5446                         <field reporter:label="Target Resource" name="target_resource" reporter:datatype="link"/>
5447                         <field reporter:label="Current Resource" name="current_resource" reporter:datatype="link"/>
5448                         <field reporter:label="Request Library" name="request_lib" reporter:datatype="link"/>
5449                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link"/>
5450                         <field reporter:label="Capture Staff" name="capture_staff" reporter:datatype="link"/>
5451                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
5452                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5453                         <field reporter:label="Attribute Value Maps" name="attr_val_maps" oils_persist:virtual="true" reporter:datatype="link"/>
5454                 </fields>
5455                 <links>
5456                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5457                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
5458                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
5459                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
5460                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
5461                         <link field="summary" reltype="might_have" key="id" map="" class="mbts"/>
5462                         <link field="target_resource_type" reltype="has_a" key="id" map="" class="brt"/>
5463                         <link field="target_resource" reltype="has_a" key="id" map="" class="brsrc"/>
5464                         <link field="current_resource" reltype="has_a" key="id" map="" class="brsrc"/>
5465                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
5466                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5467                         <link field="capture_staff" reltype="might_have" key="id" map="" class="au"/>
5468                         <link field="attr_val_maps" reltype="has_many" key="reservation" map="" class="bravm"/>
5469                 </links>
5470                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5471                         <actions>
5472                                 <create permission="ADMIN_BOOKING_RESERVATION" context_field="pickup_lib"/>
5473                                 <retrieve permission="VIEW_BOOKING_RESERVATION" context_field="pickup_lib"/>
5474                                 <update permission="ADMIN_BOOKING_RESERVATION" context_field="pickup_lib"/>
5475                                 <delete permission="ADMIN_BOOKING_RESERVATION" context_field="pickup_lib"/>
5476                         </actions>
5477                 </permacrud>
5478         </class>
5479         
5480         <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">
5481                 <fields oils_persist:primary="id" oils_persist:sequence="booking.reservation_attr_value_map_id_seq">
5482                         <field reporter:label="Reservation Attribute Value Map" name="id" reporter:datatype="id"/>
5483                         <field reporter:label="Reservation" name="reservation" reporter:datatype="link"/>
5484                         <field reporter:label="Attribute Map" name="attr_value" reporter:datatype="link"/>
5485                 </fields>
5486                 <links>
5487                         <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
5488                         <link field="attr_value" reltype="has_a" key="id" map="" class="brav"/>
5489                 </links>
5490                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5491                         <actions>
5492                                 <create permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP">
5493                                         <context link="reservation" field="pickup_lib"/>
5494                                 </create>
5495                                 <retrieve permission="VIEW_BOOKING_RESERVATION_ATTR_MAP">
5496                                         <context link="reservation" field="pickup_lib"/>
5497                                 </retrieve>
5498                                 <update permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP">
5499                                         <context link="reservation" field="pickup_lib"/>
5500                                 </update>
5501                                 <delete permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP">
5502                                         <context link="reservation" field="pickup_lib"/>
5503                                 </delete>
5504                         </actions>
5505                 </permacrud>
5506         </class>
5507
5508         <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">
5509                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_item_id_seq">
5510                         <field name="bucket" reporter:datatype="link"/>
5511                         <field name="id" reporter:datatype="id" />
5512                         <field name="target_call_number" reporter:datatype="link" />
5513                         <field name="create_time" reporter:datatype="timestamp" />
5514                         <field name="pos" reporter:datatype="int" />
5515                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
5516                 </fields>
5517                 <links>
5518                         <link field="target_call_number" reltype="has_a" key="id" map="" class="acn"/>
5519                         <link field="bucket" reltype="has_a" key="id" map="" class="ccnb"/>
5520             <link field="notes" reltype="has_many" map="" key="item" class="ccnbin"/>
5521                 </links>
5522                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5523                         <actions>
5524                                 <retrieve permission="ADMIN_CALLNUMBER_BUCKET">
5525                     <context link="bucket" owning_lib="owning_lib"/>
5526                 </retrieve>
5527             </actions>
5528         </permacrud>
5529         </class>
5530         <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">
5531                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_item_note_id_seq">
5532                         <field name="id" reporter:datatype="id" />
5533                         <field name="item" reporter:datatype="link"/>
5534                         <field name="note" reporter:datatype="text" />
5535                 </fields>
5536                 <links>
5537                         <link field="item" reltype="has_a" key="id" map="" class="ccnbi"/>
5538                 </links>
5539         </class>
5540         <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">
5541                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_id_seq">
5542                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
5543                         <field name="btype" reporter:datatype="text"/>
5544                         <field name="id" reporter:datatype="id" />
5545                         <field name="name" reporter:datatype="text"/>
5546                         <field name="description" reporter:datatype="text"/>
5547                         <field name="owner" reporter:datatype="link"/>
5548                         <field name="pub" reporter:datatype="bool"/>
5549                         <field name="create_time" reporter:datatype="timestamp" />
5550                         <field name="owning_lib" reporter:datatype="org_unit" />
5551                 </fields>
5552                 <links>
5553                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5554                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
5555                         <link field="items" reltype="has_many" key="bucket" map="" class="cbrebi"/>
5556                 </links>
5557                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5558                         <actions>
5559                                 <create permission="CREATE_BIB_BUCKET ADMIN_BIB_BUCKET" context="owning_lib" owning_user="owner"/>
5560                                 <retrieve permission="CREATE_BIB_BUCKET ADMIN_BIB_BUCKET" context="owning_lib" owning_user="owner"/>
5561                                 <update permission="CREATE_BIB_BUCKET ADMIN_BIB_BUCKET" context="owning_lib" owning_user="owner"/>
5562                                 <delete permission="CREATE_BIB_BUCKET ADMIN_BIB_BUCKET" context="owning_lib" owning_user="owner"/>
5563                         </actions>
5564                 </permacrud>
5565         </class>
5566         <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">
5567                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_note_id_seq">
5568                         <field name="id" reporter:datatype="id" />
5569                         <field name="bucket" reporter:datatype="link"/>
5570                         <field name="note" reporter:datatype="text" />
5571                 </fields>
5572                 <links>
5573                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
5574                 </links>
5575         </class>
5576         <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">
5577                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_copy_map_id_seq">
5578                         <field name="hold" reporter:datatype="link"/>
5579                         <field name="id" reporter:datatype="id" />
5580                         <field name="target_copy" reporter:datatype="link"/>
5581                         <field name="proximity" reporter:datatype="number"/>
5582                 </fields>
5583                 <links>
5584                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
5585                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
5586                 </links>
5587         </class>
5588         <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">
5589                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_notification_id_seq">
5590                         <field reporter:label="Hold" name="hold" reporter:datatype="link"/>
5591                         <field reporter:label="Notification ID" name="id" reporter:datatype="id" />
5592                         <field reporter:label="Notification Method" name="method"  reporter:datatype="text"/>
5593                         <field reporter:label="Notification Note" name="note"  reporter:datatype="text"/>
5594                         <field reporter:label="Notifying Staff" name="notify_staff" reporter:datatype="link"/>
5595                         <field reporter:label="Notification Date/Time" name="notify_time" reporter:datatype="timestamp"/>
5596                 </fields>
5597                 <links>
5598                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
5599                         <link field="notify_staff" reltype="has_a" key="id" map="" class="au"/>
5600                 </links>
5601         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5602             <actions>
5603                 <create permission="CREATE_HOLD_NOTIFICATION">
5604                                         <context link="hold" jump="usr" field="home_ou" />
5605                                 </create>
5606                 <retrieve permission="VIEW_HOLD_NOTIFICATION">
5607                                         <context link="hold" jump="usr" field="home_ou" />
5608                                 </retrieve>
5609                 <update permission="CREATE_HOLD_NOTIFICATION">
5610                                         <context link="hold" jump="usr" field="home_ou" />
5611                                 </update>
5612                 <delete permission="CREATE_HOLD_NOTIFICATION">
5613                                         <context link="hold" jump="usr" field="home_ou" />
5614                                 </delete>
5615             </actions>
5616         </permacrud>
5617         </class>
5618         <class id="acpl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::copy_location" oils_persist:tablename="asset.copy_location" reporter:label="Shelving Location"  oils_persist:field_safe="true">
5619                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_id_seq">
5620                         <field reporter:label="Can Circulate?" name="circulate"  reporter:datatype="bool"/>
5621                         <field reporter:label="Is Holdable?" name="holdable" reporter:datatype="bool"/>
5622                         <field reporter:label="Hold Capture Requires Verification" name="hold_verify" reporter:datatype="bool"/>
5623                         <field reporter:label="Location ID" name="id" reporter:selector="name" reporter:datatype="id"/>
5624                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
5625                         <field reporter:label="Is OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
5626                         <field reporter:label="Owning Org Unit" name="owning_lib"  reporter:datatype="org_unit"/>
5627                         <field reporter:label="Copy Location Orders" name="orders" oils_persist:virtual="true" reporter:datatype="link"/>
5628                         <field reporter:label="Copies" name="copies" oils_persist:virtual="true" reporter:datatype="link"/>
5629                         <field reporter:label="Label Prefix" name="label_prefix"  reporter:datatype="text" oils_persist:i18n="true"/>
5630                         <field reporter:label="Label Suffix" name="label_suffix"  reporter:datatype="text" oils_persist:i18n="true"/>
5631                         <field reporter:label="Checkin Alert" name="checkin_alert" reporter:datatype="bool" />
5632                         <field reporter:label="Is Deleted?" name="deleted" reporter:datatype="bool" />
5633                         <field reporter:label="URL" name="url" reporter:datatype="text" />
5634                 </fields>
5635                 <links>
5636                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5637                         <link field="distribution_formula_entries" reltype="has_many" key="location" map="" class="acqdfe"/>
5638                         <link field="orders" reltype="has_many" key="location" map="" class="acplo"/>
5639                         <link field="copies" reltype="has_many" key="location" map="" class="acp"/>
5640                 </links>
5641         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5642             <actions>
5643                 <create permission="CREATE_COPY_LOCATION" context_field="owning_lib"/>
5644                 <retrieve/>
5645                 <update permission="UPDATE_COPY_LOCATION" context_field="owning_lib"/>
5646                 <delete permission="DELETE_COPY_LOCATION" context_field="owning_lib"/>
5647             </actions>
5648         </permacrud>
5649         </class>
5650         <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">
5651                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_group_id_seq">
5652                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
5653                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
5654                         <field reporter:label="Is OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
5655                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit" />
5656             <field reporter:label="Position" name="pos" reporter:datatype="int"/>
5657             <field reporter:label="Display Above Orgs" name="top" reporter:datatype="bool"/>
5658             <field reporter:label="Copy Location Mappings" name="location_maps" oils_persist:virtual="true" reporter:datatype="link"/>
5659                 </fields>
5660                 <links>
5661                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5662                         <link field="location_maps" reltype="has_many" key="lgroup" map="" class="acplgm"/>
5663                 </links>
5664         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5665             <actions>
5666                 <create permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
5667                 <retrieve/>
5668                 <update permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
5669                 <delete permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
5670             </actions>
5671         </permacrud>
5672         </class>
5673         <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">
5674                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_group_map_id_seq">
5675                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
5676             <field reporter:label="Group" name="lgroup" reporter:datatype="link"/>
5677             <field reporter:label="Copy Location" name="location" reporter:datatype="link"/>
5678                 </fields>
5679                 <links>
5680                         <link field="lgroup" reltype="has_a" key="id" map="" class="acplg"/>
5681                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
5682                 </links>
5683         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5684             <actions>
5685                 <create permission="ADMIN_COPY_LOCATION_GROUP">
5686                                         <context link="lgroup" field="owner" />
5687                 </create>
5688                 <retrieve/>
5689                 <update permission="ADMIN_COPY_LOCATION_GROUP">
5690                                         <context link="lgroup" field="owner" />
5691                 </update>
5692                 <delete permission="ADMIN_COPY_LOCATION_GROUP">
5693                                         <context link="lgroup" field="owner" />
5694                 </delete>
5695             </actions>
5696         </permacrud>
5697         </class>
5698
5699     <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">
5700         <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_order_id_seq">
5701             <field reporter:label="Location Order ID" name="id" reporter:datatype="id"/>
5702             <field reporter:label="Location ID" name="location" reporter:datatype="link"/>
5703             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit"/>
5704             <field reporter:label="Position" name="position" reporter:datatype="int"/>
5705         </fields>
5706         <links>
5707             <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
5708             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
5709         </links>
5710         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5711             <actions>
5712                                 <create permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
5713                 <retrieve/>
5714                                 <update permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
5715                                 <delete permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
5716             </actions>
5717         </permacrud>
5718     </class>
5719
5720         <class id="svr" controller="open-ils.cstore" oils_obj:fieldmapper="serial::virtual_record" oils_persist:virtual="true" reporter:label="Serial Virtual Record">
5721                 <fields>
5722                         <field name="sre_id" oils_persist:virtual="true" />
5723                         <field name="location" oils_persist:virtual="true" />
5724                         <field name="owning_lib" oils_persist:virtual="true" />
5725                         <field name="basic_holdings" oils_persist:virtual="true" />
5726                         <field name="basic_holdings_add" oils_persist:virtual="true" />
5727                         <field name="supplement_holdings" oils_persist:virtual="true" />
5728                         <field name="supplement_holdings_add" oils_persist:virtual="true" />
5729                         <field name="index_holdings" oils_persist:virtual="true" />
5730                         <field name="index_holdings_add" oils_persist:virtual="true" />
5731                         <field name="online" oils_persist:virtual="true" />
5732                         <field name="missing" oils_persist:virtual="true" />
5733                         <field name="incomplete" oils_persist:virtual="true" />
5734                 </fields>
5735         </class>
5736
5737         <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">
5738                 <fields oils_persist:primary="id" oils_persist:sequence="serial.record_entry_id_seq">
5739                         <field reporter:label="Is Active" name="active" reporter:datatype="bool"/>
5740                         <field reporter:label="Bib Record" name="record" reporter:datatype="link"/>
5741                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5742                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5743                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
5744                         <field reporter:label="Edit date" name="edit_date" reporter:datatype="timestamp"/>
5745                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
5746                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5747                         <field reporter:label="Last Transaction ID" name="last_xact_id" reporter:datatype="text"/>
5748                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
5749                         <field reporter:label="Source" name="source" reporter:datatype="int"/>
5750                         <field reporter:label="Owning Org Unit" name="owning_lib" reporter:datatype="org_unit"/>
5751                 </fields>
5752                 <links>
5753                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
5754                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5755                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5756                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5757                 </links>
5758                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5759                         <actions>
5760                                 <create permission="CREATE_MFHD_RECORD" context_field="owning_lib"/>
5761                                 <retrieve/>
5762                                 <update permission="UPDATE_MFHD_RECORD" context_field="owning_lib"/>
5763                                 <delete permission="DELETE_MFHD_RECORD" context_field="owning_lib"/>
5764                         </actions>
5765                 </permacrud>
5766         </class>
5767
5768         <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">
5769                 <fields oils_persist:primary="id" oils_persist:sequence="serial.caption_and_pattern_id_seq">
5770                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5771                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
5772                         <field reporter:label="Type" name="type" reporter:datatype="text"/>
5773                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5774                         <field reporter:label="Start Date" name="start_date" reporter:datatype="timestamp"/>
5775                         <field reporter:label="End Date" name="end_date" reporter:datatype="timestamp"/>
5776                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
5777                         <field reporter:label="Pattern Code" name="pattern_code" reporter:datatype="text"/>
5778                         <field reporter:label="Enum 1" name="enum_1" reporter:datatype="text"/>
5779                         <field reporter:label="Enum 2" name="enum_2" reporter:datatype="text"/>
5780                         <field reporter:label="Enum 3" name="enum_3" reporter:datatype="text"/>
5781                         <field reporter:label="Enum 4" name="enum_4" reporter:datatype="text"/>
5782                         <field reporter:label="Enum 5" name="enum_5" reporter:datatype="text"/>
5783                         <field reporter:label="Enum 6" name="enum_6" reporter:datatype="text"/>
5784                         <field reporter:label="Chron 1" name="chron_1" reporter:datatype="text"/>
5785                         <field reporter:label="Chron 2" name="chron_2" reporter:datatype="text"/>
5786                         <field reporter:label="Chron 3" name="chron_3" reporter:datatype="text"/>
5787                         <field reporter:label="Chron 4" name="chron_4" reporter:datatype="text"/>
5788                         <field reporter:label="Chron 5" name="chron_5" reporter:datatype="text"/>
5789                 </fields>
5790                 <links>
5791                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
5792                 </links>
5793                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5794                         <actions>
5795                                 <create permission="ADMIN_SERIAL_CAPTION_PATTERN">
5796                                         <context link="subscription" field="owning_lib" />
5797                                 </create>
5798                                 <retrieve />
5799                                 <update permission="ADMIN_SERIAL_CAPTION_PATTERN">
5800                                         <context link="subscription" field="owning_lib" />
5801                                 </update>
5802                                 <delete permission="ADMIN_SERIAL_CAPTION_PATTERN">
5803                                         <context link="subscription" field="owning_lib" />
5804                                 </delete>
5805                         </actions>
5806                 </permacrud>
5807         </class>
5808
5809         <class id="ssub" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::subscription" oils_persist:tablename="serial.subscription" reporter:label="Subscription">
5810                 <fields oils_persist:primary="id" oils_persist:sequence="serial.subscription_id_seq">
5811                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5812                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
5813                         <field reporter:label="Start Date" name="start_date" reporter:datatype="timestamp"/>
5814                         <field reporter:label="End Date" name="end_date" reporter:datatype="timestamp"/>
5815                         <field reporter:label="Bibliographic Record Entry" name="record_entry" reporter:datatype="link"/>
5816                         <field reporter:label="Expected Date Offset" name="expected_date_offset" reporter:datatype="interval"/>
5817                         <field reporter:label="Distributions" name="distributions" oils_persist:virtual="true" reporter:datatype="link"/>
5818                         <field reporter:label="Issuances" name="issuances" oils_persist:virtual="true" reporter:datatype="link"/>
5819                         <field reporter:label="Captions and Patterns" name="scaps" oils_persist:virtual="true" reporter:datatype="link"/>
5820                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
5821                 </fields>
5822                 <links>
5823                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5824                         <link field="record_entry" reltype="has_a" key="id" map="" class="bre"/>
5825                         <link field="distributions" reltype="has_many" key="subscription" map="" class="sdist"/>
5826                         <link field="issuances" reltype="has_many" key="subscription" map="" class="siss"/>
5827                         <link field="scaps" reltype="has_many" key="subscription" map="" class="scap"/>
5828                         <link field="notes" reltype="has_many" key="subscription" map="" class="ssubn"/>
5829                 </links>
5830                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5831                         <actions>
5832                                 <create permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
5833                                 <retrieve />
5834                                 <update permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
5835                                 <delete permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
5836                         </actions>
5837                 </permacrud>
5838         </class>
5839
5840         <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">
5841                 <fields oils_persist:primary="id" oils_persist:sequence="serial.subscription_note_id_seq">
5842                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5843                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
5844                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5845                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5846                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
5847                         <field reporter:label="Alert?" name="alert" reporter:datatype="bool"/>
5848                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
5849                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
5850                 </fields>
5851                 <links>
5852                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
5853                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5854                 </links>
5855                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5856                         <actions>
5857                                 <create permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib">
5858                     <context link="subscription" field="owning_lib"/>
5859                 </create>
5860                                 <retrieve />
5861                                 <update permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib">
5862                     <context link="subscription" field="owning_lib"/>
5863                 </update>
5864                                 <delete permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib">
5865                     <context link="subscription" field="owning_lib"/>
5866                 </delete>
5867                         </actions>
5868                 </permacrud>
5869         </class>
5870
5871         <class id="sdist" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::distribution" oils_persist:tablename="serial.distribution" reporter:label="Distribution">
5872                 <fields oils_persist:primary="id" oils_persist:sequence="serial.distribution_id_seq">
5873                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5874                         <field reporter:label="Legacy Record Entry" name="record_entry" reporter:datatype="link"/>
5875                         <field reporter:label="Summary Method" name="summary_method" reporter:datatype="text"/>
5876                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
5877                         <field reporter:label="Holding Lib" name="holding_lib" reporter:datatype="org_unit"/>
5878                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
5879                         <field reporter:label="Receive Call Number" name="receive_call_number" reporter:datatype="link"/>
5880                         <field reporter:label="Receive Unit Template" name="receive_unit_template" reporter:datatype="link"/>
5881                         <field reporter:label="Bind Call Number" name="bind_call_number" reporter:datatype="link"/>
5882                         <field reporter:label="Bind Unit Template" name="bind_unit_template" reporter:datatype="link"/>
5883                         <field reporter:label="Unit Label Prefix" name="unit_label_prefix" reporter:datatype="text"/>
5884                         <field reporter:label="Unit Label Suffix" name="unit_label_suffix" reporter:datatype="text"/>
5885                         <field reporter:label="Display Grouping" name="display_grouping" reporter:datatype="text"/>
5886                         <field reporter:label="Streams" name="streams" oils_persist:virtual="true" reporter:datatype="link"/>
5887                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
5888                         <field reporter:label="Basic Issue Summary" name="basic_summary" oils_persist:virtual="true" reporter:datatype="link"/>
5889                         <field reporter:label="Supplemental Issue Summary" name="supplement_summary" oils_persist:virtual="true" reporter:datatype="link"/>
5890                         <field reporter:label="Index Issue Summary" name="index_summary" oils_persist:virtual="true" reporter:datatype="link"/>
5891                 </fields>
5892                 <links>
5893                         <link field="record_entry" reltype="has_a" key="id" map="" class="sre"/>
5894                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
5895                         <link field="holding_lib" reltype="has_a" key="id" map="" class="aou"/>
5896                         <link field="receive_call_number" reltype="has_a" key="id" map="" class="acn"/>
5897                         <link field="receive_unit_template" reltype="has_a" key="id" map="" class="act"/>
5898                         <link field="bind_call_number" reltype="has_a" key="id" map="" class="acn"/>
5899                         <link field="bind_unit_template" reltype="has_a" key="id" map="" class="act"/>
5900                         <link field="streams" reltype="has_many" key="distribution" map="" class="sstr"/>
5901                         <link field="notes" reltype="has_many" key="distribution" map="" class="sdistn"/>
5902                         <link field="basic_summary" reltype="might_have" key="distribution" map="" class="sbsum"/>
5903                         <link field="supplement_summary" reltype="might_have" key="distribution" map="" class="sssum"/>
5904                         <link field="index_summary" reltype="might_have" key="distribution" map="" class="sisum"/>
5905                 </links>
5906                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5907                         <actions>
5908                                 <create permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
5909                                 <retrieve />
5910                                 <update permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
5911                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
5912                         </actions>
5913                 </permacrud>
5914         </class>
5915
5916         <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">
5917                 <fields oils_persist:primary="id" oils_persist:sequence="serial.distribution_note_id_seq">
5918                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5919                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
5920                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5921                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5922                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
5923                         <field reporter:label="Alert?" name="alert" reporter:datatype="bool"/>
5924                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
5925                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
5926                 </fields>
5927                 <links>
5928                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
5929                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5930                 </links>
5931                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5932                         <actions>
5933                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
5934                                         <context link="distribution" field="holding_lib" />
5935                                 </create>
5936                                 <retrieve permission="ADMIN_SERIAL_DISTRIBUTION">
5937                                         <context link="distribution" field="holding_lib" />
5938                                 </retrieve>
5939                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
5940                                         <context link="distribution" field="holding_lib" />
5941                                 </update>
5942                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
5943                                         <context link="distribution" field="holding_lib" />
5944                                 </delete>
5945                         </actions>
5946                 </permacrud>
5947         </class>
5948
5949         <class id="sstr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::stream" oils_persist:tablename="serial.stream" reporter:label="Stream">
5950                 <fields oils_persist:primary="id" oils_persist:sequence="serial.stream_id_seq">
5951                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5952                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
5953                         <field reporter:label="Routing Label" name="routing_label" reporter:datatype="text"/>
5954                         <field reporter:label="Items" name="items" oils_persist:virtual="true" reporter:datatype="link" />
5955                         <field reporter:label="Routing List Users" name="routing_list_users" oils_persist:virtual="true" reporter:datatype="link"/>
5956                 </fields>
5957                 <links>
5958                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
5959                         <link field="items" reltype="has_many" key="stream" map="" class="sitem"/>
5960                         <link field="routing_list_users" reltype="has_many" key="stream" map="" class="srlu"/>
5961                 </links>
5962                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5963                         <actions>
5964                                 <create permission="ADMIN_SERIAL_STREAM">
5965                                         <context link="distribution" field="holding_lib" />
5966                                 </create>
5967                                 <retrieve />
5968                                 <update permission="ADMIN_SERIAL_STREAM">
5969                                         <context link="distribution" field="holding_lib" />
5970                                 </update>
5971                                 <delete permission="ADMIN_SERIAL_STREAM">
5972                                         <context link="distribution" field="holding_lib" />
5973                                 </delete>
5974                         </actions>
5975                 </permacrud>
5976         </class>
5977
5978         <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">
5979                 <fields oils_persist:primary="id" oils_persist:sequence="serial.routing_list_user_id_seq">
5980                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5981                         <field reporter:label="Stream" name="stream" reporter:datatype="link"/>
5982                         <field reporter:label="Position" name="pos" reporter:datatype="int"/>
5983                         <field reporter:label="Reader" name="reader" reporter:datatype="link"/>
5984                         <field reporter:label="Department" name="department" reporter:datatype="text"/>
5985                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5986                 </fields>
5987                 <links>
5988                         <link field="stream" reltype="has_a" key="id" map="" class="sstr"/>
5989                         <link field="reader" reltype="has_a" key="id" map="" class="au"/>
5990                 </links>
5991                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5992                         <actions>
5993                                 <create permission="ADMIN_SERIAL_STREAM">
5994                                         <context link="stream" jump="distribution" field="holding_lib" />
5995                                 </create>
5996                                 <retrieve permission="RECEIVE_SERIAL">
5997                                         <context link="stream" jump="distribution" field="holding_lib" />
5998                                 </retrieve>
5999                                 <update permission="ADMIN_SERIAL_STREAM">
6000                                         <context link="stream" jump="distribution" field="holding_lib" />
6001                                 </update>
6002                                 <delete permission="ADMIN_SERIAL_STREAM">
6003                                         <context link="stream" jump="distribution" field="holding_lib" />
6004                                 </delete>
6005                         </actions>
6006                 </permacrud>
6007         </class>
6008
6009         <class id="siss" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::issuance" oils_persist:tablename="serial.issuance" reporter:label="Issuance">
6010                 <fields oils_persist:primary="id" oils_persist:sequence="serial.issuance_id_seq">
6011                         <field reporter:label="ID" name="id" reporter:datatype="id" />
6012                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
6013                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
6014                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
6015                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
6016                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
6017                         <field reporter:label="Caption/Pattern" name="caption_and_pattern" reporter:datatype="link"/>
6018                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
6019                         <field reporter:label="Date Published" name="date_published" reporter:datatype="timestamp"/>
6020                         <field reporter:label="Holding Code" name="holding_code" reporter:datatype="text"/>
6021                         <field reporter:label="Holding Type" name="holding_type" reporter:datatype="text"/>
6022                         <field reporter:label="Holding Link ID" name="holding_link_id" reporter:datatype="int"/>
6023                         <field reporter:label="Items" name="items" oils_persist:virtual="true" reporter:datatype="link" />
6024                 </fields>
6025                 <links>
6026                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6027                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6028                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
6029                         <link field="caption_and_pattern" reltype="has_a" key="id" map="" class="scap"/>
6030                         <link field="items" reltype="has_many" key="issuance" map="" class="sitem"/>
6031                 </links>
6032                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6033                         <actions>
6034                                 <create permission="ADMIN_SERIAL_SUBSCRIPTION">
6035                                         <context link="subscription" field="owning_lib" />
6036                                 </create>
6037                                 <retrieve/>
6038                                 <update permission="ADMIN_SERIAL_SUBSCRIPTION">
6039                                         <context link="subscription" field="owning_lib" />
6040                                 </update>
6041                                 <delete permission="ADMIN_SERIAL_SUBSCRIPTION">
6042                                         <context link="subscription" field="owning_lib" />
6043                                 </delete>
6044                         </actions>
6045                 </permacrud>
6046         </class>
6047
6048         <class id="sunit" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::unit" oils_persist:tablename="serial.unit" reporter:label="Unit">
6049                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_id_seq">
6050                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6051                         <field reporter:label="Age Hold Protection" name="age_protect" reporter:datatype="link"/>
6052                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
6053                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
6054                         <field reporter:label="Call Number/Volume" name="call_number" reporter:datatype="link"/>
6055                         <field reporter:label="Circulation Type (MARC)" name="circ_as_type" reporter:datatype="text"/>
6056                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
6057                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
6058                         <field reporter:label="Can Circulate" name="circulate" reporter:datatype="bool"/>
6059                         <field reporter:label="Copy Number on Volume" name="copy_number" reporter:datatype="text"/>
6060                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
6061                         <field reporter:label="Active Date/Time" name="active_date" reporter:datatype="timestamp"/>
6062                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
6063                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
6064                         <field reporter:label="Dummy ISBN" name="dummy_isbn" reporter:datatype="text"/>
6065                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
6066                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money" />
6067                         <field reporter:label="Precat Dummy Author" name="dummy_author" reporter:datatype="text"/>
6068                         <field reporter:label="Precat Dummy Title" name="dummy_title" reporter:datatype="text"/>
6069                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
6070                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
6071                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
6072                         <field reporter:label="Is Holdable" name="holdable" reporter:datatype="bool" />
6073                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
6074                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link"/>
6075                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool" />
6076                         <field reporter:label="Price" name="price" reporter:datatype="money" />
6077                         <field reporter:label="Is Reference" name="ref" reporter:datatype="bool"/>
6078                         <field reporter:label="Copy Status" name="status" reporter:datatype="link"/>
6079                         <field reporter:label="Copy Status Changed Time" name="status_changed_time" reporter:datatype="timestamp"/>
6080                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool"/>
6081                         <field reporter:label="Floating Group" name="floating" reporter:datatype="link"/>
6082                         <field reporter:label="Cost" name="cost" reporter:datatype="money"/>
6083                         <field reporter:label="Sort Key" name="sort_key" reporter:datatype="text"/>
6084                         <field reporter:label="Summary Contents" name="summary_contents" reporter:datatype="text"/>
6085                         <field reporter:label="Detailed Contents" name="detailed_contents" reporter:datatype="text"/>
6086                         <field reporter:label="Copy Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
6087                         <field reporter:label="Stat-Cat entry maps" name="stat_cat_entry_copy_maps" oils_persist:virtual="true" reporter:datatype="link"/>
6088                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
6089                         <field reporter:label="Total Circulations" name="total_circ_count" oils_persist:virtual="true" reporter:datatype="link"/>
6090                         <field reporter:label="Holds" name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
6091                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
6092                 </fields>
6093                 <links>
6094                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
6095                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
6096                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
6097                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6098                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6099                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
6100                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
6101                         <link field="holds" reltype="has_many" key="target_copy" map="hold" class="ahcm"/>
6102                         <link field="stat_cat_entry_copy_maps" reltype="has_many" key="owning_copy" map="" class="ascecm"/>
6103                         <link field="notes" reltype="has_many" key="owning_copy" map="" class="acpn"/>
6104                         <link field="stat_cat_entries" reltype="has_many" key="owning_copy" map="stat_cat_entry" class="ascecm"/>
6105                         <link field="circulations" reltype="has_many" key="target_copy" map="" class="circ"/>
6106                         <link field="total_circ_count" reltype="might_have" key="id" map="" class="erfcc"/>
6107                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
6108                         <link field="floating" reltype="has_a" key="id" map="" class="cfg"/>
6109                 </links>
6110                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6111                         <actions>
6112                                 <create permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
6113                                 <retrieve/>
6114                                 <update permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
6115                                 <delete permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
6116                         </actions>
6117                 </permacrud>
6118         </class>
6119
6120         <class id="sitem" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::item" oils_persist:tablename="serial.item" reporter:label="Item">
6121                 <fields oils_persist:primary="id" oils_persist:sequence="serial.item_id_seq">
6122                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6123                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
6124                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
6125                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
6126                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
6127                         <field reporter:label="Issuance" name="issuance" reporter:datatype="link"/>
6128                         <field reporter:label="Stream" name="stream" reporter:datatype="link"/>
6129                         <field reporter:label="Unit" name="unit" reporter:datatype="link"/>
6130                         <field reporter:label="URI" name="uri" reporter:datatype="link"/>
6131                         <field reporter:label="Date Expected" name="date_expected" reporter:datatype="timestamp"/>
6132                         <field reporter:label="Date Received" name="date_received" reporter:datatype="timestamp"/>
6133                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
6134                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
6135                         <field reporter:label="Shadowed?" name="shadowed" reporter:datatype="bool"/>
6136                 </fields>
6137                 <links>
6138                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6139                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6140                         <link field="issuance" reltype="has_a" key="id" map="" class="siss"/>
6141                         <link field="stream" reltype="has_a" key="id" map="" class="sstr"/>
6142                         <link field="unit" reltype="has_a" key="id" map="" class="sunit"/>
6143                         <link field="uri" reltype="has_a" key="id" map="" class="auri"/>
6144                         <link field="notes" reltype="has_many" key="item" map="" class="sin"/>
6145                 </links>
6146                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6147                         <actions>
6148                                 <create permission="ADMIN_SERIAL_ITEM">
6149                                         <context link="stream" jump="distribution" field="holding_lib" />
6150                                 </create>
6151                                 <retrieve permission="ADMIN_SERIAL_ITEM">
6152                                         <context link="stream" jump="distribution" field="holding_lib" />
6153                                 </retrieve>
6154                                 <update permission="ADMIN_SERIAL_ITEM">
6155                                         <context link="stream" jump="distribution" field="holding_lib" />
6156                                 </update>
6157                                 <delete permission="ADMIN_SERIAL_ITEM">
6158                                         <context link="stream" jump="distribution" field="holding_lib" />
6159                                 </delete>
6160                         </actions>
6161                 </permacrud>
6162         </class>
6163
6164         <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">
6165                 <fields oils_persist:primary="id" oils_persist:sequence="serial.item_note_id_seq">
6166                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6167                         <field reporter:label="Item" name="item" reporter:datatype="link"/>
6168                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
6169                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
6170                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
6171                         <field reporter:label="Alert?" name="alert" reporter:datatype="bool"/>
6172                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
6173                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
6174                 </fields>
6175                 <links>
6176                         <link field="item" reltype="has_a" key="id" map="" class="sitem"/>
6177                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6178                 </links>
6179                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6180                         <actions>
6181                                 <create permission="ADMIN_SERIAL_ITEM">
6182                                         <context link="item" jump="stream.distribution" field="holding_lib" />
6183                                 </create>
6184                                 <retrieve permission="ADMIN_SERIAL_ITEM">
6185                                         <context link="item" jump="stream.distribution" field="holding_lib" />
6186                                 </retrieve>
6187                                 <update permission="ADMIN_SERIAL_ITEM">
6188                                         <context link="item" jump="stream.distribution" field="holding_lib" />
6189                                 </update>
6190                                 <delete permission="ADMIN_SERIAL_ITEM">
6191                                         <context link="item" jump="stream.distribution" field="holding_lib" />
6192                                 </delete>
6193                         </actions>
6194                 </permacrud>
6195         </class>
6196         <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">
6197                 <fields>
6198                         <field name="summary_type" reporter:label="Summary Type" reporter:datatype="text" />
6199                         <field name="id" reporter:label="Native ID" reporter:datatype="int" /><!-- not datatype="id", because id is not unique in this view -->
6200                         <field name="distribution" reporter:label="Distribution" reporter:datatype="link" />
6201                         <field name="generated_coverage" reporter:label="Generated Coverage" reporter:datatype="text" />
6202                         <field name="show_generated" reporter:label="Show Generated?" reporter:datatype="bool" />
6203                 </fields>
6204                 <links>
6205                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
6206                 </links>
6207         </class>
6208         <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">
6209                 <fields oils_persist:primary="id" oils_persist:sequence="serial.materialized_holding_code_id_seq">
6210                         <field name="id" reporter:label="ID" reporter:datatype="id" />
6211                         <field name="issuance" reporter:label="Issuance" reporter:datatype="link" />
6212                         <field name="holding_type" reporter:label="Holding Type" reporter:datatype="text" />
6213                         <field name="ind1" reporter:label="First Indicator" reporter:datatype="text" />
6214                         <field name="ind2" reporter:label="Second Indicator" reporter:datatype="text" />
6215                         <field name="subfield" reporter:label="Subfield" reporter:datatype="text" />
6216                         <field name="value" reporter:label="Value" reporter:datatype="text" oils_obj:validate="^\w$" />
6217                 </fields>
6218                 <links>
6219                         <link field="issuance" reltype="has_a" key="id" map="" class="siss"/>
6220                 </links>
6221         </class>
6222         <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">
6223                 <fields oils_persist:primary="id" oils_persist:sequence="serial.basic_summary_id_seq">
6224                         <field reporter:label="ID" name="id" reporter:datatype="id" />
6225                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
6226                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
6227                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
6228                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
6229                 </fields>
6230                 <links>
6231                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
6232                 </links>
6233                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6234                         <actions>
6235                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
6236                                         <context link="distribution" field="holding_lib" />
6237                                 </create>
6238                                 <retrieve/>
6239                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
6240                                         <context link="distribution" field="holding_lib" />
6241                                 </update>
6242                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
6243                                         <context link="distribution" field="holding_lib" />
6244                                 </delete>
6245                         </actions>
6246                 </permacrud>
6247         </class>
6248
6249         <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">
6250                 <fields oils_persist:primary="id" oils_persist:sequence="serial.supplement_summary_id_seq">
6251                         <field reporter:label="ID" name="id" reporter:datatype="id" />
6252                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
6253                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
6254                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
6255                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
6256                 </fields>
6257                 <links>
6258                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
6259                 </links>
6260                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6261                         <actions>
6262                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
6263                                         <context link="distribution" field="holding_lib" />
6264                                 </create>
6265                                 <retrieve/>
6266                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
6267                                         <context link="distribution" field="holding_lib" />
6268                                 </update>
6269                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
6270                                         <context link="distribution" field="holding_lib" />
6271                                 </delete>
6272                         </actions>
6273                 </permacrud>
6274         </class>
6275
6276         <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">
6277                 <fields oils_persist:primary="id" oils_persist:sequence="serial.index_summary_id_seq">
6278                         <field reporter:label="ID" name="id" reporter:datatype="id" />
6279                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
6280                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
6281                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
6282                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
6283                 </fields>
6284                 <links>
6285                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
6286                 </links>
6287                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6288                         <actions>
6289                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
6290                                         <context link="distribution" field="holding_lib" />
6291                                 </create>
6292                                 <retrieve/>
6293                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
6294                                         <context link="distribution" field="holding_lib" />
6295                                 </update>
6296                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
6297                                         <context link="distribution" field="holding_lib" />
6298                                 </delete>
6299                         </actions>
6300                 </permacrud>
6301         </class>
6302
6303         <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">
6304                 <fields oils_persist:primary="id" oils_persist:sequence="serial.pattern_template_id_seq">
6305                         <field reporter:label="ID" name="id" reporter:datatype="id" />
6306                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_obj:required="true"/>
6307                         <field reporter:label="Pattern Code" name="pattern_code" reporter:datatype="text" oils_obj:required="true"/>
6308                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" oils_obj:required="true"/>
6309                         <field reporter:label="Share Depth" name="share_depth"  reporter:datatype="int"/>
6310                 </fields>
6311                 <links>
6312                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
6313                 </links>
6314                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6315                         <actions>
6316                                 <create permission="ADMIN_SERIAL_PATTERN_TEMPLATE" context_field="owning_lib"/>
6317                                 <retrieve/>
6318                                 <update permission="ADMIN_SERIAL_PATTERN_TEMPLATE" context_field="owning_lib"/>
6319                                 <delete permission="ADMIN_SERIAL_PATTERN_TEMPLATE" context_field="owning_lib"/>
6320                         </actions>
6321                 </permacrud>
6322         </class>
6323
6324         <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">
6325                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_entry_copy_map_id_seq">
6326                         <field name="id" reporter:datatype="id" />
6327                         <field name="owning_copy" reporter:datatype="link"/>
6328                         <field name="stat_cat" reporter:datatype="link"/>
6329                         <field name="stat_cat_entry" reporter:datatype="link"/>
6330                 </fields>
6331                 <links>
6332                         <link field="owning_copy" reltype="has_a" key="id" map="" class="acp"/>
6333                         <link field="stat_cat_entry" reltype="has_a" key="id" map="" class="asce"/>
6334                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
6335                 </links>
6336                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6337                         <actions>
6338                                 <retrieve/>
6339                         </actions>
6340                 </permacrud>
6341         </class>
6342         <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">
6343                 <fields oils_persist:primary="code">
6344                         <field reporter:label="Item Type Code" name="code" reporter:selector="value" reporter:datatype="text"/>
6345                         <field reporter:label="Item Type" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
6346                 </fields>
6347                 <links/>
6348         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6349             <actions>
6350                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
6351                 <retrieve/>
6352                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
6353                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
6354             </actions>
6355         </permacrud>
6356         </class>
6357         <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">
6358                 <fields oils_persist:primary="code">
6359                         <field reporter:label="Bib Level Code" name="code"  reporter:datatype="text"/>
6360                         <field reporter:label="Bib Level" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
6361                 </fields>
6362                 <links/>
6363         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6364             <actions>
6365                 <create permission="CREATE_MARC_CODE" global_required="true"/>
6366                 <retrieve/>
6367                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
6368                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
6369             </actions>
6370         </permacrud>
6371         </class>
6372         <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">
6373                 <fields oils_persist:primary="id" oils_persist:sequence="search.relevance_adjustment_id_seq">
6374                         <field reporter:label="ID" name="id"  reporter:datatype="id"/>
6375                         <field reporter:label="Active" name="active"  reporter:datatype="bool"/>
6376                         <field reporter:label="Index Field" name="field"  reporter:datatype="link"/>
6377                         <field reporter:label="Bump Type" name="bump_type"  reporter:datatype="text"/>
6378                         <field reporter:label="Multiplier" name="multiplier"  reporter:datatype="number"/>
6379                 </fields>
6380                 <links>
6381             <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
6382         </links>
6383         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6384             <actions>
6385                 <create permission="CREATE_RELEVANCE_ADJUSTMENT" global_required="true"/>
6386                 <retrieve permission="CREATE_RELEVANCE_ADJUSTMENT UPDATE_RELEVANCE_ADJUSTMENT DELETE_RELEVANCE_ADJUSTMENT" global_required="true"/>
6387                 <update permission="UPDATE_RELEVANCE_ADJUSTMENT" global_required="true"/>
6388                 <delete permission="DELETE_RELEVANCE_ADJUSTMENT" global_required="true"/>
6389             </actions>
6390         </permacrud>
6391         </class>
6392         <class id="lasso" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::org_lasso" oils_persist:tablename="actor.org_lasso" reporter:label="Library Group">
6393                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_lasso_id_seq">
6394                         <field reporter:label="Library Group ID" name="id" reporter:datatype="id" reporter:selector="name"/>
6395                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
6396                         <field reporter:label="Global?" name="global" reporter:datatype="bool"/>
6397                         <field reporter:label="Maps" name="maps" oils_persist:virtual="true" reporter:datatype="link"/>
6398                 </fields>
6399                 <links>
6400                         <link field="maps" reltype="has_many" key="lasso" map="" class="lmap"/>
6401         </links>
6402         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6403             <actions>
6404                 <create permission="ADMIN_LIBRARY_GROUPS" global_required="true"/>
6405                 <retrieve/>
6406                 <update permission="ADMIN_LIBRARY_GROUPS" global_required="true"/>
6407                 <delete permission="ADMIN_LIBRARY_GROUPS" global_required="true"/>
6408             </actions>
6409         </permacrud>
6410         </class>
6411         <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="Library Group Map">
6412                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_lasso_map_id_seq">
6413                         <field reporter:label="Library Group Map ID" name="id" reporter:datatype="id" />
6414                         <field reporter:label="Library Group" name="lasso" reporter:datatype="link"/>
6415                         <field reporter:label="Organizational Unit" name="org_unit" reporter:datatype="org_unit"/>
6416                 </fields>
6417                 <links>
6418                         <link field="lasso" reltype="has_a" key="id" map="" class="lasso"/>
6419                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
6420                 </links>
6421         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6422             <actions>
6423                 <create permission="ADMIN_LIBRARY_GROUPS" global_required="true"/>
6424                 <retrieve/>
6425                 <update permission="ADMIN_LIBRARY_GROUPS" global_required="true"/>
6426                 <delete permission="ADMIN_LIBRARY_GROUPS" global_required="true"/>
6427             </actions>
6428         </permacrud>
6429         </class>
6430         <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">
6431                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_adjustment_id_seq">
6432                         <field name="id" reporter:label="ID" reporter:datatype="id" />
6433                         <field name="item_circ_lib" reporter:label="Item Circ Lib" reporter:datatype="org_unit"/>
6434                         <field name="item_owning_lib" reporter:label="Item Owning Lib" reporter:datatype="org_unit"/>
6435                         <field name="hold_pickup_lib" reporter:label="Hold Pickup Lib" reporter:datatype="org_unit"/>
6436                         <field name="hold_request_lib" reporter:label="Hold Request Lib" reporter:datatype="org_unit"/>
6437                         <field name="copy_location" reporter:label="Copy Location" reporter:datatype="link"/>
6438                         <field name="circ_mod" reporter:label="Circ Modifier" reporter:datatype="link"/>
6439                         <field name="pos" reporter:label="Position" reporter:datatype="int" oils_obj:required="true" />
6440                         <field name="absolute_adjustment" reporter:label="Absolute adjustment?" reporter:datatype="bool" />
6441                         <field name="prox_adjustment" reporter:label="Proximity Adjustment" reporter:datatype="number" />
6442                 </fields>
6443                 <links>
6444                         <link field="item_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
6445                         <link field="item_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
6446                         <link field="hold_pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
6447                         <link field="hold_request_lib" reltype="has_a" key="id" map="" class="aou"/>
6448                         <link field="circ_mod" reltype="has_a" key="code" map="" class="ccm"/>
6449                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
6450                 </links>
6451         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6452             <actions>
6453                 <create permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
6454                 <retrieve permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
6455                 <update permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
6456                 <delete permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
6457             </actions>
6458         </permacrud>
6459         </class>
6460         <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">
6461                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_id_seq">
6462                         <field name="id" reporter:datatype="id" />
6463                         <field name="from_org" reporter:datatype="org_unit"/>
6464                         <field name="to_org" reporter:datatype="org_unit"/>
6465                         <field name="prox" reporter:datatype="int" />
6466                 </fields>
6467                 <links>
6468                         <link field="from_org" reltype="has_a" key="id" map="" class="aou"/>
6469                         <link field="to_org" reltype="has_a" key="id" map="" class="aou"/>
6470                 </links>
6471         </class>
6472         <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">
6473                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_id_seq">
6474                         <field reporter:label="ID" name="id" reporter:datatype="id" />
6475                         <field reporter:label="Relevance" name="rel" reporter:datatype="float"/>
6476                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
6477                         <field reporter:label="Total Results" name="total" reporter:datatype="int" />
6478                         <field reporter:label="Checked" name="checked" reporter:datatype="int"/>
6479                         <field reporter:label="Visible" name="visible" reporter:datatype="int"/>
6480                         <field reporter:label="Deleted" name="deleted" reporter:datatype="int"/>
6481                         <field reporter:label="Excluded" name="excluded" reporter:datatype="int"/>
6482                 </fields>
6483                 <links/>
6484         </class>
6485         <class id="asv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::survey" oils_persist:tablename="action.survey" reporter:label="Survey">
6486                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_id_seq">
6487                         <field reporter:label="Questions" name="questions" oils_persist:virtual="true" reporter:datatype="link"/>
6488                         <field reporter:label="Responses" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
6489                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
6490                         <field reporter:label="Survey End Date/Time" name="end_date" reporter:datatype="timestamp"/>
6491                         <field reporter:label="Survey ID" name="id" reporter:datatype="id"/>
6492                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
6493                         <field reporter:label="OPAC Survey?" name="opac" reporter:datatype="bool"/>
6494                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
6495                         <field reporter:label="Poll Style?" name="poll" reporter:datatype="bool"/>
6496                         <field reporter:label="Is Required?" name="required" reporter:datatype="bool"/>
6497                         <field reporter:label="Survey Start Date/Time" name="start_date" reporter:datatype="timestamp"/>
6498                         <field reporter:label="Display in User Summary" name="usr_summary" reporter:datatype="bool"/>
6499                 </fields>
6500                 <links>
6501                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6502                         <link field="responses" reltype="has_many" key="survey" map="" class="asvr"/>
6503                         <link field="questions" reltype="has_many" key="survey" map="" class="asvq"/>
6504                 </links>
6505         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6506             <actions>
6507                 <create permission="ADMIN_SURVEY" context_field="owner"/>
6508                 <retrieve/>
6509                 <update permission="ADMIN_SURVEY" context_field="owner"/>
6510                 <delete permission="ADMIN_SURVEY" context_field="owner"/>
6511             </actions>
6512         </permacrud>
6513         </class>
6514         <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">
6515                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_address_id_seq">
6516                         <field name="address_type" reporter:label="Address Type" reporter:datatype="text" oils_obj:required="true" />
6517                         <field name="city" reporter:label="City" reporter:datatype="text" oils_obj:required="true"/>
6518                         <field name="country" reporter:label="Country" reporter:datatype="text" oils_obj:required="true"/>
6519                         <field name="county" reporter:label="County" reporter:datatype="text"/>
6520                         <field name="id" reporter:label="ID" reporter:datatype="id" />
6521                         <field name="org_unit" reporter:label="Org Unit" reporter:datatype="org_unit" oils_obj:required="true"/>
6522                         <field name="post_code" reporter:label="Post Code" reporter:datatype="text" oils_obj:required="true"/>
6523                         <field name="state" reporter:label="State" reporter:datatype="text"/>
6524                         <field name="street1" reporter:label="Street1" reporter:datatype="text" oils_obj:required="true"/>
6525                         <field name="street2" reporter:label="Street2" reporter:datatype="text"/>
6526                         <field name="valid" reporter:label="Is Valid?" reporter:datatype="bool" oils_obj:required="true"/>
6527                         <field name="san" reporter:label="SAN" reporter:datatype="text"/>
6528                         <field name="latitude" reporter:label="Latitude" reporter:datatype="float"/>
6529                         <field name="longitude" reporter:label="Longitude" reporter:datatype="float"/>
6530                 </fields>
6531                 <links>
6532                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
6533                 </links>
6534         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6535             <actions>
6536                 <create permission="CREATE_ORG_ADDRESS" context_field="org_unit"/>
6537                 <retrieve/>
6538                 <update permission="UPDATE_ORG_ADDRESS" context_field="org_unit"/>
6539                 <delete permission="DELETE_ORG_ADDRESS" context_field="org_unit"/>
6540             </actions>
6541         </permacrud>
6542         </class>
6543         <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">
6544                 <fields oils_persist:primary="id" oils_persist:sequence="actor.search_query_id_seq">
6545                         <field name="id" reporter:datatype="id" reporter:selector="label"/>
6546                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
6547                         <field name="query_text" reporter:datatype="text"/>
6548                 </fields>
6549         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6550             <actions>
6551                 <retrieve/>
6552             </actions>
6553         </permacrud>
6554         </class>
6555
6556         <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">
6557                 <fields oils_persist:primary="id" oils_persist:sequence="actor.search_filter_group_id_seq">
6558                         <field name="id" reporter:datatype="id" reporter:selector="label" reporter:label="ID" oils_obj:required="true"/>
6559                         <field name="owner" reporter:datatype="org_unit" reporter:label="Owning Org Unit" oils_obj:required="true"/>
6560                         <field name="code" reporter:datatype="text" reporter:label="Code" oils_obj:required="true"/>
6561                         <field name="label" reporter:datatype="text" oils_persist:i18n="true" reporter:label="Label" oils_obj:required="true"/>
6562                         <field name="create_date" reporter:datatype="timestamp" reporter:label="Create Date"/>
6563                         <field name="entries" oils_persist:virtual="true" reporter:datatype="link" reporter:label="Group Entries"/>
6564                 </fields>
6565                 <links>
6566                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6567                         <link field="entries" reltype="has_many" key="grp" map="" class="asfge"/>
6568                 </links>
6569         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6570             <actions>
6571                 <create permission="ADMIN_SEARCH_FILTER_GROUP" context_field="owner"/>
6572                 <retrieve/>
6573                 <update permission="ADMIN_SEARCH_FILTER_GROUP" context_field="owner"/>
6574                 <delete permission="ADMIN_SEARCH_FILTER_GROUP" context_field="owner"/>
6575             </actions>
6576         </permacrud>
6577         </class>
6578         <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">
6579                 <fields oils_persist:primary="id" oils_persist:sequence="actor.search_filter_group_entry_id_seq">
6580                         <field name="id" reporter:datatype="id" reporter:label="ID" oils_obj:required="true"/>
6581                         <field name="grp" reporter:datatype="link" reporter:label="Search Filter Group" oils_obj:required="true"/>
6582                         <field name="pos" reporter:datatype="int" reporter:label="Position" oils_obj:required="true"/>
6583                         <field name="query" reporter:datatype="link" reporter:label="Query" oils_obj:required="true"/>
6584                 </fields>
6585                 <links>
6586                         <link field="grp" reltype="has_a" key="id" map="" class="asfg"/>
6587                         <link field="query" reltype="has_a" key="id" map="" class="asq"/>
6588                 </links>
6589         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6590             <actions>
6591                 <create permission="ADMIN_SEARCH_FILTER_GROUP">
6592                     <context link="grp" field="owner"/>
6593                 </create>
6594                 <retrieve/>
6595                 <update permission="ADMIN_SEARCH_FILTER_GROUP">
6596                     <context link="grp" field="owner"/>
6597                 </update>
6598                 <delete permission="ADMIN_SEARCH_FILTER_GROUP">
6599                     <context link="grp" field="owner"/>
6600                 </delete>
6601             </actions>
6602         </permacrud>
6603         </class>
6604
6605         <!-- A note: Please update alhr and ahopl when updating ahr -->
6606         <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">
6607                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
6608                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
6609                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
6610                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
6611                         <field reporter:label="Currently Targeted Copy" name="current_copy" reporter:datatype="link"/>
6612                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
6613                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
6614                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
6615                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
6616                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
6617                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
6618                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
6619                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
6620                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
6621                         <field reporter:label="Notifications SMS Number" name="sms_notify" reporter:datatype="text"/>
6622                         <field reporter:label="Notifications SMS Carrier" name="sms_carrier" reporter:datatype="link"/>
6623                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
6624                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
6625                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
6626                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
6627                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
6628                         <field reporter:label="Item Selection Depth" name="selection_depth" />
6629                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
6630                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
6631                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
6632                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
6633                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
6634                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
6635                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
6636                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
6637                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
6638                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
6639                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
6640                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
6641                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
6642                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
6643                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
6644                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
6645                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
6646                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
6647                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
6648                         <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>
6649                         <field reporter:label="Acquisition Request" name="acq_request" reporter:datatype="link" />
6650                         <field reporter:label="Hopeless Date" name="hopeless_date" reporter:datatype="timestamp"/>
6651                 </fields>
6652                 <links>
6653                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
6654                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
6655                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
6656                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
6657                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
6658                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
6659                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6660                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
6661                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
6662                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
6663                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
6664                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
6665                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
6666                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
6667                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
6668                         <link field="sms_carrier" reltype="has_a" key="id" map="" class="csc"/>
6669                         <link field="acq_request" reltype="has_a" key="id" map="" class="aur"/>
6670                         <link field="hold_type" reltype="has_a" key="hold_type" map="" class="cht"/>
6671                 </links>
6672                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6673                         <actions>
6674                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
6675                         </actions>
6676                 </permacrud>
6677         </class>
6678         <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">
6679                 <oils_persist:source_definition><![CDATA[
6680                 SELECT
6681                         ahr.*,
6682                         COALESCE(acplo.position, acpl_ordered.fallback_position) AS
6683                                 copy_location_order_position,
6684                         CASE WHEN au.alias IS NOT NULL THEN
6685                                 au.alias
6686                         ELSE
6687                                 au.first_given_name
6688                         END AS usr_alias_or_first_given_name,
6689                         au.first_given_name AS usr_first_given_name,
6690                         au.second_given_name AS usr_second_given_name,
6691                         au.family_name AS usr_family_name,
6692                         au.prefix AS usr_prefix,
6693                         au.suffix AS usr_suffix,
6694                         au.alias AS usr_alias,
6695                         CASE WHEN au.alias IS NOT NULL THEN
6696                                 au.alias
6697                         ELSE
6698                                 REGEXP_REPLACE(ARRAY_TO_STRING(ARRAY[
6699                                         COALESCE(au.family_name, ''),
6700                                         COALESCE(au.suffix, ''),
6701                                         ', ',
6702                                         COALESCE(au.prefix, ''),
6703                                         COALESCE(au.first_given_name, ''),
6704                                         COALESCE(au.second_given_name, '')
6705                                 ], ' '), E'\\s+,', ',')
6706                         END AS usr_alias_or_display_name,
6707                         REGEXP_REPLACE(ARRAY_TO_STRING(ARRAY[
6708                                 COALESCE(au.family_name, ''),
6709                                 COALESCE(au.suffix, ''),
6710                                 ', ',
6711                                 COALESCE(au.prefix, ''),
6712                                 COALESCE(au.first_given_name, ''),
6713                                 COALESCE(au.second_given_name, '')
6714                         ], ' '), E'\\s+,', ',') AS usr_display_name,
6715                         TRIM(acnp.label || ' ' || acn.label || ' ' || acns.label)
6716                                 AS call_number_label,
6717                         siss.label AS issuance_label,
6718                         (ahr.usr <> ahr.requestor) AS is_staff_hold,
6719                         ahcm_1.copy_count AS potential_copies
6720                 FROM action.hold_request ahr
6721                 JOIN asset.copy acp ON (acp.id = ahr.current_copy)
6722                 JOIN asset.call_number acn ON (acp.call_number = acn.id)
6723                 JOIN asset.call_number_prefix acnp ON (acn.prefix = acnp.id)
6724                 JOIN asset.call_number_suffix acns ON (acn.suffix = acns.id)
6725                 JOIN actor.usr au ON (au.id = ahr.usr)
6726                 JOIN (
6727                         SELECT *, (ROW_NUMBER() OVER (ORDER BY name) + 1000000) AS fallback_position
6728                         FROM asset.copy_location
6729                 ) acpl_ordered ON (acpl_ordered.id = acp.location)
6730                 LEFT JOIN actor.usr_standing_penalty ausp 
6731                         ON (ahr.usr = ausp.usr AND (ausp.stop_date IS NULL OR ausp.stop_date > NOW()))
6732                 LEFT JOIN config.standing_penalty csp
6733                         ON (
6734                                 csp.id = ausp.standing_penalty AND 
6735                                 csp.block_list LIKE '%CAPTURE%' AND (
6736                                         (csp.org_depth IS NULL AND ahr.pickup_lib = ausp.org_unit) OR
6737                                         (csp.org_depth IS NOT NULL AND ahr.pickup_lib IN (
6738                                                 SELECT id FROM actor.org_unit_descendants(ausp.org_unit, csp.org_depth))
6739                                         )
6740                                 )
6741                         )
6742                 JOIN (
6743                         SELECT COUNT(target_copy) AS copy_count, hold
6744                         FROM action.hold_copy_map
6745                         GROUP BY 2
6746                 ) ahcm_1 ON (ahcm_1.hold = ahr.id)
6747                 LEFT JOIN serial.issuance siss
6748                         ON (ahr.hold_type = 'I' AND siss.id = ahr.target)
6749                 LEFT JOIN asset.copy_location_order acplo
6750                         ON (acp.location = acplo.location AND
6751                                 acp.circ_lib = acplo.org)
6752                 WHERE
6753                         ahr.capture_time IS NULL AND
6754                         ahr.cancel_time IS NULL AND
6755                         csp.id IS NULL AND
6756                         (ahr.expire_time is NULL OR ahr.expire_time > NOW()) AND
6757                         acp.status IN (0,7)
6758                 ]]></oils_persist:source_definition>
6759                 <fields oils_persist:primary="id">
6760                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
6761                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
6762                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
6763                         <field reporter:label="Currently Targeted Copy" name="current_copy" reporter:datatype="link"/>
6764                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
6765                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
6766                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
6767                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
6768                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
6769                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
6770                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
6771                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
6772                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
6773                         <field reporter:label="Notifications SMS Number" name="sms_notify" reporter:datatype="text"/>
6774                         <field reporter:label="Notifications SMS Carrier" name="sms_carrier" reporter:datatype="link"/>
6775                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
6776                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
6777                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
6778                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
6779                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
6780                         <field reporter:label="Item Selection Depth" name="selection_depth" />
6781                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
6782                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
6783                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
6784                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
6785                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
6786                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
6787                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
6788                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
6789                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
6790                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
6791                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
6792                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
6793                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
6794                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
6795                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
6796                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
6797                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
6798                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
6799                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
6800                         <field reporter:label="Acquisition Request" name="acq_request" reporter:datatype="link" />
6801                         <field reporter:label="Copy Location Sort Order" name="copy_location_order_position" reporter:datatype="int" />
6802                         <field reporter:label="User First Given Name" name="usr_first_given_name" reporter:datatype="text" />
6803                         <field reporter:label="User Second Given Name" name="usr_second_given_name" reporter:datatype="text" />
6804                         <field reporter:label="User Family Name" name="usr_family_name" reporter:datatype="text" />
6805                         <field reporter:label="User Prefix" name="usr_prefix" reporter:datatype="text" />
6806                         <field reporter:label="User Suffix" name="usr_suffix" reporter:datatype="text" />
6807                         <field reporter:label="User Alias or First Given Name" name="usr_alias_or_first_given_name" reporter:datatype="text" />
6808                         <field reporter:label="User Display Name" name="usr_display_name" reporter:datatype="text" />
6809                         <field reporter:label="User Alias or Display Name" name="usr_alias_or_display_name" reporter:datatype="text" />
6810                         <field reporter:label="User Alias" name="usr_alias" reporter:datatype="text" />
6811                         <field reporter:label="Call Number Label" name="call_number_label" reporter:datatype="text" />
6812                         <field reporter:label="Issuance Label" name="issuance_label" reporter:datatype="text" />
6813                         <field reporter:label="Is Staff Hold?" name="is_staff_hold" reporter:datatype="bool" />
6814                         <field reporter:label="Potential Copies" name="potential_copies" reporter:datatype="int" />
6815                         <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>
6816                         <field reporter:label="Hopeless Date" name="hopeless_date" reporter:datatype="timestamp"/>
6817                 </fields>
6818                 <links>
6819                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
6820                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
6821                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
6822                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
6823                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
6824                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
6825                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6826                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
6827                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
6828                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
6829                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
6830                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
6831                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
6832                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
6833                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
6834                         <link field="sms_carrier" reltype="has_a" key="id" map="" class="csc"/>
6835                         <link field="acq_request" reltype="has_a" key="id" map="" class="aur"/>
6836                 </links>
6837                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6838                         <actions>
6839                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
6840                         </actions>
6841                 </permacrud>
6842         </class>
6843         <class id="alhr" controller="open-ils.cstore" oils_obj:fieldmapper="action::last_hold_request" reporter:label="Last Captured Hold Request" oils_persist:readonly="true">
6844                 <oils_persist:source_definition><![CDATA[
6845                         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)
6846                 ]]></oils_persist:source_definition>
6847                 <fields oils_persist:primary="id">
6848                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
6849                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
6850                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
6851                         <field reporter:label="Currently Targeted Copy" name="current_copy" reporter:datatype="link"/>
6852                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
6853                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
6854                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
6855                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
6856                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
6857                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
6858                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
6859                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
6860                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
6861                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
6862                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
6863                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
6864                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
6865                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
6866                         <field reporter:label="Item Selection Depth" name="selection_depth" />
6867                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
6868                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
6869                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
6870                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
6871                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
6872                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
6873                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
6874                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
6875                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
6876                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
6877                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
6878                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
6879                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
6880                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
6881                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
6882                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
6883                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
6884                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
6885                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
6886                         <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>
6887                         <field reporter:label="Acquisition Request" name="acq_request" reporter:datatype="link" />
6888                         <field reporter:label="Hopeless Date" name="hopeless_date" reporter:datatype="timestamp"/>
6889                 </fields>
6890                 <links>
6891                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
6892                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
6893                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
6894                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
6895                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
6896                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
6897                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6898                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
6899                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
6900                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
6901                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
6902                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
6903                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
6904                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
6905                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
6906                         <link field="acq_request" reltype="has_a" key="id" map="" class="aur"/>
6907                 </links>
6908         </class>
6909
6910         <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">
6911                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_note_id_seq">
6912                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6913                         <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
6914                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
6915                         <field reporter:label="Body" name="body" reporter:datatype="text"/>
6916                         <field reporter:label="Slip?" name="slip" reporter:datatype="bool"/>
6917                         <field reporter:label="Pub?" name="pub" reporter:datatype="bool"/>
6918                         <field reporter:label="Staff?" name="staff" reporter:datatype="bool"/>
6919                 </fields>
6920                 <links>
6921                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
6922                 </links>
6923                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6924                         <actions>
6925                                 <create permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></create>
6926                                 <retrieve permission="VIEW_USER"><context link="hold" field="request_lib"/></retrieve>
6927                                 <update permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></update>
6928                                 <delete permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></delete>
6929                         </actions>
6930                 </permacrud>
6931         </class>
6932         <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">
6933                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
6934                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
6935                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
6936                         <field reporter:label="Currently Targeted Copy" name="current_copy" reporter:datatype="link"/>
6937                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
6938                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
6939                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
6940                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
6941                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
6942                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
6943                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
6944                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
6945                         <field reporter:label="Notify by Phone?" name="phone_notify" reporter:datatype="bool"/>
6946                         <field reporter:label="Notify by SMS?" name="sms_notify" reporter:datatype="bool"/>
6947                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
6948                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
6949                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
6950                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
6951                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
6952                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
6953                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
6954                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
6955                         <field reporter:label="Staff Placed?" name="staff_placed" reporter:datatype="bool"/>
6956                         <field reporter:label="Item Selection Depth" name="selection_depth" />
6957                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
6958                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
6959                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
6960                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
6961                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
6962                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
6963                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
6964                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
6965                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
6966                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
6967                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
6968                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
6969                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
6970                         <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>
6971                 </fields>
6972                 <links>
6973                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
6974                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
6975                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
6976                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
6977                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
6978                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
6979                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
6980                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
6981                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
6982                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
6983                         <link field="usr_profile" reltype="has_a" key="id" map="" class="pgt"/>
6984                 </links>
6985                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6986                         <actions>
6987                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
6988                         </actions>
6989                 </permacrud>
6990         </class>
6991         <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">
6992                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
6993                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
6994                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
6995                         <field reporter:label="Currently Targeted Copy" name="current_copy" reporter:datatype="link"/>
6996                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
6997                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
6998                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
6999                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
7000                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
7001                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
7002                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
7003                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
7004                         <field reporter:label="Notify by Phone?" name="phone_notify" reporter:datatype="bool"/>
7005                         <field reporter:label="Notify by SMS?" name="sms_notify" reporter:datatype="bool"/>
7006                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
7007                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
7008                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
7009                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
7010                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
7011                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
7012                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
7013                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
7014                         <field reporter:label="Staff Placed?" name="staff_placed" reporter:datatype="bool"/>
7015                         <field reporter:label="Item Selection Depth" name="selection_depth" />
7016                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
7017                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
7018                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
7019                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
7020                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
7021                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
7022                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
7023                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
7024                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
7025                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
7026                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
7027                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
7028                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
7029                 </fields>
7030                 <links>
7031                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
7032                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
7033                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
7034                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
7035                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
7036                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
7037                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
7038                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
7039                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
7040                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
7041                         <link field="usr_profile" reltype="has_a" key="id" map="" class="pgt"/>
7042                 </links>
7043                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7044                         <actions>
7045                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
7046                         </actions>
7047                 </permacrud>
7048         </class>
7049
7050         <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">
7051                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_id_seq">
7052                         <field reporter:label="Subordinate Organizational Units" name="children" oils_persist:virtual="true" reporter:datatype="org_unit"/>
7053                         <field reporter:label="Billing Address" name="billing_address" reporter:datatype="link"/>
7054                         <field reporter:label="Holds Receiving Address" name="holds_address" reporter:datatype="link"/>
7055                         <field reporter:label="Organizational Unit ID" name="id" reporter:datatype="org_unit" reporter:selector="shortname"/>
7056                         <field reporter:label="ILL Receiving Address" name="ill_address" reporter:datatype="link"/>
7057                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="link"/>
7058                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true"/>
7059                         <field reporter:label="Organizational Unit Type" name="ou_type" reporter:datatype="link" oils_obj:required="true"/>
7060                         <field reporter:label="Parent Organizational Unit" name="parent_ou" reporter:datatype="link"/>
7061                         <field reporter:label="Short (Policy) Name" name="shortname" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.+$"/>
7062                         <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
7063                         <field reporter:label="Phone Number" name="phone" reporter:datatype="text"/>
7064                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
7065                         <field reporter:label="Fiscal Calendar" name="fiscal_calendar" reporter:datatype="link" oils_obj:required="true"/>
7066                         <field reporter:label="Users" name="users" oils_persist:virtual="true" reporter:datatype="link"/>
7067                         <field reporter:label="Closed Dates" name="closed_dates" oils_persist:virtual="true" reporter:datatype="link"/>
7068                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
7069                         <field reporter:label="Settings" name="settings" oils_persist:virtual="true" reporter:datatype="link"/>
7070                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>
7071                         <field reporter:label="Checkins" name="checkins" oils_persist:virtual="true" reporter:datatype="link"/>
7072                         <field reporter:label="Workstations" name="workstations" oils_persist:virtual="true" reporter:datatype="link"/>
7073                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
7074                         <field reporter:label="Copy Location Orders" name="copy_location_orders" oils_persist:virtual="true" reporter:datatype="link"/>
7075                         <field reporter:label="Transit Copy Prev Destinations" name="atc_prev_dests" oils_persist:virtual="true" reporter:datatype="link"/>
7076                         <field reporter:label="Reservation Requests" name="resv_requests" oils_persist:virtual="true" reporter:datatype="link"/>
7077                         <field reporter:label="Reservation Pickups" name="resv_pickups" oils_persist:virtual="true" reporter:datatype="link"/>
7078                         <field reporter:label="Resource Types" name="rsrc_types" oils_persist:virtual="true" reporter:datatype="link"/>
7079                         <field reporter:label="Resources" name="resources" oils_persist:virtual="true" reporter:datatype="link"/>
7080                         <field reporter:label="Resource Attributes" name="rsrc_attrs" oils_persist:virtual="true" reporter:datatype="link"/>
7081                         <field reporter:label="Attribute Values" name="attr_vals" oils_persist:virtual="true" reporter:datatype="link"/>
7082                         <field reporter:label="Hours of Operation" name="hours_of_operation" oils_persist:virtual="true" reporter:datatype="link"/>
7083                 </fields>
7084                 <links>
7085                         <link field="billing_address" reltype="has_a" key="id" map="" class="aoa"/>
7086                         <link field="holds_address" reltype="has_a" key="id" map="" class="aoa"/>
7087                         <link field="ou_type" reltype="has_a" key="id" map="" class="aout"/>
7088                         <link field="mailing_address" reltype="has_a" key="id" map="" class="aoa"/>
7089                         <link field="parent_ou" reltype="has_a" key="id" map="" class="aou"/>
7090                         <link field="ill_address" reltype="has_a" key="id" map="" class="aoa"/>
7091                         <link field="fiscal_calendar" reltype="has_a" key="id" map="" class="acqfc"/>
7092                         <link field="users" reltype="has_many" key="home_ou" map="" class="au"/>
7093                         <link field="closed_dates" reltype="has_many" key="org_unit" map="" class="aoucd"/>
7094                         <link field="children" reltype="has_many" key="parent_ou" map="" class="aou"/>
7095                         <link field="circulations" reltype="has_many" key="circ_lib" map="" class="circ"/>
7096                         <link field="settings" reltype="has_many" key="org_unit" map="" class="aous"/>
7097                         <link field="addresses" reltype="has_many" key="org_unit" map="" class="aoa"/>
7098                         <link field="checkins" reltype="has_many" key="checkin_lib" map="" class="circ"/>
7099                         <link field="workstations" reltype="has_many" key="owning_lib" map="" class="aws"/>
7100                         <link field="fund_alloc_pcts" reltype="has_many" key="org" map="" class="acqfap"/>
7101                         <link field="copy_location_orders" reltype="has_many" key="org" map="" class="acplo"/>
7102                         <link field="atc_prev_dests" reltype="has_many" key="prev_dest" map="" class="atc"/>
7103                         <link field="resv_requests" reltype="has_many" key="request_lib" map="" class="bresv"/>
7104                         <link field="resv_pickups" reltype="has_many" key="pickup_lib" map="" class="bresv"/>
7105                         <link field="rsrc_types" reltype="has_many" key="owner" map="" class="brt"/>
7106                         <link field="resources" reltype="has_many" key="owner" map="" class="brsrc"/>
7107                         <link field="rsrc_attrs" reltype="has_many" key="owner" map="" class="bra"/>
7108                         <link field="attr_vals" reltype="has_many" key="owner" map="" class="brav"/>
7109                         <link field="hours_of_operation" reltype="might_have" key="id" map="" class="aouhoo"/>
7110                 </links>
7111         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7112             <actions>
7113                 <create permission="CREATE_ORG_UNIT" context_field="parent_ou"/>
7114                 <retrieve />
7115                 <update permission="UPDATE_ORG_UNIT" context_field="id"/>
7116                 <delete permission="DELETE_ORG_UNIT" context_field="parent_ou"/>
7117             </actions>
7118         </permacrud>
7119         </class>
7120         <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">
7121                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_custom_tree_id_seq">
7122                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7123                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
7124                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
7125                 </fields>
7126                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7127                         <actions>
7128                                 <create permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
7129                                 <retrieve/>
7130                                 <update permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
7131                                 <delete permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
7132                         </actions>
7133                 </permacrud>
7134         </class>
7135         <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">
7136                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_custom_tree_node_id_seq">
7137                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7138                         <field reporter:label="Tree" name="tree" reporter:datatype="link"/>
7139                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="link"/>
7140                         <field reporter:label="Parent" name="parent_node" reporter:datatype="link"/>
7141                         <field reporter:label="Sibling Sort Order" name="sibling_order" reporter:datatype="int"/>
7142                         <field reporter:label="Children" name="children" reporter:datatype="link" oils_persist:virtual="true" />
7143                 </fields>
7144                 <links>
7145                         <link field="tree" reltype="has_a" key="id" map="" class="aouct"/>
7146                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
7147                         <link field="parent_node" reltype="has_a" key="id" map="" class="aouctn"/>
7148                         <link field="children" reltype="has_many" key="parent_node" map="" class="aouctn"/>
7149                 </links>
7150                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7151                         <actions>
7152                                 <create permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
7153                                 <retrieve/>
7154                                 <update permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
7155                                 <delete permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
7156                         </actions>
7157                 </permacrud>
7158         </class>
7159         <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">
7160                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_id_seq">
7161                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
7162                         <field name="btype" reporter:datatype="text"/>
7163                         <field name="id" reporter:datatype="id" />
7164                         <field name="name"  reporter:datatype="text"/>
7165                         <field name="description" reporter:datatype="text"/>
7166                         <field name="owner" reporter:datatype="link"/>
7167                         <field name="pub" reporter:datatype="bool"/>
7168                         <field name="create_time" reporter:datatype="timestamp" />
7169                         <field name="owning_lib" reporter:datatype="org_unit" />
7170                 </fields>
7171                 <links>
7172                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
7173                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7174                         <link field="items" reltype="has_many" key="bucket" map="" class="ccnbi"/>
7175                 </links>
7176                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7177                         <actions>
7178                                 <create permission="CREATE_CALLNUMBER_BUCKET ADMIN_CALLNUMBER_BUCKET" context="owning_lib" owning_user="owner"/>
7179                                 <retrieve permission="CREATE_CALLNUMBER_BUCKET ADMIN_CALLNUMBER_BUCKET" context="owning_lib" owning_user="owner"/>
7180                                 <update permission="CREATE_CALLNUMBER_BUCKET ADMIN_CALLNUMBER_BUCKET" context="owning_lib" owning_user="owner"/>
7181                                 <delete permission="CREATE_CALLNUMBER_BUCKET ADMIN_CALLNUMBER_BUCKET" context="owning_lib" owning_user="owner"/>
7182                         </actions>
7183                 </permacrud>
7184         </class>
7185         <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">
7186                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_note_id_seq">
7187                         <field name="id" reporter:datatype="id" />
7188                         <field name="bucket" reporter:datatype="link"/>
7189                         <field name="note" reporter:datatype="text" />
7190                 </fields>
7191                 <links>
7192                         <link field="bucket" reltype="has_a" key="id" map="" class="ccnb"/>
7193                 </links>
7194         </class>
7195         <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">
7196                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_id_seq">
7197                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
7198                         <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>
7199                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
7200                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
7201                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
7202                         <field reporter:label="SIP Field" name="sip_field" reporter:datatype="link"/>
7203                         <field reporter:label="SIP Format" name="sip_format" reporter:datatype="text"/>
7204                         <field reporter:label="Required" name="required" reporter:datatype="bool"/>
7205                         <field reporter:label="Checkout Archive" name="checkout_archive" reporter:datatype="bool"/>
7206                 </fields>
7207                 <links>
7208                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7209                         <link field="sip_field" reltype="has_a" key="field" map="" class="ascsf"/>
7210                         <link field="entries" reltype="has_many" key="stat_cat" map="" class="asce"/>
7211                 </links>
7212                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7213                         <actions>
7214                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
7215                         </actions>
7216                 </permacrud>
7217         </class>
7218         <class id="ac" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::card" oils_persist:tablename="actor.card" reporter:label="Library Card">
7219                 <fields oils_persist:primary="id" oils_persist:sequence="actor.card_id_seq">
7220                         <field reporter:label="IsActive?" name="active" reporter:datatype="bool"/>
7221                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
7222                         <field reporter:label="Card ID" name="id" reporter:datatype="id" />
7223                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
7224                 </fields>
7225                 <links>
7226                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7227                 </links>
7228                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7229                         <actions>
7230                                 <retrieve permission="VIEW_USER user_request.view">
7231                                         <context link="usr" field="home_ou" />
7232                                 </retrieve>
7233                         </actions>
7234                 </permacrud>
7235         </class>
7236     <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">
7237         <fields oils_persist:primary="field">
7238             <field reporter:label="Field Identifier" name="field" reporter:datatype="text" reporter:selector="name"/>
7239             <field reporter:label="Field Name" name="name" reporter:datatype="text"/>
7240             <field reporter:label="Exclusive?" name="one_only" reporter:datatype="bool"/>
7241         </fields>
7242         <links/>
7243         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7244             <actions>
7245                 <create permission="CREATE_PATRON_STAT_CAT" global_required="true"/>
7246                 <retrieve />
7247                 <update permission="UPDATE_PATRON_STAT_CAT" global_required="true"/>
7248                 <delete permission="DELETE_PATRON_STAT_CAT" global_required="true"/>
7249             </actions>
7250         </permacrud>
7251     </class>
7252         <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">
7253                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_id_seq">
7254                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
7255                         <field reporter:label="Default Entries" name="default_entries" oils_persist:virtual="true" reporter:datatype="link"/>
7256                         <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>
7257                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
7258                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
7259                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
7260                         <field reporter:label="User Summary" name="usr_summary" reporter:datatype="bool"/>
7261                         <field reporter:label="SIP Field" name="sip_field" reporter:datatype="link"/>
7262                         <field reporter:label="SIP Format" name="sip_format" reporter:datatype="text"/>
7263                         <field reporter:label="Checkout Archive" name="checkout_archive" reporter:datatype="bool"/>
7264                         <field reporter:label="Required" name="required" reporter:datatype="bool"/>
7265                         <field reporter:label="Free Text" name="allow_freetext" reporter:datatype="bool"/>
7266                 </fields>
7267                 <links>
7268                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7269                         <link field="sip_field" reltype="has_a" key="field" map="" class="actscsf"/>
7270                         <link field="entries" reltype="has_many" key="stat_cat" map="" class="actsce"/>
7271                         <link field="default_entries" reltype="has_many" key="stat_cat" map="" class="actsced"/>
7272                 </links>
7273         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7274             <actions>
7275                 <create permission="CREATE_PATRON_STAT_CAT" context_field="owner"/>
7276                 <retrieve />
7277                 <update permission="UPDATE_PATRON_STAT_CAT" context_field="owner"/>
7278                 <delete permission="DELETE_PATRON_STAT_CAT" context_field="owner"/>
7279             </actions>
7280         </permacrud>
7281         </class>
7282         <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">
7283                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.series_field_entry_id_seq">
7284                         <field name="field" reporter:datatype="link"/>
7285                         <field name="id" reporter:datatype="id" />
7286                         <field name="source" reporter:datatype="link"/>
7287                         <field name="value"  reporter:datatype="text"/>
7288                 </fields>
7289                 <links>
7290                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
7291                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
7292                 </links>
7293         </class>
7294         <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">
7295                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_id_seq">
7296                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
7297                         <field name="btype" reporter:datatype="text"/>
7298                         <field name="id" reporter:datatype="id" />
7299                         <field name="name"  reporter:datatype="text"/>
7300                         <field name="description" reporter:datatype="text"/>
7301                         <field name="owner" reporter:datatype="link"/>
7302                         <field name="pub" reporter:datatype="bool"/>
7303                         <field name="create_time" reporter:datatype="timestamp" />
7304                         <field name="owning_lib" reporter:datatype="org_unit" />
7305                 </fields>
7306                 <links>
7307                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
7308                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7309                         <link field="items" reltype="has_many" key="bucket" map="" class="cubi"/>
7310                 </links>
7311                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7312                         <actions>
7313                                 <create permission="CREATE_USER_BUCKET ADMIN_USER_BUCKET" context="owning_lib" owning_user="owner"/>
7314                                 <retrieve permission="CREATE_USER_BUCKET ADMIN_USER_BUCKET" context="owning_lib" owning_user="owner"/>
7315                                 <update permission="CREATE_USER_BUCKET ADMIN_USER_BUCKET" context="owning_lib" owning_user="owner"/>
7316                                 <delete permission="CREATE_USER_BUCKET ADMIN_USER_BUCKET" context="owning_lib" owning_user="owner"/>
7317                         </actions>
7318                 </permacrud>
7319         </class>
7320         <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">
7321                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_note_id_seq">
7322                         <field name="id" reporter:datatype="id" />
7323                         <field name="bucket" reporter:datatype="link"/>
7324                         <field name="note" reporter:datatype="text" />
7325                 </fields>
7326                 <links>
7327                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
7328                 </links>
7329         </class>
7330         <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">
7331                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
7332                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
7333                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7334                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
7335                         <field reporter:label="Pyament ID" name="id" reporter:datatype="id" />
7336                         <field reporter:label="Payment Note" name="note"  reporter:datatype="text"/>
7337                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
7338                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
7339                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
7340                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
7341                 </fields>
7342                 <links>
7343                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
7344                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
7345                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7346                 </links>
7347         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7348             <actions>
7349                 <retrieve permission="VIEW_USER_TRANSACTIONS">
7350                     <context link="xact" jump="usr" field="home_ou"/>
7351                 </retrieve>
7352                         </actions>
7353                 </permacrud>
7354         </class>
7355         <class id="afr" controller="open-ils.cstore" oils_obj:fieldmapper="authority::full_rec" oils_persist:tablename="authority.full_rec" reporter:label="Full Authority Record">
7356                 <fields oils_persist:primary="id" oils_persist:sequence="authority.full_rec_id_seq">
7357                         <field name="id" reporter:datatype="id" />
7358                         <field name="ind1" />
7359                         <field name="ind2" />
7360                         <field name="record" />
7361                         <field name="subfield" />
7362                         <field name="tag" />
7363                         <field name="value" />
7364                 </fields>
7365                 <links>
7366                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
7367                 </links>
7368         </class>
7369         <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">
7370                 <fields oils_persist:primary="id" oils_persist:sequence="authority.authority_linking_id_seq">
7371                         <field name="id" reporter:label="ID" reporter:datatype="id" />
7372                         <field name="source" reporter:label="Source Record" reporter:datatype="link" />
7373                         <field name="target" reporter:label="Target Record" reporter:datatype="link" />
7374                         <field name="field" reporter:label="Authority Field" reporter:datatype="link" />
7375                 </fields>
7376                 <links>
7377                         <link field="source" reltype="has_a" key="id" map="" class="are"/>
7378                         <link field="target" reltype="has_a" key="id" map="" class="are"/>
7379                         <link field="field" reltype="has_a" key="id" map="" class="acsaf"/>
7380                 </links>
7381         </class>
7382         <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">
7383                 <fields oils_persist:primary="id" oils_persist:sequence="config.non_cataloged_type_id_seq">
7384                         <field reporter:label="Circulation Duration" name="circ_duration" reporter:datatype="interval"/>
7385                         <field reporter:label="Non-cat Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>
7386                         <field reporter:label="In House?" name="in_house" reporter:datatype="bool"/>
7387                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
7388                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
7389                 </fields>
7390                 <links>
7391                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
7392                 </links>
7393         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7394             <actions>
7395                 <create permission="CREATE_NON_CAT_TYPE" context_field="owning_lib"/>
7396                 <retrieve/>
7397                 <update permission="CREATE_NON_CAT_TYPE" context_field="owning_lib"/>
7398                 <delete permission="CREATE_NON_CAT_TYPE" context_field="owning_lib"/>
7399             </actions>
7400         </permacrud>
7401
7402         </class>
7403         <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">
7404                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_type_id_seq">
7405                         <field reporter:label="Subordinate Types" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
7406                         <field reporter:label="Can Have Users?" name="can_have_users" reporter:datatype="bool"/>
7407                         <field reporter:label="Can Have Volumes?" name="can_have_vols" reporter:datatype="bool"/>
7408                         <field reporter:label="Type Depth" name="depth" reporter:datatype="int" />
7409                         <field reporter:label="Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>
7410                         <field reporter:label="Type Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
7411                         <field reporter:label="OPAC Label" name="opac_label"  reporter:datatype="text" oils_persist:i18n="true"/>
7412                         <field reporter:label="Parent Type" name="parent" reporter:datatype="link"/>
7413                         <field reporter:label="Org Units" name="org_units" oils_persist:virtual="true"  reporter:datatype="org_unit"/>
7414                 </fields>
7415                 <links>
7416                         <link field="parent" reltype="has_a" key="id" map="" class="aout"/>
7417                         <link field="children" reltype="has_many" key="parent" map="" class="aout"/>
7418                         <link field="org_units" reltype="has_many" key="ou_type" map="" class="aou"/>
7419                 </links>
7420         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7421             <actions>
7422                 <create permission="CREATE_ORG_TYPE" global_required="true"/>
7423                 <retrieve/>
7424                 <update permission="UPDATE_ORG_TYPE" global_required="true"/>
7425                 <delete permission="DELETE_ORG_TYPE" global_required="true"/>
7426             </actions>
7427         </permacrud>
7428         </class>
7429         <class id="bren" controller="open-ils.cstore" oils_obj:fieldmapper="biblio::record_note" oils_persist:tablename="biblio.record_note" reporter:label="Bib Record Note">
7430                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_note_id_seq">
7431                         <field name="create_date" reporter:datatype="timestamp"/>
7432                         <field name="creator" reporter:datatype="link"/>
7433                         <field name="edit_date" reporter:datatype="timestamp"/>
7434                         <field name="editor" reporter:datatype="link"/>
7435                         <field name="id" reporter:datatype="id" />
7436                         <field name="pub" reporter:datatype="bool"/>
7437                         <field name="record" reporter:datatype="link"/>
7438                         <field name="value"  reporter:datatype="text"/>
7439                 </fields>
7440                 <links>
7441                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7442                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7443                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
7444                 </links>
7445         </class>
7446         <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">
7447                 <fields oils_persist:primary="usr" oils_persist:sequence="">
7448                         <field name="balance_owed" reporter:datatype="money" />
7449                         <field name="total_owed" reporter:datatype="money" />
7450                         <field name="total_paid" reporter:datatype="money" />
7451                         <field name="usr" reporter:datatype="link"/>
7452                 </fields>
7453                 <links>
7454                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7455                 </links>
7456         </class>
7457     <class id="mg" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::grocery" oils_persist:tablename="money.grocery" reporter:label="Grocery Transaction">
7458                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
7459                         <field reporter:label="Billing Location" name="billing_location" reporter:datatype="link"/>
7460                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
7461                         <field reporter:label="Note" name="note"  reporter:datatype="text"/>
7462                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
7463                         <field reporter:label="Transaction Finish Timestamp" name="xact_finish" reporter:datatype="timestamp" />
7464                         <field reporter:label="Transaction Start Timestamp" name="xact_start" reporter:datatype="timestamp" />
7465                         <field reporter:label="Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
7466                         <field reporter:label="Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
7467                         <field reporter:label="Billable Transaction link" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
7468                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
7469                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
7470                 </fields>
7471                 <links>
7472                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7473                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
7474                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
7475                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
7476                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
7477                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
7478                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
7479                 </links>
7480         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7481             <actions>
7482                 <retrieve permission="VIEW_USER_TRANSACTIONS" context_field="billing_location"/>
7483             </actions>
7484         </permacrud>
7485         </class>
7486         <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">
7487                 <fields oils_persist:primary="id" oils_persist:sequence="config.bib_source_id_seq">
7488                         <field name="id" reporter:selector="source" reporter:datatype="id"/>
7489                         <field name="quality" reporter:datatype="int" />
7490                         <field name="source" reporter:datatype="text"/>
7491                         <field name="transcendant" reporter:datatype="bool"/>
7492                         <field name="can_have_copies" reporter:datatype="bool"/>
7493                 </fields>
7494                 <links/>
7495         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7496             <actions>
7497                 <create permission="CREATE_BIB_SOURCE" global_required="true"/>
7498                 <retrieve/>
7499                 <update permission="UPDATE_BIB_SOURCE" global_required="true"/>
7500                 <delete permission="DELETE_BIB_SOURCE" global_required="true"/>
7501             </actions>
7502         </permacrud>
7503         </class>
7504         <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">
7505                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
7506                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
7507                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
7508                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
7509                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
7510                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
7511                         <field reporter:label="Grocery Billing link" name="grocery" oils_persist:virtual="true" reporter:datatype="link"/>
7512                         <field reporter:label="Circulation Billing link" name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
7513                         <field reporter:label="Billing Line Items" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
7514                         <field reporter:label="Payment Line Items" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
7515                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
7516                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
7517                         <field reporter:label="Payment Summary" name="summary" oils_persist:virtual="true" reporter:datatype="link"/>
7518                 </fields>
7519                 <links>
7520                         <link field="grocery" reltype="might_have" key="id" map="" class="mg"/>
7521                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
7522                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7523                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
7524                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
7525                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
7526                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
7527                         <link field="summary" reltype="might_have" key="id" map="" class="mbts"/>
7528                 </links>
7529                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7530                         <actions>
7531                                 <retrieve permission="VIEW_USER_TRANSACTIONS">
7532                                         <context link="usr" field="home_ou" />
7533                                 </retrieve>
7534                         </actions>
7535                 </permacrud>
7536         </class>
7537         <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">
7538                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_id_seq">
7539                         <field reporter:label="Entry ID" name="id" reporter:datatype="id" />
7540                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
7541                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
7542                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
7543                         <field reporter:label="Default Entries" name="default_entries" oils_persist:virtual="true" reporter:datatype="link"/>
7544                 </fields>
7545                 <links>
7546                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
7547                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7548                         <link field="default_entries" reltype="has_many" key="stat_cat_entry" map="" class="actsced"/>
7549                 </links>
7550         </class>
7551         <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">
7552                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_default_id_seq">
7553                         <field reporter:label="Default Entry ID" name="id" reporter:datatype="id" />
7554                         <field reporter:label="Default Entry Value" name="stat_cat_entry" reporter:datatype="link"/>
7555                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
7556                         <field reporter:label="Default for Owner" name="owner" reporter:datatype="link"/>
7557                 </fields>
7558                 <links>
7559                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
7560                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7561                         <link field="stat_cat_entry" reltype="has_a" key="id" map="" class="actsce"/>
7562                 </links>
7563         </class>
7564         <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">
7565                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_id_seq">
7566                         <field name="bucket" reporter:datatype="link"/>
7567                         <field name="id" reporter:datatype="id" />
7568                         <field name="target_user" reporter:datatype="link"/>
7569                         <field name="create_time" reporter:datatype="timestamp" />
7570                         <field name="pos" reporter:datatype="int" />
7571                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
7572                 </fields>
7573                 <links>
7574                         <link field="target_user" reltype="has_a" key="id" map="" class="au"/>
7575                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
7576             <link field="notes" reltype="has_many" map="" key="item" class="cubin"/>
7577                 </links>
7578                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7579                         <actions>
7580                                 <retrieve permission="ADMIN_USER_BUCKET">
7581                     <context link="bucket" owning_lib="owning_lib"/>
7582                 </retrieve>
7583             </actions>
7584         </permacrud>
7585         </class>
7586         <class id="abhe" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::batch_hold_event" oils_persist:tablename="action.batch_hold_event" reporter:label="Hold Group Event">
7587                 <fields oils_persist:primary="id" oils_persist:sequence="action.batch_hold_event_id_seq">
7588                         <field name="id" reporter:datatype="id" />
7589                         <field name="staff" reporter:datatype="link"/>
7590                         <field name="bucket" reporter:datatype="link"/>
7591                         <field name="target" reporter:datatype="int" />
7592                         <field name="hold_type" reporter:datatype="text" />
7593                         <field name="run_date" reporter:datatype="timestamp" />
7594                         <field name="cancelled" reporter:datatype="timestamp" />
7595                         <field name="mappings" oils_persist:virtual="true" reporter:datatype="link" />
7596                 </fields>
7597                 <links>
7598                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
7599                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
7600                         <link field="mappings" reltype="has_many" key="batch_hold_event" map="" class="abhem"/>
7601                 </links>
7602                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7603                         <actions>
7604                 <create permission="MANAGE_HOLD_GROUPS" global_required="true"/>
7605                 <retrieve/>
7606                 <update permission="MANAGE_HOLD_GROUPS" global_required="true"/>
7607                 <delete permission="MANAGE_HOLD_GROUPS" global_required="true"/>
7608             </actions>
7609         </permacrud>
7610         </class>
7611         <class id="abhem" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::batch_hold_event_map" oils_persist:tablename="action.batch_hold_event_map" reporter:label="Hold Group Event Map">
7612                 <fields oils_persist:primary="id" oils_persist:sequence="action.batch_hold_event_map_id_seq">
7613                         <field name="id" reporter:datatype="id" />
7614                         <field name="batch_hold_event" reporter:datatype="link"/>
7615                         <field name="hold" reporter:datatype="link"/>
7616                 </fields>
7617                 <links>
7618                         <link field="batch_hold_event" reltype="has_a" key="id" map="" class="abhe"/>
7619                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
7620                 </links>
7621                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7622                         <actions>
7623                 <retrieve/>
7624             </actions>
7625         </permacrud>
7626         </class>
7627         <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">
7628                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_note_id_seq">
7629                         <field name="id" reporter:datatype="id" />
7630                         <field name="item" reporter:datatype="link"/>
7631                         <field name="note" reporter:datatype="text" />
7632                 </fields>
7633                 <links>
7634                         <link field="item" reltype="has_a" key="id" map="" class="cubi"/>
7635                 </links>
7636         </class>
7637         <class id="mus" controller="open-ils.cstore" oils_obj:fieldmapper="money::user_summary" oils_persist:tablename="money.usr_summary" reporter:label="User Summary">
7638                 <fields oils_persist:primary="usr" oils_persist:sequence="">
7639                         <field name="balance_owed" reporter:datatype="money" />
7640                         <field name="total_owed" reporter:datatype="money" />
7641                         <field name="total_paid" reporter:datatype="money" />
7642                         <field name="usr" reporter:datatype="link"/>
7643                 </fields>
7644                 <links>
7645                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7646                 </links>
7647         </class>
7648         <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">
7649                 <fields oils_persist:primary="code" oils_persist:sequence="">
7650                         <field reporter:label="LitF Code" name="code" reporter:datatype="text"/>
7651                         <field reporter:label="LitF Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
7652                         <field reporter:label="LitF Name" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
7653                 </fields>
7654                 <links/>
7655         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7656             <actions>
7657                 <create permission="CREATE_MARC_CODE" global_required="true"/>
7658                 <retrieve/>
7659                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
7660                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
7661             </actions>
7662         </permacrud>
7663         </class>
7664         <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">
7665                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
7666                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
7667                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7668                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
7669                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
7670                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7671                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
7672                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>
7673                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
7674                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
7675                 </fields>
7676                 <links>
7677                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
7678                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
7679                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7680                 </links>
7681         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7682             <actions>
7683                 <retrieve permission="VIEW_USER_TRANSACTIONS">
7684                     <context link="xact" jump="usr" field="home_ou"/>
7685                 </retrieve>
7686                         </actions>
7687                 </permacrud>
7688         </class>
7689         <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">
7690                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
7691                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
7692                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7693                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
7694                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
7695                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7696                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
7697                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>
7698                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
7699                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
7700                 </fields>
7701                 <links>
7702                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
7703                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
7704                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7705                 </links>
7706         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7707             <actions>
7708                 <retrieve permission="VIEW_USER_TRANSACTIONS">
7709                     <context link="xact" jump="usr" field="home_ou"/>
7710                 </retrieve>
7711                         </actions>
7712                 </permacrud>
7713         </class>
7714         <class id="aoc" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circulation" oils_persist:tablename="action.open_circulation" reporter:label="Open Circulation">
7715                 <fields oils_persist:primary="id" oils_persist:sequence="">
7716                         <field name="checkin_lib" reporter:datatype="link"/>
7717                         <field name="checkin_staff" reporter:datatype="link"/>
7718                         <field name="checkin_time" reporter:datatype="timestamp"/>
7719                         <field name="circ_lib"  reporter:datatype="org_unit"/>
7720                         <field name="circ_staff" reporter:datatype="link"/>
7721                         <field name="desk_renewal" reporter:datatype="bool"/>
7722                         <field name="due_date" reporter:datatype="timestamp"/>
7723                         <field name="duration" reporter:datatype="interval"/>
7724                         <field name="duration_rule" reporter:datatype="link"/>
7725                         <field name="fine_interval" reporter:datatype="interval"/>
7726                         <field name="id" reporter:datatype="id" />
7727                         <field name="max_fine" reporter:datatype="money" />
7728                         <field name="max_fine_rule" reporter:datatype="link"/>
7729                         <field name="opac_renewal" reporter:datatype="bool"/>
7730                         <field name="phone_renewal" reporter:datatype="bool"/>
7731                         <field name="recurring_fine" reporter:datatype="money" />
7732                         <field name="recurring_fine_rule" reporter:datatype="link"/>
7733                         <field name="renewal_remaining" reporter:datatype="int" />
7734             <field name="grace_period" reporter:datatype="interval" />
7735                         <field name="stop_fines" reporter:datatype="text"/>
7736                         <field name="stop_fines_time" reporter:datatype="timestamp"/>
7737                         <field name="target_copy" reporter:datatype="link"/>
7738                         <field name="usr" reporter:datatype="link"/>
7739                         <field name="xact_finish" reporter:datatype="timestamp" />
7740                         <field name="xact_start" reporter:datatype="timestamp" />
7741                         <field name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
7742                         <field name="auto_renewal" reporter:datatype="bool"/>
7743                         <field name="auto_renewal_remaining" reporter:datatype="int" />
7744                 </fields>
7745                 <links>
7746                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
7747                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
7748                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
7749                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
7750                 </links>
7751         </class>
7752         <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">
7753                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.subject_field_entry_id_seq">
7754                         <field name="field" reporter:datatype="link"/>
7755                         <field name="id" reporter:datatype="id" />
7756                         <field name="source" reporter:datatype="link"/>
7757                         <field name="value" reporter:datatype="text"/>
7758                 </fields>
7759                 <links>
7760                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
7761                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
7762                 </links>
7763         </class>
7764         <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">
7765                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_recurring_fine_id_seq">
7766                         <field name="high" reporter:datatype="money" />
7767                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
7768                         <field name="low" reporter:datatype="money" />
7769                         <field name="name" reporter:datatype="text"/>
7770                         <field name="normal" reporter:datatype="money" />
7771                         <field name="recurrence_interval" reporter:datatype="interval"/>
7772             <field name="grace_period" reporter:datatype="interval" />
7773                 </fields>
7774                 <links/>
7775         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7776             <actions>
7777                 <create permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
7778                 <retrieve/>
7779                 <update permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
7780                 <delete permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
7781             </actions>
7782         </permacrud>
7783         </class>
7784         <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">
7785                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
7786                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
7787                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7788                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
7789                         <field reporter:label="Workstation link" name="cash_drawer" reporter:datatype="link"/>
7790                         <field reporter:label="Check Number" name="check_number" reporter:datatype="int" />
7791                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
7792                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7793                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
7794                         <field reporter:label="Transaction link" name="xact" reporter:datatype="link"/>
7795                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
7796                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
7797                 </fields>
7798                 <links>
7799                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
7800                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
7801                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
7802                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7803                 </links>
7804         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7805             <actions>
7806                 <retrieve permission="VIEW_USER_TRANSACTIONS">
7807                     <context link="xact" jump="usr" field="home_ou"/>
7808                 </retrieve>
7809                         </actions>
7810                 </permacrud>
7811         </class>
7812         <class id="mdcp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::debit_card_payment" oils_persist:tablename="money.debit_card_payment" reporter:label="Debit Card Payment">
7813                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
7814                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
7815                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7816                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
7817                         <field reporter:label="Workstation link" name="cash_drawer" reporter:datatype="link"/>
7818                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
7819                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7820                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
7821                         <field reporter:label="Transaction link" name="xact" reporter:datatype="link"/>
7822                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
7823                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
7824                 </fields>
7825                 <links>
7826                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
7827                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
7828                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
7829                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7830                 </links>
7831         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7832             <actions>
7833                 <retrieve permission="VIEW_USER_TRANSACTIONS">
7834                     <context link="xact" jump="usr" field="home_ou"/>
7835                 </retrieve>
7836                         </actions>
7837                 </permacrud>
7838         </class>
7839         <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">
7840                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_id_seq">
7841                         <field reporter:label="Age Hold Protection" name="age_protect" reporter:datatype="link"/>
7842                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
7843                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
7844                         <field reporter:label="Call Number/Volume" name="call_number" reporter:datatype="link"/>
7845                         <field reporter:label="Circulation Type (MARC)" name="circ_as_type" reporter:datatype="link"/>
7846                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
7847                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
7848                         <field reporter:label="Can Circulate" name="circulate" reporter:datatype="bool"/>
7849                         <field reporter:label="Copy Number on Volume" name="copy_number" reporter:datatype="text"/>
7850                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
7851                         <field reporter:label="Active Date/Time" name="active_date" reporter:datatype="timestamp"/>
7852                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
7853                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
7854                         <field reporter:label="Dummy ISBN" name="dummy_isbn" reporter:datatype="text"/>
7855                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
7856                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money" />
7857                         <field reporter:label="Precat Dummy Author" name="dummy_author" reporter:datatype="text"/>
7858                         <field reporter:label="Precat Dummy Title" name="dummy_title" reporter:datatype="text"/>
7859                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
7860                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
7861                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
7862                         <field reporter:label="Is Holdable" name="holdable" reporter:datatype="bool" />
7863                         <field reporter:label="Copy ID" name="id" reporter:selector="barcode" reporter:datatype="id"/>
7864                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
7865                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link"/>
7866                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool" />
7867                         <field reporter:label="Price" name="price" reporter:datatype="money" />
7868                         <field reporter:label="Is Reference" name="ref" reporter:datatype="bool"/>
7869                         <field reporter:label="Copy Status" name="status" reporter:datatype="link"/>
7870                         <field reporter:label="Copy Status Changed Time" name="status_changed_time" reporter:datatype="timestamp"/>
7871                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool"/>
7872                         <field reporter:label="Floating Group" name="floating" reporter:datatype="link"/>
7873                         <field reporter:label="Cost" name="cost" reporter:datatype="money"/>
7874                         <field reporter:label="Copy Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
7875                         <field reporter:label="Stat-Cat entry maps" name="stat_cat_entry_copy_maps" oils_persist:virtual="true" reporter:datatype="link"/>
7876                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
7877                         <field reporter:label="Aged (patronless) Circulations" name="aged_circulations" oils_persist:virtual="true" reporter:datatype="link"/>
7878                         <field reporter:label="Combined Aged and Active Circulations" name="all_circulations" oils_persist:virtual="true" reporter:datatype="link"/>
7879                         <field reporter:label="Total Circulations" name="total_circ_count" oils_persist:virtual="true" reporter:datatype="link"/>
7880                         <field reporter:label="Last Circulation Date" name="last_circ" oils_persist:virtual="true" reporter:datatype="link"/>
7881                         <field reporter:label="Holds" name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
7882                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
7883                         <field reporter:label="Monograph Parts" name="parts" oils_persist:virtual="true" reporter:datatype="link"/>
7884                         <field reporter:label="Peer Record Maps" name="peer_record_maps" oils_persist:virtual="true" reporter:datatype="link"/>
7885                         <field reporter:label="Peer Records" name="peer_records" oils_persist:virtual="true" reporter:datatype="link"/>
7886                         <field reporter:label="Last Captured Hold" name="last_captured_hold" oils_persist:virtual="true" reporter:datatype="link"/>
7887                         <field reporter:label="Latest Inventory" name="latest_inventory" oils_persist:virtual="true" reporter:datatype="link"/>
7888                         <field reporter:label="Has Holds" name="holds_count" oils_persist:virtual="true" reporter:datatype="link"/>
7889                         <field reporter:label="Copy Tags" name="tags" oils_persist:virtual="true" reporter:datatype="link"/>
7890                         <field reporter:label="Copy Alerts" name="copy_alerts" oils_persist:virtual="true" reporter:datatype="link"/>
7891                 </fields>
7892                 <links>
7893                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
7894                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
7895                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
7896                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7897                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7898                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
7899                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
7900                         <link field="holds" reltype="has_many" key="target_copy" map="hold" class="ahcm"/>
7901                         <link field="stat_cat_entry_copy_maps" reltype="has_many" key="owning_copy" map="" class="ascecm"/>
7902                         <link field="notes" reltype="has_many" key="owning_copy" map="" class="acpn"/>
7903                         <link field="stat_cat_entries" reltype="has_many" key="owning_copy" map="stat_cat_entry" class="ascecm"/>
7904                         <link field="circulations" reltype="has_many" key="target_copy" map="" class="circ"/>
7905                         <link field="aged_circulations" reltype="has_many" key="target_copy" map="" class="acirc"/>
7906                         <link field="all_circulations" reltype="has_many" key="target_copy" map="" class="combcirc"/>
7907                         <link field="total_circ_count" reltype="might_have" key="id" map="" class="erfcc"/>
7908                         <link field="last_circ" reltype="might_have" key="id" map="" class="rlc"/>
7909                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
7910                         <link field="parts" reltype="has_many" key="target_copy" map="part" class="acpm"/>
7911                         <link field="peer_record_maps" reltype="has_many" key="target_copy" map="" class="bpbcm"/>
7912                         <link field="peer_records" reltype="has_many" key="target_copy" map="peer_record" class="bpbcm"/>
7913                         <link field="last_captured_hold" reltype="has_a" key="current_copy" map="" class="alhr"/>
7914                         <link field="latest_inventory" reltype="might_have" key="copy" map="" class="alci"/>
7915                         <link field="floating" reltype="has_a" key="id" map="" class="cfg"/>
7916                         <link field="holds_count" reltype="might_have" key="id" map="" class="hasholdscount"/>
7917                         <link field="tags" reltype="has_many" key="copy" map="" class="acptcm"/>
7918                         <link field="copy_alerts" reltype="has_many" key="copy" map="" class="aca"/>
7919                         <link field="circ_as_type" reltype="has_a" key="code" map="" class="citm"/>
7920                 </links>
7921         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7922             <actions>
7923                 <create permission="CREATE_COPY">
7924                     <context link="call_number" field="owning_lib"/>
7925                 </create>
7926                 <retrieve/>
7927                 <update permission="UPDATE_COPY">
7928                     <context link="call_number" field="owning_lib"/>
7929                 </update>
7930                 <delete permission="DELETE_COPY">
7931                     <context link="call_number" field="owning_lib"/>
7932                 </delete>
7933             </actions>
7934         </permacrud>
7935         </class>
7936
7937         <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">
7938                 <fields oils_persist:primary="id" oils_persist:sequence="asset.latest_inventory_id_seq">
7939             <field reporter:label="Latest Inventory ID" name="id" reporter:datatype="id"/>
7940                         <field reporter:label="Latest Inventory Date" name="inventory_date" reporter:datatype="timestamp"/>
7941                         <field reporter:label="Latest Inventory Workstation" name="inventory_workstation" reporter:datatype="link"/>
7942                         <field reporter:label="Copy" name="copy" reporter:datatype="link"/>
7943                 </fields>
7944                 <links>
7945                         <link field="inventory_workstation" reltype="has_a" key="id" map="" class="aws"/>
7946                         <link field="copy" reltype="has_a" key="id" map="" class="acp"/>
7947                 </links>
7948         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7949             <actions>
7950                                 <create/>
7951                                 <retrieve/>
7952                                 <update/>
7953                                 <delete/>
7954             </actions>
7955         </permacrud>
7956         </class>
7957
7958         <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">
7959                 <fields oils_persist:primary="id" oils_persist:sequence="config.copy_alert_type_id_seq">
7960                         <field reporter:label="Id" name="id" reporter:selector="name" reporter:datatype="id"/>
7961                         <field reporter:label="Scope Org Unit" name="scope_org"  reporter:datatype="org_unit"/>
7962                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
7963                         <field reporter:label="Name" name="name" reporter:datatype="text" />
7964                         <field reporter:label="State" name="state" reporter:datatype="text"/>
7965                         <field reporter:label="Event" name="event" reporter:datatype="text" />
7966                         <field reporter:label="During Renewal" name="in_renew" reporter:datatype="bool" />
7967                         <field reporter:label="Allow At Copy Circ Lib" name="at_circ" reporter:datatype="bool"/>
7968                         <field reporter:label="Allow At Copy Owning Lib" name="at_owning" reporter:datatype="bool"/>
7969                         <field reporter:label="Invert allowed locations" name="invert_location" reporter:datatype="bool"/>
7970                         <field reporter:label="Next Statuses" name="next_status" reporter:datatype="text"/>
7971                 </fields>
7972                 <links>
7973                         <link field="scope_org" reltype="has_a" key="id" map="" class="aou"/>
7974                 </links>
7975         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7976             <actions>
7977                 <create permission="ADMIN_COPY_ALERT_TYPE CREATE_COPY_ALERT_TYPE" context_field="scope_org"/>
7978                 <retrieve/>
7979                 <update permission="ADMIN_COPY_ALERT_TYPE UPDATE_COPY_ALERT_TYPE" context_field="scope_org"/>
7980                 <delete permission="ADMIN_COPY_ALERT_TYPE DELETE_COPY_ALERT_TYPE" context_field="scope_org"/>
7981             </actions>
7982         </permacrud>
7983         </class>
7984
7985         <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="Item Alert Suppression">
7986                 <fields oils_persist:primary="id" oils_persist:sequence="actor.copy_alert_suppress_id_seq">
7987                         <field reporter:label="Id" name="id" reporter:datatype="id"/>
7988                         <field reporter:label="Org Unit" name="org"  reporter:datatype="org_unit"/>
7989                         <field reporter:label="Alert Type" name="alert_type" reporter:datatype="link" />
7990                 </fields>
7991                 <links>
7992                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
7993                         <link field="alert_type" reltype="has_a" key="id" map="" class="ccat"/>
7994                 </links>
7995         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7996             <actions>
7997                 <create permission="ADMIN_COPY_ALERT_SUPPRESS CREATE_COPY_ALERT_SUPPRESS" context_field="org"/>
7998                 <retrieve/>
7999                 <update permission="ADMIN_COPY_ALERT_SUPPRESS UPDATE_COPY_ALERT_SUPPRESS" context_field="org"/>
8000                 <delete permission="ADMIN_COPY_ALERT_SUPPRESS DELETE_COPY_ALERT_SUPPRESS" context_field="org"/>
8001             </actions>
8002         </permacrud>
8003         </class>
8004
8005         <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">
8006                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_alert_id_seq">
8007                         <field reporter:label="Id" name="id" reporter:datatype="id"/>
8008                         <field reporter:label="Alert Type" name="alert_type" reporter:datatype="link" />
8009                         <field reporter:label="Copy" name="copy"  reporter:datatype="link"/>
8010                         <field reporter:label="Temporary" name="temp" reporter:datatype="bool" />
8011                         <field reporter:label="Create Date/Time" name="create_time" reporter:datatype="timestamp" />
8012                         <field reporter:label="Creator" name="create_staff" reporter:datatype="link"/>
8013                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8014                         <field reporter:label="Acknowledge Date/Time" name="ack_time" reporter:datatype="timestamp" />
8015                         <field reporter:label="Acknowledger" name="ack_staff" reporter:datatype="link"/>
8016                 </fields>
8017                 <links>
8018                         <link field="alert_type" reltype="has_a" key="id" map="" class="ccat"/>
8019                         <link field="copy" reltype="has_a" key="id" map="" class="acp"/>
8020                         <link field="create_staff" reltype="has_a" key="id" map="" class="au"/>
8021                         <link field="ack_staff" reltype="has_a" key="id" map="" class="au"/>
8022                 </links>
8023         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8024             <actions>
8025                 <create permission="ADMIN_COPY_ALERT CREATE_COPY_ALERT">
8026                     <context link="copy" field="circ_lib"/>
8027                 </create>
8028                 <retrieve permission="ADMIN_COPY_ALERT VIEW_COPY_ALERT">
8029                     <context link="copy" field="circ_lib"/>
8030                                 </retrieve>
8031                 <update permission="ADMIN_COPY_ALERT UPDATE_COPY_ALERT">
8032                     <context link="copy" field="circ_lib"/>
8033                                 </update>
8034                 <delete permission="ADMIN_COPY_ALERT DELETE_COPY_ALERT">
8035                     <context link="copy" field="circ_lib"/>
8036                                 </delete>
8037             </actions>
8038         </permacrud>
8039         </class>
8040
8041         <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">
8042                 <fields oils_persist:primary="id">
8043                         <field reporter:label="Id" name="id" reporter:datatype="id"/>
8044                         <field reporter:label="Alert Type" name="alert_type" reporter:datatype="link" />
8045                         <field reporter:label="Copy" name="copy"  reporter:datatype="link"/>
8046                         <field reporter:label="Temporary" name="temp" reporter:datatype="bool" />
8047                         <field reporter:label="Create Date/Time" name="create_time" reporter:datatype="timestamp" />
8048                         <field reporter:label="Creator" name="create_staff" reporter:datatype="link"/>
8049                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8050                         <field reporter:label="Acknowledge Date/Time" name="ack_time" reporter:datatype="timestamp" />
8051                         <field reporter:label="Acknowledger" name="ack_staff" reporter:datatype="link"/>
8052                 </fields>
8053                 <links>
8054                         <link field="alert_type" reltype="has_a" key="id" map="" class="ccat"/>
8055                         <link field="copy" reltype="has_a" key="id" map="" class="acp"/>
8056                         <link field="create_staff" reltype="has_a" key="id" map="" class="au"/>
8057                         <link field="ack_staff" reltype="has_a" key="id" map="" class="au"/>
8058                 </links>
8059         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8060             <actions>
8061                 <create permission="ADMIN_COPY_ALERT CREATE_COPY_ALERT">
8062                     <context link="copy" field="circ_lib"/>
8063                 </create>
8064                 <retrieve permission="ADMIN_COPY_ALERT VIEW_COPY_ALERT">
8065                     <context link="copy" field="circ_lib"/>
8066                                 </retrieve>
8067                 <update permission="ADMIN_COPY_ALERT UPDATE_COPY_ALERT">
8068                     <context link="copy" field="circ_lib"/>
8069                                 </update>
8070                 <delete permission="ADMIN_COPY_ALERT DELETE_COPY_ALERT">
8071                     <context link="copy" field="circ_lib"/>
8072                                 </delete>
8073             </actions>
8074         </permacrud>
8075         </class>
8076
8077         <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">
8078                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_template_id_seq">
8079                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name" />
8080                         <field reporter:label="Owning Lib" name="owning_lib" reporter:datatype="org_unit"/>
8081                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
8082                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
8083                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
8084                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
8085                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
8086                         <field reporter:label="Circ Lib" name="circ_lib" reporter:datatype="org_unit"/>
8087                         <field reporter:label="Status" name="status" reporter:datatype="link"/>
8088                         <field reporter:label="Location" name="location" reporter:datatype="link"/>
8089                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
8090                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
8091                         <field reporter:label="Age Protect" name="age_protect" reporter:datatype="link"/>
8092                         <field reporter:label="Circulate?" name="circulate" reporter:datatype="bool"/>
8093                         <field reporter:label="Deposit?" name="deposit" reporter:datatype="bool"/>
8094                         <field reporter:label="Reference?" name="ref" reporter:datatype="bool"/>
8095                         <field reporter:label="Holdable?" name="holdable" reporter:datatype="bool"/>
8096                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
8097                         <field reporter:label="Price" name="price" reporter:datatype="money"/>
8098                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="link"/>
8099                         <field reporter:label="Circ As Type" name="circ_as_type" reporter:datatype="link"/>
8100                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
8101                         <field reporter:label="OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
8102                         <field reporter:label="Floating Group" name="floating" reporter:datatype="link"/>
8103                         <field reporter:label="Mint Condition?" name="mint_condition" reporter:datatype="bool"/>
8104                 </fields>
8105                 <links>
8106                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
8107                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8108                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8109                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
8110                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
8111                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
8112                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
8113                         <link field="floating" reltype="has_a" key="id" map="" class="cfg"/>
8114                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
8115                         <link field="circ_as_type" reltype="has_a" key="code" map="" class="citm"/>
8116                 </links>
8117                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8118                         <actions>
8119                                 <create permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
8120                                 <retrieve />
8121                                 <update permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
8122                                 <delete permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
8123                         </actions>
8124                 </permacrud>
8125         </class>
8126
8127         <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">
8128                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_age_hold_protect_id_seq">
8129                         <field reporter:label="Item Age" name="age" reporter:datatype="interval"/>
8130                         <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
8131                         <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>
8132                         <field reporter:label="Allowed Proximity" name="prox" reporter:datatype="int" />
8133                 </fields>
8134                 <links/>
8135         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8136             <actions>
8137                 <create permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
8138                 <retrieve/>
8139                 <update permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
8140                 <delete permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
8141             </actions>
8142         </permacrud>
8143         </class>
8144         <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">
8145                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_max_fine_id_seq">
8146                         <field reporter:label="Max Fine Amount" name="amount" reporter:datatype="money" />
8147                         <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
8148                         <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>
8149                         <field reporter:label="Is Percent" name="is_percent" reporter:datatype="bool"/>
8150                 </fields>
8151                 <links/>
8152         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8153             <actions>
8154                 <create permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
8155                 <retrieve/>
8156                 <update permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
8157                 <delete permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
8158             </actions>
8159         </permacrud>
8160         </class>
8161         <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">
8162                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_tree_id_seq">
8163                         <field reporter:label="Child Groups" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
8164                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
8165                         <field reporter:label="Group ID" name="id" reporter:selector="name" reporter:datatype="id"/>
8166                         <field reporter:label="Group Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
8167                         <field reporter:label="Parent Group" name="parent" reporter:datatype="link"/>
8168                         <field reporter:label="User Expiration Interval" name="perm_interval" reporter:datatype="interval"/>
8169                         <field reporter:label="Required Permission" name="application_perm" reporter:datatype="text"/>
8170                         <field reporter:label="Is User Group" name="usergroup" reporter:datatype="bool"/>
8171                         <field reporter:label="Hold Priority" name="hold_priority" reporter:datatype="int"/>
8172                 </fields>
8173                 <links>
8174                         <link field="parent" reltype="has_a" key="id" map="" class="pgt"/>
8175                         <link field="children" reltype="has_many" key="parent" map="" class="pgt"/>
8176                 </links>
8177         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8178             <actions>
8179                 <create permission="CREATE_PERM" global_required="true"/>
8180                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
8181                 <update permission="UPDATE_PERM" global_required="true"/>
8182                 <delete permission="DELETE_PERM" global_required="true"/>
8183             </actions>
8184         </permacrud>
8185         </class>
8186         <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">
8187                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_tree_display_entry_id_seq">
8188                         <field reporter:label="Entry ID" name="id" reporter:selector="name" reporter:datatype="id"/>
8189                         <field reporter:label="Group ID" name="grp" reporter:datatype="link" oils_persist:i18n="true"/>
8190                         <field reporter:label="Parent Group" name="parent" reporter:datatype="link"/>
8191                         <field reporter:label="Org Unit" name="org" reporter:datatype="link"/>
8192                         <field reporter:label="Position" name="position" reporter:datatype="int"/>
8193                         <field reporter:label="Child Entries" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
8194                 </fields>
8195                 <links>
8196                         <link field="parent" reltype="has_a" key="id" map="" class="pgtde"/>
8197                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
8198                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
8199                         <link field="children" reltype="has_many" key="parent" map="" class="pgtde"/>
8200                 </links>
8201                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8202                         <actions>
8203                                 <create permission="MANAGE_CUSTOM_PERM_GRP_TREE" global_required="true"/>
8204                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
8205                                 <update permission="MANAGE_CUSTOM_PERM_GRP_TREE" global_required="true"/>
8206                                 <delete permission="MANAGE_CUSTOM_PERM_GRP_TREE" global_required="true"/>
8207                         </actions>
8208                 </permacrud>
8209         </class>
8210         <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">
8211                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_answer_id_seq">
8212                         <field reporter:label="Responses using this Answer" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
8213                         <field reporter:label="Answer Text" name="answer" reporter:datatype="text"/>
8214                         <field reporter:label="Answer ID" name="id" reporter:datatype="id" />
8215                         <field reporter:label="Question" name="question" reporter:datatype="link"/>
8216                 </fields>
8217                 <links>
8218                         <link field="question" reltype="has_a" key="id" map="" class="asvq"/>
8219                         <link field="responses" reltype="has_many" key="answer" map="" class="asvr"/>
8220                 </links>
8221         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8222             <actions>
8223                 <create permission="ADMIN_SURVEY">
8224                     <context link="question" jump="survey" field="owner"/>
8225                 </create>
8226                 <retrieve/>
8227                 <update permission="ADMIN_SURVEY">
8228                     <context link="question" jump="survey" field="owner"/>
8229                 </update>
8230                 <delete permission="ADMIN_SURVEY">
8231                     <context link="question" jump="survey" field="owner"/>
8232                 </delete>
8233             </actions>
8234         </permacrud>
8235         </class>
8236         <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">
8237                 <fields oils_persist:primary="id" oils_persist:sequence="action.non_cataloged_circulation_id_seq">
8238                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
8239                         <field reporter:label="Circulation Date/Time" name="circ_time" reporter:datatype="timestamp"/>
8240                         <field reporter:label="Non-cat Circulation ID" name="id" reporter:datatype="id" />
8241                         <field reporter:label="Non-cat Item Type" name="item_type" reporter:datatype="link"/>
8242                         <field reporter:label="Patron" name="patron" reporter:datatype="link"/>
8243                         <field reporter:label="Circulating Staff" name="staff" reporter:datatype="link"/>
8244                         <field reporter:label="Virtual Due Date/Time" name="duedate" reporter:datatype="timestamp" oils_persist:virtual="true"/>
8245                 </fields>
8246                 <links>
8247                         <link field="item_type" reltype="has_a" key="id" map="" class="cnct"/>
8248                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
8249                         <link field="patron" reltype="has_a" key="id" map="" class="au"/>
8250                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
8251                 </links>
8252                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8253                         <actions>
8254                                 <retrieve permission="VIEW_CIRCULATIONS" context_field="circ_lib" />
8255                         </actions>
8256                 </permacrud>
8257         </class>
8258         <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">
8259                 <fields oils_persist:primary="usr" oils_persist:sequence="">
8260                         <field name="balance_owed" reporter:datatype="money" />
8261                         <field name="total_owed" reporter:datatype="money" />
8262                         <field name="total_paid" reporter:datatype="money" />
8263                         <field name="usr" reporter:datatype="link"/>
8264                 </fields>
8265                 <links>
8266                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
8267                 </links>
8268         </class>
8269         <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">
8270                 <fields oils_persist:primary="id" oils_persist:sequence="action.unfulfilled_hold_list_id_seq">
8271                         <field reporter:label="Non-fulfilling Library" name="circ_lib"  reporter:datatype="org_unit"/>
8272                         <field reporter:label="Non-fulfilling Copy" name="current_copy" reporter:datatype="link"/>
8273                         <field reporter:label="Retargeting Date/Time" name="fail_time" reporter:datatype="timestamp"/>
8274                         <field reporter:label="Hold" name="hold" reporter:datatype="link"/>
8275                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
8276                 </fields>
8277                 <links>
8278                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
8279                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
8280                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
8281                 </links>
8282         </class>
8283         <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">
8284                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.identifier_field_entry_id_seq">
8285                         <field name="field" reporter:datatype="link"/>
8286                         <field name="id" reporter:datatype="id" />
8287                         <field name="source" reporter:datatype="link"/>
8288                         <field name="value" reporter:datatype="text"/>
8289                 </fields>
8290                 <links>
8291                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
8292                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
8293                 </links>
8294         </class>
8295         <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">
8296                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.title_field_entry_id_seq">
8297                         <field name="field" reporter:datatype="link"/>
8298                         <field name="id" reporter:datatype="id" />
8299                         <field name="source" reporter:datatype="link"/>
8300                         <field name="value" reporter:datatype="text"/>
8301                 </fields>
8302                 <links>
8303                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
8304                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
8305                 </links>
8306         </class>
8307         <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">
8308                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_usr_map_id_seq">
8309                         <field reporter:label="Entry ID" name="id" reporter:datatype="id" />
8310                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
8311                         <field reporter:label="Entry Text" name="stat_cat_entry" reporter:datatype="text"/>
8312                         <field reporter:label="User" name="target_usr" reporter:datatype="link"/>
8313                 </fields>
8314                 <links>
8315                         <link field="target_usr" reltype="has_a" key="id" map="" class="au"/>
8316                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
8317                 </links>
8318         </class>
8319         <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">
8320                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_perm_map_id_seq">
8321                         <field name="depth" reporter:datatype="int" />
8322                         <field name="grantable" reporter:datatype="bool"/>
8323                         <field name="grp" reporter:datatype="link"/>
8324                         <field name="id" reporter:datatype="id" />
8325                         <field name="perm" reporter:datatype="link"/>
8326                 </fields>
8327                 <links>
8328                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
8329                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
8330                 </links>
8331         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8332             <actions>
8333                 <create permission="ASSIGN_GROUP_PERM" global_required="true"/>
8334                 <retrieve permission="ASSIGN_GROUP_PERM UPDATE_GROUP_PERM REMOVE_GROUP_PERM" global_required="true"/>
8335                 <update permission="UPDATE_GROUP_PERM" global_required="true"/>
8336                 <delete permission="REMOVE_GROUP_PERM" global_required="true"/>
8337             </actions>
8338         </permacrud>
8339         </class>
8340         <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">
8341                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_id_seq">
8342                         <field name="items" oils_persist:virtual="true" />
8343                         <field name="btype" reporter:datatype="text"/>
8344                         <field name="id" reporter:datatype="id" />
8345                         <field name="name" reporter:datatype="text"/>
8346                         <field name="description" reporter:datatype="text"/>
8347                         <field name="owner" reporter:datatype="link"/>
8348                         <field name="pub" reporter:datatype="bool"/>
8349                         <field name="create_time" reporter:datatype="timestamp" />
8350                         <field name="owning_lib" reporter:datatype="org_unit" />
8351                 </fields>
8352                 <links>
8353                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
8354                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8355                         <link field="items" reltype="has_many" key="bucket" map="" class="ccbi"/>
8356                 </links>
8357                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8358                         <actions>
8359                                 <create permission="CREATE_COPY_BUCKET ADMIN_COPY_BUCKET" context="owning_lib" owning_user="owner"/>
8360                                 <retrieve permission="CREATE_COPY_BUCKET ADMIN_COPY_BUCKET" context="owning_lib" owning_user="owner"/>
8361                                 <update permission="CREATE_COPY_BUCKET ADMIN_COPY_BUCKET" context="owning_lib" owning_user="owner"/>
8362                                 <delete permission="CREATE_COPY_BUCKET ADMIN_COPY_BUCKET" context="owning_lib" owning_user="owner"/>
8363                         </actions>
8364                 </permacrud>
8365         </class>
8366         <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">
8367                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_note_id_seq">
8368                         <field name="id" reporter:datatype="id" />
8369                         <field name="bucket" reporter:datatype="link"/>
8370                         <field name="note" reporter:datatype="text" />
8371                 </fields>
8372                 <links>
8373                         <link field="bucket" reltype="has_a" key="id" map="" class="ccb"/>
8374                 </links>
8375         </class>
8376         <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">
8377                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_work_ou_map_id_seq">
8378                         <field reporter:label="User/Working Location Map ID" name="id" reporter:datatype="int" />
8379                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
8380                         <field reporter:label="Working Location" name="work_ou" reporter:datatype="link"/>
8381                 </fields>
8382                 <links>
8383                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
8384                         <link field="work_ou" reltype="has_a" key="id" map="" class="aou"/>
8385                 </links>
8386         </class>
8387         <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">
8388                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_perm_map_id_seq">
8389                         <field name="depth" reporter:datatype="int"/>
8390                         <field name="grantable" reporter:datatype="bool"/>
8391                         <field name="id" reporter:datatype="id" />
8392                         <field name="perm" reporter:datatype="link"/>
8393                         <field name="usr" reporter:datatype="link"/>
8394                 </fields>
8395                 <links>
8396                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
8397                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
8398                 </links>
8399         </class>
8400         <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">
8401                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_object_perm_map_id_seq">
8402                         <field name="object_id" reporter:datatype="text"/>
8403                         <field name="grantable" reporter:datatype="bool"/>
8404                         <field name="id" reporter:datatype="id" />
8405                         <field name="perm" reporter:datatype="link"/>
8406                         <field name="usr" reporter:datatype="link"/>
8407                         <field name="object_type" reporter:datatype="text"/>
8408                 </fields>
8409                 <links>
8410                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
8411                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
8412                 </links>
8413         </class>
8414         <class id="mp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::payment" oils_persist:tablename="money.payment_view" reporter:label="Payments">
8415                 <fields oils_persist:primary="id" oils_persist:sequence="">
8416                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
8417                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
8418                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8419                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
8420                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
8421                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
8422                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
8423                         <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8424                         <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8425                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8426                         <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8427                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8428                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8429                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8430                         <field reporter:label="Account Adjustment Detail" name="account_adjustment" oils_persist:virtual="true" reporter:datatype="link"/>
8431                         <field reporter:label="Debit Card Payment Detail" name="debit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8432                 </fields>
8433                 <links>
8434                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
8435                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
8436                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
8437                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
8438                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
8439                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
8440                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
8441                         <link field="account_adjustment" reltype="might_have" key="id" map="" class="maa"/>
8442                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
8443                         <link field="debit_card_payment" reltype="might_have" key="id" map="" class="mdcp"/>
8444                 </links>
8445         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8446             <actions>
8447                 <retrieve permission="VIEW_USER_TRANSACTIONS">
8448                     <context link="xact" jump="usr" field="home_ou"/>
8449                 </retrieve>
8450                         </actions>
8451                 </permacrud>
8452         </class>
8453         <class id="map" controller="open-ils.cstore open-ils.pcrud" 
8454                 oils_obj:fieldmapper="money::aged_payment" 
8455                 oils_persist:tablename="money.aged_payment" 
8456                 reporter:label="Payments: Aged">
8457                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
8458                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
8459                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
8460                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8461                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
8462                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
8463                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
8464                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
8465                         <field reporter:label="Accepting User" name="accepting_usr" reporter:datatype="link"/>
8466                         <field reporter:label="Cash Drawer" name="cash_drawer" reporter:datatype="link"/>
8467                         <field name="billing" reporter:datatype="link"/>
8468                 </fields>
8469                 <links>
8470                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
8471                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
8472                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
8473                         <link field="billing" reltype="has_a" key="id" class="mab"/>
8474                 </links>
8475                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8476                         <actions>
8477                                 <retrieve permission="VIEW_USER_TRANSACTIONS">
8478                                         <context link="xact" field="usr_home_ou"/>
8479                                 </retrieve>
8480                         </actions>
8481                 </permacrud>
8482         </class>
8483         <class id="mallp" controller="open-ils.cstore" 
8484                 oils_obj:fieldmapper="money::all_payments" 
8485                 oils_persist:tablename="money.all_payments" 
8486                 oils_persist="readonly" reporter:core="true"
8487                 reporter:label="Payments: All">
8488                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
8489                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
8490                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
8491                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8492                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
8493                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
8494                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
8495                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
8496                         <field reporter:label="Accepting User" name="accepting_usr" reporter:datatype="link"/>
8497                         <field reporter:label="Cash Drawer" name="cash_drawer" reporter:datatype="link"/>
8498                         <field name="billing" reporter:datatype="link"/>
8499                 </fields>
8500                 <links>
8501                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
8502                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
8503                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
8504                         <link field="billing" reltype="has_a" key="id" class="mallb"/>
8505                 </links>
8506         </class>
8507
8508         <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">
8509                 <fields oils_persist:primary="id" oils_persist:sequence="">
8510                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
8511                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
8512                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8513                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
8514                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
8515                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
8516                         <field reporter:label="Accepting User" name="accepting_usr" reporter:datatype="link"/>
8517                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
8518                         <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8519                         <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8520                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8521                         <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8522                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8523                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8524                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8525                         <field reporter:label="Account Adjustment Detail" name="account_adjustment" oils_persist:virtual="true" reporter:datatype="link"/>
8526                         <field reporter:label="Debit Card Payment Detail" name="debit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8527                 </fields>
8528                 <links>
8529                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
8530                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
8531                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
8532                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
8533                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
8534                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
8535                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
8536                         <link field="account_adjustment" reltype="might_have" key="id" map="" class="maa"/>
8537                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
8538                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
8539                         <link field="debit_card_payment" reltype="might_have" key="id" map="" class="mdcp"/>
8540                 </links>
8541                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8542                         <actions>
8543                                 <retrieve permission="VIEW_USER_TRANSACTIONS">
8544                                         <context link="xact" jump="usr" field="home_ou"/>
8545                                 </retrieve>
8546                         </actions>
8547                 </permacrud>
8548         </class>
8549         <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">
8550                 <fields oils_persist:primary="id" oils_persist:sequence="">
8551                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
8552                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
8553                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8554                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
8555                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
8556                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
8557                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
8558                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8559                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8560                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8561                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8562                         <field reporter:label="Account Adjustment Detail" name="account_adjustment" oils_persist:virtual="true" reporter:datatype="link"/>
8563                 </fields>
8564                 <links>
8565                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
8566                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
8567                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
8568                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
8569                         <link field="account_adjustment" reltype="might_have" key="id" map="" class="maa"/>
8570                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
8571                 </links>
8572         </class>
8573         <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">
8574                 <fields oils_persist:primary="id" oils_persist:sequence="">
8575                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
8576                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
8577                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8578                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
8579                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
8580                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
8581                         <field reporter:label="Accepting User" name="accepting_usr" reporter:datatype="link"/>
8582                         <field reporter:label="Cash Drawer" name="cash_drawer" reporter:datatype="link"/>
8583                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
8584                         <field reporter:label="Cash Payment" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8585                         <field reporter:label="Credit Card Payment" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8586                         <field reporter:label="Check Payment" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8587                         <field reporter:label="Debit Card Payment" name="debit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8588                 </fields>
8589                 <links>
8590                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
8591                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
8592                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
8593                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
8594                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
8595                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
8596                         <link field="debit_card_payment" reltype="might_have" key="id" map="" class="mdcp"/>
8597                 </links>
8598         </class>
8599         <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">
8600                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_id_seq">
8601                         <field name="bucket" reporter:datatype="link"/>
8602                         <field name="id" reporter:datatype="id" />
8603                         <field name="target_biblio_record_entry" reporter:datatype="link"/>
8604                         <field name="create_time" reporter:datatype="timestamp" />
8605                         <field name="pos" reporter:datatype="int" />
8606                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
8607                 </fields>
8608                 <links>
8609                         <link field="target_biblio_record_entry" reltype="has_a" key="id" map="" class="bre"/>
8610                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
8611             <link field="notes" reltype="has_many" map="" key="item" class="cbrebin"/>
8612                 </links>
8613                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8614                         <actions>
8615                                 <retrieve permission="ADMIN_COPY_BUCKET">
8616                     <context link="bucket" owning_lib="owning_lib"/>
8617                 </retrieve>
8618             </actions>
8619         </permacrud>
8620         </class>
8621         <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">
8622                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_note_id_seq">
8623                         <field name="id" reporter:datatype="id" />
8624                         <field name="item" reporter:datatype="link"/>
8625                         <field name="note" reporter:datatype="text" />
8626                 </fields>
8627                 <links>
8628                         <link field="item" reltype="has_a" key="id" map="" class="cbrebi"/>
8629                 </links>
8630         </class>
8631         <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">
8632                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_entry_id_seq">
8633                         <field reporter:label="Entry ID" name="id" reporter:datatype="int" />
8634                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
8635                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
8636                         <field reporter:label="Value" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
8637                 </fields>
8638                 <links>
8639                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
8640                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
8641                 </links>
8642                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8643                         <actions>
8644                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
8645                         </actions>
8646                 </permacrud>
8647         </class>
8648     <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">
8649         <fields oils_persist:primary="field">
8650             <field reporter:label="Field Identifier" name="field" reporter:datatype="text" reporter:selector="name"/>
8651             <field reporter:label="Field Name" name="name" reporter:datatype="text"/>
8652             <field reporter:label="Exclusive?" name="one_only" reporter:datatype="bool"/>
8653         </fields>
8654         <links/>
8655         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8656             <actions>
8657                 <create permission="CREATE_COPY_STAT_CAT" global_required="true"/>
8658                 <retrieve />
8659                 <update permission="UPDATE_COPY_STAT_CAT" global_required="true"/>
8660                 <delete permission="DELETE_COPY_STAT_CAT" global_required="true"/>
8661             </actions>
8662         </permacrud>
8663     </class>
8664         <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">
8665                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_cancel_cause_id_seq">
8666                         <field reporter:label="Cause ID" name="id" reporter:datatype="id" />
8667                         <field reporter:label="Cause Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
8668                 </fields>
8669                 <links/>
8670         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8671             <actions>
8672                 <create permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
8673                 <retrieve/>
8674                 <update permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
8675                 <delete permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
8676             </actions>
8677         </permacrud>
8678         </class>
8679
8680
8681         <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">
8682                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
8683                         <field reporter:label="Copy Status at Transit" name="copy_status" reporter:datatype="link"/>
8684                         <field reporter:label="Destination Library" name="dest" reporter:datatype="org_unit"/>
8685                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
8686                         <field reporter:label="Reservation requiring Transit" name="reservation" reporter:datatype="link"/>
8687                         <field reporter:label="Transit ID" name="id" reporter:datatype="id" />
8688                         <field reporter:label="Is Persistent?" name="persistant_transfer" reporter:datatype="bool"/>
8689                         <field reporter:label="Previous Stop" name="prev_hop" reporter:datatype="link"/>
8690                         <field reporter:label="Sending Library" name="source" reporter:datatype="org_unit"/>
8691                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
8692                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
8693                         <field reporter:label="Base Transit" name="transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
8694                         <field reporter:label="Prev Destination Library" name="prev_dest" reporter:datatype="org_unit"/>
8695                         <field reporter:label="Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
8696                 </fields>
8697                 <links>
8698                         <link field="transit_copy" reltype="might_have" key="id" map="" class="atc"/>
8699                         <link field="target_copy" reltype="has_a" key="id" map="" class="brsrc"/>
8700                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
8701                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
8702                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
8703                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
8704                         <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
8705                 </links>
8706         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8707             <actions>
8708                 <create permission="TRANSIT_COPY">
8709                     <context link="target_copy" field="owner"/>
8710                 </create>
8711                 <retrieve/>
8712                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
8713                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
8714             </actions>
8715         </permacrud>
8716         </class>
8717         <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">
8718                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
8719                         <field reporter:label="Copy Status at Transit" name="copy_status" reporter:datatype="link"/>
8720                         <field reporter:label="Destination Library" name="dest" reporter:datatype="org_unit"/>
8721                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
8722                         <field reporter:label="Hold requiring Transit" name="hold" reporter:datatype="link"/>
8723                         <field reporter:label="Transit ID" name="id" reporter:datatype="id" />
8724                         <field reporter:label="Is Persistent?" name="persistant_transfer" reporter:datatype="bool"/>
8725                         <field reporter:label="Previous Stop" name="prev_hop" reporter:datatype="link"/>
8726                         <field reporter:label="Sending Library" name="source" reporter:datatype="org_unit"/>
8727                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
8728                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
8729                         <field reporter:label="Base Transit" name="transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
8730                         <field reporter:label="Prev Destination Library" name="prev_dest" reporter:datatype="org_unit"/>
8731                         <field reporter:label="Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
8732                 </fields>
8733                 <links>
8734                         <link field="transit_copy" reltype="might_have" key="id" map="" class="atc"/>
8735                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
8736                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
8737                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
8738                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
8739                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
8740                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
8741                 </links>
8742         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8743             <actions>
8744                 <create permission="TRANSIT_COPY" context_field="owner">
8745                     <context link="target_copy" field="circ_lib"/>
8746                 </create>
8747                 <retrieve/>
8748                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
8749                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
8750             </actions>
8751         </permacrud>
8752         </class>
8753         <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">
8754                 <fields oils_persist:primary="id" oils_persist:sequence="money.billing_id_seq">
8755                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
8756                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
8757                         <field reporter:label="Billing Period Start" name="period_start" reporter:datatype="timestamp"/>
8758                         <field reporter:label="Billing Period End" name="period_end" reporter:datatype="timestamp"/>
8759                         <field reporter:label="Legacy Billing Timestamp" name="billing_ts" reporter:datatype="timestamp"/>
8760                         <field reporter:label="Legacy Billing Type" name="billing_type" reporter:datatype="text"/>
8761                         <field reporter:label="Billing ID" name="id" reporter:datatype="id" />
8762                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8763                         <field reporter:label="Void Timestamp" name="void_time" reporter:datatype="timestamp"/>
8764                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
8765                         <field reporter:label="Voiding Staff Member" name="voider" reporter:datatype="link"/>
8766                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
8767                         <field reporter:label="Type" name="btype" reporter:datatype="link"/>
8768                         <field reporter:label="Adjustments" name="adjustments" oils_persist:virtual="true" reporter:datatype="link"/>
8769                 </fields>
8770                 <links>
8771                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
8772                         <link field="voider" reltype="has_a" key="id" map="" class="au"/>
8773                         <link field="btype" reltype="has_a" key="id" map="" class="cbt"/>
8774                         <link field="adjustments" reltype="has_many" key="billing" map="" class="maa"/>
8775                 </links>
8776         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8777             <actions>
8778                 <retrieve permission="VIEW_USER_TRANSACTIONS">
8779                     <context link="xact" jump="usr" field="home_ou"/>
8780                 </retrieve>
8781                         </actions>
8782                 </permacrud>
8783         </class>
8784         <class id="mab" controller="open-ils.cstore open-ils.pcrud" 
8785                 oils_obj:fieldmapper="money::aged_billing" 
8786                 oils_persist:tablename="money.aged_billing" 
8787                 reporter:label="Aged Billing Line Item">
8788                 <fields oils_persist:primary="id" oils_persist:sequence="money.billing_id_seq">
8789                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
8790                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
8791                         <field reporter:label="Billing Period Start" name="period_start" reporter:datatype="timestamp"/>
8792                         <field reporter:label="Billing Period End" name="period_end" reporter:datatype="timestamp"/>
8793                         <field reporter:label="Legacy Billing Timestamp" name="billing_ts" reporter:datatype="timestamp"/>
8794                         <field reporter:label="Legacy Billing Type" name="billing_type" reporter:datatype="text"/>
8795                         <field reporter:label="Billing ID" name="id" reporter:datatype="id" />
8796                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8797                         <field reporter:label="Void Timestamp" name="void_time" reporter:datatype="timestamp"/>
8798                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
8799                         <field reporter:label="Voiding Staff Member" name="voider" reporter:datatype="link"/>
8800                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
8801                         <field reporter:label="Type" name="btype" reporter:datatype="link"/>
8802                 </fields>
8803                 <links>
8804                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
8805                         <link field="voider" reltype="has_a" key="id" map="" class="au"/>
8806                         <link field="btype" reltype="has_a" key="id" map="" class="cbt"/>
8807                 </links>
8808                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8809                         <actions>
8810                                 <retrieve permission="VIEW_USER_TRANSACTIONS">
8811                                         <context link="xact" field="usr_home_ou"/>
8812                                 </retrieve>
8813                         </actions>
8814                 </permacrud>
8815         </class>
8816         <class id="mallb" controller="open-ils.cstore" 
8817                 oils_obj:fieldmapper="money::all_billings" 
8818                 oils_persist:tablename="money.all_billings" 
8819                 oils_persist="readonly" reporter:label="All Billing Line Items">
8820                 <fields oils_persist:primary="id" oils_persist:sequence="">
8821                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
8822                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
8823                         <field reporter:label="Billing Period Start" name="period_start" reporter:datatype="timestamp"/>
8824                         <field reporter:label="Billing Period End" name="period_end" reporter:datatype="timestamp"/>
8825                         <field reporter:label="Legacy Billing Timestamp" name="billing_ts" reporter:datatype="timestamp"/>
8826                         <field reporter:label="Legacy Billing Type" name="billing_type" reporter:datatype="text"/>
8827                         <field reporter:label="Billing ID" name="id" reporter:datatype="id" />
8828                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8829                         <field reporter:label="Void Timestamp" name="void_time" reporter:datatype="timestamp"/>
8830                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
8831                         <field reporter:label="Voiding Staff Member" name="voider" reporter:datatype="link"/>
8832                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
8833                         <field reporter:label="Type" name="btype" reporter:datatype="link"/>
8834                 </fields>
8835                 <links>
8836                         <link field="voider" reltype="has_a" key="id" map="" class="au"/>
8837                         <link field="btype" reltype="has_a" key="id" map="" class="cbt"/>
8838                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
8839                 </links>
8840         </class>
8841         <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">
8842                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_grp_map_id_seq">
8843                         <field name="grp" />
8844                         <field name="id" reporter:datatype="id" />
8845                         <field name="usr" />
8846                 </fields>
8847                 <links>
8848                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
8849                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
8850                 </links>
8851         </class>
8852         <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">
8853                 <fields oils_persist:primary="id" oils_persist:sequence="config.i18n_core_id_seq">
8854                         <field name="id" reporter:datatype="id" />
8855                         <field name="fq_field" reporter:datatype="text"/>
8856                         <field name="identity_value" reporter:datatype="text"/>
8857                         <field name="translation" reporter:datatype="text"/>
8858                         <field name="string" reporter:datatype="text"/>
8859                 </fields>
8860                 <links>
8861                         <link field="translation" reltype="has_a" key="code" map="" class="i18n_l"/>
8862                 </links>
8863         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8864             <actions>
8865                 <create permission="CREATE_TRANSLATION" global_required="true"/>
8866                 <retrieve permission="CREATE_TRANSLATION UPDATE_TRANSLATION DELETE_TRANSLATION" global_required="true"/>
8867                 <update permission="UPDATE_TRANSLATION" global_required="true"/>
8868                 <delete permission="DELETE_TRANSLATION" global_required="true"/>
8869             </actions>
8870         </permacrud>
8871         </class>
8872         <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">
8873                 <fields oils_persist:primary="id" oils_persist:sequence="config.idl_field_doc_id_seq">
8874                         <field name="id" reporter:datatype="id" />
8875                         <field name="fm_class" reporter:datatype="text"/>
8876                         <field name="field" reporter:datatype="text"/>
8877                         <field name="owner" reporter:datatype="org_unit"/>
8878                         <field name="string" reporter:datatype="text" oils_persist:i18n="true"/>
8879                 </fields>
8880                 <links>
8881                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
8882                 </links>
8883         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8884             <actions>
8885                 <create   permission="ADMIN_FIELD_DOC" context_field="owner"/>
8886                 <retrieve/>
8887                 <update   permission="ADMIN_FIELD_DOC" context_field="owner"/>
8888                 <delete   permission="ADMIN_FIELD_DOC" context_field="owner"/>
8889             </actions>
8890         </permacrud>
8891         </class>
8892         <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">
8893                 <fields oils_persist:primary="code">
8894                         <field name="code" reporter:datatype="id" />
8895                         <field name="marc_code" reporter:datatype="text"/>
8896                         <field name="name" reporter:datatype="text" oils_persist:i18n="true"/>
8897                         <field name="description" reporter:datatype="text" oils_persist:i18n="true"/>
8898                         <field name="rtl" reporter:datatype="bool"/>
8899                 </fields>
8900                 <links/>
8901         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8902             <actions>
8903                 <create permission="CREATE_LOCALE" global_required="true"/>
8904                 <retrieve/>
8905                 <update permission="UPDATE_LOCALE" global_required="true"/>
8906                 <delete permission="DELETE_LOCALE" global_required="true"/>
8907             </actions>
8908         </permacrud>
8909         </class>
8910         <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">
8911                 <fields oils_persist:primary="id" oils_persist:sequence="config.billing_type_id_seq">
8912                         <field name="id" reporter:datatype="id" reporter:label="ID" reporter:selector="name" oils_obj:required="true"/>
8913                         <field name="name" reporter:datatype="text" reporter:label="Name" oils_persist:i18n="true" oils_obj:required="true"/>
8914                         <field name="owner" reporter:datatype="org_unit" reporter:label="Org Unit" oils_obj:required="true"/>
8915                         <field name="default_price" reporter:datatype="money" reporter:label="Default Price"/>
8916                 </fields>
8917                 <links>
8918                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
8919                 </links>
8920         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8921             <actions>
8922                 <create permission="CREATE_BILLING_TYPE" context_field="owner"/>
8923                 <retrieve permission="VIEW_BILLING_TYPE CREATE_BILLING_TYPE UPDATE_BILLING_TYPE DELETE_BILLING_TYPE" context_field="owner"/>
8924                 <update permission="UPDATE_BILLING_TYPE" context_field="owner"/>
8925                 <delete permission="DELETE_BILLING_TYPE" context_field="owner"/>
8926             </actions>
8927         </permacrud>
8928         </class>
8929
8930         <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">
8931                 <fields oils_persist:primary="id">
8932                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
8933                         <field reporter:label="Type Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
8934                 </fields>
8935                 <links/>
8936         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8937             <actions>
8938                 <create permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
8939                 <retrieve/>
8940                 <update permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
8941                 <delete permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
8942             </actions>
8943         </permacrud>
8944         </class>
8945
8946         <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">
8947                 <fields oils_persist:primary="id" oils_persist:sequence="acq.user_request_id_seq">
8948                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
8949                         <field reporter:label="User" name="usr" reporter:datatype="link" />
8950                         <field reporter:label="Request Type" name="request_type" oils_obj:required="true" reporter:datatype="link" />
8951                         <field reporter:label="Place Hold" name="hold" reporter:datatype="bool" />
8952                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link" />
8953                         <field reporter:label="Holdable Formats" name="holdable_formats" reporter:datatype="text" />
8954                         <field reporter:label="Phone Notify" name="phone_notify" reporter:datatype="text" />
8955                         <field reporter:label="Email Notify" name="email_notify" reporter:datatype="bool" />
8956                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
8957                         <field reporter:label="Bib Record" name="eg_bib" reporter:datatype="link" />
8958                         <field reporter:label="Request Date/Time" name="request_date" reporter:datatype="timestamp" />
8959                         <field reporter:label="Need Before Date/Time" name="need_before" reporter:datatype="timestamp" />
8960                         <field reporter:label="Max Acceptable Fee" name="max_fee" reporter:datatype="text" />
8961                         <field reporter:label="ISxN" name="isxn" reporter:datatype="text" />
8962                         <field reporter:label="UPC" name="upc" reporter:datatype="text" />
8963                         <field reporter:label="Title" name="title" reporter:datatype="text" />
8964                         <field reporter:label="Volume" name="volume" reporter:datatype="text" />
8965                         <field reporter:label="Author" name="author" reporter:datatype="text" />
8966                         <field reporter:label="Article Title" name="article_title" reporter:datatype="text" />
8967                         <field reporter:label="Article Pages" name="article_pages" reporter:datatype="text" />
8968                         <field reporter:label="Publisher" name="publisher" reporter:datatype="text" />
8969                         <field reporter:label="Publication Location" name="location" reporter:datatype="text" />
8970                         <field reporter:label="Publication Date" name="pubdate" reporter:datatype="text" />
8971                         <field reporter:label="Mentioned In" name="mentioned" reporter:datatype="text" />
8972                         <field reporter:label="Other Info" name="other_info" reporter:datatype="text" />
8973                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
8974                         <field reporter:label="Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp" />
8975                 </fields>
8976                 <links>
8977                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
8978                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
8979                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
8980                         <link field="eg_bib" reltype="has_a" key="id" map="" class="bre"/>
8981                         <link field="request_type" reltype="has_a" key="id" map="" class="aurt"/>
8982                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
8983                 </links>
8984         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8985             <actions>
8986                 <create permission="user_request.create">
8987                     <context link="usr" field="home_ou"/>
8988                                 </create>
8989                 <retrieve permission="user_request.view">
8990                     <context link="usr" field="home_ou"/>
8991                                 </retrieve>
8992                 <update permission="user_request.update">
8993                     <context link="usr" field="home_ou"/>
8994                                 </update>
8995                 <delete permission="user_request.delete">
8996                     <context link="usr" field="home_ou"/>
8997                                 </delete>
8998             </actions>
8999         </permacrud>
9000         </class>
9001
9002         <class id="aurs" controller="open-ils.cstore open-ils.reporter-store open-ils.pcrud" oils_obj:fieldmapper="acq::user_request_status" reporter:label="User Purchase Request with Status" oils_persist="readonly">
9003         <oils_persist:source_definition><![CDATA[
9004             SELECT r.*, CASE
9005                         WHEN r.cancel_reason IS NOT NULL THEN 7 -- Canceled
9006                         WHEN h.fulfillment_time IS NOT NULL THEN 6 -- Fulfilled
9007                         WHEN l.state = 'received' THEN 5 -- Received
9008                         WHEN p.state = 'on-order' AND h.id IS NOT NULL THEN 4 -- Ordered, Hold Placed
9009                         WHEN p.state = 'on-order' AND h.id IS NULL THEN 3 -- Ordered, Hold Not Placed
9010                         WHEN l.id IS NOT NULL THEN 2 -- Pending
9011                         WHEN l.id IS NULL THEN 1 -- New
9012                         ELSE 0 -- Error
9013                     END AS request_status
9014                     ,u.home_ou
9015             FROM      acq.user_request r
9016             JOIN actor.usr u ON (r.usr = u.id)
9017             LEFT JOIN acq.lineitem l ON (r.lineitem = l.id)
9018             LEFT JOIN acq.purchase_order p ON (l.purchase_order = p.id)
9019             LEFT JOIN action.hold_request h ON (h.acq_request = r.id)
9020         ]]></oils_persist:source_definition>
9021                 <fields oils_persist:primary="id">
9022                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
9023                         <field reporter:label="User" name="usr" reporter:datatype="link" />
9024                         <field reporter:label="Request Type" name="request_type" oils_obj:required="true" reporter:datatype="link" />
9025                         <field reporter:label="Place Hold" name="hold" reporter:datatype="bool" />
9026                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link" />
9027                         <field reporter:label="Holdable Formats" name="holdable_formats" reporter:datatype="text" />
9028                         <field reporter:label="Phone Notify" name="phone_notify" reporter:datatype="text" />
9029                         <field reporter:label="Email Notify" name="email_notify" reporter:datatype="bool" />
9030                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
9031                         <field reporter:label="Bib Record" name="eg_bib" reporter:datatype="link" />
9032                         <field reporter:label="Request Date/Time" name="request_date" reporter:datatype="timestamp" />
9033                         <field reporter:label="Need Before Date/Time" name="need_before" reporter:datatype="timestamp" />
9034                         <field reporter:label="Max Acceptable Fee" name="max_fee" reporter:datatype="text" />
9035                         <field reporter:label="ISxN" name="isxn" reporter:datatype="text" />
9036                         <field reporter:label="UPC" name="upc" reporter:datatype="text" />
9037                         <field reporter:label="Title" name="title" reporter:datatype="text" />
9038                         <field reporter:label="Volume" name="volume" reporter:datatype="text" />
9039                         <field reporter:label="Author" name="author" reporter:datatype="text" />
9040                         <field reporter:label="Article Title" name="article_title" reporter:datatype="text" />
9041                         <field reporter:label="Article Pages" name="article_pages" reporter:datatype="text" />
9042                         <field reporter:label="Publisher" name="publisher" reporter:datatype="text" />
9043                         <field reporter:label="Publication Location" name="location" reporter:datatype="text" />
9044                         <field reporter:label="Publication Date" name="pubdate" reporter:datatype="text" />
9045                         <field reporter:label="Mentioned In" name="mentioned" reporter:datatype="text" />
9046                         <field reporter:label="Other Info" name="other_info" reporter:datatype="text" />
9047                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
9048                         <field reporter:label="Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp" />
9049                         <field reporter:label="Request Status" name="request_status" reporter:datatype="link" />
9050                         <field reporter:label="Home Library" name="home_ou" reporter:datatype="link"/>
9051                 </fields>
9052                 <links>
9053                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
9054                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
9055                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
9056                         <link field="eg_bib" reltype="has_a" key="id" map="" class="bre"/>
9057                         <link field="request_type" reltype="has_a" key="id" map="" class="aurt"/>
9058                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
9059                         <link field="request_status" reltype="has_a" key="id" map="" class="aurst"/>
9060                         <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
9061                 </links>
9062         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9063             <actions>
9064                 <retrieve permission="user_request.view">
9065                     <context link="usr" field="home_ou"/>
9066                                 </retrieve>
9067             </actions>
9068         </permacrud>
9069         </class>
9070
9071         <class id="aurst" controller="open-ils.cstore open-ils.reporter-store open-ils.pcrud" oils_obj:fieldmapper="acq::user_request_status_type" oils_persist:tablename="acq.user_request_status_type" reporter:label="Acquisition Patron Request Status Type">
9072                 <fields oils_persist:primary="id">
9073                         <field reporter:label="Status ID" name="id" reporter:datatype="id" reporter:selector='label'/>
9074                         <field reporter:label="Status" name="label" reporter:datatype="text" oils_persist:i18n="true" />
9075                 </fields>
9076                 <links/>
9077         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9078             <actions>
9079                 <retrieve/>
9080             </actions>
9081         </permacrud>
9082         </class>
9083
9084         <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">
9085                 <fields oils_persist:primary="code">
9086                         <field reporter:label="Currency Code" name="code" reporter:datatype="text" reporter:selector='label'/>
9087                         <field reporter:label="Currency Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
9088                 </fields>
9089                 <links/>
9090         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9091             <actions>
9092                 <create permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
9093                 <retrieve/>
9094                 <update permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
9095                 <delete permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
9096             </actions>
9097         </permacrud>
9098         </class>
9099
9100         <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">
9101                 <fields oils_persist:primary="id" oils_persist:sequence="acq.exchange_rate_id_seq">
9102                         <field reporter:label="Exchange Rate ID" name="id" reporter:datatype="id" />
9103                         <field reporter:label="From Currency" name="from_currency" reporter:datatype="link" />
9104                         <field reporter:label="To Currency" name="to_currency" reporter:datatype="link" />
9105                         <field reporter:label="Ratio" name="ratio" />
9106                 </fields>
9107                 <links>
9108                         <link field="from_currency" reltype="has_a" key="code" map="" class="acqct"/>
9109                         <link field="to_currency" reltype="has_a" key="code" map="" class="acqct"/>
9110                 </links>
9111                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9112                         <actions>
9113                                 <create permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
9114                                 <retrieve/>
9115                                 <update permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
9116                                 <delete permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
9117                         </actions>
9118                 </permacrud>
9119         </class>
9120
9121         <class id="acqpro" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::provider" oils_persist:tablename="acq.provider" reporter:label="Provider">
9122                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_id_seq">
9123                         <field reporter:label="Provider ID" name="id" reporter:datatype="id" reporter:selector='code'/>
9124                         <field reporter:label="Provider Name" name="name" reporter:datatype="text" oils_obj:required="true"/>
9125                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" oils_obj:required="true"/>
9126                         <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" oils_obj:required="true"/>
9127                         <field reporter:label="Code" name="code" reporter:datatype="text" oils_obj:required="true"/>
9128                         <field reporter:label="Holdings Tag" name="holding_tag" reporter:datatype="text" />
9129                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link" />
9130                         <field reporter:label="SAN" name="san" reporter:datatype="text" />
9131                         <field reporter:label="EDI Default" name="edi_default" reporter:datatype="link" />
9132                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
9133                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
9134                         <field reporter:label="URL" name="url" reporter:datatype="text" />
9135                         <field reporter:label="Email" name="email" reporter:datatype="text" />
9136                         <field reporter:label="Phone" name="phone" reporter:datatype="text" />
9137                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text" />
9138                         <field reporter:label="Default Claim Policy" name="default_claim_policy" reporter:datatype="link" />
9139                         <field reporter:label="Default # Copies" name="default_copy_count" reporter:datatype="int" />
9140                         <field reporter:label="Primary Contact" name="primary_contact" reporter:datatype="link" />
9141                         <field reporter:label="Contacts" name="contacts" oils_persist:virtual="true" reporter:datatype="link" />
9142                         <field reporter:label="Notes" name="provider_notes" oils_persist:virtual="true" reporter:datatype="link" />
9143                         <field reporter:label="Holdings Subfields" name="holdings_subfields" oils_persist:virtual="true" reporter:datatype="link" />
9144                         <field reporter:label="Attribute Definitions" name="attributes" oils_persist:virtual="true" reporter:datatype="link" />
9145                         <field reporter:label="EDI Accounts" name="edi_accounts" oils_persist:virtual="true" reporter:datatype="link" />
9146                 </fields>
9147                 <links>
9148                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
9149                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
9150                         <link field="addresses" reltype="has_many" map="" key="provider" class="acqpa"/>
9151                         <link field="contacts" reltype="has_many" map="" key="provider" class="acqpc"/>
9152                         <link field="edi_default" reltype="has_a" map="" key="id" class="acqedi"/>
9153                         <link field="primary_contact" reltype="has_a" map="" key="id" class="acqpc"/>
9154                         <link field="default_claim_policy" reltype="has_a" map="" key="id" class="acqclp"/>
9155                         <link field="provider_notes" reltype="has_many" map="" key="provider" class="acqpron"/>
9156                         <link field="holdings_subfields" reltype="has_many" map="" key="provider" class="acqphsm"/>
9157                         <link field="attributes" reltype="has_many" map="" key="provider" class="acqlipad"/>
9158                         <link field="edi_accounts" reltype="has_many" map="" key="provider" class="acqedi"/>
9159                 </links>
9160         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9161             <actions>
9162                 <create   permission="ADMIN_PROVIDER" context_field="owner"/>
9163                 <retrieve permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER" context_field="owner"/>
9164                 <update   permission="ADMIN_PROVIDER" context_field="owner"/>
9165                 <delete   permission="ADMIN_PROVIDER" context_field="owner"/>
9166             </actions>
9167         </permacrud>
9168         </class>
9169
9170         <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">
9171                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_note_id_seq">
9172                         <field reporter:label="PO Note ID" name="id" reporter:datatype="id" />
9173                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
9174                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
9175                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
9176                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
9177                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
9178                         <field reporter:label="Note Value" name="value" reporter:datatype="text" />
9179                 </fields>
9180                 <links>
9181                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9182                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
9183                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
9184                 </links>
9185         </class>
9186
9187         <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">
9188                 <fields oils_persist:primary="code">
9189                         <field reporter:label="Code" name="code" reporter:datatype="id" reporter:selector="name"/>
9190                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
9191                 </fields>
9192                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9193             <actions>
9194                 <create permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
9195                 <retrieve/>
9196                 <update permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
9197                 <delete permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
9198             </actions>
9199                 </permacrud>
9200         </class>
9201
9202         <class id="acqinv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::invoice" oils_persist:tablename="acq.invoice" reporter:label="Invoice">
9203                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_id_seq">
9204                         <field reporter:label="Internal Invoice ID" name="id" reporter:datatype="id"/>
9205                         <field reporter:label="Receiver" name="receiver" reporter:datatype="org_unit" />
9206                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
9207                         <field reporter:label="Shipper" name="shipper" reporter:datatype="link"/>
9208                         <field reporter:label="Invoice Date" name="recv_date" reporter:datatype="timestamp" />
9209                         <field reporter:label="Receive Method" name="recv_method" reporter:datatype="link" />
9210                         <field reporter:label="Invoice Type" name="inv_type" reporter:datatype="text" />
9211                         <field reporter:label="Vendor Invoice ID" name="inv_ident" reporter:datatype="text" />
9212                         <field reporter:label="Payment Auth" name="payment_auth" reporter:datatype="text" />
9213                         <field reporter:label="Payment Method" name="payment_method" reporter:datatype="link" />
9214                         <field reporter:label="Note" name="note" reporter:datatype="text" />
9215                         <field reporter:label="Close Date" name="close_date" reporter:datatype="timestamp" />
9216                         <field reporter:label="Closed By" name="closed_by" reporter:datatype="link" />
9217                         <field reporter:label="Invoice Entries" name="entries" reporter:datatype="link" oils_persist:virtual="true"/>
9218                         <field reporter:label="Invoice Items" name="items" reporter:datatype="link" oils_persist:virtual="true"/>
9219                 </fields>
9220                 <links>
9221                         <link field="receiver" reltype="has_a" key="id" map="" class="aou"/>
9222                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
9223                         <link field="shipper" reltype="has_a" key="id" map="" class="acqpro"/>
9224                         <link field="recv_method" reltype="has_a" key="code" map="" class="acqim"/>
9225                         <link field="payment_method" reltype="has_a" key="code" map="" class="acqipm"/>
9226                         <link field="entries" reltype="has_many" key="invoice" map="" class="acqie"/>
9227                         <link field="items" reltype="has_many" key="invoice" map="" class="acqii"/>
9228                         <link field="closed_by" reltype="has_a" key="id" map="" class="au"/>
9229                 </links>
9230         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9231             <actions>
9232                 <create   permission="CREATE_INVOICE" context_field="receiver"/>
9233                 <retrieve permission="CREATE_INVOICE VIEW_INVOICE" context_field="receiver"/>
9234                 <update   permission="CREATE_INVOICE" context_field="receiver"/>
9235                 <delete   permission="CREATE_INVOICE" context_field="receiver"/>
9236             </actions>
9237         </permacrud>
9238         </class>
9239
9240         <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">
9241                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_entry_id_seq">
9242                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
9243                         <field reporter:label="Invoice" name="invoice" reporter:datatype="link" />
9244                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
9245                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link"/>
9246                         <field reporter:label="Invoice Item Count" name="inv_item_count" reporter:datatype="int" />
9247                         <field reporter:label="Physical Item Count" name="phys_item_count" reporter:datatype="int" />
9248                         <field reporter:label="Note" name="note" reporter:datatype="text" />
9249                         <field reporter:label="Billed Cost per Item" name="billed_per_item" reporter:datatype="bool" />
9250                         <field reporter:label="Cost Billed" name="cost_billed" reporter:datatype="money" />
9251                         <field reporter:label="Actual Cost" name="actual_cost" reporter:datatype="money" />
9252                         <field reporter:label="Amount Paid" name="amount_paid" reporter:datatype="money" />
9253                 </fields>
9254                 <links>
9255                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv"/>
9256                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
9257                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
9258                 </links>
9259         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9260             <actions>
9261                 <create   permission="ADMIN_INVOICE">
9262                                         <context link="invoice" field="receiver"/>
9263                                 </create>
9264                 <retrieve permission="ADMIN_INVOICE">
9265                                         <context link="invoice" field="receiver"/>
9266                                 </retrieve>
9267                 <update   permission="ADMIN_INVOICE">
9268                                         <context link="invoice" field="receiver"/>
9269                                 </update>
9270                                 <delete   permission="ADMIN_INVOICE">
9271                                         <context link="invoice" field="receiver"/>
9272                                 </delete>
9273             </actions>
9274         </permacrud>
9275         </class>
9276
9277         <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">
9278                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_item_id_seq">
9279                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
9280                         <field reporter:label="Invoice" name="invoice" reporter:datatype="link" />
9281                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
9282                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
9283                         <field reporter:label="Invoice Item Type" name="inv_item_type" reporter:datatype="link" />
9284                         <field reporter:label="Title or Item Name" name="title" reporter:datatype="text" />
9285                         <field reporter:label="Author" name="author" reporter:datatype="text" />
9286                         <field reporter:label="Note" name="note" reporter:datatype="text" />
9287                         <field reporter:label="Cost Billed" name="cost_billed" reporter:datatype="money" />
9288                         <field reporter:label="Actual Cost" name="actual_cost" reporter:datatype="money" />
9289                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
9290                         <field reporter:label="Amount Paid" name="amount_paid" reporter:datatype="money" />
9291                         <field reporter:label="Purchase Order Item" name="po_item" reporter:datatype="link" />
9292                         <field reporter:label="Target" name="target" reporter:datatype="int" />
9293                 </fields>
9294                 <links>
9295                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv"/>
9296                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
9297                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
9298                         <link field="inv_item_type" reltype="has_a" key="code" map="" class="aiit"/>
9299                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9300                         <link field="po_item" reltype="has_a" key="id" map="" class="acqpoi"/>
9301                 </links>
9302         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9303             <actions>
9304                 <create   permission="ADMIN_INVOICE">
9305                                         <context link="invoice" field="receiver"/>
9306                                 </create>
9307                 <retrieve permission="ADMIN_INVOICE">
9308                                         <context link="invoice" field="receiver"/>
9309                                 </retrieve>
9310                 <update   permission="ADMIN_INVOICE">
9311                                         <context link="invoice" field="receiver"/>
9312                                 </update>
9313                                 <delete   permission="ADMIN_INVOICE">
9314                                         <context link="invoice" field="receiver"/>
9315                                 </delete>
9316             </actions>
9317         </permacrud>
9318         </class>
9319
9320         <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">
9321                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_address_id_seq">
9322                         <field reporter:label="Address Type" name="address_type"  reporter:datatype="text"/>
9323                         <field reporter:label="City" name="city"  reporter:datatype="text" oils_obj:required="true"/>
9324                         <field reporter:label="Country" name="country"  reporter:datatype="text" oils_obj:required="true"/>
9325                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
9326                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
9327                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
9328                         <field reporter:label="Post Code" name="post_code"  reporter:datatype="text" oils_obj:required="true"/>
9329                         <field reporter:label="State" name="state"  reporter:datatype="text" oils_obj:required="true"/>
9330                         <field reporter:label="Street 1" name="street1"  reporter:datatype="text" oils_obj:required="true"/>
9331                         <field reporter:label="Street 2" name="street2"  reporter:datatype="text"/>
9332                         <field reporter:label="Is Valid?" name="valid" reporter:datatype="bool"/>
9333                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text"/>
9334                 </fields>
9335                 <links>
9336                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
9337                 </links>
9338         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9339             <actions>
9340                 <create permission="ADMIN_PROVIDER">
9341                     <context link="provider" field="owner"/>
9342                 </create>
9343                 <retrieve permission="ADMIN_PROVIDER">
9344                     <context link="provider" field="owner"/>
9345                 </retrieve>
9346                 <update permission="ADMIN_PROVIDER">
9347                     <context link="provider" field="owner"/>
9348                 </update>
9349                 <delete permission="ADMIN_PROVIDER">
9350                     <context link="provider" field="owner"/>
9351                 </delete>
9352             </actions>
9353         </permacrud>
9354         </class>
9355
9356         <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">
9357                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_id_seq">
9358                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
9359                         <field reporter:label="Provider" name="provider" reporter:datatype="link" oils_obj:required="true"/>
9360                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_obj:required="true"/>
9361                         <field reporter:label="Role" name="role" reporter:datatype="text"/>
9362                         <field reporter:label="Email" name="email" reporter:datatype="text"/>
9363                         <field reporter:label="Phone" name="phone" reporter:datatype="text"/>
9364                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>
9365         </fields>
9366                 <links>
9367                         <link field="addresses" reltype="has_many" key="contact" map="" class="acqpca"/>
9368                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
9369                 </links>
9370         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9371             <actions>
9372                 <create permission="ADMIN_PROVIDER">
9373                     <context link="provider" field="owner"/>
9374                 </create>
9375                 <retrieve permission="ADMIN_PROVIDER">
9376                     <context link="provider" field="owner"/>
9377                 </retrieve>
9378                 <update permission="ADMIN_PROVIDER">
9379                     <context link="provider" field="owner"/>
9380                 </update>
9381                 <delete permission="ADMIN_PROVIDER">
9382                     <context link="provider" field="owner"/>
9383                 </delete>
9384             </actions>
9385         </permacrud>
9386     </class>
9387         <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">
9388                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_address_id_seq">
9389                         <field reporter:label="Type" name="address_type"  reporter:datatype="text"/>
9390                         <field reporter:label="City" name="city"  reporter:datatype="text" oils_obj:required="true"/>
9391                         <field reporter:label="Country" name="country"  reporter:datatype="text" oils_obj:required="true"/>
9392                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
9393                         <field reporter:label="Address ID" name="id" reporter:datatype="id" />
9394                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text" oils_obj:required="true"/>
9395                         <field reporter:label="State" name="state"  reporter:datatype="text" oils_obj:required="true"/>
9396                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text" oils_obj:required="true"/>
9397                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
9398                         <field reporter:label="Contact" name="contact" reporter:datatype="link" oils_obj:required="true"/>
9399                         <field reporter:label="Valid Address?" name="valid" reporter:datatype="bool"/>
9400                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text"/>
9401                 </fields>
9402                 <links>
9403                         <link field="contact" reltype="has_a" key="id" map="" class="acqpc"/>
9404                 </links>
9405         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9406             <actions>
9407                 <create permission="ADMIN_PROVIDER">
9408                     <context link="contact" jump='provider' field="owner"/>
9409                 </create>
9410                 <retrieve permission="ADMIN_PROVIDER">
9411                     <context link="contact" jump='provider' field="owner"/>
9412                 </retrieve>
9413                 <update permission="ADMIN_PROVIDER">
9414                     <context link="contact" jump='provider' field="owner"/>
9415                 </update>
9416                 <delete permission="ADMIN_PROVIDER">
9417                     <context link="contact" jump='provider' field="owner"/>
9418                 </delete>
9419             </actions>
9420         </permacrud>
9421         </class>
9422
9423         <class id="acqftr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::fund_transfer" oils_persist:tablename="acq.fund_transfer" reporter:label="Fund Transfer">
9424                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_transfer_id_seq">
9425                         <field reporter:label="Fund Transfer ID" name="id" reporter:datatype="id"/>
9426                         <field reporter:label="Source Fund" name="src_fund" reporter:datatype="link"/>
9427                         <field reporter:label="Source Amount" name="src_amount" reporter:datatype="money"/>
9428                         <field reporter:label="Destination Fund" name="dest_fund" reporter:datatype="link"/>
9429                         <field reporter:label="Destination Amount" name="dest_amount" reporter:datatype="money"/>
9430                         <field reporter:label="Transfer Time" name="transfer_time" reporter:datatype="timestamp"/>
9431                         <field reporter:label="Transfer User" name="transfer_user" reporter:datatype="link"/>
9432                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
9433                         <field reporter:label="Funding Source Credit ID" name="funding_source_credit" reporter:datatype="link"/>
9434                 </fields>
9435                 <links>
9436                         <link field="src_fund" reltype="has_a" key="id" map="" class="acqf"/>
9437                         <link field="dest_fund" reltype="has_a" key="id" map="" class="acqf"/>
9438                         <link field="transfer_user" reltype="has_a" key="id" map="" class="au"/>
9439                         <link field="funding_source_credit" reltype="has_a" key="id" map="" class="acqfscred"/>
9440                 </links>
9441         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9442             <actions>
9443                 <create permission="ADMIN_ACQ_FUND">
9444                     <context link="src_fund" field="org"/>
9445                 </create>
9446                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
9447                     <context link="src_fund" field="org"/>
9448                     <context link="dest_fund" field="org"/>
9449                 </retrieve>
9450                 <update permission="ADMIN_ACQ_FUND">
9451                     <context link="src_fund" field="org"/>
9452                 </update>
9453                 <delete permission="ADMIN_ACQ_FUND">
9454                     <context link="src_fund" field="org"/>
9455                 </delete>
9456             </actions>
9457         </permacrud>
9458         </class>
9459
9460         <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">
9461                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fiscal_calendar_id_seq">
9462                         <field reporter:label="Fiscal Calendar ID" name="id" reporter:datatype="id" reporter:selector='name'/>
9463                         <field reporter:label="Fiscal Calendar Name" name="name" reporter:datatype="text"/>
9464                         <field reporter:label="Years" name="years" oils_persist:virtual="true" reporter:datatype="link"/>
9465                 </fields>
9466                 <links>
9467             <link field="years" reltype="has_many" map="" key="calendar" class="acqfy"/>
9468                 </links>
9469                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9470                         <actions>
9471                                 <create permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
9472                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
9473                                 <update permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
9474                                 <delete permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
9475                         </actions>
9476                 </permacrud>
9477         </class>
9478
9479         <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">
9480                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fiscal_year_id_seq">
9481                         <field reporter:label="Fiscal Year ID" name="id" reporter:datatype="id" reporter:selector='year'/>
9482                         <field reporter:label="Calendar" name="calendar" reporter:datatype="link"/>
9483                         <field reporter:label="Fiscal Year" name="year" reporter:datatype="int"/>
9484                         <field reporter:label="Year Begin" name="year_begin" reporter:datatype="timestamp"/>
9485                         <field reporter:label="Year End" name="year_end" reporter:datatype="timestamp"/>
9486                 </fields>
9487                 <links>
9488                         <link field="calendar" reltype="has_a" key="id" map="" class="acqfc"/>
9489                 </links>
9490                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9491                         <actions>
9492                                 <create permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
9493                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
9494                                 <update permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
9495                                 <delete permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
9496                         </actions>
9497                 </permacrud>
9498         </class>
9499
9500         <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">
9501                 <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_id_seq">
9502                         <field reporter:label="Funding Source ID" name="id" reporter:datatype="id" reporter:selector='code'/>
9503                         <field reporter:label="Funding Source Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
9504                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" oils_obj:required="true" />
9505                         <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" oils_obj:required="true" />
9506                         <field reporter:label="Code" name="code" reporter:datatype="text" oils_obj:required="true" />
9507                         <field reporter:label="Summary" name="summary" oils_persist:virtual="true"/>
9508                         <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>
9509                         <field reporter:label="Credits" name="credits" oils_persist:virtual="true" reporter:datatype="link"/>
9510                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
9511                 </fields>
9512                 <links>
9513                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
9514                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
9515             <link field="allocations" reltype="has_many" map="" key="funding_source" class="acqfa"/>
9516             <link field="credits" reltype="has_many" key="funding_source" map="" class="acqfscred"/>
9517                         <link field="fund_alloc_pcts" reltype="has_many" key="funding_source" map="" class="acqfap"/>
9518                 </links>
9519         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9520             <actions>
9521                 <create   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
9522                 <retrieve permission="ADMIN_FUNDING_SOURCE MANAGE_FUNDING_SOURCE VIEW_FUNDING_SOURCE" context_field="owner"/>
9523                 <update   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
9524                 <delete   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
9525             </actions>
9526         </permacrud>
9527         </class>
9528
9529         <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">
9530                 <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_credit_id_seq">
9531                         <field reporter:label="Credit ID" name="id" reporter:datatype="id" />
9532                         <field reporter:label="Funding Source ID" name="funding_source" reporter:datatype="link" oils_obj:required="true" />
9533                         <field reporter:label="Amount" name="amount" reporter:datatype="money" oils_obj:required="true" />
9534                         <field reporter:label="Note" name="note" reporter:datatype="text" />
9535                         <field reporter:label="Deadline Date" name="deadline_date" reporter:datatype="timestamp" />
9536                         <field reporter:label="Effective Date" name="effective_date" reporter:datatype="timestamp" />
9537                 </fields>
9538                 <links>
9539                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
9540                 </links>
9541                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9542                         <actions>
9543                                 <create permission="ADMIN_FUNDING_SOURCE">
9544                     <context link="funding_source" field="owner"/>
9545                 </create>
9546                                 <retrieve permission="ADMIN_FUNDING_SOURCE">
9547                     <context link="funding_source" field="owner"/>
9548                 </retrieve>
9549                                 <update permission="ADMIN_FUNDING_SOURCE">
9550                     <context link="funding_source" field="owner"/>
9551                 </update>
9552                                 <delete permission="ADMIN_FUNDING_SOURCE">
9553                     <context link="funding_source" field="owner"/>
9554                 </delete>
9555                         </actions>
9556                 </permacrud>
9557         </class>
9558
9559         <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">
9560                 <fields oils_persist:primary="id">
9561                         <field reporter:label="Ordered Fund Src ID" name="id" reporter:datatype="id"/>
9562                         <field reporter:label="Sort Priority" name="sort_priority" reporter:datatype="int"/>
9563                         <field reporter:label="Sort Date" name="sort_date" reporter:datatype="timestamp"/>
9564                         <field reporter:label="Funding Source ID" name="funding_source" reporter:datatype="link"/>
9565                         <field reporter:label="Amount" name="amount" reporter:datatype="money"/>
9566                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
9567                 </fields>
9568                 <links>
9569                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
9570                 </links>
9571         </class>
9572
9573         <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">
9574                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_debit_id_seq">
9575                         <field reporter:label="Debit ID" name="id" reporter:datatype="id" />
9576                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
9577                         <field reporter:label="Origin Amount" name="origin_amount" reporter:datatype="money" />
9578                         <field reporter:label="Origin Currency" name="origin_currency_type" reporter:datatype="link" />
9579                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
9580                         <field reporter:label="Encumbrance" name="encumbrance" reporter:datatype="bool" />
9581                         <field reporter:label="Debit Type" name="debit_type" reporter:datatype="text" />
9582                         <field reporter:label="Debit Time" name="create_time" reporter:datatype="timestamp" />
9583                         <field reporter:label="Invoice Entry" name="invoice_entry" reporter:datatype="link" />
9584                         <field reporter:label="Invoice Items" name="invoice_items" reporter:datatype="link" oils_persist:virtual="true"/>
9585                         <field reporter:label="PO Items" name="po_items" oils_persist:virtual="true" reporter:datatype="link" />
9586                         <field reporter:label="Line Item Details" name="lineitem_details" oils_persist:virtual="true" reporter:datatype="link" />
9587                 </fields>
9588                 <links>
9589                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9590                         <link field="origin_currency_type" reltype="has_a" key="code" map="" class="acqct"/>
9591                         <link field="invoice_entry" reltype="has_a" key="id" map="" class="acqie"/>
9592                         <link field="invoice_items" reltype="has_many" key="fund_debit" map="" class="acqii"/>
9593                         <link field="po_items" reltype="has_many" key="fund_debit" map="" class="acqpoi"/>
9594                         <link field="lineitem_details" reltype="has_many" key="fund_debit" map="" class="acqlid"/>
9595                 </links>
9596                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9597                         <actions>
9598                                 <create permission="ADMIN_ACQ_FUND">
9599                     <context link="fund" field="org"/>
9600                 </create>
9601                                 <retrieve permission="ADMIN_ACQ_FUND">
9602                     <context link="fund" field="org"/>
9603                 </retrieve>
9604                                 <update permission="ADMIN_ACQ_FUND">
9605                     <context link="fund" field="org"/>
9606                 </update>
9607                                 <delete permission="ADMIN_ACQ_FUND">
9608                     <context link="fund" field="org"/>
9609                 </delete>
9610                         </actions>
9611                 </permacrud>
9612         </class>
9613
9614         <class id="acqf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::fund" oils_persist:tablename="acq.fund" reporter:label="Fund">
9615                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_id_seq">
9616                         <field reporter:label="Fund ID" name="id" reporter:datatype="id" reporter:selector='code'/>
9617                         <field reporter:label="Owner" name="org" reporter:datatype="org_unit" oils_obj:required="true" />
9618                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_obj:required="true" />
9619                         <field reporter:label="Year" name="year" reporter:datatype="int" oils_obj:required="true" />
9620                         <field reporter:label="Currency Type" name="currency_type" reporter:datatype="link" oils_obj:required="true" />
9621                         <field reporter:label="Code" name="code" reporter:datatype="text" oils_obj:required="true" />
9622                         <field reporter:label="Rollover" name="rollover" reporter:datatype="bool" />
9623                         <field reporter:label="Propagate" name="propagate" reporter:datatype="bool" />
9624                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
9625                         <field reporter:label="Balance Warning Percent" name="balance_warning_percent" reporter:datatype="int" />
9626                         <field reporter:label="Balance Stop Percent" name="balance_stop_percent" reporter:datatype="int" />
9627                         <field reporter:label="Summary" name="summary" oils_persist:virtual="true"/>
9628                         <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>
9629                         <field reporter:label="Debits" name="debits" oils_persist:virtual="true" reporter:datatype="link"/>
9630                         <field reporter:label="Tags" name="tags" oils_persist:virtual="true" reporter:datatype="link"/>
9631                         <field reporter:label="Allocation Total" name="allocation_total" oils_persist:virtual="true" reporter:datatype="link"/>
9632                         <field reporter:label="Debit Total" name="debit_total" oils_persist:virtual="true" reporter:datatype="link"/>
9633                         <field reporter:label="Encumbrance Total" name="encumbrance_total" oils_persist:virtual="true" reporter:datatype="link"/>
9634                         <field reporter:label="Spent Total" name="spent_total" oils_persist:virtual="true" reporter:datatype="link"/>
9635                         <field reporter:label="Combined Balance" name="combined_balance" oils_persist:virtual="true" reporter:datatype="link"/>
9636                         <field reporter:label="Spent Balance" name="spent_balance" oils_persist:virtual="true" reporter:datatype="link"/>
9637                 </fields>
9638                 <links>
9639                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
9640                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
9641             <link field="allocations" reltype="has_many" key="fund" map="" class="acqfa"/>
9642             <link field="debits" reltype="has_many" key="fund" map="" class="acqfdeb"/>
9643             <link field="tags" reltype="has_many" key="fund" map="" class="acqftm"/>
9644             <link field="allocation_total" reltype="might_have" key="fund" map="" class="acqfat"/>
9645             <link field="debit_total" reltype="might_have" key="fund" map="" class="acqfdt"/>
9646             <link field="encumbrance_total" reltype="might_have" key="fund" map="" class="acqfet"/>
9647             <link field="spent_total" reltype="might_have" key="fund" map="" class="acqfst"/>
9648             <link field="combined_balance" reltype="might_have" key="fund" map="" class="acqfcb"/>
9649             <link field="spent_balance" reltype="might_have" key="fund" map="" class="acqfsb"/>
9650                 </links>
9651         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1" ignore_object_perms="true">
9652             <actions>
9653                 <create permission="ADMIN_ACQ_FUND" context_field="org"/>
9654                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="org"/>
9655                 <update permission="ADMIN_ACQ_FUND" context_field="org"/>
9656                 <delete permission="ADMIN_ACQ_FUND" context_field="org"/>
9657             </actions>
9658         </permacrud>
9659         </class>
9660
9661         <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">
9662                 <fields oils_persist:primary="fund">
9663                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
9664                         <field reporter:label="Total Allocation Amount" name="amount" reporter:datatype="money" />
9665                 </fields>
9666                 <links>
9667                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9668                 </links>
9669         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9670             <actions>
9671                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
9672                                         <context link="fund" field="org" />
9673                 </retrieve>
9674             </actions>
9675         </permacrud>
9676         </class>
9677
9678         <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">
9679                 <fields oils_persist:primary="fund">
9680                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
9681                         <field reporter:label="Total Debit Amount" name="amount" reporter:datatype="money" />
9682                 </fields>
9683                 <links>
9684                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9685                 </links>
9686         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9687             <actions>
9688                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
9689                                         <context link="fund" field="org" />
9690                 </retrieve>
9691             </actions>
9692         </permacrud>
9693         </class>
9694
9695         <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">
9696                 <fields oils_persist:primary="fund">
9697                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
9698                         <field reporter:label="Total Encumbrance Amount" name="amount" reporter:datatype="money" />
9699                 </fields>
9700                 <links>
9701                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9702                 </links>
9703         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9704             <actions>
9705                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
9706                                         <context link="fund" field="org" />
9707                 </retrieve>
9708             </actions>
9709         </permacrud>
9710         </class>
9711
9712         <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">
9713                 <fields oils_persist:primary="fund">
9714                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
9715                         <field reporter:label="Total Spent Amount" name="amount" reporter:datatype="money" />
9716                 </fields>
9717                 <links>
9718                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9719                 </links>
9720         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9721             <actions>
9722                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
9723                                         <context link="fund" field="org" />
9724                 </retrieve>
9725             </actions>
9726         </permacrud>
9727         </class>
9728
9729         <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">
9730                 <fields oils_persist:primary="fund">
9731                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
9732                         <field reporter:label="Balance after Spent and Encumbered" name="amount" reporter:datatype="money" />
9733                 </fields>
9734                 <links>
9735                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9736                 </links>
9737         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9738             <actions>
9739                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
9740                                         <context link="fund" field="org" />
9741                 </retrieve>
9742             </actions>
9743         </permacrud>
9744         </class>
9745
9746    <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">
9747         <fields oils_persist:primary="fund">
9748             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
9749             <field reporter:label="Total Allocation Amount" name="amount" reporter:datatype="money" />
9750         </fields>
9751         <links>
9752             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9753         </links>
9754     </class>
9755
9756    <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">
9757         <fields oils_persist:primary="fund">
9758             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
9759             <field reporter:label="Total Encumbered Amount" name="amount" reporter:datatype="money" />
9760         </fields>
9761         <links>
9762             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9763         </links>
9764     </class>
9765
9766    <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">
9767         <fields oils_persist:primary="fund">
9768             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
9769             <field reporter:label="Total Spent Amount" name="amount" reporter:datatype="money" />
9770         </fields>
9771         <links>
9772             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9773         </links>
9774     </class>
9775
9776    <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">
9777         <fields oils_persist:primary="fund">
9778             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
9779             <field reporter:label="Total Spent Balance" name="amount" reporter:datatype="money" />
9780         </fields>
9781         <links>
9782             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9783         </links>
9784     </class>
9785
9786    <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">
9787         <fields oils_persist:primary="fund">
9788             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
9789             <field reporter:label="Total Combined Balance" name="amount" reporter:datatype="money" />
9790         </fields>
9791         <links>
9792             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9793         </links>
9794     </class>
9795
9796         <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">
9797                 <fields oils_persist:primary="funding_source">
9798                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
9799                         <field reporter:label="Total Credits to Funding Source" name="amount" reporter:datatype="money" />
9800                 </fields>
9801                 <links>
9802                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
9803                 </links>
9804         </class>
9805
9806         <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">
9807                 <fields oils_persist:primary="funding_source">
9808                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
9809                         <field reporter:label="Total Allocated from Funding Source" name="amount" reporter:datatype="money" />
9810                 </fields>
9811                 <links>
9812                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
9813                 </links>
9814         </class>
9815
9816         <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">
9817                 <fields oils_persist:primary="funding_source">
9818                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
9819                         <field reporter:label="Balance Remaining" name="amount" reporter:datatype="money" />
9820                 </fields>
9821                 <links>
9822                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
9823                 </links>
9824         </class>
9825
9826         <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">
9827                 <fields oils_persist:primary="fund">
9828                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
9829                         <field reporter:label="Balance after Spent" name="amount" reporter:datatype="money" />
9830                 </fields>
9831                 <links>
9832                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9833                 </links>
9834         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9835             <actions>
9836                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
9837                                         <context link="fund" field="org" />
9838                 </retrieve>
9839             </actions>
9840         </permacrud>
9841     </class>
9842     <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">
9843         <oils_persist:source_definition><![CDATA[
9844             SELECT
9845                 acqf.*,
9846                 COALESCE(acqfat.amount, 0.00) AS allocated_total,
9847                 COALESCE(acqfst.amount, 0.00) AS spent_total,
9848                 COALESCE(acqfet.amount, 0.00) AS encumbrance_total,
9849                 COALESCE(acqfcb.amount, 0.00) AS combined_balance
9850             FROM
9851                 acq.fund acqf
9852                 LEFT JOIN acq.fund_allocation_total acqfat ON (acqfat.fund = acqf.id)
9853                 LEFT JOIN acq.fund_spent_total acqfst ON (acqfst.fund = acqf.id)
9854                 LEFT JOIN acq.fund_encumbrance_total acqfet ON (acqfet.fund = acqf.id)
9855                 LEFT JOIN acq.fund_combined_balance acqfcb ON (acqfcb.fund = acqf.id)
9856         ]]></oils_persist:source_definition>
9857         <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_id_seq">
9858             <field reporter:label="Fund ID" name="id" reporter:datatype="id" reporter:selector='code'/>
9859             <field reporter:label="Owner" name="org" reporter:datatype="org_unit" />
9860             <field reporter:label="Name" name="name" reporter:datatype="text" />
9861             <field reporter:label="Year" name="year" reporter:datatype="int" />
9862             <field reporter:label="Currency Type" name="currency_type" reporter:datatype="link" />
9863             <field reporter:label="Code" name="code" reporter:datatype="text" />
9864             <field reporter:label="Rollover" name="rollover" reporter:datatype="bool" />
9865             <field reporter:label="Propagate" name="propagate" reporter:datatype="bool" />
9866             <field reporter:label="Active" name="active" reporter:datatype="bool" />
9867             <field reporter:label="Balance Warning Percent" name="balance_warning_percent" reporter:datatype="int" />
9868             <field reporter:label="Balance Stop Percent" name="balance_stop_percent" reporter:datatype="int" />
9869
9870             <!-- non fund-native fields -->
9871             <field reporter:label="Total Allocated" name="allocated_total" reporter:datatype="money"/>
9872             <field reporter:label="Total Spent" name="spent_total" reporter:datatype="money"/>
9873             <field reporter:label="Total Encumbered" name="encumbrance_total" reporter:datatype="money"/>
9874             <field reporter:label="Remaining Balance" name="combined_balance" reporter:datatype="money"/>
9875         </fields>
9876         <links>
9877             <link field="id" reltype="has_a" key="id" map="" class="acqf"/>
9878             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
9879             <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
9880         </links>
9881         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9882             <actions>
9883                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="org"/>
9884             </actions>
9885         </permacrud>
9886         </class>
9887         <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">
9888                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_allocation_id_seq">
9889                         <field reporter:label="Allocation ID" name="id" reporter:datatype="id" />
9890                         <field reporter:label="Fund" name="fund" reporter:datatype="link" oils_obj:required="true" />
9891                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" oils_obj:required="true" />
9892                         <field reporter:label="Amount" name="amount" reporter:datatype="money" oils_obj:required="true" />
9893                         <field reporter:label="Allocating User" name="allocator" reporter:datatype="link" oils_obj:required="true" />
9894                         <field reporter:label="Note" name="note" reporter:datatype="text" />
9895                         <field reporter:label="Allocation Time" name="create_time" reporter:datatype="timestamp" />
9896                 </fields>
9897                 <links>
9898                         <link field="allocator" reltype="has_a" key="id" map="" class="au"/>
9899                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9900                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
9901                 </links>
9902                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9903                         <actions>
9904                                 <create permission="ADMIN_ACQ_FUND">
9905                     <context link="fund" field="org"/>
9906                 </create>
9907                                 <retrieve permission="ADMIN_ACQ_FUND">
9908                     <context link="fund" field="org"/>
9909                 </retrieve>
9910                                 <update permission="ADMIN_ACQ_FUND">
9911                     <context link="fund" field="org"/>
9912                 </update>
9913                                 <delete permission="ADMIN_ACQ_FUND">
9914                     <context link="fund" field="org"/>
9915                 </delete>
9916                         </actions>
9917                 </permacrud>
9918         </class>
9919
9920     <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">
9921         <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_allocation_percent_id_seq">
9922             <field reporter:label="Allocation ID" name="id" reporter:datatype="id" />
9923             <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
9924             <field reporter:label="Owner" name="org" reporter:datatype="org_unit" />
9925             <field reporter:label="Fund Code" name="fund_code" reporter:datatype="text" />
9926             <field reporter:label="Percent" name="percent" reporter:datatype="float" />
9927             <field reporter:label="Allocating User" name="allocator" reporter:datatype="link" />
9928             <field reporter:label="Note" name="note" reporter:datatype="text" />
9929             <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
9930         </fields>
9931         <links>
9932             <link field="allocator" reltype="has_a" key="id" map="" class="au"/>
9933             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
9934             <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
9935         </links>
9936                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9937                         <actions>
9938                                 <create permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
9939                                 <retrieve permission="VIEW_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
9940                                 <update permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
9941                                 <delete permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
9942                         </actions>
9943                 </permacrud>
9944     </class>
9945
9946         <class id="acqpl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::picklist" oils_persist:tablename="acq.picklist" reporter:label="Selection List">
9947                 <fields oils_persist:primary="id" oils_persist:sequence="acq.picklist_id_seq">
9948                         <field reporter:label="Selection List ID" name="id" reporter:datatype="id" reporter:selector='name' />
9949                         <field reporter:label="Owner" name="owner" reporter:datatype="link" />
9950                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit" />
9951                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
9952                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
9953                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
9954                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link" />
9955                         <field reporter:label="Entry Count" name="entry_count" oils_persist:virtual="true"/>
9956                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
9957                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
9958                 </fields>
9959                 <links>
9960                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
9961                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9962                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
9963                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
9964                         <link field="entries" reltype="has_many" key="picklist" map="" class="jub"/>
9965                 </links>
9966                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9967                         <actions>
9968                                 <retrieve permission="CREATE_PICKLIST VIEW_PICKLIST" context_field="org_unit"/>
9969                         </actions>
9970                 </permacrud>
9971         </class>
9972
9973         <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">
9974                 <fields oils_persist:primary="id" oils_persist:sequence="acq.cancel_reason_id_seq">
9975                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
9976                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
9977                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
9978                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
9979                         <field reporter:label="Keep Debits?" name="keep_debits" reporter:datatype="bool"/>
9980                 </fields>
9981                 <links>
9982                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
9983                 </links>
9984                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9985                         <actions>
9986                                 <create permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
9987                                 <retrieve permission="STAFF_LOGIN" context_field="org_unit"/>
9988                                 <update permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
9989                                 <delete permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
9990                         </actions>
9991                 </permacrud>
9992         </class>
9993
9994         <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">
9995                 <fields oils_persist:primary="id" oils_persist:sequence="acq.purchase_order_id_seq">
9996                         <field reporter:label="Purchase Order ID" name="id" reporter:datatype="id" reporter:selector='name'/>
9997                         <field reporter:label="Owner" name="owner" reporter:datatype="link" />
9998                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
9999                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
10000                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
10001                         <field reporter:label="Status" name="state" reporter:datatype="link" />
10002                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="org_unit" />
10003                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
10004                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
10005                         <field reporter:label="Order Date" name="order_date" reporter:datatype="timestamp" />
10006                         <field reporter:label="Name" name="name" reporter:datatype="text" />
10007                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
10008                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
10009                         <field reporter:label="Line Items" name="lineitems" oils_persist:virtual="true" reporter:datatype="link" />
10010                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link" />
10011                         <field reporter:label="Line Item Count" name="lineitem_count" oils_persist:virtual="true" reporter:datatype="int" />
10012                         <field reporter:label="Amount Encumbered" name="amount_encumbered" oils_persist:virtual="true" reporter:datatype="float" />
10013                         <field reporter:label="Amount Spent" name="amount_spent" oils_persist:virtual="true" reporter:datatype="float" />
10014                         <field reporter:label="Amount Estimated" name="amount_estimated" oils_persist:virtual="true" reporter:datatype="float" />
10015                         <field reporter:label="PO Items" name="po_items" oils_persist:virtual="true" reporter:datatype="link" />
10016                 </fields>
10017                 <links>
10018                         <link field="state" reltype="has_a" key="id" map="" class="acqpostlbl"/>
10019                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
10020                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
10021                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
10022                         <link field="default_fund" reltype="has_a" key="id" map="" class="acqf"/>
10023                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
10024                         <link field="lineitems" reltype="has_many" key="purchase_order" map="" class="jub"/>
10025                         <link field="po_items" reltype="has_many" key="purchase_order" map="" class="acqpoi"/>
10026                         <link field="notes" reltype="has_many" key="purchase_order" map="" class="acqpon"/>
10027                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
10028                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
10029                 </links>
10030                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10031                         <actions>
10032                                 <create permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
10033                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER" context_field="ordering_agency"/>
10034                                 <update permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
10035                                 <delete permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
10036                         </actions>
10037                 </permacrud>
10038         </class>
10039
10040         <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">
10041                 <fields oils_persist:primary="audit_id" oils_persist:sequence="acq.acq_purchase_order_pkey_seq">
10042                         <field reporter:label="Audit ID" name="audit_id" reporter:datatype="id"/>
10043                         <field reporter:label="Audit Time" name="audit_time" reporter:datatype="timestamp"/>
10044                         <field reporter:label="Audit Action" name="audit_action" reporter:datatype="text"/>
10045                         <field reporter:label="Purchase Order ID" name="id" reporter:datatype="link"/>
10046                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
10047                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
10048                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
10049                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="link"/>
10050                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
10051                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
10052                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
10053                         <field reporter:label="Status" name="state" reporter:datatype="text"/>
10054                         <field reporter:label="Order Date" name="order_date" reporter:datatype="timestamp"/>
10055                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
10056                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link"/>
10057                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
10058                 </fields>
10059                 <links>
10060                         <link field="id" reltype="has_a" key="id" map="" class="acqpo"/>
10061                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
10062                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
10063                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
10064                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
10065                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
10066                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
10067                 </links>
10068                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10069             <actions>
10070                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER" context_field="ordering_agency"/>
10071             </actions>
10072                 </permacrud>
10073         </class>
10074
10075         <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">
10076                 <fields oils_persist:primary="id" oils_persist:sequence="acq.po_note_id_seq">
10077                         <field reporter:label="PO Note ID" name="id" reporter:datatype="id" />
10078                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />
10079                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
10080                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
10081                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
10082                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
10083                         <field reporter:label="Vote Value" name="value" reporter:datatype="text" />
10084                         <field reporter:label="Vendor Public" name="vendor_public" reporter:datatype="bool" />
10085                 </fields>
10086                 <links>
10087                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
10088                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
10089                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
10090                 </links>
10091                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10092             <actions>
10093                 <create permission="CREATE_PURCHASE_ORDER">
10094                     <context link="purchase_order" field="ordering_agency"/>
10095                 </create>
10096                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
10097                     <context link="purchase_order" field="ordering_agency"/>
10098                 </retrieve>
10099                 <update permission="CREATE_PURCHASE_ORDER">
10100                     <context link="purchase_order" field="ordering_agency"/>
10101                 </update>
10102                 <delete permission="CREATE_PURCHASE_ORDER">
10103                     <context link="purchase_order" field="ordering_agency"/>
10104                 </delete>
10105             </actions>
10106                 </permacrud>
10107         </class>
10108
10109         <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">
10110                 <fields oils_persist:primary="id" oils_persist:sequence="acq.po_item_id_seq">
10111                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
10112                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
10113                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
10114                         <field reporter:label="Invoice Item Type" name="inv_item_type" reporter:datatype="link"/>
10115                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
10116                         <field reporter:label="Author" name="author" reporter:datatype="text"/>
10117                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
10118                         <field reporter:label="Estimated Cost" name="estimated_cost" reporter:datatype="money"/>
10119                         <field reporter:label="Fund" name="fund" reporter:datatype="link"/>
10120                         <field reporter:label="Target" name="target" reporter:datatype="int" />
10121                 </fields>
10122                 <links>
10123                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
10124                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
10125                         <link field="inv_item_type" reltype="has_a" key="code" map="" class="aiit"/>
10126                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
10127                 </links>
10128                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10129             <actions>
10130                 <create permission="CREATE_PURCHASE_ORDER">
10131                     <context link="purchase_order" field="ordering_agency"/>
10132                 </create>
10133                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
10134                     <context link="purchase_order" field="ordering_agency"/>
10135                 </retrieve>
10136                 <update permission="CREATE_PURCHASE_ORDER">
10137                     <context link="purchase_order" field="ordering_agency"/>
10138                 </update>
10139                 <delete permission="CREATE_PURCHASE_ORDER">
10140                     <context link="purchase_order" field="ordering_agency"/>
10141                 </delete>
10142             </actions>
10143                 </permacrud>
10144         </class>
10145
10146         <class id="jub" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::lineitem" oils_persist:tablename="acq.lineitem" reporter:label="Line Item">
10147                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_id_seq">
10148                         <field reporter:label="Lineitem ID" name="id" reporter:datatype="id" />
10149                         <field reporter:label="Selecting User" name="selector" reporter:datatype="link" />
10150                         <field reporter:label="Selection List" name="picklist" reporter:datatype="link" />
10151                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />
10152                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
10153                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
10154                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
10155                         <field reporter:label="MARC" name="marc" reporter:datatype="text" />
10156                         <field reporter:label="Evergreen Bib ID" name="eg_bib_id" reporter:datatype="link" />
10157                         <field reporter:label="Source Label" name="source_label" reporter:datatype="text" />
10158                         <field reporter:label="Expected Receive Date" name="expected_recv_time" reporter:datatype="timestamp" />
10159                         <field reporter:label="Status" name="state" reporter:datatype="link" />
10160                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
10161                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
10162                         <field reporter:label="Claim Policy" name="claim_policy" reporter:datatype="link" />
10163                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
10164                         <field reporter:label="Estimated Unit Price" name="estimated_unit_price" reporter:datatype="money" />
10165                         <field reporter:label="Queued Vandelay Record" name="queued_record" reporter:datatype="link" />
10166                         <field reporter:label="Item Count" name="item_count" oils_persist:virtual="true" reporter:datatype="int" />
10167                         <field reporter:label="Descriptive Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link" />
10168                         <field reporter:label="Line Item Details" name="lineitem_details" oils_persist:virtual="true" reporter:datatype="link" />
10169                         <field reporter:label="Line Item Notes" name="lineitem_notes" oils_persist:virtual="true" reporter:datatype="link" />
10170                         <field reporter:label="Distribution Formulas" name="distribution_formulas" oils_persist:virtual="true" reporter:datatype="link" />
10171                         <field reporter:label="Invoice Entries" name="invoice_entries" oils_persist:virtual="true" reporter:datatype="link" />
10172                         <field reporter:label="Order Summary" name="order_summary" oils_persist:virtual="true" reporter:datatype="link" />
10173                 </fields>
10174                 <links>
10175                         <link field="state" reltype="has_a" key="id" map="" class="jubstlbl"/>
10176                         <link field="selector" reltype="has_a" key="id" map="" class="au"/>
10177                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
10178                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
10179                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
10180                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
10181                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl"/>
10182                         <link field="eg_bib_id" reltype="has_a" key="id" map="" class="bre"/>
10183                         <link field="attributes" reltype="has_many" key="lineitem" map="" class="acqlia"/>
10184                         <link field="lineitem_details" reltype="has_many" key="lineitem" map="" class="acqlid"/>
10185                         <link field="lineitem_notes" reltype="has_many" key="lineitem" map="" class="acqlin"/>
10186                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
10187                         <link field="distribution_formulas" reltype="has_many" key="lineitem" map="" class="acqdfa"/>
10188                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
10189                         <link field="invoice_entries" reltype="has_many" key="lineitem" map="" class="acqie"/>
10190                         <link field="order_summary" reltype="might_have" key="lineitem" map="" class="acqlisum"/>
10191                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
10192                 </links>
10193                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10194                         <actions>
10195                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER CREATE_PICKLIST VIEW_PICKLIST">
10196                                         <context link="purchase_order" field="ordering_agency"/>
10197                                         <context link="picklist" field="org_unit"/>
10198                                 </retrieve>
10199                         </actions>
10200                 </permacrud>
10201         </class>
10202
10203         <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">
10204                 <fields oils_persist:primary="audit_id" oils_persist:sequence="acq.acq_lineitem_pkey_seq">
10205                         <field reporter:label="Audit ID" name="audit_id" reporter:datatype="id"/>
10206                         <field reporter:label="Audit Time" name="audit_time" reporter:datatype="timestamp"/>
10207                         <field reporter:label="Audit Action" name="audit_action" reporter:datatype="text"/>
10208                         <field reporter:label="Lineitem ID" name="id" reporter:datatype="link"/>
10209                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
10210                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
10211                         <field reporter:label="Selector" name="selector" reporter:datatype="link"/>
10212                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
10213                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
10214                         <field reporter:label="Selection List" name="picklist" reporter:datatype="link"/>
10215                         <field reporter:label="Expected Receive Time" name="expected_recv_time" reporter:datatype="timestamp"/>
10216                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
10217                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
10218                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
10219                         <field reporter:label="Evergreen Bib ID" name="eg_bib_id" reporter:datatype="link"/>
10220                         <field reporter:label="Source Label" name="source_label" reporter:datatype="text"/>
10221                         <field reporter:label="Status" name="state" reporter:datatype="text"/>
10222                         <field reporter:label="Claim Policy" name="claim_policy" reporter:datatype="link"/>
10223                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link"/>
10224                         <field reporter:label="Estimated Unit Price" name="estimated_unit_price" reporter:datatype="money" />
10225                         <field reporter:label="Queued Vandelay Record" name="queued_record" reporter:datatype="link" />
10226                 </fields>
10227                 <links>
10228                         <link field="id" reltype="has_a" key="id" map="" class="jub"/>
10229                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
10230                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
10231                         <link field="selector" reltype="has_a" key="id" map="" class="au"/>
10232                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
10233                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
10234                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl"/>
10235                         <link field="eg_bib_id" reltype="has_a" key="id" map="" class="bre"/>
10236                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
10237                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
10238                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
10239                 </links>
10240                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10241                         <actions>
10242                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
10243                                         <context link="purchase_order" field="ordering_agency"/>
10244                                         <context link="picklist" field="org_unit"/>
10245                                 </retrieve>
10246                         </actions>
10247                 </permacrud>
10248         </class>
10249
10250         <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">
10251                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_alert_text_id_seq">
10252                         <field reporter:label="Alert Text ID" name="id" reporter:datatype="id"/>
10253                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
10254                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
10255                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link"/>
10256                 </fields>
10257                 <links>
10258                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10259                 </links>
10260                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10261                         <actions>
10262                                 <create permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
10263                                 <retrieve permission="STAFF_LOGIN" context_field="owning_lib"/>
10264                                 <update permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
10265                                 <delete permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
10266                         </actions>
10267                 </permacrud>
10268         </class>
10269
10270         <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">
10271                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_note_id_seq">
10272                         <field reporter:label="PO Line Item Note ID" name="id" reporter:datatype="id" />
10273                         <field reporter:label="Line Item" name="lineitem" reporter:datatype="link" />
10274                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
10275                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
10276                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
10277                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
10278                         <field reporter:label="Note Value" name="value" reporter:datatype="text" />
10279                         <field reporter:label="Alert Text" name="alert_text" reporter:datatype="link" />
10280                         <field reporter:label="Vendor Public" name="vendor_public" reporter:datatype="bool" />
10281                 </fields>
10282                 <links>
10283                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
10284                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
10285                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
10286                         <link field="alert_text" reltype="has_a" key="id" map="" class="acqliat"/>
10287                 </links>
10288         </class>
10289
10290         <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">
10291                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_id_seq">
10292                         <field reporter:label="Attribute Value ID" name="id" reporter:datatype="id" />
10293                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link" />
10294                         <field reporter:label="Type" name="attr_type" reporter:datatype="text" />
10295                         <field reporter:label="Name" name="attr_name" reporter:datatype="text" />
10296                         <field reporter:label="Value" name="attr_value" reporter:datatype="text" />
10297                         <field reporter:label="Definition" name="definition" reporter:datatype="text" />
10298                         <field reporter:label="Order Identifier" name="order_ident" reporter:datatype="bool" />
10299                 </fields>
10300                 <links>
10301                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
10302                         <link field="definition" reltype="has_a" key="id" map="" class="acqliad"/>
10303                 </links>
10304         </class>
10305
10306         <class id="acqlid" controller="open-ils.cstore open-ils.reporter-store open-ils.pcrud" oils_obj:fieldmapper="acq::lineitem_detail" oils_persist:tablename="acq.lineitem_detail" reporter:label="Line Item Detail">
10307                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_detail_id_seq">
10308                         <field reporter:label="Item Detail ID" name="id" reporter:datatype="id" />
10309                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
10310                         <field reporter:label="Evergreen Copy ID" name="eg_copy_id" reporter:datatype="link" />
10311                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text" />
10312                         <field reporter:label="Call Number Label" name="cn_label" reporter:datatype="text" />
10313                         <field reporter:label="Actual Receive Date" name="recv_time" reporter:datatype="timestamp" />
10314                         <field reporter:label="Receiving User" name="receiver" reporter:datatype="link" />
10315                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
10316                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link" />
10317                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" />
10318                         <field reporter:label="Copy Location" name="location" reporter:datatype="link" />
10319                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="link" />
10320                         <field reporter:label="Note" name="note" reporter:datatype="text" />
10321                         <field reporter:label="Collection Code" name="collection_code" reporter:datatype="text" />
10322                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
10323                         <field reporter:label="Claims" name="claims" reporter:datatype="link" oils_persist:virtual="true" />
10324                 </fields>
10325                 <links>
10326                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
10327                         <link field="eg_copy_id" reltype="has_a" key="id" map="" class="acp"/>
10328                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
10329                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
10330                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10331                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
10332                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
10333                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
10334                         <link field="claims" reltype="has_many" key="lineitem_detail" map="" class="acqcl"/>
10335                         <link field="receiver" reltype="has_a" key="id" map="" class="au"/>
10336                 </links>
10337         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10338             <actions>
10339                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER CREATE_PICKLIST VIEW_PICKLIST">
10340                     <context link="lineitem" jump="purchase_order" field="ordering_agency"/>
10341                     <context link="lineitem" jump="picklist" field="org_unit"/>
10342                 </retrieve>
10343             </actions>
10344         </permacrud>
10345         </class>
10346
10347         <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">
10348                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
10349                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
10350                         <field reporter:label="Code" name="code" reporter:datatype="text" />
10351                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
10352                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
10353                 </fields>
10354                 <links/>
10355                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10356                         <actions>
10357                                 <retrieve />
10358                         </actions>
10359                 </permacrud>
10360         </class>
10361
10362         <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">
10363                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
10364                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
10365                         <field reporter:label="Code" name="code" reporter:datatype="text" />
10366                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
10367                         <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
10368                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
10369             <field reporter:label="Remove" name="remove" reporter:datatype="text" />
10370                 </fields>
10371                 <links/>
10372         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10373             <actions>
10374                 <create permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
10375                 <retrieve />
10376                 <update permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
10377                 <delete permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
10378             </actions>
10379         </permacrud>
10380         </class>
10381
10382         <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">
10383                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
10384                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
10385                         <field reporter:label="Code" name="code" reporter:datatype="text" />
10386                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
10387                         <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
10388                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
10389                 </fields>
10390                 <links/>
10391         </class>
10392         <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">
10393                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
10394                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
10395                         <field reporter:label="Code" name="code" reporter:datatype="text" />
10396                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
10397                         <field reporter:label="User" name="usr" reporter:datatype="link" />
10398                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
10399                 </fields>
10400                 <links>
10401                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
10402                 </links>
10403         </class>
10404
10405         <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">
10406             <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
10407                 <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
10408                 <field reporter:label="Code" name="code" reporter:datatype="text"  oils_obj:required="true" />
10409                 <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
10410                 <field reporter:label="XPath" name="xpath" reporter:datatype="text" oils_obj:required="true" />
10411                 <field reporter:label="Provider" name="provider" reporter:datatype="link" oils_obj:required="true" />
10412                 <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
10413         <field reporter:label="Remove" name="remove" reporter:datatype="text" />
10414
10415             </fields>
10416             <links>
10417                 <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
10418             </links>
10419             <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10420                 <actions>
10421                     <create permission="ADMIN_PROVIDER">
10422                         <context link="provider" field="owner"/>
10423                     </create>
10424                     <retrieve permission="ADMIN_PROVIDER">
10425                         <context link="provider" field="owner"/>
10426                     </retrieve>
10427                     <update permission="ADMIN_PROVIDER">
10428                         <context link="provider" field="owner"/>
10429                     </update>
10430                     <delete permission="ADMIN_PROVIDER">
10431                         <context link="provider" field="owner"/>
10432                     </delete>
10433                 </actions>
10434             </permacrud>
10435         </class>
10436         
10437         <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">
10438             <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_holding_subfield_map_id_seq">
10439                 <field reporter:label="ID" name="id" reporter:datatype="id" />
10440                 <field reporter:label="Provider" name="provider" reporter:datatype="link" oils_obj:required="true" />
10441                 <field reporter:label="Name" name="name" reporter:datatype="text" oils_obj:required="true" />
10442                 <field reporter:label="Subfield" name="subfield" reporter:datatype="text" oils_obj:required="true" />
10443             </fields>
10444             <links>
10445                 <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
10446             </links>
10447             <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10448                 <actions>
10449                     <create permission="ADMIN_PROVIDER">
10450                         <context link="provider" field="owner"/>
10451                     </create>
10452                     <retrieve permission="ADMIN_PROVIDER">
10453                         <context link="provider" field="owner"/>
10454                     </retrieve>
10455                     <update permission="ADMIN_PROVIDER">
10456                         <context link="provider" field="owner"/>
10457                     </update>
10458                     <delete permission="ADMIN_PROVIDER">
10459                         <context link="provider" field="owner"/>
10460                     </delete>
10461                 </actions>
10462             </permacrud>
10463         </class>
10464         
10465         <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">
10466             <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
10467                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
10468                         <field reporter:label="Code" name="code" reporter:datatype="text" />
10469                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
10470                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
10471                 </fields>
10472                 <links/>
10473         </class>
10474
10475         <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">
10476                 <fields oils_persist:primary="id" oils_persist:sequence="config.remote_account_id_seq"><!-- edi_account inherits from config.remote_account, hence the seq -->
10477                         <field name="id"            reporter:datatype="id"        reporter:label="EDI Account ID" reporter:selector="label"/>
10478                         <field name="label"         reporter:datatype="text"      reporter:label="Label" oils_obj:required="true"/>
10479                         <field name="host"          reporter:datatype="text"      reporter:label="Host" oils_obj:required="true"/>
10480                         <field name="username"      reporter:datatype="text"      reporter:label="Username"/>
10481                         <field name="password"      reporter:datatype="text"      reporter:label="Password"/>
10482                         <field name="account"       reporter:datatype="text"      reporter:label="Account"/>
10483                         <field name="path"          reporter:datatype="text"      reporter:label="Path"/>
10484                         <field name="owner"         reporter:datatype="link"      reporter:label="Owner" oils_obj:required="true"/>
10485                         <field name="last_activity" reporter:datatype="timestamp" reporter:label="Last Activity"/>
10486                         <field name="provider"      reporter:datatype="link"      reporter:label="Provider" oils_obj:required="true"/>
10487                         <field name="in_dir"        reporter:datatype="text"      reporter:label="Incoming Directory"/>
10488                         <field name="vendacct"      reporter:datatype="text"      reporter:label="Vendor Account Number"/>
10489                         <field name="vendcode"      reporter:datatype="text"      reporter:label="Vendor Assigned Code"/>
10490                         <field name="attr_set"      reporter:datatype="link"      reporter:label="EDI Attribute Set"/>
10491                         <field name="use_attrs"     reporter:datatype="bool"      reporter:label="Use EDI Attributes" oils_obj:required="true"/>
10492                 </fields>
10493                 <links>
10494                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
10495                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
10496                         <link field="attr_set" reltype="has_a" key="id" map="" class="aeas"/>
10497                 </links>
10498         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10499             <actions>
10500                 <create permission="ADMIN_PROVIDER">
10501                     <context link="provider" field="owner"/>
10502                 </create>
10503                 <retrieve permission="ADMIN_PROVIDER">
10504                     <context link="provider" field="owner"/>
10505                 </retrieve>
10506                 <update permission="ADMIN_PROVIDER">
10507                     <context link="provider" field="owner"/>
10508                 </update>
10509                 <delete permission="ADMIN_PROVIDER">
10510                     <context link="provider" field="owner"/>
10511                 </delete>
10512             </actions>
10513         </permacrud>
10514         </class>
10515
10516         <class id="aea" controller="open-ils.cstore open-ils.pcrud" 
10517                 oils_obj:fieldmapper="acq::edi_attr" 
10518                 oils_persist:tablename="acq.edi_attr" reporter:label="EDI Attribute">
10519                 <fields oils_persist:primary="key">
10520                         <field name="key"   reporter:datatype="text" reporter:label="Key" reporter:selector="label"/>
10521                         <field name="label" reporter:datatype="text" reporter:label="Label"/>
10522                 </fields>
10523         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10524             <actions>
10525                 <create permission="ADMIN_PROVIDER" global_required="true"/>
10526                 <retrieve/>
10527                 <update permission="ADMIN_PROVIDER" global_required="true"/>
10528                 <delete permission="ADMIN_PROVIDER" global_required="true"/>
10529             </actions>
10530         </permacrud>
10531         </class>
10532         <class id="aeas" controller="open-ils.cstore open-ils.pcrud" 
10533                 oils_obj:fieldmapper="acq::edi_attr_set" 
10534                 oils_persist:tablename="acq.edi_attr_set" reporter:label="EDI Attribute Set">
10535                 <fields oils_persist:primary="id" oils_persist:sequence="acq.edi_attr_set_id_seq">
10536                         <field name="id"    reporter:datatype="id"   reporter:label="ID" reporter:selector="label"/>
10537                         <field name="label" reporter:datatype="text" reporter:label="Label"/>
10538                         <field name="attr_maps" reporter:datatype="link" oils_persist:virtual="true" reporter:label="Mapped EDI Attributes"/>
10539                         <field name="edi_accounts" reporter:datatype="link" oils_persist:virtual="true" reporter:label="EDI Accounts"/>
10540                 </fields>
10541                 <links>
10542                         <link field="attr_maps" reltype="has_many" key="attr_set" map="" class="aeasm"/>
10543                         <link field="edi_accounts" reltype="has_many" key="attr_set" map="" class="acqedi"/>
10544                 </links>
10545         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10546             <actions>
10547                 <create permission="ADMIN_PROVIDER" global_required="true"/>
10548                 <retrieve/>
10549                 <update permission="ADMIN_PROVIDER" global_required="true"/>
10550                 <delete permission="ADMIN_PROVIDER" global_required="true"/>
10551             </actions>
10552         </permacrud>
10553         </class>
10554         <class id="aeasm" controller="open-ils.cstore open-ils.pcrud" 
10555                 oils_obj:fieldmapper="acq::edi_attr_set_map" 
10556                 oils_persist:tablename="acq.edi_attr_set_map" reporter:label="EDI Attribute Set Map">
10557                 <fields oils_persist:primary="id" oils_persist:sequence="acq.edi_attr_set_map_id_seq">
10558                         <field name="id"       reporter:datatype="id"   reporter:label="ID" reporter:selector="label"/>
10559                         <field name="attr_set" reporter:datatype="link" reporter:label="Attribute Set"/>
10560                         <field name="attr"     reporter:datatype="link" reporter:label="Attribute"/>
10561                 </fields>
10562                 <links>
10563                         <link field="attr_set" reltype="has_a" key="id" map="" class="aeas"/>
10564                         <link field="attr" reltype="has_a" key="id" map="" class="aea"/>
10565                 </links>
10566         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10567             <actions>
10568                 <create permission="ADMIN_PROVIDER" global_required="true"/>
10569                 <retrieve/>
10570                 <update permission="ADMIN_PROVIDER" global_required="true"/>
10571                 <delete permission="ADMIN_PROVIDER" global_required="true"/>
10572             </actions>
10573         </permacrud>
10574         </class>
10575
10576
10577         <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">
10578                 <fields oils_persist:primary="id" oils_persist:sequence="acq.edi_message_id_seq">
10579                         <field name="id"               reporter:datatype="id"        reporter:label="EDI Message ID"/>
10580                         <field name="account"          reporter:datatype="link"      reporter:label="EDI Account"/>
10581                         <field name="remote_file"      reporter:datatype="text"      reporter:label="Filename"/>
10582                         <field name="create_time"      reporter:datatype="timestamp" reporter:label="Time Created"/>
10583                         <field name="translate_time"   reporter:datatype="timestamp" reporter:label="Time Translated"/>
10584                         <field name="process_time"     reporter:datatype="timestamp" reporter:label="Time Processed"/>
10585                         <field name="error_time"       reporter:datatype="timestamp" reporter:label="Time of Error"/>
10586                         <field name="status"           reporter:datatype="text"      reporter:label="Status"/>
10587                         <field name="edi"              reporter:datatype="text"      reporter:label="EDI Message Body"/>
10588                         <field name="jedi"             reporter:datatype="text"      reporter:label="JEDI Message Body"/>
10589                         <field name="error"            reporter:datatype="text"      reporter:label="Error"/>
10590                         <field name="purchase_order"   reporter:datatype="link"      reporter:label="Purchase Order"/>
10591                         <field name="message_type"     reporter:datatype="text"      reporter:label="Message Type"/>
10592                 </fields>
10593                 <links>
10594                         <link field="account" reltype="has_a" key="id" map="" class="acqedi"/>
10595                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
10596                 </links>
10597         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10598             <actions>
10599                 <retrieve permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
10600                     <context link="account" jump="provider" field="owner"/>
10601                 </retrieve>
10602                 <update   permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
10603                     <context link="account" jump="provider" field="owner"/>
10604                 </update>
10605                 <delete   permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
10606                     <context link="account" jump="provider" field="owner"/>
10607                 </delete>
10608             </actions>
10609         </permacrud>
10610         </class>
10611
10612
10613         <class id="rof" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::output_folder" oils_persist:tablename="reporter.output_folder" reporter:label="Output Folder">
10614                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.output_folder_id_seq">
10615                         <field name="id" reporter:datatype="id" />
10616                         <field name="parent" reporter:datatype="link"/>
10617                         <field name="owner" reporter:datatype="link"/>
10618                         <field name="create_time" reporter:datatype="timestamp"/>
10619                         <field name="name" reporter:datatype="text"/>
10620                         <field name="shared" reporter:datatype="bool"/>
10621                         <field name="share_with" reporter:datatype="link"/>
10622                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
10623                         <field name="outputs" oils_persist:virtual="true" reporter:datatype="link"/>
10624                 </fields>
10625                 <links>
10626                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
10627                         <link field="parent" reltype="has_a" key="id" map="" class="rof"/>
10628                         <link field="children" reltype="has_many" key="parent" map="" class="rof"/>
10629                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
10630                         <link field="outputs" reltype="has_many" key="folder" map="" class="rs"/>
10631                 </links>
10632         </class>
10633         <class id="rtf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::template_folder" oils_persist:tablename="reporter.template_folder" reporter:label="Template Folder">
10634                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_folder_id_seq">
10635                         <field name="id" reporter:datatype="id" />
10636                         <field name="parent" reporter:datatype="link"/>
10637                         <field name="owner" reporter:datatype="link"/>
10638                         <field name="create_time" reporter:datatype="timestamp"/>
10639                         <field name="name" reporter:datatype="text"/>
10640                         <field name="shared" reporter:datatype="bool"/>
10641                         <field name="share_with" reporter:datatype="link"/>
10642                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
10643                         <field name="templates" oils_persist:virtual="true" reporter:datatype="link"/>
10644                 </fields>
10645                 <links>
10646                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
10647                         <link field="parent" reltype="has_a" key="id" map="" class="rtf"/>
10648                         <link field="children" reltype="has_many" key="parent" map="" class="rtf"/>
10649                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
10650                         <link field="templates" reltype="has_many" key="folder" map="" class="rt"/>
10651                 </links>
10652         </class>
10653         <class id="rrf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report_folder" oils_persist:tablename="reporter.report_folder" reporter:label="Report Folder">
10654                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_folder_id_seq">
10655                         <field name="id" reporter:datatype="id" />
10656                         <field name="parent" reporter:datatype="link"/>
10657                         <field name="owner" reporter:datatype="link"/>
10658                         <field name="create_time" reporter:datatype="timestamp"/>
10659                         <field name="name" reporter:datatype="text"/>
10660                         <field name="shared" reporter:datatype="bool"/>
10661                         <field name="share_with" reporter:datatype="link"/>
10662                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
10663                         <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>
10664                 </fields>
10665                 <links>
10666                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
10667                         <link field="parent" reltype="has_a" key="id" map="" class="rrf"/>
10668                         <link field="children" reltype="has_many" key="parent" map="" class="rrf"/>
10669                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
10670                         <link field="reports" reltype="has_many" key="folder" map="" class="rr"/>
10671                 </links>
10672         </class>
10673         <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">
10674                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_id_seq">
10675                         <field name="id" reporter:datatype="id" />
10676                         <field name="owner" reporter:datatype="link"/>
10677                         <field name="create_time" reporter:datatype="timestamp"/>
10678                         <field name="name" reporter:datatype="text"/>
10679                         <field name="data" reporter:datatype="text"/>
10680                         <field name="folder" reporter:datatype="link"/>
10681                         <field name="description" reporter:datatype="text"/>
10682                         <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>
10683                 </fields>
10684                 <links>
10685                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
10686                         <link field="folder" reltype="has_a" key="id" map="" class="rtf"/>
10687                         <link field="reports" reltype="has_many" key="template" map="" class="rr"/>
10688                 </links>
10689         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10690             <actions>
10691                 <create   permission="RUN_REPORTS" owning_user="owner" global_required="true"/>
10692                 <retrieve permission="RUN_REPORTS" owning_user="owner" global_required="true"/>
10693                 <update   permission="RUN_REPORTS" owning_user="owner" global_required="true"/>
10694                 <delete   permission="RUN_REPORTS" owning_user="owner" global_required="true"/>
10695             </actions>
10696         </permacrud>
10697         </class>
10698         <class id="rr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report" oils_persist:tablename="reporter.report" reporter:label="Report">
10699                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_id_seq">
10700                         <field name="id" reporter:datatype="id" />
10701                         <field name="owner" reporter:datatype="link"/>
10702                         <field name="create_time" reporter:datatype="timestamp"/>
10703                         <field name="template" reporter:datatype="link"/>
10704                         <field name="data" reporter:datatype="text"/>
10705                         <field name="folder" reporter:datatype="link"/>
10706                         <field name="recur" reporter:datatype="bool"/>
10707                         <field name="recurrence" reporter:datatype="interval"/>
10708                         <field name="name" reporter:datatype="text"/>
10709                         <field name="description" reporter:datatype="text"/>
10710                         <field name="runs" oils_persist:virtual="true" reporter:datatype="link"/>
10711                 </fields>
10712                 <links>
10713                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
10714                         <link field="template" reltype="has_a" key="id" map="" class="rt"/>
10715                         <link field="folder" reltype="has_a" key="id" map="" class="rrf"/>
10716                         <link field="runs" reltype="has_many" key="report" map="" class="rs"/>
10717                 </links>
10718         </class>
10719         <class id="rs" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::schedule" oils_persist:tablename="reporter.schedule" reporter:label="Schedule">
10720                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.schedule_id_seq">
10721                         <field name="id" reporter:datatype="id" />
10722                         <field name="runner" reporter:datatype="link"/>
10723                         <field name="start_time" reporter:datatype="timestamp"/>
10724                         <field name="complete_time" reporter:datatype="timestamp"/>
10725                         <field name="run_time" reporter:datatype="timestamp"/>
10726                         <field name="email" reporter:datatype="text"/>
10727                         <field name="excel_format" reporter:datatype="bool"/>
10728                         <field name="csv_format" reporter:datatype="bool"/>
10729                         <field name="html_format" reporter:datatype="bool"/>
10730                         <field name="error_code" reporter:datatype="int"/>
10731                         <field name="error_text" reporter:datatype="text"/>
10732                         <field name="report" reporter:datatype="link"/>
10733                         <field name="folder" reporter:datatype="link"/>
10734                         <field name="chart_pie" reporter:datatype="bool"/>
10735                         <field name="chart_bar" reporter:datatype="bool"/>
10736                         <field name="chart_line" reporter:datatype="bool"/>
10737                 </fields>
10738                 <links>
10739                         <link field="runner" reltype="has_a" key="id" map="" class="au"/>
10740                         <link field="report" reltype="has_a" key="id" map="" class="rr"/>
10741                         <link field="folder" reltype="has_a" key="id" map="" class="rof"/>
10742                 </links>
10743         </class>
10744         <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">
10745                 <fields oils_persist:primary="id">
10746                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
10747                         <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>
10748                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
10749                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
10750                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
10751                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
10752                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
10753                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
10754                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
10755                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
10756                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
10757                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
10758                 </fields>
10759                 <links>
10760                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
10761                 </links>
10762                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10763                         <actions>
10764                                 <retrieve />
10765                         </actions>
10766                 </permacrud>
10767         </class>
10768         <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">
10769                 <fields oils_persist:primary="id">
10770                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
10771                         <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>
10772                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
10773                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
10774                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
10775                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
10776                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
10777                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
10778                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
10779                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
10780                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
10781                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
10782                 </fields>
10783                 <links>
10784                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
10785                 </links>
10786         </class>
10787         <class id="rsr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::simple_record" oils_persist:tablename="reporter.simple_record" reporter:label="Simple Record">
10788                 <fields oils_persist:primary="id">
10789                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
10790                         <field reporter:label="Metarecord" name="metarecord" reporter:datatype="link"/>
10791                         <field reporter:label="Fingerprint" name="fingerprint" />
10792                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
10793                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
10794                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
10795                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
10796                         <field reporter:label="Uniform Title (normalized)" name="uniform_title" reporter:datatype="text"/>
10797                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
10798                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
10799                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
10800                         <field reporter:label="Series Title (normalized)" name="series_title" reporter:datatype="text"/>
10801                         <field reporter:label="Series Statement (normalized)" name="series_statement" reporter:datatype="text"/>
10802                         <field reporter:label="Summary (normalized)" name="summary" reporter:datatype="text"/>
10803                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
10804                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
10805                         <field reporter:label="Topic Subjects (normalized)" name="topic_subject" reporter:datatype="text"/>
10806                         <field reporter:label="Geographic Subjects (normalized)" name="geographic_subject" reporter:datatype="text"/>
10807                         <field reporter:label="Genres (normalized)" name="genre" reporter:datatype="text"/>
10808                         <field reporter:label="Personal Name Subjects (normalized)" name="name_subject" reporter:datatype="text"/>
10809                         <field reporter:label="Corporate Name Subjects (normalized)" name="corporate_subject" reporter:datatype="text"/>
10810                         <field reporter:label="External URI List (normalized)" name="external_uri" reporter:datatype="text"/>
10811                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
10812                 </fields>
10813                 <links>
10814                         <link field="metarecord" reltype="has_a" key="id" map="" class="mmr"/>
10815                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
10816                 </links>
10817         </class>
10818         <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">
10819                 <fields oils_persist:primary="id">
10820                         <field reporter:label="User ID" name="id" reporter:datatype="id" />
10821                         <field reporter:label="Date of Birth" name="dob" reporter:datatype="timestamp"/>
10822                         <field reporter:label="General Demographic Division" name="general_division" reporter:datatype="text"/>
10823                 </fields>
10824                 <links>
10825                         <link field="id" reltype="might_have" key="id" map="" class="au"/>
10826                 </links>
10827         </class>
10828         <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">
10829                 <fields oils_persist:primary="id">
10830                         <field reporter:label="Circulation ID" name="id" reporter:datatype="id" />
10831                         <field reporter:label="Circulation Type" name="type" reporter:datatype="text"/>
10832                 </fields>
10833                 <links>
10834                         <link field="id" reltype="might_have" key="id" map="" class="circ"/>
10835                 </links>
10836         </class>
10837         <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">
10838                 <fields oils_persist:primary="id">
10839                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
10840                         <field reporter:label="Hold Target" name="target" reporter:datatype="int" />
10841                         <field reporter:label="Hold Request Type" name="hold_type" reporter:datatype="text"/>
10842                         <field reporter:label="Target Bib Record" name="bib_record" reporter:datatype="link"/>
10843                 </fields>
10844                 <links>
10845                         <link field="id" reltype="might_have" key="id" map="" class="ahr"/>
10846                         <link field="bib_record" reltype="has_a" key="id" map="" class="bre"/>
10847                 </links>
10848         </class>
10849         <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">
10850                 <fields oils_persist:primary="xact">
10851                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />
10852                         <field reporter:label="Unvoided Billing Amount" name="unvoided" reporter:datatype="money" />
10853                         <field reporter:label="Voided Billing Amount" name="voided" reporter:datatype="money"/>
10854                         <field reporter:label="Total Billing Amount" name="total" reporter:datatype="money"/>
10855                 </fields>
10856                 <links>
10857                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
10858                 </links>
10859         </class>
10860         <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">
10861                 <fields oils_persist:primary="xact">
10862                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />
10863                         <field reporter:label="Unvoided Paid Amount" name="unvoided" reporter:datatype="money" />
10864                         <field reporter:label="Voided (Returned) Paid Amount" name="voided" reporter:datatype="money"/>
10865                         <field reporter:label="Total Paid Amount" name="total" reporter:datatype="money"/>
10866                 </fields>
10867                 <links>
10868                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
10869                 </links>
10870         </class>
10871         <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)">
10872                 <fields oils_persist:primary="id">
10873                         <field reporter:label="Bib ID" name="id" reporter:datatype="id" />
10874                         <field reporter:label="Update Time" name="holding_update" reporter:datatype="timestamp" />
10875                         <field reporter:label="Update Type" name="update_type" reporter:datatype="text" />
10876                 </fields>
10877                 <links>
10878                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
10879                 </links>
10880         </class>
10881         <class id="erfcc" controller="open-ils.reporter-store open-ils.pcrud" oils_obj:fieldmapper="extend_reporter::full_circ_count" oils_persist:tablename="extend_reporter.full_circ_count" reporter:label="Total Circulation Count, Including Legacy">
10882                 <fields oils_persist:primary="id">
10883                         <field reporter:label="Copy ID" name="id" reporter:datatype="int" />
10884                         <field reporter:label="Total Circulation Count" name="circ_count" reporter:datatype="int" />
10885                 </fields>
10886                 <links>
10887                         <link field="id" reltype="has_a" key="id" map="" class="acp"/>
10888                 </links>
10889                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10890                         <actions>
10891                                 <retrieve permission="STAFF_LOGIN" context_field="circ_lib"/>
10892                         </actions>
10893                 </permacrud>
10894         </class>
10895         <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">
10896                 <fields oils_persist:primary="bibid">
10897                         <field reporter:label="Bib Record" name="bibid" reporter:datatype="id" />
10898                         <field reporter:label="Circulation Library" name="circ_lib" reporter:datatype="link" />
10899                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link" />
10900                         <field reporter:label="Last Edit Date" name="last_edit_time" reporter:datatype="timestamp" />
10901                         <field reporter:label="Has Only Deleted Copies 0/1" name="has_only_deleted_copies" reporter:datatype="int" />
10902                         <field reporter:label="Total deleted copies" name="deleted_count" reporter:datatype="int" />
10903                         <field reporter:label="Total visible copies" name="visible_count" reporter:datatype="int" />
10904                         <field reporter:label="Total copies attached" name="total_count" reporter:datatype="int" />
10905                 </fields>
10906                 <links>
10907                         <link field="bibid" reltype="has_a" key="id" map="" class="bre"/>
10908                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
10909                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10910                 </links>
10911         </class>
10912         <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">
10913                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_id_seq">
10914                         <field reporter:label="Formula ID" name="id" reporter:datatype="id" reporter:selector="name" />
10915                         <field reporter:label="Formula Owner" name="owner" reporter:datatype="org_unit"/>
10916                         <field reporter:label="Formula Name" name="name" reporter:datatype="text"/>
10917                         <field reporter:label="Skip Count" name="skip_count" reporter:datatype="int"/>
10918                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
10919                         <field reporter:label="Use Count" name="use_count" oils_persist:virtual="true" reporter:datatype="int"/>
10920                 </fields>
10921                 <links>
10922                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
10923                         <link field="entries" reltype="has_many" key="formula" map="" class="acqdfe"/>
10924                 </links>
10925                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10926                         <actions>
10927                                 <create permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
10928                                 <retrieve permission="CREATE_PURCHASE_ORDER ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
10929                                 <update permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
10930                                 <delete permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
10931                         </actions>
10932                 </permacrud>
10933         </class>
10934         <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">
10935                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_entry_id_seq">
10936                         <field reporter:label="Entry ID" name="id" reporter:datatype="id"/>
10937                         <field reporter:label="Formula ID" name="formula" reporter:datatype="link"/>
10938                         <field reporter:label="Position" name="position" reporter:datatype="int"/>
10939                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
10940                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
10941                         <field reporter:label="Location" name="location" reporter:datatype="link"/>
10942                         <field reporter:label="Fund" name="fund" reporter:datatype="link"/>
10943                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
10944                         <field reporter:label="Collection Code" name="collection_code" reporter:datatype="text"/>
10945                 </fields>
10946                 <links>
10947                         <link field="formula" reltype="has_a" key="id" map="" class="acqdf"/>
10948                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10949                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
10950                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
10951                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
10952                 </links>
10953                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10954                         <actions>
10955                                 <create permission="ADMIN_ACQ_DISTRIB_FORMULA">
10956                                         <context link="formula" field="owner"/>
10957                                 </create>
10958                                 <retrieve permission="ADMIN_ACQ_DISTRIB_FORMULA">
10959                                         <context link="formula" field="owner"/>
10960                                 </retrieve>
10961                                 <update permission="ADMIN_ACQ_DISTRIB_FORMULA">
10962                                         <context link="formula" field="owner"/>
10963                                 </update>
10964                                 <delete permission="ADMIN_ACQ_DISTRIB_FORMULA">
10965                                         <context link="formula" field="owner"/>
10966                                 </delete>
10967                         </actions>
10968                 </permacrud>
10969         </class>
10970
10971         <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">
10972                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_application_id_seq">
10973                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
10974                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
10975                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
10976                         <field reporter:label="Distribution Formula" name="formula" reporter:datatype="link"/>
10977                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
10978                 </fields>
10979                 <links>
10980                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
10981                         <link field="formula" reltype="has_a" key="id" map="" class="acqdf"/>
10982                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
10983                 </links>
10984                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10985                         <actions>
10986                                 <create permission="CREATE_PURCHASE_ORDER">
10987                                         <context link="formula" field="owner"/>
10988                 </create>
10989                                 <retrieve permission="CREATE_PURCHASE_ORDER">
10990                                         <context link="formula" field="owner"/>
10991                 </retrieve>
10992                                 <update permission="CREATE_PURCHASE_ORDER">
10993                                         <context link="formula" field="owner"/>
10994                 </update>
10995                                 <delete permission="CREATE_PURCHASE_ORDER">
10996                                         <context link="formula" field="owner"/>
10997                 </delete>
10998                         </actions>
10999                 </permacrud>
11000         </class>
11001
11002         <class id="acqda" controller="open-ils.cstore" oils_obj:fieldmapper="acq::debit_attribution" oils_persist:tablename="acq.debit_attribution" reporter:label="Debit Attribution">
11003                 <fields oils_persist:primary="id">
11004                         <field reporter:label="Debit Attribution ID" name="id" reporter:datatype="id"/>
11005                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
11006                         <field reporter:label="Debit Amount" name="debit_amount" reporter:datatype="money"/>
11007                         <field reporter:label="Funding Source Credit" name="funding_source_credit" reporter:datatype="link"/>
11008                         <field reporter:label="Credit Amount" name="credit_amount" reporter:datatype="money"/>
11009                 </fields>
11010                 <links>
11011                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
11012                         <link field="funding_source_credit" reltype="has_a" key="id" map="" class="acqfscred"/>
11013                 </links>
11014         </class>
11015
11016         <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">
11017                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_type_id_seq">
11018                         <field reporter:label="Claim Type ID" name="id" reporter:datatype="id" reporter:selector="code" />
11019                         <field reporter:label="Owner" name="org_unit" reporter:datatype="org_unit"/>
11020                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
11021                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
11022                 </fields>
11023                 <links>
11024                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
11025                 </links>
11026                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11027                         <actions>
11028                                 <create permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
11029                                 <retrieve permission="ADMIN_ACQ_CLAIM_TYPE ADMIN_ACQ_CLAIM VIEW_CLAIM MANAGE_CLAIM" context_field="org_unit"/>
11030                                 <update permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
11031                                 <delete permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
11032                         </actions>
11033                 </permacrud>
11034         </class>
11035
11036         <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">
11037                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_event_type_id_seq">
11038                         <field reporter:label="Claim Event Type ID" name="id" reporter:datatype="id" reporter:selector="code" />
11039                         <field reporter:label="Owner" name="org_unit" reporter:datatype="org_unit"/>
11040                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
11041                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
11042                         <field reporter:label="Library Initiated" name="library_initiated" reporter:datatype="bool"/>
11043                 </fields>
11044                 <links>
11045                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
11046                 </links>
11047                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11048                         <actions>
11049                                 <create permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
11050                                 <retrieve permission="ADMIN_ACQ_CLAIM_EVENT_TYPE ADMIN_ACQ_CLAIM VIEW_CLAIM MANAGE_CLAIM" context_field="org_unit"/>
11051                                 <update permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
11052                                 <delete permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
11053                         </actions>
11054                 </permacrud>
11055         </class>
11056
11057         <class id="acqcl" controller="open-ils.cstore" oils_obj:fieldmapper="acq::claim" oils_persist:tablename="acq.claim" reporter:label="Claim">
11058                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_id_seq">
11059                         <field reporter:label="Claim ID" name="id" reporter:datatype="id"/>
11060                         <field reporter:label="Claim Type" name="type" reporter:datatype="link"/>
11061                         <field reporter:label="Lineitem Detail" name="lineitem_detail" reporter:datatype="link"/>
11062                 </fields>
11063                 <links>
11064                         <link field="type" reltype="has_a" key="id" map="" class="acqclt"/>
11065                         <link field="lineitem_detail" reltype="has_a" key="id" map="" class="acqlid"/>
11066                 </links>
11067         </class>
11068
11069         <class id="acqcle" controller="open-ils.cstore" oils_obj:fieldmapper="acq::claim_event" oils_persist:tablename="acq.claim_event" reporter:label="Claim Event">
11070                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_event_id_seq">
11071                         <field reporter:label="Claim Event ID" name="id" reporter:datatype="id"/>
11072                         <field reporter:label="Claim Event Type" name="type" reporter:datatype="link"/>
11073                         <field reporter:label="Claim ID" name="claim" reporter:datatype="link"/>
11074                         <field reporter:label="Event Date" name="event_date" reporter:datatype="timestamp"/>
11075                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
11076                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
11077                 </fields>
11078                 <links>
11079                         <link field="type" reltype="has_a" key="id" map="" class="acqclet"/>
11080                         <link field="claim" reltype="has_a" key="id" map="" class="acqcl"/>
11081                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
11082                 </links>
11083         </class>
11084
11085         <class id="acqscl" controller="open-ils.cstore" oils_obj:fieldmapper="acq::serial_claim" oils_persist:tablename="acq.serial_claim" reporter:label="Serial Claim">
11086                 <fields oils_persist:primary="id" oils_persist:sequence="acq.serial_claim_id_seq">
11087                         <field reporter:label="Claim ID" name="id" reporter:datatype="id"/>
11088                         <field reporter:label="Claim Type" name="type" reporter:datatype="link"/>
11089                         <field reporter:label="Serial Item" name="item" reporter:datatype="link"/>
11090                 </fields>
11091                 <links>
11092                         <link field="type" reltype="has_a" key="id" map="" class="acqclt"/>
11093                         <link field="item" reltype="has_a" key="id" map="" class="sitem"/>
11094                 </links>
11095         </class>
11096
11097         <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">
11098                 <fields oils_persist:primary="id" oils_persist:sequence="acq.serial_claim_event_id_seq">
11099                         <field reporter:label="Claim Event ID" name="id" reporter:datatype="id"/>
11100                         <field reporter:label="Claim Event Type" name="type" reporter:datatype="link"/>
11101                         <field reporter:label="Claim ID" name="claim" reporter:datatype="link"/>
11102                         <field reporter:label="Event Date" name="event_date" reporter:datatype="timestamp"/>
11103                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
11104                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
11105                 </fields>
11106                 <links>
11107                         <link field="type" reltype="has_a" key="id" map="" class="acqclet"/>
11108                         <link field="claim" reltype="has_a" key="id" map="" class="acqscl"/>
11109                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
11110                 </links>
11111         </class>
11112
11113         <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">
11114                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_policy_id_seq">
11115                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
11116                         <field reporter:label="Owner" name="org_unit" reporter:datatype="org_unit"/>
11117                         <field reporter:label="Claim Policy Name" name="name" reporter:datatype="text"/>
11118                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
11119                 </fields>
11120                 <links>
11121                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
11122                 </links>
11123                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11124             <actions>
11125                 <create   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
11126                 <retrieve permission="ADMIN_CLAIM_POLICY VIEW_PROVIDER" context_field="org_unit"/>
11127                 <update   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
11128                 <delete   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
11129             </actions>
11130                 </permacrud>
11131         </class>
11132
11133         <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">
11134                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_policy_action_id_seq">
11135                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="action"/>
11136                         <field reporter:label="Claim Policy" name="claim_policy" reporter:datatype="link"/>
11137                         <field reporter:label="Action Interval" name="action_interval" reporter:datatype="interval"/>
11138                         <field reporter:label="Action (Event Type)" name="action" reporter:datatype="link"/>
11139                 </fields>
11140                 <links>
11141                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
11142                         <link field="action" reltype="has_a" key="id" map="" class="acqclet"/>
11143                 </links>
11144                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11145                         <actions>
11146                                 <create permission="ADMIN_CLAIM_POLICY">
11147                                         <context link="claim_policy" field="org_unit"/>
11148                 </create>
11149                                 <retrieve permission="ADMIN_CLAIM_POLICY VIEW_PROVIDER">
11150                                         <context link="claim_policy" field="org_unit"/>
11151                 </retrieve>
11152                                 <update permission="ADMIN_CLAIM_POLICY">
11153                                         <context link="claim_policy" field="org_unit"/>
11154                 </update>
11155                                 <delete permission="ADMIN_CLAIM_POLICY">
11156                                         <context link="claim_policy" field="org_unit"/>
11157                 </delete>
11158                         </actions>
11159                 </permacrud>
11160         </class>
11161
11162     <class id="stgu" controller="open-ils.cstore" oils_obj:fieldmapper="staging::user_stage" oils_persist:tablename="staging.user_stage" reporter:label="User Stage">
11163         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.user_stage_row_id_seq">
11164             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
11165             <field reporter:label="Create Date" name="row_date" reporter:datatype="timestamp"/>
11166             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
11167             <field reporter:label="Main (Profile) Permission Group" name="profile" reporter:datatype="text"/>
11168             <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
11169             <field reporter:label="Password" name="passwd" reporter:datatype="text"/>
11170             <field reporter:label="Primary Identification Type" name="ident_type" reporter:datatype="int"/>
11171             <field reporter:label="First Name" name="first_given_name" reporter:datatype="text"/>
11172             <field reporter:label="Middle Name" name="second_given_name" reporter:datatype="text"/>
11173             <field reporter:label="Last Name" name="family_name" reporter:datatype="text"/>
11174             <field reporter:label="Daytime Phone" name="day_phone" reporter:datatype="text"/>
11175             <field reporter:label="Evening Phone" name="evening_phone" reporter:datatype="text"/>
11176             <field reporter:label="Home Library" name="home_ou" reporter:datatype="int"/>
11177             <field reporter:label="Date of Birth" name="dob" reporter:datatype="text"/>
11178             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
11179             <field reporter:label="Requesting User" name="requesting_usr" reporter:datatype="link"/>
11180                                                 <field reporter:label="Preferred First Name" name="pref_first_given_name" reporter:datatype="text"/>
11181                                                 <field reporter:label="Preferred Middle Name" name="pref_second_given_name" reporter:datatype="text"/>
11182                                                 <field reporter:label="Preferred Last Name" name="pref_family_name"  reporter:datatype="text"/>
11183         </fields>
11184         <links>
11185             <link field="requesting_usr" reltype="has_a" key="id" map="" class="au"/>
11186             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
11187         </links>
11188     </class>
11189
11190     <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">
11191         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.card_stage_row_id_seq">
11192             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
11193             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
11194             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
11195             <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
11196             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
11197         </fields>
11198     </class>
11199
11200     <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">
11201         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.mailing_address_stage_row_id_seq">
11202             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
11203             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
11204             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
11205             <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
11206             <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
11207             <field reporter:label="City" name="city" reporter:datatype="text"/>
11208             <field reporter:label="County" name="county"  reporter:datatype="text"/>
11209             <field reporter:label="State" name="state" reporter:datatype="text"/>
11210             <field reporter:label="Country" name="country" reporter:datatype="text"/>
11211             <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
11212             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
11213         </fields>
11214     </class>
11215
11216     <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">
11217         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.mailing_address_stage_row_id_seq">
11218             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
11219             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
11220             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
11221             <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
11222             <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
11223             <field reporter:label="City" name="city" reporter:datatype="text"/>
11224             <field reporter:label="County" name="county"  reporter:datatype="text"/>
11225             <field reporter:label="State" name="state" reporter:datatype="text"/>
11226             <field reporter:label="Country" name="country" reporter:datatype="text"/>
11227             <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
11228             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
11229         </fields>
11230     </class>
11231
11232     <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">
11233         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.statcat_stage_row_id_seq">
11234             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
11235             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
11236             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
11237             <field reporter:label="Stat Cat ID" name="statcat" reporter:datatype="text"/>
11238             <field reporter:label="Stat Cat Value" name="value" reporter:datatype="text"/>
11239             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
11240         </fields>
11241     </class>
11242
11243     <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">
11244         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.setting_stage_row_id_seq">
11245             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
11246             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
11247             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
11248             <field reporter:label="User Setting Code" name="setting" reporter:datatype="text"/>
11249             <field reporter:label="User Setting Value" name="value" reporter:datatype="text"/>
11250             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
11251         </fields>
11252     </class>
11253
11254         <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">
11255                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_group_id_seq">
11256                         <field reporter:label="Fieldset Group ID" name="id" reporter:datatype="id"/>
11257                         <field reporter:label="Fieldset Group Name" name="name" reporter:datatype="text" oils_obj:required="true"/>
11258                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp"/>
11259                         <field reporter:label="Complete Time" name="complete_time" reporter:datatype="timestamp"/>
11260                         <field reporter:label="Container ID" name="container" reporter:datatype="int" oils_obj:required="true"/> <!-- not an fkey because could be on multiple tables -->
11261                         <field reporter:label="Container Type" name="container_type" reporter:datatype="text" oils_obj:required="true"/>
11262                         <field reporter:label="Rollback Group" name="rollback_group" reporter:datatype="link"/>
11263                         <field reporter:label="Rollback Time" name="rollback_time" reporter:datatype="timestamp"/>
11264                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
11265                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
11266                 </fields>
11267                 <links>
11268                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
11269                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
11270                         <link field="rollback_group" reltype="has_a" key="id" map="" class="afsg"/>
11271                 </links>
11272                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11273                         <actions>
11274                                 <create permission="CREATE_FIELDSET_GROUP ADMIN_FIELDSET_GROUP" context_field="owning_lib" owning_user="creator"/>
11275                                 <retrieve permission="RETRIEVE_FIELDSET_GROUP ADMIN_FIELDSET_GROUP" context_field="owning_lib" owning_user="creator"/>
11276                                 <update permission="UPDATE_FIELDSET_GROUP ADMIN_FIELDSET_GROUP" context_field="owning_lib" owning_user="creator"/>
11277                                 <delete permission="DELETE_FIELDSET_GROUP ADMIN_FIELDSET_GROUP" context_field="owning_lib" owning_user="creator"/>
11278                         </actions>
11279                 </permacrud>
11280         </class>
11281
11282         <class id="afs" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::fieldset" oils_persist:tablename="action.fieldset" reporter:label="Fieldset">
11283                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_id_seq">
11284                         <field reporter:label="Fieldset ID" name="id" reporter:datatype="id"/>
11285                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
11286                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link"/>
11287                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
11288                         <field reporter:label="Creation Time" name="creation_time" reporter:datatype="timestamp"/>
11289                         <field reporter:label="Scheduled Time" name="scheduled_time" reporter:datatype="timestamp"/>
11290                         <field reporter:label="Applied Time" name="applied_time" reporter:datatype="timestamp"/>
11291                         <field reporter:label="Class Name" name="classname" reporter:datatype="text"/>
11292                         <field reporter:label="Fieldset Name" name="name" reporter:datatype="text"/>
11293                         <field reporter:label="Stored Query" name="stored_query" reporter:datatype="link"/>
11294                         <field reporter:label="Primary Key Value" name="pkey_value" reporter:datatype="text"/>
11295                         <field reporter:label="Fieldset Group" name="fieldset_group" reporter:datatype="link"/>
11296                         <field reporter:label="Error Message" name="error_msg" reporter:datatype="text"/>
11297                 </fields>
11298                 <links>
11299                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
11300                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
11301                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
11302                         <link field="fieldset_group" reltype="has_a" key="id" map="" class="afsg"/>
11303                 </links>
11304                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11305                         <actions>
11306                                 <create permission="CREATE_FIELDSET ADMIN_FIELDSET" context_field="owning_lib" owning_user="owner"/>
11307                                 <retrieve permission="RETRIEVE_FIELDSET ADMIN_FIELDSET" context_field="owning_lib" owning_user="owner"/>
11308                                 <update permission="UPDATE_FIELDSET ADMIN_FIELDSET" context_field="owning_lib" owning_user="owner"/>
11309                                 <delete permission="DELETE_FIELDSET ADMIN_FIELDSET" context_field="owning_lib" owning_user="owner"/>
11310                         </actions>
11311                 </permacrud>
11312         </class>
11313
11314         <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">
11315                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_col_val_id_seq">
11316                         <field reporter:label="Column Value ID" name="id" reporter:datatype="id"/>
11317                         <field reporter:label="Fieldset ID" name="fieldset" reporter:datatype="link"/>
11318                         <field reporter:label="Column Name" name="col" reporter:datatype="text"/>
11319                         <field reporter:label="Column Value" name="val" reporter:datatype="text"/>
11320                 </fields>
11321                 <links>
11322                         <link field="fieldset" reltype="has_a" key="id" map="" class="afs"/>
11323                 </links>
11324                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1"> <!-- NOTE: foreign context does not support owning_user today -->
11325                         <actions>
11326                                 <create permission="CREATE_FIELDSET_ENTRY ADMIN_FIELDSET_ENTRY">
11327                     <context link="fieldset" field="owning_lib"/>
11328                 </create>
11329                                 <retrieve permission="RETRIEVE_FIELDSET_ENTRY ADMIN_FIELDSET_ENTRY">
11330                     <context link="fieldset" field="owning_lib"/>
11331                 </retrieve>
11332                                 <update permission="UPDATE_FIELDSET_ENTRY ADMIN_FIELDSET_ENTRY">
11333                     <context link="fieldset" field="owning_lib"/>
11334                 </update>
11335                                 <delete permission="DELETE_FIELDSET_ENTRY ADMIN_FIELDSET_ENTRY">
11336                     <context link="fieldset" field="owning_lib"/>
11337                 </delete>
11338                         </actions>
11339                 </permacrud>
11340         </class>
11341
11342     <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">
11343         <fields>
11344             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
11345             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
11346             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
11347         </fields>
11348                 <links>
11349                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
11350                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
11351                 </links>
11352     </class>
11353
11354     <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">
11355         <fields>
11356             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
11357             <field reporter:label="Min Loop" name="min" reporter:datatype="int"/>
11358         </fields>
11359                 <links>
11360                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
11361                 </links>
11362     </class>
11363
11364     <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">
11365         <fields>
11366             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
11367             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
11368             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
11369         </fields>
11370                 <links>
11371                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
11372                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
11373                 </links>
11374     </class>
11375
11376     <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">
11377         <fields>
11378             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
11379             <field reporter:label="Max Loop" name="max" reporter:datatype="int"/>
11380         </fields>
11381                 <links>
11382                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
11383                 </links>
11384     </class>
11385
11386     <class id="aufhol" controller="open-ils.cstore" oils_obj:fieldmapper="action::unfulfilled_hold_outermost_loop" oils_persist:readonly="true">
11387                 <oils_persist:source_definition><![CDATA[
11388
11389             SELECT  DISTINCT l.*
11390               FROM  action.unfulfilled_hold_loops l
11391                     JOIN action.unfulfilled_hold_max_loop m USING (hold)
11392               WHERE l.count = m.max
11393
11394                 ]]></oils_persist:source_definition>
11395         <fields>
11396             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
11397             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
11398             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
11399         </fields>
11400                 <links>
11401                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
11402                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
11403                 </links>
11404     </class>
11405
11406         <class id="qsq" controller="open-ils.cstore" oils_obj:fieldmapper="query::stored_query" oils_persist:tablename="query.stored_query" reporter:label="Stored Query">
11407                 <fields oils_persist:primary="id" oils_persist:sequence="query.stored_query_id_seq">
11408                         <field reporter:label="Query ID" name="id" reporter:datatype="id"/>
11409                         <field reporter:label="Query type" name="type" reporter:datatype="text"/>
11410                         <field reporter:label="Use ALL" name="use_all" reporter:datatype="bool"/>
11411                         <field reporter:label="Use DISTINCT" name="use_distinct" reporter:datatype="bool"/>
11412                         <field reporter:label="FROM Clause" name="from_clause" reporter:datatype="link"/>
11413                         <field reporter:label="WHERE Clause" name="where_clause" reporter:datatype="link"/>
11414                         <field reporter:label="HAVING Clause" name="having_clause" reporter:datatype="link"/>
11415                         <field reporter:label="LIMIT count" name="limit_count" reporter:datatype="link"/>
11416                         <field reporter:label="OFFSET count" name="offset_count" reporter:datatype="link"/>
11417                 </fields>
11418                 <links>
11419                         <link field="from_clause" reltype="has_a" key="id" map="" class="qfr"/>
11420                         <link field="having_clause" reltype="has_a" key="id" map="" class="qxp"/>
11421                         <link field="where_clause" reltype="has_a" key="id" map="" class="qxp"/>
11422                         <link field="limit_count" reltype="has_a" key="id" map="" class="qxp"/>
11423                         <link field="offset_count" reltype="has_a" key="id" map="" class="qxp"/>
11424                 </links>
11425         </class>
11426
11427         <class id="qseq" controller="open-ils.cstore" oils_obj:fieldmapper="query::query_sequence" oils_persist:tablename="query.query_sequence" reporter:label="Query Sequence">
11428                 <fields oils_persist:primary="id" oils_persist:sequence="query.query_sequence_id_seq">
11429                         <field reporter:label="Query Seq ID" name="id" reporter:datatype="id"/>
11430                         <field reporter:label="Parent Query" name="parent_query" reporter:datatype="link"/>
11431                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11432                         <field reporter:label="Child Query" name="child_query" reporter:datatype="link"/>
11433                 </fields>
11434                 <links>
11435                         <link field="parent_query" reltype="has_a" key="id" map="" class="qsq"/>
11436                         <link field="child_query" reltype="has_a" key="id" map="" class="qsq"/>
11437                 </links>
11438         </class>
11439
11440         <class id="qdt" controller="open-ils.cstore" oils_obj:fieldmapper="query::datatype" oils_persist:tablename="query.datatype" reporter:label="Datatype">
11441                 <fields oils_persist:primary="id" oils_persist:sequence="query.datatype_id_seq">
11442                         <field reporter:label="Datatype ID" name="id" reporter:datatype="id"/>
11443                         <field reporter:label="Datatype Name" name="datatype_name" reporter:datatype="text"/>
11444                         <field reporter:label="Is Numeric" name="is_numeric" reporter:datatype="bool"/>
11445                         <field reporter:label="Is Composite" name="is_composite" reporter:datatype="bool"/>
11446                 </fields>
11447                 <links>
11448                 </links>
11449         </class>
11450
11451         <class id="qsf" controller="open-ils.cstore" oils_obj:fieldmapper="query::subfield" oils_persist:tablename="query.subfield" reporter:label="Subfield">
11452                 <fields oils_persist:primary="id" oils_persist:sequence="query.subfield_id_seq">
11453                         <field reporter:label="Subfield ID" name="id" reporter:datatype="id"/>
11454                         <field reporter:label="Composite Type" name="composite_type" reporter:datatype="link"/>
11455                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11456                         <field reporter:label="Subfield Type" name="subfield_type" reporter:datatype="link"/>
11457                 </fields>
11458                 <links>
11459                         <link field="composite_type" reltype="has_a" key="id" map="" class="qdt"/>
11460                         <link field="subfield_type" reltype="has_a" key="id" map="" class="qdt"/>
11461                 </links>
11462         </class>
11463         
11464         <class id="qfs" controller="open-ils.cstore" oils_obj:fieldmapper="query::function_sig" oils_persist:tablename="query.function_sig" reporter:label="Function Signature">
11465                 <fields oils_persist:primary="id" oils_persist:sequence="query.function_sig_id_seq">
11466                         <field reporter:label="Function Signature ID" name="id" reporter:datatype="id"/>
11467                         <field reporter:label="Function Name" name="function_name" reporter:datatype="text"/>
11468                         <field reporter:label="Return Type" name="return_type" reporter:datatype="link"/>
11469                         <field reporter:label="Is Aggregate" name="is_aggregate" reporter:datatype="bool"/>
11470                 </fields>
11471                 <links>
11472                         <link field="return_type" reltype="has_a" key="id" map="" class="qdt"/>
11473                 </links>
11474         </class>
11475         
11476         <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">
11477                 <fields oils_persist:primary="id" oils_persist:sequence="query.function_param_def_id_seq">
11478                         <field reporter:label="Function Param Def ID" name="id" reporter:datatype="id"/>
11479                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
11480                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11481                         <field reporter:label="Datatype" name="datatype" reporter:datatype="link"/>
11482                 </fields>
11483                 <links>
11484                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
11485                         <link field="datatype" reltype="has_a" key="id" map="" class="qdt"/>
11486                 </links>
11487         </class>
11488
11489         <class id="qbv" controller="open-ils.cstore" oils_obj:fieldmapper="query::bind_variable" oils_persist:tablename="query.bind_variable" reporter:label="Bind Variable">
11490                 <fields oils_persist:primary="name">
11491                         <field reporter:label="Name" name="name" reporter:datatype="id"/>
11492                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
11493                         <field reporter:label="Type" name="type" reporter:datatype="text"/>
11494                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
11495                         <field reporter:label="Default Value" name="default_value" reporter:datatype="text"/>
11496                         <field reporter:label="Actual Value" name="actual_value" oils_persist:virtual="true" reporter:datatype="text"/>
11497                 </fields>
11498                 <links>
11499                 </links>
11500         </class>
11501
11502         <class id="qxp" controller="open-ils.cstore" oils_obj:fieldmapper="query::expression" oils_persist:tablename="query.expression" reporter:label="Expression">
11503                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11504                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11505                         <field reporter:label="Expression Type" name="type" reporter:datatype="text"/>
11506                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11507                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11508                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11509                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
11510                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
11511                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
11512                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
11513                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
11514                         <field reporter:label="Right Operand" name="right_operand" reporter:datatype="link"/>
11515                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
11516                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
11517                         <field reporter:label="Cast Type" name="cast_type" reporter:datatype="link"/>
11518                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
11519                         <field reporter:label="Bind Variable" name="bind_variable" reporter:datatype="link"/>
11520                 </fields>
11521                 <links>
11522                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11523                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
11524                         <link field="right_operand" reltype="has_a" key="id" map="" class="qxp"/>
11525                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
11526                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
11527                         <link field="cast_type" reltype="has_a" key="id" map="" class="qdt"/>
11528                         <link field="bind_variable" reltype="has_a" key="name" map="" class="qbv"/>
11529                 </links>
11530         </class>
11531
11532         <class id="qcb" controller="open-ils.cstore" oils_obj:fieldmapper="query::case_branch" oils_persist:tablename="query.case_branch" reporter:label="Case Branch">
11533                 <fields oils_persist:primary="id" oils_persist:sequence="query.case_branch_id_seq">
11534                         <field reporter:label="Case Branch ID" name="id" reporter:datatype="id"/>
11535                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11536                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11537                         <field reporter:label="Condition" name="condition" reporter:datatype="link"/>
11538                         <field reporter:label="Result" name="result" reporter:datatype="link"/>
11539                 </fields>
11540                 <links>
11541                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11542                         <link field="condition" reltype="has_a" key="id" map="" class="qxp"/>
11543                         <link field="result" reltype="has_a" key="id" map="" class="qxp"/>
11544                 </links>
11545         </class>
11546
11547         <class id="qfr" controller="open-ils.cstore" oils_obj:fieldmapper="query::from_relation" oils_persist:tablename="query.from_relation" reporter:label="From Relation">
11548                 <fields oils_persist:primary="id" oils_persist:sequence="query.from_relation_id_seq">
11549                         <field reporter:label="From Relation ID" name="id" reporter:datatype="id"/>
11550                         <field reporter:label="From Relation Type" name="type" reporter:datatype="text"/>
11551                         <field reporter:label="Table Name" name="table_name" reporter:datatype="text"/>
11552                         <field reporter:label="Class Name" name="class_name" reporter:datatype="text"/>
11553                         <field reporter:label="Subquery ID" name="subquery" reporter:datatype="link"/>
11554                         <field reporter:label="Function Call ID" name="function_call" reporter:datatype="link"/>
11555                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
11556                         <field reporter:label="Parent Relation ID" name="parent_relation" reporter:datatype="link"/>
11557                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11558                         <field reporter:label="Join Type" name="join_type" reporter:datatype="text"/>
11559                         <field reporter:label="On Clause ID" name="on_clause" reporter:datatype="link"/>
11560                 </fields>
11561                 <links>
11562                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
11563                         <link field="function_call" reltype="has_a" key="id" map="" class="qxp"/>
11564                         <link field="parent_relation" reltype="has_a" key="id" map="" class="qfr"/>
11565                         <link field="on_clause" reltype="has_a" key="id" map="" class="qxp"/>
11566                 </links>
11567         </class>
11568
11569         <class id="qrc" controller="open-ils.cstore" oils_obj:fieldmapper="query::record_column" oils_persist:tablename="query.record_column" reporter:label="Record Column">
11570                 <fields oils_persist:primary="id" oils_persist:sequence="query.record_column_id_seq">
11571                         <field reporter:label="Record Column ID" name="id" reporter:datatype="id"/>
11572                         <field reporter:label="From Relation ID" name="from_relation" reporter:datatype="link"/>
11573                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11574                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
11575                         <field reporter:label="Column Type" name="column_type" reporter:datatype="link"/>
11576                 </fields>
11577                 <links>
11578                         <link field="from_relation" reltype="has_a" key="id" map="" class="qfr"/>
11579                         <link field="column_type" reltype="has_a" key="id" map="" class="qdt"/>
11580                 </links>
11581         </class>
11582
11583         <class id="qsi" controller="open-ils.cstore" oils_obj:fieldmapper="query::select_item" oils_persist:tablename="query.select_item" reporter:label="Select Item">
11584                 <fields oils_persist:primary="id" oils_persist:sequence="query.select_item_id_seq">
11585                         <field reporter:label="Select Item ID" name="id" reporter:datatype="id"/>
11586                         <field reporter:label="Stored Query ID" name="stored_query" reporter:datatype="link"/>
11587                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11588                         <field reporter:label="Expression" name="expression" reporter:datatype="link"/>
11589                         <field reporter:label="Column Alias" name="column_alias" reporter:datatype="text"/>
11590                         <field reporter:label="Is Grouped By" name="grouped_by" reporter:datatype="bool"/>
11591                 </fields>
11592                 <links>
11593                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
11594                         <link field="expression" reltype="has_a" key="id" map="" class="qxp"/>
11595                 </links>
11596         </class>
11597
11598         <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">
11599                 <fields oils_persist:primary="id" oils_persist:sequence="query.order_by_item_id_seq">
11600                         <field reporter:label="Order By Item ID" name="id" reporter:datatype="id"/>
11601                         <field reporter:label="Stored Query ID" name="stored_query" reporter:datatype="link"/>
11602                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11603                         <field reporter:label="Expression" name="expression" reporter:datatype="link"/>
11604                 </fields>
11605                 <links>
11606                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
11607                         <link field="expression" reltype="has_a" key="id" map="" class="qxp"/>
11608                 </links>
11609         </class>
11610
11611         <class id="xbet" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbet" oils_persist:tablename="query.expr_xbet" reporter:label="Between Expression">
11612                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11613                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11614                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11615                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11616                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11617                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
11618                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
11619                 </fields>
11620                 <links>
11621                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11622                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
11623                 </links>
11624         </class>
11625
11626         <class id="xbind" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbind" oils_persist:tablename="query.expr_xbind" reporter:label="Bind Variable Expression">
11627                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11628                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11629                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11630                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11631                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11632                         <field reporter:label="Bind Variable" name="bind_variable" reporter:datatype="link"/>
11633                 </fields>
11634                 <links>
11635                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11636                         <link field="bind_variable" reltype="has_a" key="name" map="" class="qbv"/>
11637                 </links>
11638         </class>
11639
11640         <class id="xbool" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbool" oils_persist:tablename="query.expr_xbool" reporter:label="Boolean Expression">
11641                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11642                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11643                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11644                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11645                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11646                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
11647                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
11648                 </fields>
11649                 <links>
11650                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11651                 </links>
11652         </class>
11653
11654         <class id="xcase" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcase" oils_persist:tablename="query.expr_xcase" reporter:label="Case Expression">
11655                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11656                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11657                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11658                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11659                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11660                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
11661                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
11662                 </fields>
11663                 <links>
11664                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11665                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
11666                 </links>
11667         </class>
11668
11669         <class id="xcast" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcast" oils_persist:tablename="query.expr_xcast" reporter:label="Cast Expression">
11670                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11671                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11672                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11673                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11674                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11675                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
11676                         <field reporter:label="Cast Type" name="cast_type" reporter:datatype="link"/>
11677                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
11678                 </fields>
11679                 <links>
11680                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11681                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
11682                         <link field="cast_type" reltype="has_a" key="id" map="" class="qdt"/>
11683                 </links>
11684         </class>
11685
11686         <class id="xcol" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcol" oils_persist:tablename="query.expr_xcol" reporter:label="Column Expression">
11687                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11688                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11689                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11690                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11691                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11692                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
11693                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
11694                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
11695                 </fields>
11696                 <links>
11697                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11698                 </links>
11699         </class>
11700
11701         <class id="xex" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xex" oils_persist:tablename="query.expr_xex" reporter:label="Exists Expression">
11702                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11703                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11704                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11705                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11706                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11707                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
11708                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
11709                 </fields>
11710                 <links>
11711                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11712                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
11713                 </links>
11714         </class>
11715
11716         <class id="xfunc" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xfunc" oils_persist:tablename="query.expr_xfunc" reporter:label="Function Expression">
11717                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11718                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11719                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11720                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11721                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11722                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
11723                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
11724                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
11725                 </fields>
11726                 <links>
11727                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11728                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
11729                 </links>
11730         </class>
11731
11732         <class id="xin" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xin" oils_persist:tablename="query.expr_xin" reporter:label="In Expression">
11733                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11734                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11735                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11736                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11737                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11738                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
11739                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
11740                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
11741                 </fields>
11742                 <links>
11743                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11744                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
11745                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
11746                 </links>
11747         </class>
11748
11749         <class id="xisnull" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xisnull" oils_persist:tablename="query.expr_xisnull" reporter:label="IS NULL Expression">
11750                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11751                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11752                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11753                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11754                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11755                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
11756                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
11757                 </fields>
11758                 <links>
11759                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11760                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
11761                 </links>
11762         </class>
11763
11764         <class id="xnull" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xnull" oils_persist:tablename="query.expr_xnull" reporter:label="Null Expression">
11765                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11766                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11767                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11768                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11769                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11770                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
11771                 </fields>
11772                 <links>
11773                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11774                 </links>
11775         </class>
11776
11777         <class id="xnum" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xnum" oils_persist:tablename="query.expr_xnum" reporter:label="Number Expression">
11778                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11779                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11780                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11781                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11782                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11783                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
11784                 </fields>
11785                 <links>
11786                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11787                 </links>
11788         </class>
11789
11790         <class id="xop" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xop" oils_persist:tablename="query.expr_xop" reporter:label="Operator Expression">
11791                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11792                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11793                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11794                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11795                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11796                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
11797                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
11798                         <field reporter:label="Right Operand" name="right_operand" reporter:datatype="link"/>
11799                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
11800                 </fields>
11801                 <links>
11802                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11803                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
11804                         <link field="right_operand" reltype="has_a" key="id" map="" class="qxp"/>
11805                 </links>
11806         </class>
11807
11808         <class id="xser" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xser" oils_persist:tablename="query.expr_xser" reporter:label="Operator Expression">
11809                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11810                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11811                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11812                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11813                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11814                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
11815                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
11816                 </fields>
11817                 <links>
11818                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11819                 </links>
11820         </class>
11821
11822         <class id="xstr" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xstr" oils_persist:tablename="query.expr_xstr" reporter:label="String Expression">
11823                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11824                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11825                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11826                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11827                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11828                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
11829                 </fields>
11830                 <links>
11831                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11832                 </links>
11833         </class>
11834
11835         <class id="xsubq" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xsubq" oils_persist:tablename="query.expr_xsubq" reporter:label="Subquery Expression">
11836                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11837                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11838                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11839                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11840                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11841                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
11842                 </fields>
11843                 <links>
11844                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11845                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
11846                 </links>
11847         </class>
11848
11849         <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">
11850                 <fields oils_persist:primary="id">
11851                         <field reporter:label="Temp ID" name="id" reporter:datatype="id"/>
11852                         <field reporter:label="Type" name="ptype" reporter:datatype="link"/>
11853                         <field reporter:label="Subfield" name="subfield" reporter:datatype="link"/>
11854                         <field reporter:label="Value" name="value" reporter:datatype="link"/>
11855                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
11856                 </fields>
11857                 <links>
11858                         <link field="ptype" reltype="has_a" key="id" map="" class="cmpctm"/>
11859                         <link field="subfield" reltype="has_a" key="id" map="" class="cmpcsm"/>
11860                         <link field="value" reltype="has_a" key="id" map="" class="cmpcvm"/>
11861                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
11862                 </links>
11863         </class>
11864
11865         <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">
11866                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_ff_pos_map_id_seq">
11867                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
11868                         <field reporter:label="Fixed Field" name="fixed_field" reporter:datatype="text"/>
11869                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
11870                         <field reporter:label="Record Type" name="rec_type" reporter:datatype="text"/>
11871                         <field reporter:label="Start Postion" name="start_pos" reporter:datatype="int"/>
11872                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
11873                         <field reporter:label="Default Value" name="default_val" reporter:datatype="text"/>
11874                 </fields>
11875                 <links/>
11876                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11877                         <actions>
11878                                 <retrieve/>
11879                         </actions>
11880                 </permacrud>
11881         </class>
11882
11883         <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">
11884                 <fields oils_persist:primary="ptype_key">
11885                         <field reporter:label="Type Key" name="ptype_key" reporter:datatype="id"/>
11886                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
11887                 </fields>
11888                 <links/>
11889                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11890                         <actions>
11891                                 <retrieve/>
11892                         </actions>
11893                 </permacrud>
11894         </class>
11895
11896         <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">
11897                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_physical_characteristic_subfield_map_id_seq">
11898                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
11899                         <field reporter:label="Type Key" name="ptype_key" reporter:datatype="link"/>
11900                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
11901                         <field reporter:label="Start Postion" name="start_pos" reporter:datatype="int"/>
11902                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
11903                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
11904                 </fields>
11905                 <links>
11906                         <link field="ptype_key" reltype="has_a" key="id" map="" class="cmpctm"/>
11907                 </links>
11908                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11909                         <actions>
11910                                 <retrieve/>
11911                         </actions>
11912                 </permacrud>
11913         </class>
11914
11915         <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">
11916                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_physical_characteristic_value_map_id_seq">
11917                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
11918                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
11919                         <field reporter:label="Subfield" name="ptype_subfield" reporter:datatype="link"/>
11920                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
11921                 </fields>
11922                 <links>
11923                         <link field="ptype_subfield" reltype="has_a" key="id" map="" class="cmpcsm"/>
11924                 </links>
11925                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11926                         <actions>
11927                                 <retrieve/>
11928                         </actions>
11929                 </permacrud>
11930         </class>
11931
11932     <class
11933         id="uvs"
11934         controller="open-ils.cstore open-ils.pcrud"
11935         oils_obj:fieldmapper="url_verify::session"
11936         oils_persist:tablename="url_verify.session"
11937         reporter:label="URL Verification Session"
11938     >
11939         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.session_id_seq">
11940             <field reporter:label="Session ID" name="id" reporter:datatype="id"/>
11941             <field reporter:label="Name" name="name" reporter:datatype="text" oils_obj:required="true"/>
11942                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" oils_obj:required="true"/>
11943             <field reporter:label="Creator" name="creator" reporter:datatype="link" oils_obj:required="true"/>
11944             <field reporter:label="Record Container" name="container" reporter:datatype="link" oils_obj:required="true"/>
11945             <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
11946             <field reporter:label="Search Constraints" name="search" reporter:datatype="text" oils_obj:required="true"/>
11947             <field reporter:label="URL Selectors" name="selectors" reporter:datatype="link" oils_persist:virtual="true"/>
11948             <field reporter:label="Verification Attempts" name="attempts" reporter:datatype="link" oils_persist:virtual="true"/>
11949         </fields>
11950
11951         <links>
11952             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
11953             <link field="creator" reltype="has_a" key="id" map="" class="au"/>
11954             <link field="container" reltype="has_a" key="id" map="" class="cbreb"/>
11955             <link field="selectors" reltype="has_many" key="session" map="" class="uvus"/>
11956             <link field="attempts" reltype="has_many" key="session" map="" class="uvva"/>
11957         </links>
11958
11959         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11960             <actions>
11961                 <retrieve permission="URL_VERIFY" context_field="owning_lib"/>
11962             </actions>
11963         </permacrud>
11964
11965     </class>
11966
11967     <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">
11968         <oils_persist:source_definition><![CDATA[
11969             SELECT
11970                 cbrebi.id AS id,  -- so we can have a pkey in our view
11971                 uvs.id AS session,
11972                 uvs.owning_lib,
11973                 cbrebi.target_biblio_record_entry
11974             FROM url_verify.session uvs
11975             JOIN container.biblio_record_entry_bucket cbreb
11976                 ON (uvs.container = cbreb.id)
11977             JOIN container.biblio_record_entry_bucket_item cbrebi
11978                 ON (cbrebi.bucket = cbreb.id)
11979         ]]></oils_persist:source_definition>
11980         <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_id_seq">
11981             <field reporter:label="Bucket Item ID" name="id" reporter:datatype="id" />
11982             <field reporter:label="Session" name="session" reporter:datatype="link" />
11983             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" />
11984             <field reporter:label="Target Biblio Record Entry" name="target_biblio_record_entry" reporter:datatype="link" />
11985         </fields>
11986         <links>
11987             <link field="target_biblio_record_entry" reltype="has_a" key="id" map="" class="bre" />
11988             <link field="session" reltype="has_a" key="id" map="" class="uvs" />
11989             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou" />
11990         </links>
11991         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11992             <actions>
11993                 <retrieve permission="URL_VERIFY" context_field="owning_lib" />
11994             </actions>
11995         </permacrud>
11996     </class>
11997
11998     <class
11999         id="uvus"
12000         controller="open-ils.cstore open-ils.pcrud"
12001         oils_obj:fieldmapper="url_verify::url_selector"
12002         oils_persist:tablename="url_verify.url_selector"
12003         reporter:label="URL Verification URL Selector"
12004     >
12005         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.url_selector_id_seq">
12006             <field reporter:label="URL Selector ID" name="id" reporter:datatype="id"/>
12007             <field reporter:label="XPath" name="xpath" reporter:datatype="text" oils_obj:required="true"/>
12008                         <field reporter:label="Session" name="session" reporter:datatype="link" oils_obj:required="true"/>
12009             <field reporter:label="URLs" name="urls" reporter:datatype="link" oils_persist:virtual="true"/>
12010         </fields>
12011
12012         <links>
12013             <link field="session" reltype="has_a" key="id" map="" class="uvs"/>
12014             <link field="urls" reltype="has_many" key="id" map="" class="uvu"/>
12015         </links>
12016
12017         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12018             <actions>
12019                 <create permission="URL_VERIFY">
12020                     <context link="session" field="owning_lib"/>
12021                 </create>
12022                 <retrieve permission="URL_VERIFY">
12023                     <context link="session" field="owning_lib"/>
12024                 </retrieve>
12025                 <update permission="URL_VERIFY">
12026                     <context link="session" field="owning_lib"/>
12027                 </update>
12028                 <delete permission="URL_VERIFY">
12029                     <context link="session" field="owning_lib"/>
12030                 </delete>
12031             </actions>
12032         </permacrud>
12033
12034     </class>
12035
12036     <class
12037         id="uvu"
12038         controller="open-ils.cstore open-ils.pcrud"
12039         oils_obj:fieldmapper="url_verify::url"
12040         oils_persist:tablename="url_verify.url"
12041         reporter:label="URL Verification URL"
12042     >
12043         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.url_id_seq">
12044             <field reporter:label="URL ID" name="id" reporter:datatype="id"/>
12045                         <field reporter:label="Redirected From" name="redirect_from" reporter:datatype="link"/>
12046                         <field reporter:label="Container Item" name="item" reporter:datatype="link" oils_obj:required="true"/>
12047                         <field reporter:label="Session" name="session" reporter:datatype="link" oils_obj:required="true"/>
12048                         <field reporter:label="URL Selector" name="url_selector" reporter:datatype="link"/>
12049             <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
12050             <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
12051             <field reporter:label="Ordinal Position" name="ord" reporter:datatype="int"/>
12052             <field reporter:label="URL" name="full_url" reporter:datatype="text"/>
12053             <field reporter:label="Scheme" name="scheme" reporter:datatype="text"/>
12054             <field reporter:label="Host" name="host" reporter:datatype="text"/>
12055             <field reporter:label="Domain" name="domain" reporter:datatype="text"/>
12056             <field reporter:label="TLD" name="tld" reporter:datatype="text"/>
12057             <field reporter:label="Path" name="path" reporter:datatype="text"/>
12058             <field reporter:label="Page" name="page" reporter:datatype="text"/>
12059             <field reporter:label="Query" name="query" reporter:datatype="text"/>
12060             <field reporter:label="Fragment" name="fragment" reporter:datatype="text"/>
12061             <field reporter:label="Verifications" name="verifications" reporter:datatype="link" oils_persist:virtual="true" />
12062         </fields>
12063
12064         <links>
12065             <link field="redirect_from" reltype="has_a" key="id" map="" class="uvu"/>
12066             <link field="item" reltype="has_a" key="id" map="" class="uvsbrem" />
12067             <link field="session" reltype="has_a" key="id" map="" class="uvs"/>
12068             <link field="url_selector" reltype="has_a" key="id" map="" class="uvus"/>
12069             <link field="verifications" reltype="has_many" key="url" map="" class="uvuv"/>
12070         </links>
12071
12072         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12073             <actions>
12074                 <create permission="URL_VERIFY">
12075                     <context link="session" field="owning_lib"/>
12076                 </create>
12077                 <retrieve permission="URL_VERIFY">
12078                     <context link="session" field="owning_lib"/>
12079                 </retrieve>
12080                 <update permission="URL_VERIFY">
12081                     <context link="session" field="owning_lib"/>
12082                 </update>
12083                 <delete permission="URL_VERIFY">
12084                     <context link="session" field="owning_lib"/>
12085                 </delete>
12086             </actions>
12087         </permacrud>
12088
12089     </class>
12090
12091     <class
12092         id="uvva"
12093         controller="open-ils.cstore open-ils.pcrud"
12094         oils_obj:fieldmapper="url_verify::verification_attempt"
12095         oils_persist:tablename="url_verify.verification_attempt"
12096         reporter:label="URL Verification Attempt"
12097     >
12098         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.verification_attempt_id_seq">
12099             <field reporter:label="Attempt ID" name="id" reporter:datatype="id"/>
12100                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
12101                         <field reporter:label="Session" name="session" reporter:datatype="link"/>
12102             <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
12103             <field reporter:label="Finish Time" name="finish_time" reporter:datatype="timestamp"/>
12104         </fields>
12105
12106         <links>
12107             <link field="session" reltype="has_a" key="id" map="" class="uvs"/>
12108             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
12109         </links>
12110
12111         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12112             <actions>
12113                 <create permission="URL_VERIFY">
12114                     <context link="session" field="owning_lib"/>
12115                 </create>
12116                 <retrieve permission="URL_VERIFY">
12117                     <context link="session" field="owning_lib"/>
12118                 </retrieve>
12119                 <update permission="URL_VERIFY">
12120                     <context link="session" field="owning_lib"/>
12121                 </update>
12122                 <delete permission="URL_VERIFY">
12123                     <context link="session" field="owning_lib"/>
12124                 </delete>
12125             </actions>
12126         </permacrud>
12127
12128     </class>
12129
12130     <class
12131         id="uvuv"
12132         controller="open-ils.cstore open-ils.pcrud"
12133         oils_obj:fieldmapper="url_verify::url_verification"
12134         oils_persist:tablename="url_verify.url_verification"
12135         reporter:label="URL Verification"
12136     >
12137         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.url_verification_id_seq">
12138             <field reporter:label="Verification ID" name="id" reporter:datatype="id"/>
12139                         <field reporter:label="URL" name="url" reporter:datatype="link"/>
12140                         <field reporter:label="Attempt" name="attempt" reporter:datatype="link"/>
12141             <field reporter:label="Request Time" name="req_time" reporter:datatype="timestamp"/>
12142             <field reporter:label="Result Time" name="res_time" reporter:datatype="timestamp"/>
12143             <field reporter:label="Result Code" name="res_code" reporter:datatype="int"/>
12144             <field reporter:label="Result Text" name="res_text" reporter:datatype="text"/>
12145                         <field reporter:label="Redirected To" name="redirect_to" reporter:datatype="link"/>
12146         </fields>
12147
12148         <links>
12149             <link field="url" reltype="has_a" key="id" map="" class="uvu"/>
12150             <link field="attempt" reltype="has_a" key="id" map="" class="uvva"/>
12151             <link field="redirect_to" reltype="has_a" key="id" map="" class="uvu"/>
12152         </links>
12153
12154         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12155             <actions>
12156                 <create permission="URL_VERIFY">
12157                     <context link="attempt" jump="session" field="owning_lib"/>
12158                 </create>
12159                 <retrieve permission="URL_VERIFY">
12160                     <context link="attempt" jump="session" field="owning_lib"/>
12161                 </retrieve>
12162                 <update permission="URL_VERIFY">
12163                     <context link="attempt" jump="session" field="owning_lib"/>
12164                 </update>
12165                 <delete permission="URL_VERIFY">
12166                     <context link="attempt" jump="session" field="owning_lib"/>
12167                 </delete>
12168             </actions>
12169         </permacrud>
12170
12171     </class>
12172
12173         <class
12174                 id="cfdi"
12175                 controller="open-ils.cstore open-ils.pcrud"
12176                 oils_obj:fieldmapper="config::filter_dialog_interface"
12177                 oils_persist:tablename="config.filter_dialog_interface"
12178                 reporter:label="FilterDialog Interface">
12179                 <fields oils_persist:primary="key" oils_persist:sequence="config.filter_dialog_interface_pkey">
12180                         <field reporter:label="Interface Key" name="key" reporter:datatype="text" />
12181                         <field reporter:label="Description" name="description" reporter:datatype="text" />
12182                 </fields>
12183                 <links>
12184                         <link field="filter_sets" reltype="has_many" key="interface" map="" class="cfdfs"/>
12185                 </links>
12186                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12187                         <actions>
12188                                 <retrieve />
12189                         </actions>
12190                 </permacrud>
12191         </class>
12192
12193         <class
12194                 id="cfdfs"
12195                 controller="open-ils.cstore open-ils.pcrud"
12196                 oils_obj:fieldmapper="config::filter_dialog_filter_set"
12197                 oils_persist:tablename="config.filter_dialog_filter_set"
12198                 reporter:label="FilterDialog Filter Set">
12199                 <fields oils_persist:primary="id" oils_persist:sequence="config.filter_dialog_filter_set_id_seq">
12200                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
12201                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
12202                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
12203                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
12204                         <field reporter:label="Interface" name="interface" reporter:datatype="link"/>
12205                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
12206                         <field reporter:label="Filters" name="filters" reporter:datatype="text"/>
12207                 </fields>
12208                 <links>
12209                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
12210                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
12211                         <link field="interface" reltype="has_a" key="key" map="" class="cfdi"/>
12212                 </links>
12213                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12214                         <actions>
12215                                 <create permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
12216                                 <retrieve permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
12217                                 <update permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
12218                                 <delete permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
12219                         </actions>
12220                 </permacrud>
12221
12222         </class>
12223
12224         <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">
12225                 <fields oils_persist:primary="code">
12226                         <field reporter:label="Code" name="code" reporter:datatype="id"/>
12227                         <field reporter:label="Type Value" name="type_val" reporter:datatype="text"/>
12228                         <field reporter:label="BLvl Value" name="blvl_val" reporter:datatype="text"/>
12229                 </fields>
12230                 <links/>
12231                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12232                         <actions>
12233                                 <retrieve/>
12234                         </actions>
12235                 </permacrud>
12236         </class>
12237
12238         <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">
12239                 <oils_persist:source_definition><![CDATA[
12240
12241             SELECT  b.id,
12242                     MAX(dcp.edit_date) AS last_delete_date
12243              FROM   biblio.record_entry b
12244                     JOIN asset.call_number cn ON (cn.record = b.id)
12245                     JOIN asset.copy dcp ON (cn.id = dcp.call_number)
12246              WHERE  NOT b.deleted
12247              GROUP BY b.id
12248              HAVING SUM( CASE WHEN NOT dcp.deleted THEN 1 ELSE 0 END) = 0 
12249
12250                 ]]></oils_persist:source_definition>
12251                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
12252                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
12253                         <field reporter:label="Delete Date/Time" name="last_delete_date" reporter:datatype="timestamp"/>
12254                 </fields>
12255                 <links>
12256                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
12257                 </links>
12258                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12259                         <actions>
12260                                 <retrieve/>
12261                         </actions>
12262                 </permacrud>
12263         </class>
12264
12265         <class id="jubstlbl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::li_state_label" oils_persist:tablename="acq.li_state_label" oils_persist:readonly="true" reporter:label="Line Item State Labels" oils_persist:field_safe="true">
12266                 <fields oils_persist:primary="id">
12267                         <field reporter:label="State ID" reporter:selector="label" name="id" reporter:datatype="text"/>
12268                         <field reporter:label="State Label" name="label" oils_persist:i18n="true" reporter:datatype="text"/>
12269                 </fields>
12270                 <links/>
12271                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12272                         <actions>
12273                                 <retrieve/>
12274                         </actions>
12275                 </permacrud>
12276         </class>
12277
12278         <class id="acqpostlbl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::po_state_label" oils_persist:tablename="acq.po_state_label" oils_persist:readonly="true" reporter:label="PO State Labels">
12279                 <fields oils_persist:primary="id">
12280                         <field reporter:label="State ID" reporter:selector="label" name="id" reporter:datatype="text"/>
12281                         <field reporter:label="State Label" name="label" oils_persist:i18n="true" reporter:datatype="text"/>
12282                 </fields>
12283                 <links/>
12284                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12285                         <actions>
12286                                 <retrieve/>
12287                         </actions>
12288                 </permacrud>
12289         </class>
12290
12291
12292         <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">
12293                 <oils_persist:source_definition><![CDATA[
12294
12295             -- -- 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.
12296             -- -- 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
12297             -- -- may not.
12298             -- SELECT
12299             --     bre.id AS bib_id,
12300             --     COALESCE( z.copy_count, 0 ) AS copy_count,
12301             --     COALESCE( z.hold_count, 0 ) AS hold_count,
12302             --     COALESCE( z.copy_hold_ratio, 0 ) AS hold_copy_ratio
12303             -- FROM (
12304                 SELECT
12305                     y.bre AS id,
12306                     COALESCE( x.copy_count, 0 ) AS copy_count,
12307                     y.hold_count AS hold_count,
12308                     (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
12309                 FROM (
12310                         SELECT
12311                             (SELECT bib_record FROM reporter.hold_request_record r WHERE r.id = h.id LIMIT 1) AS bre,
12312                             COUNT(*) AS hold_count
12313                         FROM action.hold_request h
12314                         WHERE
12315                             cancel_time IS NULL
12316                             AND fulfillment_time IS NULL
12317                             -- AND NOT frozen  -- a frozen hold is still a desired hold, eh?
12318                         GROUP BY 1
12319                     )y LEFT JOIN (
12320                         SELECT 
12321                             (SELECT id
12322                                 FROM biblio.record_entry 
12323                                 WHERE id = (SELECT record FROM asset.call_number WHERE id = call_number and deleted is false)
12324                             ) AS bre, 
12325                             COUNT(*) AS copy_count
12326                         FROM asset.copy
12327                             JOIN asset.copy_location loc ON (copy.location = loc.id AND loc.holdable)
12328                         WHERE copy.holdable 
12329                             AND NOT copy.deleted 
12330                             AND copy.status IN ( SELECT id FROM config.copy_status WHERE holdable ) 
12331                         GROUP BY 1
12332                     )x ON x.bre = y.bre
12333                 -- )z RIGHT JOIN (
12334                 --     SELECT id
12335                 --     FROM biblio.record_entry
12336                 --     WHERE NOT deleted
12337                 -- )bre ON (z.bib_id = bre.id)
12338                 
12339
12340                 ]]></oils_persist:source_definition>
12341                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
12342                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
12343                         <field reporter:label="Holdable Copy Count" name="copy_count" reporter:datatype="int"/>
12344                         <field reporter:label="Active Holds" name="hold_count" reporter:datatype="int"/>
12345                         <field reporter:label="Hold/Copy Ratio" name="hold_copy_ratio" reporter:datatype="float"/>
12346                 </fields>
12347                 <links>
12348                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
12349                 </links>
12350                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12351                         <actions>
12352                                 <retrieve/>
12353                         </actions>
12354                 </permacrud>
12355         </class>
12356
12357         <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">
12358                 <oils_persist:source_definition><![CDATA[
12359             SELECT *,
12360                 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,
12361                 CASE WHEN copy_count_everywhere = 0 THEN 'Infinity'::FLOAT ELSE holds_everywhere::FLOAT/copy_count_everywhere END AS everywhere_ratio
12362             FROM
12363                 (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
12364                     FROM
12365                         action.hold_request ahr
12366                         JOIN reporter.hold_request_record rhrr USING (id)
12367                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
12368                         LEFT JOIN asset.copy ac ON (ahcm.target_copy = ac.id AND ahr.pickup_lib = ac.circ_lib)
12369                     WHERE
12370                         ahr.cancel_time IS NULL
12371                         AND ahr.fulfillment_time IS NULL
12372                     GROUP BY bib_record, pickup_lib
12373                 )x
12374                 JOIN
12375                 (SELECT bib_record as id, count(DISTINCT ahr.id) AS holds_everywhere, COALESCE(count(DISTINCT target_copy),0) as copy_count_everywhere
12376                     FROM
12377                         action.hold_request ahr
12378                         JOIN reporter.hold_request_record rhrr USING (id)
12379                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
12380                     WHERE
12381                         ahr.cancel_time IS NULL
12382                         AND ahr.fulfillment_time IS NULL
12383                     GROUP BY bib_record
12384                 )y
12385                 USING (id)
12386                 ]]></oils_persist:source_definition>
12387                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
12388                         <field reporter:label="Record ID" name="id" reporter:datatype="link"/>
12389                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
12390                         <field reporter:label="Active Holds at Pickup Library" name="holds_at_pickup_library" reporter:datatype="int"/>
12391                         <field reporter:label="Holdable Copy Count at Pickup Library" name="copy_count_at_pickup_library" reporter:datatype="int"/>
12392                         <field reporter:label="Active Holds Everywhere" name="holds_everywhere" reporter:datatype="int"/>
12393                         <field reporter:label="Holdable Copy Count Everywhere" name="copy_count_everywhere" reporter:datatype="int"/>
12394                         <field reporter:label="Hold/Copy Ratio at Pickup Library" name="pickup_library_ratio" reporter:datatype="float"/>
12395                         <field reporter:label="Hold/Copy Ratio Everywhere" name="everywhere_ratio" reporter:datatype="float"/>
12396                 </fields>
12397                 <links>
12398                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
12399                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
12400                 </links>
12401                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12402                         <actions>
12403                                 <retrieve/>
12404                         </actions>
12405                 </permacrud>
12406         </class>
12407
12408         <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) ">
12409                 <oils_persist:source_definition><![CDATA[
12410             WITH counts_at_ou AS (
12411                 SELECT  rhrr.bib_record AS id,
12412                         aou.id AS pickup_lib_or_desc,
12413                         COUNT(DISTINCT ahr.id) AS holds_at_or_below,
12414                         COALESCE(COUNT(DISTINCT ac.id),0) AS copy_count_at_or_below
12415                   FROM  actor.org_unit aou
12416                         JOIN actor.org_unit_type aout ON (aou.ou_type = aout.id),
12417                         action.hold_request ahr
12418                         JOIN reporter.hold_request_record rhrr USING (id)
12419                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
12420                         LEFT JOIN asset.copy ac ON (ahcm.target_copy = ac.id)
12421                   WHERE ahr.cancel_time IS NULL AND ahr.fulfillment_time IS NULL
12422                         AND ac.circ_lib IN (SELECT id FROM actor.org_unit_descendants(aou.id))
12423                         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
12424                   GROUP BY 1, 2
12425             )
12426             SELECT x.id, x.pickup_lib_or_desc, x.holds_at_or_below, x.copy_count_at_or_below,
12427                    y.holds_everywhere, y.copy_count_everywhere,
12428                 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,
12429                 CASE WHEN copy_count_everywhere = 0 THEN 'Infinity'::FLOAT ELSE y.holds_everywhere::FLOAT/y.copy_count_everywhere END AS everywhere_ratio
12430             FROM counts_at_ou x
12431                 JOIN (SELECT bib_record AS id, count(DISTINCT ahr.id) AS holds_everywhere, COALESCE(count(DISTINCT target_copy),0) as copy_count_everywhere
12432                     FROM
12433                         action.hold_request ahr
12434                         JOIN reporter.hold_request_record rhrr USING (id)
12435                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
12436                     WHERE
12437                         ahr.cancel_time IS NULL
12438                         AND ahr.fulfillment_time IS NULL
12439                     GROUP BY bib_record
12440                 )y
12441                 USING (id)
12442                 ]]></oils_persist:source_definition>
12443                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
12444                         <field reporter:label="Record ID" name="id" reporter:datatype="link"/>
12445                         <field reporter:label="Pickup Library" name="pickup_lib_or_desc" reporter:datatype="org_unit"/>
12446                         <field reporter:label="Active Holds at Pickup Library and its Descendants" name="holds_at_or_below" reporter:datatype="int"/>
12447                         <field reporter:label="Holdable Copy Count at Pickup Library and its Descendants" name="copy_count_at_or_below" reporter:datatype="int"/>
12448                         <field reporter:label="Active Holds Everywhere" name="holds_everywhere" reporter:datatype="int"/>
12449                         <field reporter:label="Holdable Copy Count Everywhere" name="copy_count_everywhere" reporter:datatype="int"/>
12450                         <field reporter:label="Hold/Copy Ratio at Pickup Library and its Descendants" name="hold_copy_ratio_at_or_below_ou" reporter:datatype="float"/>
12451                         <field reporter:label="Hold/Copy Ratio Everywhere" name="everywhere_ratio" reporter:datatype="float"/>
12452                 </fields>
12453                 <links>
12454                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
12455                         <link field="pickup_lib_or_desc" reltype="has_a" key="id" map="" class="aou"/>
12456                 </links>
12457                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12458                         <actions>
12459                                 <retrieve/>
12460                         </actions>
12461                 </permacrud>
12462         </class>
12463
12464         <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">
12465                 <oils_persist:source_definition><![CDATA[
12466             SELECT
12467                 ac.id,
12468                 COALESCE(MAX(actac.xact_start), ac.create_date) AS last_circ_or_create,
12469                 MAX(actac.xact_start) AS last_circ
12470             FROM asset.copy ac
12471                  LEFT JOIN action.all_circulation actac ON ac.id = actac.target_copy
12472             GROUP BY ac.id
12473
12474             -- Alternate version, say if you have migrated last checkout information in extend_reporter.legacy_circ_timestamp:
12475             --SELECT
12476             --    ac.id,
12477             --    GREATEST(MAX(actac.xact_start), erlct.last_cko_ts, ac.create_date) AS last_circ_or_create,
12478             --    GREATEST(MAX(actac.xact_start), erlct.last_cko_ts) AS last_circ
12479             --FROM asset.copy ac
12480             --     LEFT JOIN action.all_circulation actac ON ac.id = actac.target_copy
12481             --     LEFT JOIN extend_reporter.legacy_circ_timestamp erlct ON ac.id = erlct.id
12482             --GROUP BY ac.id, ac.create_date, erlct.last_cko_ts
12483                 ]]></oils_persist:source_definition>
12484                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
12485                         <field reporter:label="Copy ID" name="id" reporter:datatype="link"/>
12486                         <field reporter:label="Last Circulation or Creation Date" name="last_circ_or_create" reporter:datatype="timestamp"/>
12487                         <field reporter:label="Last Circulation Date" name="last_circ" reporter:datatype="timestamp"/>
12488                 </fields>
12489                 <links>
12490                         <link field="id" reltype="has_a" key="id" map="" class="acp"/>
12491                 </links>
12492                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12493                         <actions>
12494                                 <retrieve/>
12495                         </actions>
12496                 </permacrud>
12497         </class>
12498
12499         <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">
12500                 <fields oils_persist:primary="id">
12501                         <field reporter:label="Text Search Config" reporter:selector="name" reporter:datatype="text" name="id"/>
12502                         <field reporter:label="Text Search Config Name" reporter:datatype="text" name="name"/>
12503                 </fields>
12504                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12505                         <actions>
12506                                 <retrieve/>
12507                         </actions>
12508                 </permacrud>
12509         </class>
12510
12511         <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">
12512                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_class_ts_map_id_seq">
12513                         <field reporter:label="Map ID" reporter:datatype="id" name="id"/>
12514                         <field reporter:label="Metabib Class" reporter:datatype="text" name="field_class"/>
12515                         <field reporter:label="Text Search Config" reporter:datatype="text" name="ts_config"/>
12516                         <field reporter:label="Active?" reporter:datatype="bool" name="active"/>
12517                         <field reporter:label="Index Weight" reporter:datatype="text" name="index_weight"/>
12518                         <field reporter:label="Index Language" reporter:datatype="text" name="index_lang"/>
12519                         <field reporter:label="Search Language" reporter:datatype="text" name="search_lang"/>
12520                         <field reporter:label="Always Apply?" reporter:datatype="bool" name="always"/>
12521                 </fields>
12522                 <links>
12523                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
12524                         <link field="ts_config" reltype="has_a" key="id" map="" class="ctcl"/>
12525                 </links>
12526                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12527                         <actions>
12528                                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
12529                                 <retrieve/>
12530                                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
12531                                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
12532                         </actions>
12533                 </permacrud>
12534         </class>
12535
12536         <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">
12537                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_ts_map_id_seq">
12538                         <field reporter:label="Map ID" reporter:datatype="id" name="id"/>
12539                         <field reporter:label="Metabib Field" reporter:datatype="text" name="metabib_field"/>
12540                         <field reporter:label="Text Search Config" reporter:datatype="text" name="ts_config"/>
12541                         <field reporter:label="Active?" reporter:datatype="bool" name="active"/>
12542                         <field reporter:label="Index Weight" reporter:datatype="text" name="index_weight"/>
12543                         <field reporter:label="Index Language" reporter:datatype="text" name="index_lang"/>
12544                         <field reporter:label="Search Language" reporter:datatype="text" name="search_lang"/>
12545                 </fields>
12546                 <links>
12547                         <link field="metabib_field" reltype="has_a" key="id" map="" class="cmf"/>
12548                         <link field="ts_config" reltype="has_a" key="id" map="" class="ctcl"/>
12549                 </links>
12550                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12551                         <actions>
12552                                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
12553                                 <retrieve/>
12554                                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
12555                                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
12556                         </actions>
12557                 </permacrud>
12558         </class>
12559
12560
12561         <!-- ********************************************************************************************************************* -->
12562         <!-- What follows is a set of example extensions that are useful for PINES.  Comment out or remove if you don't want them. -->
12563         <!-- ********************************************************************************************************************* -->
12564         <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">
12565                 <fields oils_persist:primary="id">
12566                         <field reporter:label="Circulation" name="id" reporter:datatype="id" />
12567                         <field reporter:label="Library Circulation Location Short (Policy) Name" name="circ_lib" reporter:datatype="text"/>
12568                         <field reporter:label="Library Circulation Location Link" name="circ_lib_id" reporter:datatype="org_unit"/>
12569                         <field reporter:label="Circulation Date/Time" name="xact_start" reporter:datatype="timestamp"/>
12570                         <field reporter:label="Circulation Type" name="circ_type" reporter:datatype="text"/>
12571                         <field reporter:label="Copy Link" name="copy_id" reporter:datatype="link"/>
12572                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
12573                         <field reporter:label="Owning Library Short (Policy) Name" name="owning_lib_name" reporter:datatype="text"/>
12574                         <field reporter:label="Item Language" name="language" reporter:datatype="text"/>
12575                         <field reporter:label="Literary Form" name="lit_form" reporter:datatype="text"/>
12576                         <field reporter:label="MARC Form" name="item_form" reporter:datatype="text"/>
12577                         <field reporter:label="MARC Type" name="item_type" reporter:datatype="text"/>
12578                         <field reporter:label="Shelving Location" name="shelving_location" reporter:datatype="text"/>
12579                         <field reporter:label="Patron Profile Group" name="profile_group" reporter:datatype="text"/>
12580                         <field reporter:label="Patron Age Demographic" name="demographic_general_division" reporter:datatype="text"/>
12581                         <field reporter:label="Call Number Link" name="call_number" reporter:datatype="link"/>
12582                         <field reporter:label="Call Number Label" name="call_number_label" reporter:datatype="text"/>
12583                         <field reporter:label="Call Number Dewey/Prefix" name="dewey" reporter:datatype="text"/>
12584                         <field reporter:label="Patron Link" name="patron_id" reporter:datatype="link"/>
12585                         <field reporter:label="Patron Home Library Link" name="patron_home_lib" reporter:datatype="link"/>
12586                         <field reporter:label="Patron Home Library Short (Policy) Name" name="patron_home_lib_shortname" reporter:datatype="text"/>
12587                         <field reporter:label="Patron County" name="patron_county" reporter:datatype="text"/>
12588                         <field reporter:label="Patron City" name="patron_city" reporter:datatype="text"/>
12589                         <field reporter:label="Patron ZIP Code" name="patron_zip" reporter:datatype="text"/>
12590                         <field reporter:label="Legacy CAT1 Link" name="stat_cat_1" reporter:datatype="link"/>
12591                         <field reporter:label="Legacy CAT2 Link" name="stat_cat_2" reporter:datatype="link"/>
12592                         <field reporter:label="Dewey Range - Tens" name="dewey_range_tens" reporter:datatype="text"/>
12593                         <field reporter:label="Dewey Range - Hundreds" name="dewey_range_hundreds" reporter:datatype="text"/>
12594                         <field reporter:label="Dewey Block - Tens" name="dewey_block_tens" reporter:datatype="text"/>
12595                         <field reporter:label="Dewey Block - Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
12596                         <field reporter:label="Legacy CAT1 Value" name="stat_cat_1_value" reporter:datatype="text"/>
12597                         <field reporter:label="Legacy CAT2 Value" name="stat_cat_2_value" reporter:datatype="text"/>
12598                 </fields>
12599                 <links>
12600                         <link field="id" reltype="has_a" key="id" map="" class="circ"/>
12601                         <link field="copy_id" reltype="has_a" key="id" map="" class="acp"/>
12602                         <link field="patron_id" reltype="has_a" key="id" map="" class="au"/>
12603                         <link field="circ_lib_id" reltype="has_a" key="id" map="" class="aou"/>
12604                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
12605                         <link field="patron_home_lib" reltype="has_a" key="id" map="" class="aou"/>
12606                         <link field="stat_cat_1" reltype="has_a" key="id" map="" class="rsce1"/>
12607                         <link field="stat_cat_2" reltype="has_a" key="id" map="" class="rsce2"/>
12608                 </links>
12609         </class>
12610
12611         <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">
12612                 <fields oils_persist:primary="id">
12613                         <field reporter:label="Entry ID" name="id" reporter:selector="value" reporter:datatype="id" />
12614                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
12615                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
12616                 </fields>
12617                 <links>
12618                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
12619                 </links>
12620         </class>
12621
12622         <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">
12623                 <fields oils_persist:primary="id">
12624                         <field reporter:label="Entry ID" name="id" reporter:selector="value" reporter:datatype="id" />
12625                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
12626                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
12627                 </fields>
12628                 <links>
12629                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
12630                 </links>
12631         </class>
12632
12633         <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">
12634                 <fields oils_persist:primary="id">
12635                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
12636
12637                         <field reporter:label="Billing Location Short (Policy) Name" name="billing_location_shortname" reporter:datatype="text"/>
12638                         <field reporter:label="Billing Location Name" name="billing_location_name" reporter:datatype="text"/>
12639                         <field reporter:label="Billing Location Link" name="billing_location" reporter:datatype="org_unit"/>
12640
12641                         <field reporter:label="User Home Library Short (Policy) Name" name="usr_home_ou_shortname" reporter:datatype="text"/>
12642                         <field reporter:label="User Home Library Name" name="usr_home_ou_name" reporter:datatype="text"/>
12643                         <field reporter:label="User Home Library Link" name="usr_home_ou" reporter:datatype="org_unit"/>
12644
12645                         <field reporter:label="User Barcode" name="barcode" reporter:datatype="text"/>
12646                         <field reporter:label="User Link" name="usr" reporter:datatype="link"/>
12647
12648                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
12649                         <field reporter:label="Transaction End Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
12650                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
12651
12652                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
12653                         <field reporter:label="Total Billed" name="total_owed" reporter:datatype="money"/>
12654
12655                         <field reporter:label="Last Payment Date/Time" name="last_payment_ts" reporter:datatype="timestamp"/>
12656                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
12657                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
12658
12659                         <field reporter:label="Last Billing Date/Time" name="last_billing_ts" reporter:datatype="timestamp"/>
12660                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
12661                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
12662
12663                         <field reporter:label="User Age Demographic" name="demographic_general_division" reporter:datatype="text"/>
12664                         <field reporter:label="User County" name="patron_county" reporter:datatype="text"/>
12665                         <field reporter:label="User City" name="patron_city" reporter:datatype="text"/>
12666                         <field reporter:label="User ZIP Code" name="patron_zip" reporter:datatype="text"/>
12667
12668                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
12669                         <field reporter:label="User Profile Group" name="profile_group" reporter:datatype="text"/>
12670
12671                 </fields>
12672                 <links>
12673                         <link field="id" reltype="has_a" key="id" map="" class="mbt"/>
12674                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
12675                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
12676                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
12677                 </links>
12678         </class>
12679
12680         <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">
12681                 <oils_persist:source_definition><![CDATA[
12682
12683             SELECT
12684                 po.ordering_agency AS ordering_agency,
12685                 po.id AS purchase_order,
12686                 li.id AS lineitem,
12687                 lid.id AS lineitem_detail,
12688                 cpa.id AS claim_policy_action
12689             FROM
12690                 acq.lineitem_detail lid
12691                 JOIN acq.lineitem li ON (li.id = lid.lineitem)
12692                 JOIN acq.purchase_order po ON (po.id = li.purchase_order)
12693                 JOIN acq.claim_policy cp ON (li.claim_policy = cp.id)
12694                 JOIN acq.claim_policy_action cpa ON (
12695                     cpa.claim_policy = cp.id
12696
12697                     -- we only care about claim policy actions whose claim
12698                     -- interval we'd reached or exceeded
12699                     AND (NOW() - cpa.action_interval) > po.order_date
12700
12701                     -- filter out all claim policy actions where claim events
12702                     -- have occurred on or after the action's action_interval
12703                     AND NOT EXISTS (
12704                         SELECT 1
12705                         FROM
12706                             acq.claim_event evt
12707                             JOIN acq.claim claim ON (
12708                                 claim.id = evt.claim
12709                                 AND claim.lineitem_detail = lid.id
12710                             )
12711                         WHERE
12712                             evt.event_date >= (po.order_date + cpa.action_interval)
12713                     )
12714                 )
12715             WHERE
12716                 lid.cancel_reason IS NULL
12717                 AND li.cancel_reason IS NULL -- belt/suspenders
12718                 AND po.cancel_reason IS NULL -- belt/suspenders
12719                 AND lid.recv_time IS NULL
12720                 AND po.state = 'on-order'
12721             ORDER BY 1, 2, 3, 4, 5
12722
12723                 ]]></oils_persist:source_definition>
12724                 <fields>
12725                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="link"/>
12726                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
12727                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
12728                         <field reporter:label="Lineitem Detail" name="lineitem_detail" reporter:datatype="link"/>
12729                         <field reporter:label="Claim Policy Action" name="claim_policy_action" reporter:datatype="link"/>
12730                 </fields>
12731                 <links>
12732                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
12733                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
12734                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
12735                         <link field="lineitem_detail" reltype="has_a" key="id" map="" class="acqlid"/>
12736                         <link field="claim_policy_action" reltype="has_a" key="id" map="" class="acqclpa"/>
12737                 </links>
12738         </class>
12739         <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">
12740                 <fields oils_persist:primary="lineitem" oils_persist:sequence="acq.lineitem_id_seq">
12741                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
12742                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
12743                         <field reporter:label="Receive Count" name="recv_count" reporter:datatype="int"/>
12744                         <field reporter:label="Cancel Count" name="cancel_count" reporter:datatype="int"/>
12745                         <field reporter:label="Delay Count" name="delay_count" reporter:datatype="int"/>
12746                         <field reporter:label="Invoice Count" name="invoice_count" reporter:datatype="int"/>
12747                         <field reporter:label="Claim Count" name="claim_count" reporter:datatype="int"/>
12748                         <field reporter:label="Estimated Amount" name="estimated_amount" reporter:datatype="money"/>
12749                         <field reporter:label="Encumbrance Amount" name="encumbrance_amount" reporter:datatype="money"/>
12750                         <field reporter:label="Paid Amount" name="paid_amount" reporter:datatype="money"/>
12751                 </fields>
12752                 <links>
12753                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
12754                 </links>
12755     </class>
12756         <class id="acqlisumi" controller="open-ils.cstore" oils_obj:fieldmapper="acq::lineitem_summary_invoiceable" oils_persist:readonly="true" reporter:label="Invoiceable Lineitem Summary">
12757                 <oils_persist:source_definition><![CDATA[
12758             SELECT * FROM acq.lineitem_summary 
12759                                 WHERE item_count > (invoice_count + cancel_count)
12760         ]]></oils_persist:source_definition>
12761                 <fields oils_persist:primary="lineitem" oils_persist:sequence="acq.lineitem_id_seq">
12762                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
12763                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
12764                         <field reporter:label="Receive Count" name="recv_count" reporter:datatype="int"/>
12765                         <field reporter:label="Cancel Count" name="cancel_count" reporter:datatype="int"/>
12766                         <field reporter:label="Delay Count" name="delay_count" reporter:datatype="int"/>
12767                         <field reporter:label="Invoice Count" name="invoice_count" reporter:datatype="int"/>
12768                         <field reporter:label="Claim Count" name="claim_count" reporter:datatype="int"/>
12769                         <field reporter:label="Estimated Amount" name="estimated_amount" reporter:datatype="money"/>
12770                         <field reporter:label="Encumbrance Amount" name="encumbrance_amount" reporter:datatype="money"/>
12771                         <field reporter:label="Paid Amount" name="paid_amount" reporter:datatype="money"/>
12772                 </fields>
12773                 <links>
12774                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
12775                 </links>
12776     </class>
12777         <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">
12778                 <oils_persist:source_definition><![CDATA[
12779
12780                         SELECT  t.*
12781                           FROM  action.transit_copy t
12782                                 JOIN actor.org_unit AS s ON (t.source = s.id)
12783                                 JOIN actor.org_unit AS d ON (t.dest = d.id)
12784                           WHERE s.parent_ou <> d.parent_ou
12785
12786                 ]]></oils_persist:source_definition>
12787                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
12788                         <field reporter:label="Pretransit Copy Status" name="copy_status" reporter:datatype="link"/>
12789                         <field reporter:label="Destination" name="dest" reporter:datatype="link"/>
12790                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
12791                         <field reporter:label="Transit ID" name="id" reporter:datatype="id"/>
12792                         <field reporter:label="Is Persistent? (unused)" name="persistant_transfer" reporter:datatype="bool"/>
12793                         <field reporter:label="Previous Hop (unused)" name="prev_hop" reporter:datatype="link"/>
12794                         <field reporter:label="Source" name="source" reporter:datatype="link"/>
12795                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
12796                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
12797                         <field reporter:label="Hold Transit" name="hold_transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
12798                         <field reporter:label="Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
12799                 </fields>
12800                 <links>
12801                         <link field="hold_transit_copy" reltype="might_have" key="id" map="" class="ahtc"/>
12802                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
12803                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
12804                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
12805                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
12806                         <link field="prev_hop" reltype="has_a" key="id" map="" class="atc"/>
12807                 </links>
12808         </class>
12809
12810     <class id="circbyyr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::circ_counts_by_year" oils_persist:readonly="true">
12811                 <oils_persist:source_definition><![CDATA[
12812
12813         SELECT copy, SUM(count) AS count, year, is_renewal FROM (
12814                 SELECT
12815                         cp.id as copy,
12816                         COUNT(circ.id),
12817                         EXTRACT(YEAR FROM circ.xact_start) AS year,
12818                         (phone_renewal OR desk_renewal OR opac_renewal OR auto_renewal) as is_renewal
12819                 FROM
12820                         asset.copy cp
12821                                 JOIN action.circulation circ ON (cp.id = circ.target_copy)
12822                 GROUP BY 1, 3, 4
12823                 UNION ALL
12824                 SELECT
12825                         cp.id as copy,
12826                         COUNT(circ.id),
12827                         EXTRACT(YEAR FROM circ.xact_start) AS year,
12828                         (phone_renewal OR desk_renewal OR opac_renewal OR auto_renewal) as is_renewal
12829                 FROM
12830                         asset.copy cp
12831                                 JOIN action.aged_circulation circ ON (cp.id = circ.target_copy)
12832                 GROUP BY 1, 3, 4
12833                 UNION ALL
12834                 SELECT
12835                         id as copy,
12836                         circ_count,
12837                         -1 AS year,
12838                         false as is_renewal
12839                 FROM
12840                         extend_reporter.legacy_circ_count
12841         )x GROUP BY 1, 3, 4
12842
12843                 ]]></oils_persist:source_definition>
12844         <fields>
12845             <field reporter:label="Copy ID" name="copy" reporter:datatype="link"/>
12846             <field reporter:label="Count" name="count" reporter:datatype="int"/>
12847             <field reporter:label="Year" name="year" reporter:datatype="int"/>
12848             <field reporter:label="Renewal" name="is_renewal" reporter:datatype="bool"/>
12849         </fields>
12850                 <links>
12851                         <link field="copy" reltype="has_a" key="id" map="" class="acp"/>
12852                 </links>
12853                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12854                         <actions>
12855                                 <retrieve/>
12856                         </actions>
12857                 </permacrud>
12858     </class>
12859
12860         <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">
12861                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
12862                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
12863                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
12864                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
12865                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
12866                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
12867                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
12868                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
12869                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
12870                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
12871                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
12872                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
12873                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
12874                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
12875                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
12876                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
12877                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
12878                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
12879                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
12880                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
12881                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
12882                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
12883                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
12884                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
12885                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
12886                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
12887                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
12888                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
12889                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="link"/>
12890                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="link"/>
12891                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="link"/>
12892                         <field reporter:label="Auto Renewal" name="auto_renewal" reporter:datatype="bool"/>
12893                         <field reporter:label="Remaining Auto Renewals" name="auto_renewal_remaining" reporter:datatype="int" />
12894                 </fields>
12895                 <links>
12896                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
12897                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
12898                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
12899                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
12900                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
12901                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
12902                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
12903                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
12904                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
12905                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
12906                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
12907                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
12908                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
12909                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
12910                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
12911                 </links>
12912         </class>
12913
12914     <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">
12915         <fields oils_persist:primary="id">
12916             <field reporter:label="Title" name="title" reporter:datatype="text"/>
12917             <field reporter:label="Author" name="author" reporter:datatype="text"/>
12918             <field reporter:label="Pubdate" name="pubdate" reporter:datatype="text"/>
12919             <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
12920             <field reporter:label="Price" name="price" reporter:datatype="money"/>
12921             <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
12922             <field reporter:label="Callnumber Label" name="call_number_label" reporter:datatype="text"/>
12923             <field reporter:label="Dewy Tens" name="dewey_block_tens" reporter:datatype="text"/>
12924             <field reporter:label="Dewy Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
12925             <field reporter:label="Use Count" name="use_count" reporter:datatype="int"/>
12926             <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
12927             <field reporter:label="Shelving Location Name" name="shelving_location" reporter:datatype="text"/>
12928             <field reporter:label="Legacy Stat Cat 1" name="stat_cat_1" reporter:datatype="link"/>
12929             <field reporter:label="Legacy Stat Cat 2" name="stat_cat_2" reporter:datatype="link"/>
12930             <field reporter:label="Legacy Stat Cat 1 Value" name="stat_cat_1_value" reporter:datatype="text"/>
12931             <field reporter:label="Legacy Stat Cat 2 Value" name="stat_cat_2_value" reporter:datatype="text"/>
12932             <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
12933             <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
12934             <field reporter:label="Owning Lib Name" name="owning_lib_name" reporter:datatype="text"/>
12935             <field reporter:label="Circ Lib Name" name="circ_lib_name" reporter:datatype="text"/>
12936             <field reporter:label="Owning Lib" name="owning_lib" reporter:datatype="link"/>
12937             <field reporter:label="Circ Lib" name="circ_lib" reporter:datatype="link"/>
12938             <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
12939             <field reporter:label="Age Protection" name="age_protect" reporter:datatype="link"/>
12940             <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
12941             <field reporter:label="Reference" name="ref" reporter:datatype="bool"/>
12942             <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="text"/>
12943             <field reporter:label="Deleted" name="deleted" reporter:datatype="bool"/>
12944             <field reporter:label="TCN" name="tcn_value" reporter:datatype="text"/>
12945             <field reporter:label="Status" name="status" reporter:datatype="link"/>
12946             <field reporter:label="Stop Fines Reason" name="stop_fines" reporter:datatype="text"/>
12947             <field reporter:label="Due Date" name="due_date" reporter:datatype="timestamp"/>
12948             <field reporter:label="Patron Barcode" name="patron_barcode" reporter:datatype="text"/>
12949             <field reporter:label="Patron Name" name="patron_name" reporter:datatype="text"/>
12950         </fields>
12951         <links>
12952             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
12953             <link field="id" reltype="has_a" key="id" map="" class="acp"/>
12954             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
12955             <link field="creator" reltype="has_a" key="id" map="" class="au"/>
12956             <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
12957             <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
12958             <link field="stat_cat_1" reltype="might_have" key="id" map="" class="rsce1"/>
12959             <link field="stat_cat_2" reltype="might_have" key="id" map="" class="rsce2"/>
12960         </links>
12961     </class>
12962
12963     <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">
12964         <fields oils_persist:primary="id">
12965             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
12966             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
12967             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
12968             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
12969         </fields>
12970         <links>
12971             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
12972             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
12973         </links>
12974     </class>
12975
12976     <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">
12977         <fields oils_persist:primary="owning_lib">
12978             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
12979             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
12980             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
12981         </fields>
12982         <links>
12983             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
12984         </links>
12985     </class>
12986
12987     <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">
12988         <fields oils_persist:primary="id">
12989             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
12990             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
12991             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
12992             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
12993             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
12994         </fields>
12995         <links>
12996             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
12997             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
12998             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
12999         </links>
13000     </class>
13001
13002     <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">
13003         <fields oils_persist:primary="circ_lib">
13004             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
13005             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
13006             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
13007             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
13008         </fields>
13009         <links>
13010             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
13011             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
13012         </links>
13013     </class>
13014
13015     <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">
13016         <fields oils_persist:primary="id">
13017             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
13018             <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
13019             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
13020             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
13021             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
13022         </fields>
13023         <links>
13024             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
13025             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
13026             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
13027         </links>
13028     </class>
13029
13030     <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">
13031         <fields oils_persist:primary="home_ou">
13032             <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
13033             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
13034             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
13035             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
13036         </fields>
13037         <links>
13038             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
13039             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
13040         </links>
13041     </class>
13042         <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">
13043                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_id_seq">
13044                         <field reporter:label="Fund Tag ID" name="id" reporter:datatype="id"/>
13045                         <field reporter:label="Fund Tag Owner" name="owner" reporter:datatype="org_unit" oils_obj:required="true"/>
13046                         <field reporter:label="Fund Tag Name" name="name" reporter:datatype="text" oils_obj:required="true"/>
13047                         <field reporter:label="Map Entries" name="map_entries" oils_persist:virtual="true" reporter:datatype="link"/>
13048                 </fields>
13049                 <links>
13050                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
13051                         <link field="map_entries" reltype="has_many" key="fund" map="" class="acqftm"/>
13052                 </links>
13053                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
13054                         <actions>
13055                                 <create permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
13056                                 <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="owner"/>
13057                                 <update permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
13058                         <delete permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
13059                         </actions>
13060                 </permacrud>
13061         </class>
13062         <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">
13063                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_map_id_seq">
13064                         <field reporter:label="Map Entry ID" name="id" reporter:datatype="id"/>
13065                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link"/>
13066                         <field reporter:label="Tag ID" name="tag" reporter:datatype="link"/>
13067                 </fields>
13068                 <links>
13069                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
13070                         <link field="tag" reltype="has_a" key="id" map="" class="acqft"/>
13071                         </links>
13072                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
13073                 <actions>
13074                                 <create permission="ADMIN_ACQ_FUND_TAG">
13075                                         <context link="tag" field="owner"/>
13076                                 </create>
13077                                 <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
13078                                         <context link="tag" field="owner"/>
13079                                 </retrieve>
13080                                 <update permission="ADMIN_ACQ_FUND_TAG">
13081                                         <context link="tag" field="owner"/>
13082                                 </update>
13083                                 <delete permission="ADMIN_ACQ_FUND_TAG">
13084                                         <context link="tag" field="owner"/>
13085                                 </delete>
13086                         </actions>
13087                 </permacrud>
13088         </class>
13089         <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">
13090                 <oils_persist:source_definition><![CDATA[
13091                 SELECT
13092                         poi.purchase_order AS purchase_order,
13093                         ii.invoice AS invoice,
13094                         NULL AS lineitem,
13095                         poi.id AS po_item,
13096                         NULL AS picklist
13097                 FROM
13098                         acq.po_item poi
13099                         JOIN acq.invoice_item ii ON (ii.po_item = poi.id)
13100                 UNION SELECT
13101                         jub.purchase_order AS purchase_order,
13102                         ie.invoice AS invoice,
13103                         jub.id AS lineitem,
13104                         NULL AS po_item,
13105                         jub.picklist AS picklist
13106                 FROM
13107                         acq.lineitem jub
13108                         JOIN acq.invoice_entry ie ON (ie.lineitem = jub.id)
13109                 UNION SELECT
13110                         ii.purchase_order AS purchase_order,
13111                         ii.invoice AS invoice,
13112                         NULL AS lineitem,
13113                         NULL AS po_item,
13114                         NULL AS picklist
13115                 FROM
13116                         acq.invoice_item ii
13117                 WHERE ii.po_item IS NULL
13118                 UNION SELECT
13119                         ie.purchase_order AS purchase_order,
13120                         ie.invoice AS invoice,
13121                         NULL AS lineitem,
13122                         NULL AS po_item,
13123                         NULL AS picklist
13124                 FROM
13125                         acq.invoice_entry ie
13126                 WHERE ie.lineitem IS NULL
13127                 UNION SELECT
13128                         NULL AS purchase_order,
13129                         NULL AS invoice,
13130                         jub.id AS lineitem,
13131                         NULL AS po_item,
13132                         jub.picklist AS picklist
13133                 FROM
13134                         acq.lineitem jub
13135                 WHERE jub.purchase_order IS NULL
13136                 ]]></oils_persist:source_definition>
13137                 <fields>
13138                         <field reporter:label="Purchase Order ID" name="purchase_order" reporter:datatype="link"/>
13139                         <field reporter:label="Lineitem ID" name="lineitem" reporter:datatype="link"/>
13140                         <field reporter:label="Invoice ID" name="invoice" reporter:datatype="link"/>
13141                         <field reporter:label="Purchase Order Item ID" name="po_item" reporter:datatype="link"/>
13142                         <field reporter:label="Picklist ID" name="picklist" reporter:datatype="link"/>
13143                 </fields>
13144                 <links>
13145                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo" />
13146                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub" />
13147                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv" />
13148                         <link field="po_item" reltype="has_a" key="id" map="" class="acqpoi" />
13149                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl" />
13150                 </links>
13151         </class>
13152         <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">
13153                 <fields oils_persist:primary="id" oils_persist:sequence="config.barcode_completion_id_seq">
13154                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
13155                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
13156                         <field reporter:label="Owner" name="org_unit" reporter:datatype="org_unit"/>
13157                         <field reporter:label="Prefix" name="prefix" reporter:datatype="text"/>
13158                         <field reporter:label="Suffix" name="suffix" reporter:datatype="text"/>
13159                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
13160                         <field reporter:label="Padding" name="padding" reporter:datatype="text"/>
13161                         <field reporter:label="Padding At End" name="padding_end" reporter:datatype="bool"/>
13162                         <field reporter:label="Applies to Items" name="asset" reporter:datatype="bool"/>
13163                         <field reporter:label="Applies to Users" name="actor" reporter:datatype="bool"/>
13164                 </fields>
13165                 <links>
13166                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
13167                 </links>
13168                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
13169                         <actions>
13170                                 <create permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
13171                                 <retrieve/>
13172                                 <update permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
13173                                 <delete permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
13174                         </actions>
13175                 </permacrud>
13176         </class>
13177
13178         <class id="coustl" controller="open-ils.cstore" 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">
13179                 <fields oils_persist:primary="id" oils_persist:sequence="config.org_unit_setting_type_log_id_seq">
13180                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
13181                         <field name="date_applied" reporter:datatype="timestamp"/>
13182                         <field name="org" reporter:datatype="org_unit"/>
13183                         <field name="original_value" reporter:datatype="text"/>
13184                         <field name="new_value" reporter:datatype="text"/>
13185                         <field name="field_name" reporter:datatype="link"/>
13186                 </fields>
13187                 <links>
13188                         <link field="field_name" reltype="has_a" key="name" map="" class="coust"/>
13189                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
13190                 </links>
13191         </class>
13192         <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">
13193                 <fields oils_persist:primary="id" oils_persist:sequence="action.archive_actor_stat_cat_id_seq">
13194                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
13195                         <field reporter:label="Circ" name="xact" reporter:datatype="link"/>
13196                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
13197                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
13198                 </fields>
13199                 <links>
13200                         <link field="xact" reltype="has_a" key="id" map="" class="combcirc"/>
13201                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
13202                 </links>
13203         </class>
13204         <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">
13205                 <fields oils_persist:primary="id" oils_persist:sequence="action.archive_actor_stat_cat_id_seq">
13206                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
13207                         <field reporter:label="Circ" name="xact" reporter:datatype="link"/>
13208                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
13209                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
13210                 </fields>
13211                 <links>
13212                         <link field="xact" reltype="has_a" key="id" map="" class="combcirc"/>
13213                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
13214                 </links>
13215         </class>
13216         <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">
13217                 <fields oils_persist:primary="id" oils_persist:sequence="config.floating_group_id_seq">
13218                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
13219                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_obj:required="true"/>
13220                         <field reporter:label="Manual" name="manual" reporter:datatype="bool" oils_obj:required="true"/>
13221                         <field reporter:label="Group Members" name="members" oils_persist:virtual="true" reporter:datatype="link"/>
13222                 </fields>
13223                 <links>
13224                         <link field="members" reltype="has_many" key="floating_group" class="cfgm"/>
13225                 </links>
13226                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
13227                         <actions>
13228                                 <create permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
13229                                 <retrieve/>
13230                                 <update permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
13231                                 <delete permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
13232                         </actions>
13233                 </permacrud>
13234         </class>
13235         <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">
13236                 <fields oils_persist:primary="id" oils_persist:sequence="config.floating_group_member_id_seq">
13237                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
13238                         <field reporter:label="Floating Group" name="floating_group" reporter:datatype="link" oils_obj:required="true"/>
13239                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="link" oils_obj:required="true"/>
13240                         <field reporter:label="Stop Depth" name="stop_depth" reporter:datatype="int" oils_obj:required="true"/>
13241                         <field reporter:label="Max Depth" name="max_depth" reporter:datatype="int"/>
13242                         <field reporter:label="Exclude" name="exclude" reporter:datatype="bool" oils_obj:required="true"/>
13243                 </fields>
13244                 <links>
13245                         <link field="floating_group" reltype="has_a" key="id" class="cfg"/>
13246                         <link field="org_unit" reltype="has_a" key="id" class="aou"/>
13247                 </links>
13248                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
13249                         <actions>
13250                                 <create permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
13251                                 <retrieve/>
13252                                 <update permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
13253                                 <delete permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
13254                         </actions>
13255                 </permacrud>
13256         </class>
13257         <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">
13258                 <fields oils_persist:primary="code">
13259                         <field reporter:label="Code" name="code" reporter:selector="label" reporter:datatype="id" oils_obj:required="true"/>
13260                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_obj:required="true"/>
13261                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" oils_obj:required="true"/>
13262                 </fields>
13263                 <links>
13264                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
13265                 </links>
13266                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
13267                         <actions>
13268                                 <create permission="ADMIN_COPY_TAG_TYPES" context_field="owner"/>
13269                                 <retrieve/>
13270                                 <update permission="ADMIN_COPY_TAG_TYPES" context_field="owner"/>
13271                                 <delete permission="ADMIN_COPY_TAG_TYPES" context_field="owner"/>
13272                         </actions>
13273                 </permacrud>
13274         </class>
13275         <class id="acpt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::copy_tag" oils_persist:tablename="asset.copy_tag" reporter:label="Item Tags" oils_persist:field_safe="true">
13276                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_tag_id_seq">
13277                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
13278                         <field reporter:label="Copy Tag Type" name="tag_type" reporter:datatype="link"/>
13279                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
13280                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
13281                         <field reporter:label="Staff Note" name="staff_note" reporter:datatype="text"/>
13282                         <field reporter:label="Is OPAC Visible?" name="pub" reporter:datatype="bool"/>
13283                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" oils_obj:required="true"/>
13284                         <field reporter:label="URL" name="url" reporter:datatype="text"/>
13285                 </fields>
13286                 <links>
13287                         <link field="tag_type" reltype="has_a" key="code" map="" class="cctt"/>
13288                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
13289                 </links>
13290                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
13291                         <actions>
13292                                 <create permission="ADMIN_COPY_TAG" context_field="owner"/>
13293                                 <retrieve/>
13294                                 <update permission="ADMIN_COPY_TAG" context_field="owner"/>
13295                                 <delete permission="ADMIN_COPY_TAG" context_field="owner"/>
13296                         </actions>
13297                 </permacrud>
13298         </class>
13299         <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">
13300                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_tag_copy_map_id_seq">
13301                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
13302                         <field reporter:label="Copy" name="copy" reporter:datatype="link"/>
13303                         <field reporter:label="Tag" name="tag" reporter:datatype="link"/>
13304                 </fields>
13305                 <links>
13306                         <link field="copy" reltype="has_a" key="id" map="" class="acp"/>
13307                         <link field="tag" reltype="has_a" key="id" map="" class="acpt"/>
13308                 </links>
13309                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
13310                         <actions>
13311                                 <create permission="UPDATE_COPY">
13312                     <context link="copy" field="circ_lib"/>
13313                 </create>
13314                                 <retrieve/>
13315                                 <update permission="UPDATE_COPY">
13316                     <context link="copy" field="circ_lib"/>
13317                 </update>
13318                                 <delete permission="UPDATE_COPY">
13319                     <context link="copy" field="circ_lib"/>
13320                 </delete>
13321                         </actions>
13322                 </permacrud>
13323         </class>
13324         <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">
13325         <oils_persist:source_definition><![CDATA[
13326         SELECT ahcm.target_copy AS id,count(*) AS count
13327          FROM
13328          action.hold_request ahr,
13329          action.hold_copy_map ahcm
13330          WHERE
13331          ahr.cancel_time IS NULL AND
13332          ahr.fulfillment_time IS NULL AND
13333          ahr.capture_time IS NULL AND
13334          ahr.id = ahcm.hold
13335          GROUP BY ahcm.target_copy
13336         ]]></oils_persist:source_definition>
13337         <fields oils_persist:primary="id">
13338             <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
13339             <field reporter:label="Holds Count" name="count" reporter:datatype="text"/>
13340         </fields>
13341         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
13342             <actions>
13343                <retrieve/>
13344             </actions>
13345         </permacrud>
13346         </class>
13347
13348         <class id="cwst" controller="open-ils.cstore open-ils.pcrud"
13349                 oils_obj:fieldmapper="config::workstation_setting_type" 
13350                 oils_persist:tablename="config.workstation_setting_type" 
13351                 reporter:label="Workstation Setting Type">
13352                 <fields oils_persist:primary="name">
13353                         <field name="name" reporter:datatype="text"/>
13354                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
13355                         <field name="description" reporter:datatype="text" oils_persist:i18n="true"/>
13356                         <field name="datatype" reporter:datatype="text"/>
13357                         <field name="fm_class" reporter:datatype="text"/>
13358                         <field name="grp" reporter:datatype="link"/>
13359                 </fields>
13360                 <links>
13361                         <link field="name" reltype="has_many" key="name" map="" class="aous"/>
13362                         <link field="grp" reltype="has_a" key="name" map="" class="csg"/>
13363                 </links>
13364                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
13365                         <actions>
13366                                 <create permission="ADMIN_WORKSTATION_SETTING_TYPE" global_required="true"/>
13367                                 <retrieve/>
13368                                 <update permission="ADMIN_WORKSTATION_SETTING_TYPE" global_required="true"/>
13369                                 <delete permission="ADMIN_WORKSTATION_SETTING_TYPE" global_required="true"/>
13370                         </actions>
13371                 </permacrud>
13372         </class>
13373
13374         <!-- no pcrud access is granted for now, because it's assumed these
13375                          setting values will be applied and retrived via the API. -->
13376         <class id="awss" 
13377                 controller="open-ils.cstore"
13378                 oils_obj:fieldmapper="actor::workstation_setting" 
13379                 oils_persist:tablename="actor.workstation_setting" 
13380                 reporter:label="Workstation Setting">
13381                 <fields oils_persist:primary="id" oils_persist:sequence="actor.workstation_setting_id_seq">
13382                         <field reporter:label="Setting ID" name="id" reporter:datatype="id" />
13383                         <field reporter:label="Name" name="name" reporter:datatype="link"/>
13384                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
13385                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
13386                 </fields>
13387                 <links>
13388                         <link field="name" reltype="has_a" key="name" map="" class="cwst"/>
13389                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
13390                 </links>
13391         </class>
13392
13393         <class id="cht" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::hold_type" oils_persist:tablename="config.hold_type" reporter:label="Hold Type" oils_persist:readonly="true">
13394         <fields oils_persist:primary="id" oils_persist:sequence="config.hold_type_id_seq">
13395                 <field name="id" reporter:selector="name" reporter:datatype="id"/>
13396                 <field name="description"  reporter:datatype="text" oils_persist:i18n="true"/>
13397                 <field name="hold_type"  reporter:datatype="text" oils_persist:i18n="true"/>
13398         </fields>
13399         </class>
13400
13401         <class id="cpt" controller="open-ils.cstore open-ils.pcrud"
13402                 oils_obj:fieldmapper="config::print_template" 
13403                 oils_persist:tablename="config.print_template" 
13404                 reporter:label="Print Templates">
13405                 <fields oils_persist:primary="id" oils_persist:sequence="config.print_template_id_seq">
13406                         <field name="id" reporter:datatype="id"  reporter:selector="label"/>
13407                         <field name="name" reporter:datatype="text" oils_obj:required="true"/>
13408                         <field name="label" reporter:datatype="text" oils_obj:required="true" oils_persist:i18n="true"/>
13409                         <field reporter:label="Owner" name="owner" oils_obj:required="true" reporter:datatype="link"/>
13410                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
13411                         <field reporter:label="Locale" name="locale" reporter:datatype="link"/>
13412                         <field name="content_type" reporter:datatype="text"/>
13413                         <field name="template" reporter:datatype="text" oils_obj:required="true"/>
13414                 </fields>
13415                 <links>
13416                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
13417                         <link field="locale" reltype="has_a" key="id" map="" class="i18n_l"/>
13418                 </links>
13419                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
13420                         <actions>
13421                                 <create permission="ADMIN_PRINT_TEMPLATE" context_field="owner"/>
13422                                 <retrieve permission="STAFF_LOGIN" context_field="owner"/>
13423                                 <update permission="ADMIN_PRINT_TEMPLATE" context_field="owner"/>
13424                                 <delete permission="ADMIN_PRINT_TEMPLATE" context_field="owner"/>
13425                         </actions>
13426                 </permacrud>
13427         </class>
13428
13429         <class id="cct" 
13430                 controller="open-ils.cstore open-ils.pcrud"
13431                 oils_obj:fieldmapper="config::carousel_type" 
13432                 oils_persist:tablename="config.carousel_type" 
13433                 reporter:label="Carousel Types">
13434                 <fields oils_persist:primary="id" oils_persist:sequence="config.carousel_type_id_seq">
13435                         <field reporter:label="Carousel Type ID" reporter:selector="name" name="id" reporter:datatype="id" />
13436                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_obj:required="true" oils_obj:i18n="true"/>
13437                         <field reporter:label="Automatically Managed?" name="automatic" reporter:datatype="bool"/>
13438                         <field reporter:label="Filter By Age?" name="filter_by_age" reporter:datatype="bool"/>
13439                         <field reporter:label="Filter By Item Owning Library?" name="filter_by_copy_owning_lib" reporter:datatype="bool"/>
13440                         <field reporter:label="Filter By Item Location?" name="filter_by_copy_location" reporter:datatype="bool"/>
13441                 </fields>
13442                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
13443                         <actions>
13444                                 <create permission="ADMIN_CAROUSEL_TYPE" global_required="true"/>
13445                                 <retrieve/>
13446                                 <update permission="ADMIN_CAROUSEL_TYPE" global_required="true"/>
13447                                 <delete permission="ADMIN_CAROUSEL_TYPE" global_required="true"/>
13448                         </actions>
13449                 </permacrud>
13450         </class>
13451
13452         <class id="cc" 
13453                 controller="open-ils.cstore open-ils.pcrud"
13454                 oils_obj:fieldmapper="container::carousel" 
13455                 oils_persist:tablename="container.carousel" 
13456                 reporter:label="Carousels">
13457                 <fields oils_persist:primary="id" oils_persist:sequence="container.carousel_id_seq">
13458                         <field reporter:label="Carousel ID" name="id" reporter:datatype="id" reporter:selector="name"/>
13459                         <field reporter:label="Carousel Type" name="type" reporter:datatype="link" oils_obj:required="true"/>
13460                         <field reporter:label="Owner" name="owner" reporter:datatype="link" oils_obj:required="true"/>
13461                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_obj:required="true" oils_obj:i18n="true"/>
13462                         <field reporter:label="Bucket" name="bucket" reporter:datatype="link"/>
13463                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
13464                         <field reporter:label="Editing User" name="editor" reporter:datatype="link"/>
13465                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
13466                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
13467                         <field reporter:label="Age Limit" name="age_filter"  reporter:datatype="interval"/>
13468                         <field reporter:label="Item Libraries" name="owning_lib_filter" reporter:datatype="text" />      <!-- Actually an int[], but this is the best we can do in fm_IDL.xml -->
13469                         <field reporter:label="Shelving Locations" name="copy_location_filter" reporter:datatype="text" /> <!-- ditto -->
13470                         <field reporter:label="Last Refresh Time" name="last_refresh_time" reporter:datatype="timestamp"/>
13471                         <field reporter:label="Is Active" name="active" reporter:datatype="bool"/>
13472                         <field reporter:label="Maximum Items" name="max_items" reporter:datatype="int" oils_obj:required="true"/>
13473                 </fields>
13474                 <links>
13475                         <link field="type" reltype="has_a" key="id" map="" class="cct"/>
13476                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
13477                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
13478                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
13479                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
13480                 </links>
13481                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
13482                         <actions>
13483                                 <create permission="ADMIN_CAROUSEL" context_field="owner"/>
13484                                 <retrieve permission="ADMIN_CAROUSEL" context_field="owner"/>
13485                                 <update permission="ADMIN_CAROUSEL" context_field="owner"/>
13486                                 <delete permission="ADMIN_CAROUSEL" context_field="owner"/>
13487                         </actions>
13488                 </permacrud>
13489         </class>
13490
13491         <class id="ccou" 
13492                 controller="open-ils.cstore open-ils.pcrud"
13493                 oils_obj:fieldmapper="container::carousel_org_unit" 
13494                 oils_persist:tablename="container.carousel_org_unit" 
13495                 reporter:label="Carousels Visible at Library">
13496                 <fields oils_persist:primary="id" oils_persist:sequence="container.carousel_org_unit_id_seq">
13497                         <field reporter:label="ID" name="id" reporter:datatype="id" />
13498                         <field reporter:label="Carousel" name="carousel" reporter:datatype="link"/>
13499                         <field reporter:label="Override Name" name="override_name" reporter:datatype="text"/>
13500                         <field reporter:label="Library" name="org_unit" reporter:datatype="link"/>
13501                         <field reporter:label="Sequence Number" name="seq" reporter:datatype="int"/>
13502                 </fields>
13503                 <links>
13504                         <link field="carousel" reltype="has_a" key="id" map="" class="cc"/>
13505                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
13506                 </links>
13507                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
13508                         <actions>
13509                                 <create permission="ADMIN_CAROUSEL">
13510                                     <context link="carousel" field="owner" />
13511                                 </create>
13512                                 <retrieve permission="ADMIN_CAROUSEL">
13513                                     <context link="carousel" field="owner" />
13514                                 </retrieve>
13515                                 <update permission="ADMIN_CAROUSEL">
13516                                     <context link="carousel" field="owner" />
13517                                 </update>
13518                                 <delete permission="ADMIN_CAROUSEL">
13519                                     <context link="carousel" field="owner" />
13520                                 </delete>
13521                         </actions>
13522                 </permacrud>
13523         </class>
13524
13525         <class id="cra" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::remoteauth_profile" oils_persist:tablename="config.remoteauth_profile" reporter:label="Remote Patron Authentication Configuration Profile">
13526                 <fields oils_persist:primary="name">
13527                         <field name="name"              reporter:datatype="text"     reporter:label="Name" oils_obj:required="true"/>
13528                         <field name="description"       reporter:datatype="text"     reporter:label="Description"/>
13529                         <field name="context_org"       reporter:datatype="org_unit" reporter:label="Context Org" oils_obj:required="true"/>
13530                         <field name="enabled"           reporter:datatype="bool"     reporter:label="Enabled"/>
13531                         <field name="perm"              reporter:datatype="link"     reporter:label="Permission Required by User" oils_obj:required="true"/>
13532                         <field name="restrict_to_org"   reporter:datatype="bool"     reporter:label="Restrict by Home Library"/>
13533                         <field name="allow_inactive"    reporter:datatype="bool"     reporter:label="Allow Inactive Users"/>
13534                         <field name="allow_expired"     reporter:datatype="bool"     reporter:label="Allow Expired Users"/>
13535                         <field name="block_list"        reporter:datatype="text"     reporter:label="Block List"/>
13536                         <field name="usr_activity_type" reporter:datatype="link"     reporter:label="User Activity Type"/>
13537                 </fields>
13538                 <links>
13539                         <link field="context_org" reltype="has_a" key="id" map="" class="aou"/>
13540                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
13541                         <link field="usr_activity_type" reltype="has_a" key="id" map="" class="cuat"/>
13542                 </links>
13543                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
13544                         <actions>
13545                                 <create permission="ADMIN_REMOTEAUTH" context_field="context_org"/>
13546                                 <retrieve permission="STAFF_LOGIN" context_field="context_org"/>
13547                                 <update permission="ADMIN_REMOTEAUTH" context_field="context_org"/>
13548                                 <delete permission="ADMIN_REMOTEAUTH" context_field="context_org"/>
13549                         </actions>
13550                 </permacrud>
13551         </class>
13552         <class id="cgs" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::geolocation_service" oils_persist:tablename="config.geolocation_service" reporter:label="Geographic Location Service">
13553                 <fields oils_persist:primary="id" oils_persist:sequence="config.geolocation_service_id_seq">
13554                         <field name="id" reporter:selector="name" reporter:datatype="id" reporter:label="ID"/>
13555                         <field reporter:label="Active" name="active" reporter:datatype="bool" oils_obj:required="true"/>
13556                         <field reporter:label="Owner" name="owner" reporter:datatype="link" oils_obj:required="true"/>
13557                         <field name="name"  reporter:datatype="text" oils_persist:i18n="true" reporter:label="Name"/>
13558                         <field reporter:label="Service Code" name="service_code" reporter:datatype="text"/>
13559                         <field reporter:label="API Key" name="api_key" reporter:datatype="text"/>
13560                 </fields>
13561                 <links>
13562                         <link field="owner" reltype="has_a" key="id" class="aou"/>
13563                 </links>
13564                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
13565                         <actions>
13566                                 <create permission="ADMIN_GEOLOCATION_SERVICES" global_required="true"/>
13567                                 <retrieve permission="VIEW_GEOLOCATION_SERVICES" global_required="true"/>
13568                                 <update permission="ADMIN_GEOLOCATION_SERVICES" global_required="true"/>
13569                                 <delete permission="ADMIN_GEOLOCATION_SERVICES" global_required="true"/>
13570                         </actions>
13571                 </permacrud>
13572         </class>
13573
13574         <!-- ********************************************************************************************************************* -->
13575 </IDL>
13576
13577 <!--
13578     vim:noet:ts=4:sw=4:
13579 -->