]> git.evergreen-ils.org Git - working/Evergreen.git/blob - Open-ILS/examples/fm_IDL.xml
75b52a7597d5dcc1b7d6b17d16e79eaeed5ba9c5
[working/Evergreen.git] / Open-ILS / examples / fm_IDL.xml
1 <?xml version="1.0" encoding="UTF-8" ?>
2 <!--
3
4 Copyright (C) 2006-2008 Georgia Public Library Service
5 Copyright (C) 2008 Equinox Software, Inc
6 Author: Mike Rylander <miker@esilibrary.com>
7
8 This program is free software; you can redistribute it and/or
9 modify it under the terms of the GNU General Public License
10 as published by the Free Software Foundation; either version 2
11 of the License, or (at your option) any later version.
12
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16 GNU General Public License for more details.
17
18 You should have received a copy of the GNU General Public License
19 along with this program; if not, write to the Free Software
20 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
21
22 ############################
23           TEMPLATE
24 ############################
25
26     <class
27         id=""
28         controller="open-ils.cstore open-ils.pcrud"
29         oils_obj:fieldmapper=""
30         oils_persist:tablename=""
31         reporter:label=""
32         oils_persist:field_safe=""
33         oils_persist:virtual=""
34         oils_persist:readonly=""
35         reporter:core=""
36     >
37
38         <oils_persist:source_definition><![CDATA[
39             SELECT * FROM foo
40         ]]></oils_persist:source_definition>
41
42         <fields oils_persist:primary="" oils_persist:sequence="">
43             <field reporter:label="ID" name="id" reporter:datatype="id"/>
44                         <field reporter:label="" name="" reporter:datatype="org_unit"/>
45             <field reporter:label="" name="" reporter:datatype="text"/>
46             <field reporter:label="" name="" reporter:datatype="link"/>
47             <field reporter:label="" name="" reporter:datatype="timestamp"/>
48             <field reporter:label="" name="" reporter:datatype="money"/>
49             <field reporter:label="" name="" reporter:datatype="bool"/>
50             <field reporter:label="" name="" reporter:datatype="int" oils_obj:required="true"/>
51             <field reporter:label="" name="" reporter:datatype="int" oils_persist:virtual="true"/>
52         </fields>
53
54         <links>
55             <link field="" reltype="has_a" key="" map="" class=""/>
56         </links>
57
58         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
59             <actions>
60                 <create permission="" gloabl_required="true"/>
61                 <retrieve/>
62                 <update permission="" context_field=""/>
63                 <delete permission="">
64                     <context link="" field=""/>
65                 </delete>
66             </actions>
67         </permacrud>
68
69     </class>
70
71
72 -->
73
74 <IDL xmlns="http://opensrf.org/spec/IDL/base/v1" xmlns:idl="http://opensrf.org/spec/IDL/base/v1" xmlns:oils_persist="http://open-ils.org/spec/opensrf/IDL/persistence/v1" xmlns:oils_obj="http://open-ils.org/spec/opensrf/IDL/objects/v1" xmlns:reporter="http://open-ils.org/spec/opensrf/IDL/reporter/v1" xmlns:permacrud="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
75
76         <!-- Virtual classes -->
77         <class id="mups" controller="open-ils.cstore" oils_obj:fieldmapper="money::user_payment_summary" oils_persist:virtual="true" reporter:label="User Payment Summary">
78                 <fields>
79                         <field name="usr" oils_persist:virtual="true" />
80                         <field name="forgive_payment" oils_persist:virtual="true" />
81                         <field name="work_payment" oils_persist:virtual="true" />
82                         <field name="credit_payment" oils_persist:virtual="true" />
83                         <field name="goods_payment" oils_persist:virtual="true" />
84                         <field name="account_adjustment" oils_persist:virtual="true" />
85                 </fields>
86                 <links>
87                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
88                 </links>
89         </class>
90
91         <class id="mwps" controller="open-ils.cstore" oils_obj:fieldmapper="money::workstation_payment_summary" oils_persist:virtual="true" reporter:label="Workstation Payment Summary">
92                 <fields>
93                         <field name="workstation" oils_persist:virtual="true" />
94                         <field name="cash_payment" oils_persist:virtual="true" />
95                         <field name="check_payment" oils_persist:virtual="true" />
96                         <field name="credit_card_payment" oils_persist:virtual="true" />
97                 </fields>
98                 <links>
99                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
100                 </links>
101         </class>
102
103         <class id="brn" controller="open-ils.cstore" oils_obj:fieldmapper="biblio::record_node" oils_persist:virtual="true" reporter:label="Record Node">
104                 <fields>
105                         <field name="id" oils_persist:virtual="true" />
106                         <field name="children" oils_persist:virtual="true" />
107                         <field name="owner_doc" oils_persist:virtual="true" />
108                         <field name="intra_doc_id" oils_persist:virtual="true" />
109                         <field name="parent_node" oils_persist:virtual="true" />
110                         <field name="node_type" oils_persist:virtual="true" />
111                         <field name="namespace_uri" oils_persist:virtual="true" />
112                         <field name="name" oils_persist:virtual="true" />
113                         <field name="value" oils_persist:virtual="true" />
114                 </fields>
115         </class>
116
117         <class id="mvr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::virtual_record" oils_persist:virtual="true" reporter:label="Virtual Record">
118                 <fields>
119                         <field name="title" oils_persist:virtual="true" />
120                         <field name="author" oils_persist:virtual="true" />
121                         <field name="doc_id" oils_persist:virtual="true" />
122                         <field name="doc_type" oils_persist:virtual="true" />
123                         <field name="pubdate" oils_persist:virtual="true" />
124                         <field name="isbn" oils_persist:virtual="true" />
125                         <field name="publisher" oils_persist:virtual="true" />
126                         <field name="tcn" oils_persist:virtual="true" />
127                         <field name="subject" oils_persist:virtual="true" />
128                         <field name="types_of_resource" oils_persist:virtual="true" />
129                         <field name="call_numbers" oils_persist:virtual="true" />
130                         <field name="edition" oils_persist:virtual="true" />
131                         <field name="online_loc" oils_persist:virtual="true" />
132                         <field name="synopsis" oils_persist:virtual="true" />
133                         <field name="physical_description" oils_persist:virtual="true" />
134                         <field name="toc" oils_persist:virtual="true" />
135                         <field name="copy_count" oils_persist:virtual="true" />
136                         <field name="series" oils_persist:virtual="true" />
137                         <field name="serials" oils_persist:virtual="true" />
138                         <field name="foreign_copy_maps" oils_persist:virtual="true" />
139                 </fields>
140         </class>
141
142         <class id="ex" controller="open-ils.cstore" oils_obj:fieldmapper="ex" oils_persist:virtual="true">
143                 <fields>
144                         <field name="err_msg" oils_persist:virtual="true" />
145                         <field name="type" oils_persist:virtual="true" />
146                 </fields>
147         </class>
148
149         <class id="perm_ex" controller="open-ils.cstore" oils_obj:fieldmapper="perm_ex" oils_persist:virtual="true">
150                 <fields>
151                         <field name="err_msg" oils_persist:virtual="true" />
152                         <field name="type" oils_persist:virtual="true" />
153                 </fields>
154         </class>
155
156         <class id="amtr" controller="open-ils.cstore" oils_obj:fieldmapper="action::matrix_test_result" oils_persist:virtual="true" reporter:label="Matrix Test Result">
157                 <fields oils_persist:primary="matchpoint">
158                         <field reporter:label="Matchpoint ID" name="matchpoint" reporter:datatype="id"/>
159                         <field reporter:label="Success" name="success" reporter:datatype="bool"/>
160                         <field reporter:label="Failure Part" name="fail_part" reporter:datatype="text"/>
161                 </fields>
162                 <links>
163                         <link field="matchpoint" reltype="has_a" key="id" map="" class="ccmm"/>
164                 </links>
165         </class>
166
167         <class id="accs" controller="open-ils.cstore" oils_obj:fieldmapper="action::circ_chain_summary" oils_persist:virtual="true" reporter:label="Circulation Chain Summary">
168         <!-- when the time is right, turn me into a view.  -->
169                 <fields>
170             <field reporter:label="Total Circs" name="num_circs" reporter:datatype="int"/>
171             <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
172             <field reporter:label="Checkout Workstation" name="checkout_workstation" reporter:datatype="text"/>
173             <field reporter:label="Last Renewal Time" name="last_renewal_time" reporter:datatype="timestamp"/>
174             <field reporter:label="Last Stop Fines" name="last_stop_fines" reporter:datatype="text"/>
175             <field reporter:label="Last Stop Fines Time" name="last_stop_fines_time" reporter:datatype="timestamp"/>
176             <field reporter:label="Last Renewal Workstation" name="last_renewal_workstation" reporter:datatype="text"/>
177             <field reporter:label="Last Checkin Workstation" name="last_checkin_workstation" reporter:datatype="text"/>
178             <field reporter:label="Last Checkin Time" name="last_checkin_time" reporter:datatype="timestamp"/>
179             <field reporter:label="Last Checkin Scan Time" name="last_checkin_scan_time" reporter:datatype="timestamp"/>
180                 </fields>
181         </class>
182
183         <class id="rhr" oils_obj:fieldmapper="resolver::holdings_record" oils_persist:virtual="true">
184                 <fields>
185                         <field name="public_name" oils_persist:virtual="true" />
186                         <field name="target_url" oils_persist:virtual="true" />
187                         <field name="target_coverage" oils_persist:virtual="true" />
188                         <field name="target_embargo" oils_persist:virtual="true" />
189                 </fields>
190         </class>
191
192         <!-- Actually in the DB -->
193         <class id="vmp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::merge_profile" oils_persist:tablename="vandelay.merge_profile" reporter:label="Bib Import Merge Profile">
194                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.merge_profile_id_seq">
195                         <field reporter:label="Field ID" name="id" reporter:selector="name" reporter:datatype="id"/>
196                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
197                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
198                         <field reporter:label="Add Specification" name="add_spec" reporter:datatype="text"/>
199                         <field reporter:label="Replace Specification" name="replace_spec" reporter:datatype="text"/>
200                         <field reporter:label="Remove Specification" name="strip_spec" reporter:datatype="text"/>
201                         <field reporter:label="Preserve Specification" name="preserve_spec" reporter:datatype="text"/>
202                         <field reporter:label="Min. Quality Ratio" name="lwm_ratio" reporter:datatype="float"/>
203                         <field reporter:label="Update Bib. Source" name="update_bib_source" reporter:datatype="bool"/>
204                 </fields>
205                 <links>
206                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
207                 </links>
208                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
209                         <actions>
210                                 <create permission="ADMIN_MERGE_PROFILE CREATE_MERGE_PROFILE" context_field="owner"/>
211                                 <retrieve permission="ADMIN_MERGE_PROFILE CREATE_MERGE_PROFILE UPDATE_MERGE_PROFILE DELETE_MERGE_PROFILE VIEW_MERGE_PROFILE" context_field="owner"/>
212                                 <update permission="ADMIN_MERGE_PROFILE UPDATE_MERGE_PROFILE" context_field="owner"/>
213                                 <delete permission="ADMIN_MERGE_PROFILE DELETE_MERGE_PROFILE" context_field="owner"/>
214                         </actions>
215                 </permacrud>
216         </class>
217
218         <class id="vibtf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::import_bib_trash_fields" oils_persist:tablename="vandelay.import_bib_trash_fields" reporter:label="Import/Overlay Fields for Removal">
219                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.import_bib_trash_fields_id_seq">
220                         <field reporter:label="Field ID" name="id" reporter:datatype="id"/>
221                         <field reporter:label="Group" name="grp" reporter:datatype="link"/>
222                         <field reporter:label="Field" name="field" reporter:datatype="text"/>
223                 </fields>
224                 <links>
225                         <link field="grp" reltype="has_a" key="id" map="" class="vibtg"/>
226                 </links>
227                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
228                         <actions>
229                                 <create permission="CREATE_IMPORT_TRASH_FIELD">
230                     <context link="grp" field="owner"/>
231                 </create>
232                                 <retrieve/>
233                                 <update permission="UPDATE_IMPORT_TRASH_FIELD">
234                     <context link="grp" field="owner"/>
235                 </update>
236                                 <delete permission="DELETE_IMPORT_TRASH_FIELD">
237                     <context link="grp" field="owner"/>
238                 </delete>
239                         </actions>
240                 </permacrud>
241         </class>
242
243         <class  id="rrbs" 
244             controller="open-ils.cstore open-ils.pcrud" 
245             oils_obj:fieldmapper="rating::record_badge_score" 
246             oils_persist:tablename="rating.record_badge_score" 
247             reporter:label="Statistical Popularity Badge">
248                 <fields oils_persist:primary="id" 
249                 oils_persist:sequence="rating.record_badge_score_id_seq">
250                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
251                         <field reporter:label="Badge" name="badge" reporter:datatype="link"/>
252                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
253                         <field reporter:label="Score" name="score" reporter:datatype="int"/>
254                 </fields>
255         <links>
256             <link field="badge" reltype="has_a" key="id" map="" class="rb"/>
257             <link field="record" reltype="has_a" key="id" map="" class="bre"/>
258         </links>
259                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
260                         <actions>
261                                 <retrieve/>
262                         </actions>
263                 </permacrud>
264         </class>
265
266         <class  id="rp" 
267             controller="open-ils.cstore open-ils.pcrud" 
268             oils_obj:fieldmapper="rating::popularity_parameter" 
269             oils_persist:tablename="rating.popularity_parameter" 
270             reporter:label="Statistical Popularity Parameter">
271                 <fields oils_persist:primary="id" 
272                 oils_persist:sequence="rating.popularity_parameter_id_seq">
273                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
274                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
275                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
276                         <field reporter:label="Population Function" name="func" reporter:datatype="text"/>
277                         <field reporter:label="Require Horizon" name="require_horizon" reporter:datatype="bool"/>
278                         <field reporter:label="Require Percentile" name="require_percentile" reporter:datatype="bool"/>
279                         <field reporter:label="Require Importance" name="require_importance" reporter:datatype="bool"/>
280                 </fields>
281                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
282                         <actions>
283                                 <create permission="CREATE_POP_PARAMETER" global_required="true"/>
284                                 <retrieve/>
285                                 <update permission="UPDATE_POP_PARAMETER" global_required="true"/>
286                                 <delete permission="DELETE_POP_PARAMETER" global_required="true"/>
287                         </actions>
288                 </permacrud>
289         </class>
290
291         <class  id="rb" 
292             controller="open-ils.cstore open-ils.pcrud" 
293             oils_obj:fieldmapper="rating::badge" 
294             oils_persist:tablename="rating.badge" 
295             reporter:label="Statistical Popularity Badge">
296                 <fields oils_persist:primary="id" 
297                 oils_persist:sequence="rating.badge_id_seq">
298                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
299                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
300                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
301                         <field reporter:label="Scope" name="scope" reporter:datatype="org_unit"/>
302                         <field reporter:label="Weight" name="weight" reporter:datatype="int"/>
303                         <field reporter:label="Age Horizon" name="horizon_age" reporter:datatype="text"/>
304                         <field reporter:label="Importance Horizon" name="importance_age" reporter:datatype="text"/>
305                         <field reporter:label="Importance Interval" name="importance_interval" reporter:datatype="text"/>
306                         <field reporter:label="Importance Scale" name="importance_scale" reporter:datatype="text"/>
307                         <field reporter:label="Percentile" name="percentile" reporter:datatype="float"/>
308                         <field reporter:label="Attribute Filter" name="attr_filter" reporter:datatype="text"/>
309                         <field reporter:label="Circ Mod Filter" name="circ_mod_filter" reporter:datatype="link"/>
310                         <field reporter:label="Bib Source Filter" name="src_filter" reporter:datatype="link"/>
311                         <field reporter:label="Location Group Filter" name="loc_grp_filter" reporter:datatype="link"/>
312                         <field reporter:label="Recalculation Interval" name="recalc_interval" reporter:datatype="text"/>
313                         <field reporter:label="Fixed Rating" name="fixed_rating" reporter:datatype="int"/>
314                         <field reporter:label="Discard Value Count" name="discard" reporter:datatype="int"/>
315                         <field reporter:label="Last Refresh Time" name="last_calc" reporter:datatype="timestamp"/>
316                         <field reporter:label="Popularity Parameter" name="popularity_parameter" reporter:datatype="link"/>
317                 </fields>
318                 <links>
319                         <link field="scope" reltype="has_a" key="id" map="" class="aou"/>
320                         <link field="popularity_parameter" reltype="has_a" key="id" map="" class="rp"/>
321                         <link field="src_filter" reltype="has_a" key="id" map="" class="cbs"/>
322                         <link field="circ_mod_filter" reltype="has_a" key="code" map="" class="ccm"/>
323                         <link field="loc_grp_filter" reltype="has_a" key="id" map="" class="acplg"/>
324                 </links>
325                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
326                         <actions>
327                                 <create permission="CREATE_POP_BADGE" global_required="true"/>
328                                 <retrieve/>
329                                 <update permission="UPDATE_POP_BADGE" global_required="true"/>
330                                 <delete permission="DELETE_POP_BADGE" global_required="true"/>
331                         </actions>
332                 </permacrud>
333         </class>
334
335         <class  id="vibtg" 
336             controller="open-ils.cstore open-ils.pcrud" 
337             oils_obj:fieldmapper="vandelay::import_bib_trash_group" 
338             oils_persist:tablename="vandelay.import_bib_trash_group" 
339             reporter:label="Import/Overlay Field Groups for Removal">
340                 <fields oils_persist:primary="id" 
341                 oils_persist:sequence="vandelay.import_bib_trash_group_id_seq">
342                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
343                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
344                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
345                         <field reporter:label="Always Apply" name="always_apply" reporter:datatype="bool"/>
346                 </fields>
347                 <links>
348                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
349                 </links>
350                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
351                         <actions>
352                                 <create permission="CREATE_IMPORT_TRASH_FIELD" context_field="owner"/>
353                                 <retrieve/>
354                                 <update permission="UPDATE_IMPORT_TRASH_FIELD" context_field="owner"/>
355                                 <delete permission="DELETE_IMPORT_TRASH_FIELD" context_field="owner"/>
356                         </actions>
357                 </permacrud>
358         </class>
359
360
361         <class id="vii" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::import_item" oils_persist:tablename="vandelay.import_item" reporter:label="Import Item">
362                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.import_item_id_seq">
363                         <field reporter:label="Import Item ID" name="id" reporter:datatype="id"/>
364                         <field reporter:label="Import Record" name="record" reporter:datatype="link"/>
365                         <field reporter:label="Attribute Definition" name="definition" reporter:datatype="link"/>
366                         <field reporter:label="Import Error" name="import_error" reporter:datatype="link"/>
367                         <field reporter:label="Import Error Detail" name="error_detail" reporter:datatype="text"/>
368                         <field reporter:label="Final Target Copy" name="imported_as" reporter:datatype="link"/>
369                         <field reporter:label="Import Time" name="import_time" reporter:datatype="timestamp"/>
370                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="int"/>
371                         <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="int"/>
372                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
373                         <field reporter:label="Copy Number" name="copy_number" reporter:datatype="int"/>
374                         <field reporter:label="Status" name="status" reporter:datatype="int"/>
375                         <field reporter:label="Shelving Location" name="location" reporter:datatype="int"/>
376                         <field reporter:label="Circulate" name="circulate" reporter:datatype="bool"/>
377                         <field reporter:label="Deposit" name="deposit" reporter:datatype="bool"/>
378                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
379                         <field reporter:label="Reference" name="ref" reporter:datatype="bool"/>
380                         <field reporter:label="Holdable" name="holdable" reporter:datatype="bool"/>
381                         <field reporter:label="Price" name="price" reporter:datatype="money"/>
382                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
383                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="text"/>
384                         <field reporter:label="Circulate As MARC Type" name="circ_as_type" reporter:datatype="text"/>
385                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
386                         <field reporter:label="Public Note" name="pub_note" reporter:datatype="text"/>
387                         <field reporter:label="Private Note" name="priv_note" reporter:datatype="text"/>
388                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
389                         <field reporter:label="Overlay Match ID" name="internal_id" reporter:datatype="int"/>
390                         <field reporter:label="Stat Cat Data" name="stat_cat_data" reporter:datatype="text"/>
391                         <field reporter:label="Parts Data" name="parts_data" reporter:datatype="text"/>
392                 </fields>
393                 <links>
394                         <link field="import_error" reltype="has_a" key="code" map="" class="vie"/>
395                         <link field="record" reltype="has_a" key="id" map="" class="vqbr"/>
396                         <link field="definition" reltype="has_a" key="id" map="" class="viiad"/>
397                         <link field="imported_as" reltype="has_a" key="id" map="" class="acp"/>
398                 </links>
399                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
400                         <actions>
401                                 <create permission="CREATE_IMPORT_ITEM">
402                     <context link="definition" field="owner"/>
403                                 </create>
404                                 <retrieve permission="CREATE_IMPORT_ITEM UPDATE_IMPORT_ITEM DELETE_IMPORT_ITEM">
405                     <context link="definition" field="owner"/>
406                                 </retrieve>
407                                 <update permission="UPDATE_IMPORT_ITEM">
408                     <context link="definition" field="owner"/>
409                                 </update>
410                                 <delete permission="DELETE_IMPORT_ITEM">
411                     <context link="definition" field="owner"/>
412                                 </delete>
413                         </actions>
414                 </permacrud>
415         </class>
416
417         <class id="viiad" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::import_item_attr_definition" oils_persist:tablename="vandelay.import_item_attr_definition" reporter:label="Import Item Attribute Definition">
418                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.import_item_attr_definition_id_seq">
419                         <field reporter:label="Definition ID" name="id" reporter:datatype="id"/>
420                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
421                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
422                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
423                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="text"/>
424                         <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="text"/>
425                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
426                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
427                         <field reporter:label="Shelving Location" name="location" reporter:datatype="text"/>
428                         <field reporter:label="Circulate" name="circulate" reporter:datatype="text"/>
429                         <field reporter:label="Deposit" name="deposit" reporter:datatype="text"/>
430                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="text"/>
431                         <field reporter:label="Reference" name="ref" reporter:datatype="text"/>
432                         <field reporter:label="Holdable" name="holdable" reporter:datatype="text"/>
433                         <field reporter:label="Price" name="price" reporter:datatype="text"/>
434                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
435                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="text"/>
436                         <field reporter:label="Circulate As MARC Type" name="circ_as_type" reporter:datatype="text"/>
437                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
438                         <field reporter:label="Public Note" name="pub_note" reporter:datatype="text"/>
439                         <field reporter:label="Private Note" name="priv_note" reporter:datatype="text"/>
440                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="text"/>
441                         <field reporter:label="Copy Number" name="copy_number" reporter:datatype="text"/>
442                         <field reporter:label="Overlay Match ID" name="internal_id" reporter:datatype="text"/>
443                         <field reporter:label="Stat Cat Data" name="stat_cat_data" reporter:datatype="text"/>
444                         <field reporter:label="Parts Data" name="parts_data" reporter:datatype="text"/>
445                 </fields>
446                 <links>
447                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
448                 </links>
449                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
450                         <actions>
451                                 <create permission="CREATE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
452                                 <retrieve permission="CREATE_IMPORT_ITEM_ATTR_DEF UPDATE_IMPORT_ITEM_ATTR_DEF DELETE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
453                                 <update permission="UPDATE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
454                                 <delete permission="DELETE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
455                         </actions>
456                 </permacrud>
457         </class>
458
459         <class id="vbq" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::bib_queue" oils_persist:tablename="vandelay.bib_queue" reporter:label="Import/Overlay Bib Queue">
460                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queue_id_seq">
461                         <field reporter:label="Queue ID" name="id" reporter:selector="name" reporter:datatype="id"/>
462                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
463                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
464                         <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
465                         <field reporter:label="Type" name="queue_type" reporter:datatype="text"/>
466                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
467                         <field reporter:label="Item Import Attribute Definition" name="item_attr_def" reporter:datatype="link"/>
468                         <field reporter:label="Match Bucket" name="match_bucket" reporter:datatype="link"/>
469                 </fields>
470                 <links>
471                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
472                         <link field="item_attr_def" reltype="has_a" key="id" map="" class="viiad"/>
473                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
474                         <link field="match_bucket" reltype="has_a" key="id" map="" class="cbreb"/>
475                 </links>
476                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
477                         <actions>
478                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
479                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
480                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
481                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
482                         </actions>
483                 </permacrud>
484         </class>
485
486         <class id="vie" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::import_error" oils_persist:tablename="vandelay.import_error" reporter:label="Import/Overlay Error Definitions">
487                 <fields oils_persist:primary="code">
488                         <field reporter:label="Error Code" name="code" reporter:selector="description" reporter:datatype="id"/>
489                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
490                 </fields>
491                 <links>
492                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
493                         <link field="item_attr_def" reltype="has_a" key="id" map="" class="viiad"/>
494                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
495                 </links>
496                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
497                         <actions>
498                                 <retrieve/>
499                         </actions>
500                 </permacrud>
501         </class>
502
503         <class id="vqbr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::queued_bib_record" oils_persist:tablename="vandelay.queued_bib_record" reporter:label="Queued Bib Record">
504                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_record_id_seq">
505                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
506                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
507                         <field reporter:label="Import Time" name="import_time" reporter:datatype="timestamp"/>
508                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
509                         <field reporter:label="Queue" name="queue" reporter:datatype="link"/>
510                         <field reporter:label="Bib Source" name="bib_source" reporter:datatype="link"/>
511                         <field reporter:label="Final Target Record" name="imported_as" reporter:datatype="link"/>
512                         <field reporter:label="Import Error" name="import_error" reporter:datatype="link"/>
513                         <field reporter:label="Import Error Detail" name="error_detail" reporter:datatype="text"/>
514                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
515                         <field reporter:label="Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link"/>
516                         <field reporter:label="Matches" name="matches" oils_persist:virtual="true" reporter:datatype="link"/>
517                         <field reporter:label="Import Items" name="import_items" oils_persist:virtual="true" reporter:datatype="link"/>
518                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
519                 </fields>
520                 <links>
521                         <link field="import_error" reltype="has_a" key="code" map="" class="vie"/>
522                         <link field="queue" reltype="has_a" key="id" map="" class="vbq"/>
523                         <link field="bib_source" reltype="has_a" key="id" map="" class="cbs"/>
524                         <link field="imported_as" reltype="has_a" key="id" map="" class="bre"/>
525             <link field="attributes" reltype="has_many" key="record" map="" class="vqbra"/>
526             <link field="matches" reltype="has_many" key="queued_record" map="" class="vbm"/>
527             <link field="import_items" reltype="has_many" key="record" map="" class="vii"/>
528                 </links>
529                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
530                         <actions>
531                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
532                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
533                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
534                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
535                         </actions>
536                 </permacrud>
537         </class>
538
539         <class id="vqbrad" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::bib_attr_definition" oils_persist:tablename="vandelay.bib_attr_definition" reporter:label="Queued Bib Record Attribute Definition">
540                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.bib_attr_definition_id_seq">
541                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
542                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
543                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
544                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
545                         <field reporter:label="Remove RegExp" name="remove" reporter:datatype="text"/>
546                 </fields>
547                 <links/>
548                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
549                         <actions>
550                                 <create permission="CREATE_BIB_IMPORT_FIELD_DEF" global_required="true"/>
551                 <retrieve/>
552                                 <update permission="UPDATE_BIB_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
553                                 <delete permission="DELETE_BIB_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
554                         </actions>
555                 </permacrud>
556         </class>
557
558         <class id="vqbra" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::queued_bib_record_attr" oils_persist:tablename="vandelay.queued_bib_record_attr" reporter:label="Queued Bib Record Attribute">
559                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_bib_record_attr_id_seq">
560                         <field reporter:label="Attribute ID" name="id" reporter:datatype="id"/>
561                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
562                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
563                         <field reporter:label="Value" name="attr_value" reporter:datatype="text"/>
564                 </fields>
565                 <links>
566                         <link field="record" reltype="has_a" key="id" map="" class="vqbr"/>
567                         <link field="field" reltype="has_a" key="id" map="" class="vqbrad"/>
568                 </links>
569                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
570                         <actions>
571                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
572                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
573                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
574                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
575                         </actions>
576                 </permacrud>
577         </class>
578
579         <class id="vbm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::bib_match" oils_persist:tablename="vandelay.bib_match" reporter:label="Queued Bib Record Match">
580                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.bib_match_id_seq">
581                         <field reporter:label="Match ID" name="id" reporter:datatype="id"/>
582                         <field reporter:label="Queued Record" name="queued_record" reporter:datatype="link"/>
583                         <field reporter:label="Evergreen Record" name="eg_record" reporter:datatype="link"/>
584                         <field reporter:label="Quality" name="quality" reporter:datatype="text"/>
585                         <field reporter:label="Match Score" name="match_score" reporter:datatype="text"/>
586                 </fields>
587                 <links>
588                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
589                         <link field="eg_record" reltype="has_a" key="id" map="" class="bre"/>
590                 </links>
591                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
592                         <actions>
593                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
594                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
595                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
596                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
597                         </actions>
598                 </permacrud>
599         </class>
600
601         <class id="vaq" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::authority_queue" oils_persist:tablename="vandelay.authority_queue" reporter:label="Import/Overlay Authority Queue">
602                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queue_id_seq">
603                         <field reporter:label="Queue ID" name="id" reporter:selector="name" reporter:datatype="id"/>
604                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
605                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
606                         <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
607                         <field reporter:label="Type" name="queue_type" reporter:datatype="text"/>
608                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
609                 </fields>
610                 <links>
611                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
612                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
613                 </links>
614                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
615                         <actions>
616                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
617                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
618                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
619                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
620                         </actions>
621                 </permacrud>
622         </class>
623
624         <class id="vqar" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::queued_authority_record" oils_persist:tablename="vandelay.queued_authority_record" reporter:label="Queued Authority Record">
625                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_record_id_seq">
626                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
627                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
628                         <field reporter:label="Import Time" name="import_time" reporter:datatype="timestamp"/>
629                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
630                         <field reporter:label="Queue" name="queue" reporter:datatype="link"/>
631                         <field reporter:label="Final Target Record" name="imported_as" reporter:datatype="link"/>
632                         <field reporter:label="Import Error" name="import_error" reporter:datatype="link"/>
633                         <field reporter:label="Import Error Detail" name="error_detail" reporter:datatype="text"/>
634                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
635                         <field reporter:label="Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link"/>
636                         <field reporter:label="Matches" name="matches" oils_persist:virtual="true" reporter:datatype="link"/>
637                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
638                 </fields>
639                 <links>
640                         <link field="import_error" reltype="has_a" key="code" map="" class="vie"/>
641                         <link field="queue" reltype="has_a" key="id" map="" class="vaq"/>
642                         <link field="imported_as" reltype="has_a" key="id" map="" class="are"/>
643             <link field="attributes" reltype="has_many" key="record" map="" class="vqara"/>
644             <link field="matches" reltype="has_many" key="queued_record" map="" class="vam"/>
645                 </links>
646                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
647                         <actions>
648                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
649                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
650                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
651                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
652                         </actions>
653                 </permacrud>
654         </class>
655
656         <class id="vqarad" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::authority_attr_definition" oils_persist:tablename="vandelay.authority_attr_definition" reporter:label="Queued Authority Record Attribute Definition">
657                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.authority_attr_definition_id_seq">
658                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
659                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
660                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
661                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
662                         <field reporter:label="Remove RegExp" name="remove" reporter:datatype="text"/>
663                 </fields>
664                 <links/>
665                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
666                         <actions>
667                                 <create permission="CREATE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
668                 <retrieve/>
669                                 <update permission="UPDATE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
670                                 <delete permission="DELETE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
671                         </actions>
672                 </permacrud>
673         </class>
674
675         <class id="vqara" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::queued_authority_record_attr" oils_persist:tablename="vandelay.queued_authority_record_attr" reporter:label="Queued Authority Record Attribute">
676                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_authority_record_attr_id_seq">
677                         <field reporter:label="Attribute ID" name="id" reporter:datatype="id"/>
678                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
679                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
680                         <field reporter:label="Value" name="attr_value" reporter:datatype="text"/>
681                 </fields>
682                 <links>
683                         <link field="record" reltype="has_a" key="id" map="" class="vqar"/>
684                         <link field="field" reltype="has_a" key="id" map="" class="vqarad"/>
685                 </links>
686                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
687                         <actions>
688                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
689                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
690                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
691                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
692                         </actions>
693                 </permacrud>
694         </class>
695
696         <class id="vam" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::authority_match" oils_persist:tablename="vandelay.authority_match" reporter:label="Queued Authority Record Match">
697                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.authority_match_id_seq">
698                         <field reporter:label="Match ID" name="id" reporter:datatype="id"/>
699                         <field reporter:label="Queued Record" name="queued_record" reporter:datatype="link"/>
700                         <field reporter:label="Evergreen Record" name="eg_record" reporter:datatype="link"/>
701                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
702                         <field reporter:label="Match Score" name="match_score" reporter:datatype="text"/>
703                 </fields>
704                 <links>
705                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqar"/>
706                         <link field="eg_record" reltype="has_a" key="id" map="" class="are"/>
707                 </links>
708                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
709                         <actions>
710                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
711                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
712                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
713                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
714                         </actions>
715                 </permacrud>
716         </class>
717
718         <class id="vms" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::match_set" oils_persist:tablename="vandelay.match_set" reporter:label="Record Matching Definition Set">
719                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.match_set_id_seq">
720                         <field reporter:label="Match Set ID" name="id" reporter:datatype="id" reporter:selector="name"/>
721                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
722                         <field reporter:label="Owning Library" name="owner" reporter:datatype="link"/>
723                         <field reporter:label="Match Set Type" name="mtype" reporter:datatype="text"/>
724                 </fields>
725                 <links>
726                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
727                 </links>
728                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
729                         <actions>
730                                 <create permission="ADMIN_IMPORT_MATCH_SET" context_field="owner"/>
731                                 <retrieve permission="ADMIN_IMPORT_MATCH_SET VIEW_IMPORT_MATCH_SET" context_field="owner"/>
732                                 <update permission="ADMIN_IMPORT_MATCH_SET" context_field="owner"/>
733                                 <delete permission="ADMIN_IMPORT_MATCH_SET" context_field="owner"/>
734                         </actions>
735                 </permacrud>
736         </class>
737
738         <class id="vmsp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::match_set_point" oils_persist:tablename="vandelay.match_set_point" reporter:label="Record Matching Definition">
739                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.match_set_point_id_seq">
740                         <field reporter:label="Match Definition ID" name="id" reporter:datatype="id"/>
741                         <field reporter:label="Expression Tree Parent" name="parent" reporter:datatype="link"/>
742                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
743                         <field reporter:label="Boolean Operator" name="bool_op" reporter:datatype="text"/>
744                         <field reporter:label="Coded Field" name="svf" reporter:datatype="link"/>
745                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
746                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
747             <field reporter:label="Negate" name="negate"  reporter:datatype="bool"/>
748                         <field reporter:label="Importance" name="quality" reporter:datatype="int"/>
749                         <field reporter:label="Expression Tree Children" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
750                         <field reporter:label="Authority Heading" name="heading" reporter:datatype="bool"/>
751                 </fields>
752                 <links>
753                         <link field="parent" reltype="has_a" key="id" map="" class="vmsp"/>
754                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
755                         <link field="svf" reltype="has_a" key="id" map="" class="crad"/>
756                         <link field="children" reltype="has_many" key="parent" map="" class="vmsp"/>
757                 </links>
758                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
759                         <actions>
760                                 <create permission="ADMIN_IMPORT_MATCH_SET">
761                     <context link="match_set" field="owner"/>
762                                 </create>
763                                 <retrieve permission="ADMIN_IMPORT_MATCH_SET VIEW_IMPORT_MATCH_SET">
764                     <context link="match_set" field="owner"/>
765                                 </retrieve>
766                                 <update permission="ADMIN_IMPORT_MATCH_SET">
767                     <context link="match_set" field="owner"/>
768                                 </update>
769                                 <delete permission="ADMIN_IMPORT_MATCH_SET">
770                     <context link="match_set" field="owner"/>
771                                 </delete>
772                         </actions>
773                 </permacrud>
774         </class>
775
776         <class id="vmsq" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::match_set_quality" oils_persist:tablename="vandelay.match_set_quality" reporter:label="Record Quality Metric">
777                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.match_set_quality_id_seq">
778                         <field reporter:label="Quality Metric ID" name="id" reporter:datatype="id"/>
779                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
780                         <field reporter:label="Record Attribute" name="svf" reporter:datatype="text"/>
781                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
782                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
783                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
784                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
785                 </fields>
786                 <links>
787                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
788                 </links>
789                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
790                         <actions>
791                                 <create permission="ADMIN_IMPORT_MATCH_SET">
792                     <context link="match_set" field="owner"/>
793                                 </create>
794                                 <retrieve permission="ADMIN_IMPORT_MATCH_SET">
795                     <context link="match_set" field="owner"/>
796                                 </retrieve>
797                                 <update permission="ADMIN_IMPORT_MATCH_SET">
798                     <context link="match_set" field="owner"/>
799                                 </update>
800                                 <delete permission="ADMIN_IMPORT_MATCH_SET">
801                     <context link="match_set" field="owner"/>
802                                 </delete>
803                         </actions>
804                 </permacrud>
805         </class>
806
807         <class id="vst" controller="open-ils.cstore open-ils.pcrud" 
808                 oils_obj:fieldmapper="vandelay::session_tracker" 
809                 oils_persist:tablename="vandelay.session_tracker" 
810                 reporter:label="Vandelay Session Tracker">
811                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.session_tracker_id_seq">
812                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
813                         <field reporter:label="Session Key" name="session_key" reporter:datatype="text"/>
814                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
815                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
816                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
817                         <field reporter:label="Record Type" name="record_type" reporter:datatype="text"/>
818                         <!-- queue doesn't use datatype 'link' because it may refer to a bib
819                                          queue or an auth queue and there's no IDL class for vandelay.queue .
820                                          parent table.
821                         -->
822                         <field reporter:label="Source Queue" name="queue" reporter:datatype="int"/>
823                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestsamp"/>
824                         <field reporter:label="Update Time" name="update_time" reporter:datatype="timestsamp"/>
825                         <field reporter:label="State" name="state" reporter:datatype="text"/>
826                         <field reporter:label="Action Type" name="action_type" reporter:datatype="text"/>
827                         <field reporter:label="Total Actions" name="total_actions" reporter:datatype="int"/>
828                         <field reporter:label="Actions Performed" name="actions_performed" reporter:datatype="int"/>
829                 </fields>
830                 <links>
831                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
832                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
833                 </links>
834                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
835                         <actions>
836                                 <!-- created by the API -->
837                                 <retrieve global_required="true"
838                                         permission="CREATE_BIB_IMPORT_QUEUE CREATE_AUTHORITY_IMPORT_QUEUE"/>
839                                 <update global_required="true"
840                                         permission="UPDATE_BIB_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE">
841                                         <context link="workstation" field="owning_lib"/>
842                                 </update>
843                                 <delete 
844                                         permission="DELETE_BIB_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE">
845                                         <context link="workstation" field="owning_lib"/>
846                                 </delete>
847                         </actions>
848                 </permacrud>
849         </class>
850
851         <class id="auoi" controller="open-ils.cstore" oils_obj:fieldmapper="actor::usr_org_unit_opt_in" oils_persist:tablename="actor.usr_org_unit_opt_in" reporter:label="User Sharing Opt-in">
852                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_org_unit_opt_in_id_seq">
853                         <field reporter:label="Opt-in ID" name="id" reporter:datatype="id"/>
854                         <field reporter:label="Workstation" name="opt_in_ws" reporter:datatype="link"/>
855                         <field reporter:label="Staff Member" name="staff" reporter:datatype="link"/>
856                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
857                         <field reporter:label="Allowed Org Unit" name="org_unit" reporter:datatype="link"/>
858                         <field reporter:label="Opt-in Date/Time" name="opt_in_ts" reporter:datatype="timestamp"/>
859                 </fields>
860                 <links>
861                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
862                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
863                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
864                         <link field="opt_in_ws" reltype="has_a" key="id" map="" class="aws"/>
865                 </links>
866         </class>
867
868     <class id="cgf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::global_flag" oils_persist:tablename="config.global_flag" reporter:label="Global Flags and Settings" oils_persist:field_safe="true">
869         <fields oils_persist:primary="name">
870             <field reporter:label="Name" name="name" reporter:datatype="text"/>
871             <field reporter:label="Label" name="label"  reporter:datatype="text" oils_persist:i18n="true"/>
872             <field reporter:label="Value" name="value"  reporter:datatype="text"/>
873             <field reporter:label="Enabled" name="enabled"  reporter:datatype="bool"/>
874         </fields>
875         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
876             <actions>
877                 <create   permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
878                 <retrieve permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
879                 <update   permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
880                 <delete   permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
881             </actions>
882         </permacrud>
883     </class>
884
885     <class id="cin" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::index_normalizer" oils_persist:tablename="config.index_normalizer" reporter:label="Indexing Normalizer" oils_persist:field_safe="true">
886         <fields oils_persist:primary="id">
887             <field reporter:label="ID" name="id" reporter:datatype="id"/>
888             <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
889             <field reporter:label="Description" name="description"  reporter:datatype="text" oils_persist:i18n="true"/>
890             <field reporter:label="Function" name="func"  reporter:datatype="text"/>
891             <field reporter:label="Required Parameter Count" name="param_count"  reporter:datatype="int"/>
892         </fields>
893         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
894             <actions>
895                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
896                 <retrieve/>
897                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
898                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
899             </actions>
900         </permacrud>
901     </class>
902
903         <class id="cmfinm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::metabib_field_index_norm_map" oils_persist:tablename="config.metabib_field_index_norm_map" reporter:label="Metabib Field to Indexing Normalizer Map" oils_persist:field_safe="true">
904                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_index_norm_map_id_seq">
905                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
906                         <field reporter:label="Metabib Field" name="field" reporter:datatype="link"/>
907                         <field reporter:label="Normalizer" name="norm" reporter:datatype="link"/>
908                         <field reporter:label="Parameters (JSON Array)" name="params" reporter:datatype="text"/>
909                         <field reporter:label="Order of Application" name="pos" reporter:datatype="int"/>
910                 </fields>
911                 <links>
912                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
913                         <link field="norm" reltype="has_a" key="id" map="" class="cin"/>
914                 </links>
915         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
916             <actions>
917                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
918                 <retrieve/>
919                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
920                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
921             </actions>
922         </permacrud>
923         </class>
924
925         <class id="cmrcfmt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::marc_format" oils_persist:tablename="config.marc_format" reporter:label="MARC Formats" oils_persist:field_safe="true">
926                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc_format_id_seq">
927                         <field reporter:label="ID"   name="id" reporter:datatype="id" reporter:selector="name" />
928                         <field reporter:label="Code" name="code" reporter:datatype="text" oils_obj:required="true"/>
929                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true"/>
930         </fields>
931         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
932             <actions>
933                 <create permission="ADMIN_TAG_TABLE" global_required="true"/>
934                 <retrieve/>
935                 <update permission="ADMIN_TAG_TABLE" global_required="true"/>
936                 <delete permission="ADMIN_TAG_TABLE" global_required="true"/>
937             </actions>
938         </permacrud>
939         </class>
940
941         <class id="cmrcfld" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::marc_field" oils_persist:tablename="config.marc_field" reporter:label="MARC Fields" oils_persist:field_safe="true">
942                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc_field_id_seq">
943                         <field reporter:label="ID"   name="id" reporter:datatype="id"/>
944                         <field reporter:label="MARC Format" name="marc_format" reporter:datatype="link" oils_obj:required="true"/>
945                         <field reporter:label="MARC Record Type" name="marc_record_type" reporter:datatype="text" oils_obj:required="true" />
946                         <field reporter:label="MARC Tag" name="tag" reporter:datatype="text" oils_obj:required="true"/>
947                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
948                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
949                         <field reporter:label="Fixed Field?" name="fixed_field" reporter:datatype="bool"/>
950                         <field reporter:label="Repeatable?" name="repeatable" reporter:datatype="bool"/>
951                         <field reporter:label="Mandatory?" name="mandatory" reporter:datatype="bool"/>
952                         <field reporter:label="Hidden?" name="hidden" reporter:datatype="bool"/>
953                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit"/>
954         </fields>
955                 <links>
956                         <link field="marc_format" reltype="has_a" key="id" map="" class="cmrcfmt"/>
957                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
958         </links>
959         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
960             <actions>
961                 <create permission="ADMIN_TAG_TABLE" context_field="owner"/>
962                 <retrieve/>
963                 <update permission="ADMIN_TAG_TABLE" context_field="owner"/>
964                 <delete permission="ADMIN_TAG_TABLE" context_field="owner"/>
965             </actions>
966         </permacrud>
967         </class>
968
969         <class id="cmrcsubfld" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::marc_subfield" oils_persist:tablename="config.marc_subfield" reporter:label="MARC Subfields" oils_persist:subfield_safe="true">
970                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc_subfield_id_seq">
971                         <field reporter:label="ID"   name="id" reporter:datatype="id"/>
972                         <field reporter:label="MARC Format" name="marc_format" reporter:datatype="link" oils_obj:required="true"/>
973                         <field reporter:label="MARC Record Type" name="marc_record_type" reporter:datatype="text" oils_obj:required="true"/>
974                         <field reporter:label="MARC Tag" name="tag" reporter:datatype="text" oils_obj:required="true"/>
975                         <field reporter:label="MARC Subfield" name="code" reporter:datatype="text" oils_obj:required="true"/>
976                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
977                         <field reporter:label="Repeatable?" name="repeatable" reporter:datatype="bool"/>
978                         <field reporter:label="Mandatory?" name="mandatory" reporter:datatype="bool"/>
979                         <field reporter:label="Hidden?" name="hidden" reporter:datatype="bool"/>
980                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit"/>
981         </fields>
982                 <links>
983                         <link field="marc_format" reltype="has_a" key="id" map="" class="cmrcfmt"/>
984                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
985         </links>
986         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
987             <actions>
988                 <create permission="ADMIN_TAG_TABLE" context_field="owner"/>
989                 <retrieve/>
990                 <update permission="ADMIN_TAG_TABLE" context_field="owner"/>
991                 <delete permission="ADMIN_TAG_TABLE" context_field="owner"/>
992             </actions>
993         </permacrud>
994         </class>
995
996         <class id="crad" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::record_attr_definition" oils_persist:tablename="config.record_attr_definition" reporter:label="SVF Record Attribute Defintion" oils_persist:field_safe="true">
997                 <fields oils_persist:primary="name">
998                         <field reporter:label="Name" name="name" reporter:datatype="id" reporter:selector="label"  oils_obj:required="true"/>
999                         <field reporter:label="Label" name="label" reporter:datatype="text"  oils_obj:required="true" oils_persist:i18n="true"/>
1000                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
1001                         <field reporter:label="Multi-valued?" name="multi" reporter:datatype="bool"/>
1002                         <field reporter:label="Filter?" name="filter" reporter:datatype="bool"/>
1003                         <field reporter:label="Sorter?" name="sorter" reporter:datatype="bool"/>
1004                         <field reporter:label="Composite attribute?" name="composite" reporter:datatype="bool"/>
1005                         <field reporter:label="MARC Tag" name="tag" reporter:datatype="text"/>
1006                         <field reporter:label="MARC Subfields" name="sf_list" reporter:datatype="text"/>
1007                         <field reporter:label="Joiner" name="joiner" reporter:datatype="text"/>
1008                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
1009                         <field reporter:label="Format" name="format" reporter:datatype="link"/>
1010                         <field reporter:label="Starting Position" name="start_pos" reporter:datatype="int"/>
1011                         <field reporter:label="String Length" name="string_len" reporter:datatype="int"/>
1012                         <field reporter:label="Fixed Field" name="fixed_field" reporter:datatype="text"/>
1013                         <field reporter:label="Physical Characteristic" name="phys_char_sf" reporter:datatype="text"/>
1014                         <field reporter:label="Vocabulary URI" name="vocabulary" reporter:datatype="text"/>
1015                         <field reporter:label="Normalizers" name="normalizers" reporter:datatype="link" oils_persist:virtual="true"/>
1016                 </fields>
1017                 <links>
1018                         <link field="format" reltype="has_a" key="name" map="" class="cxt"/>
1019                         <link field="normalizers" reltype="has_many" key="name" map="" class="crainm"/>
1020                 </links>
1021         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1022             <actions>
1023                 <create permission="ADMIN_SVF" global_required="true"/>
1024                 <retrieve/>
1025                 <update permission="ADMIN_SVF" global_required="true"/>
1026                 <delete permission="ADMIN_SVF" global_required="true"/>
1027             </actions>
1028         </permacrud>
1029         </class>
1030
1031         <class id="csc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::sms_carrier" oils_persist:tablename="config.sms_carrier" reporter:label="SMS Carrier" oils_persist:field_safe="true">
1032                 <fields oils_persist:primary="id" oils_persist:sequence="config.sms_carrier_id_seq">
1033                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
1034                         <field reporter:label="Region" name="region" reporter:datatype="text" oils_persist:i18n="true"/>
1035                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1036             <field reporter:label="Active" name="active" reporter:datatype="bool" oils_persist:i18n="true"/>
1037                         <field reporter:label="Email Gateway" name="email_gateway" reporter:datatype="text" oils_persist:i18n="true"/>
1038                 </fields>
1039                 <links/>
1040         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1041             <actions>
1042                 <create permission="ADMIN_SMS_CARRIER" global_required="true"/>
1043                 <retrieve/>
1044                 <update permission="ADMIN_SMS_CARRIER" global_required="true"/>
1045                 <delete permission="ADMIN_SMS_CARRIER" global_required="true"/>
1046             </actions>
1047         </permacrud>
1048         </class>
1049
1050         <class id="ccraed" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::composite_attr_entry_definition" oils_persist:tablename="config.composite_attr_entry_definition" reporter:label="Composite Attribute Definitions" oils_persist:field_safe="true">
1051                 <fields oils_persist:primary="coded_value">
1052                         <field reporter:label="Coded Value" name="coded_value" reporter:datatype="id" oils_obj:required="true"/>
1053                         <field reporter:label="Defintion" name="definition" reporter:datatype="text"  oils_obj:required="true"/>
1054                 </fields>
1055                 <links>
1056                         <link field="coded_value" reltype="has_a" key="id" map="" class="ccvm"/>
1057                 </links>
1058         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1059             <actions>
1060                 <create permission="ADMIN_CODED_VALUE" global_required="true"/>
1061                 <retrieve/>
1062                 <update permission="ADMIN_CODED_VALUE" global_required="true"/>
1063                 <delete permission="ADMIN_CODED_VALUE" global_required="true"/>
1064             </actions>
1065         </permacrud>
1066         </class>
1067
1068         <class id="murav" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="metabib::uncontrolled_record_attr_value" oils_persist:tablename="metabib.uncontrolled_record_attr_value" reporter:label="Uncontrolled Record Attribute Values" oils_persist:field_safe="true">
1069                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.uncontrolled_record_attr_value_id_seq">
1070                         <field reporter:label="ID" name="id" reporter:datatype="id" oils_obj:required="true"/>
1071                         <field reporter:label="Attribute" name="attr" reporter:datatype="text"  oils_obj:required="true"/>
1072                         <field reporter:label="Value" name="value" reporter:datatype="text"  oils_obj:required="true"/>
1073                 </fields>
1074                 <links>
1075                         <link field="attr" reltype="has_a" key="name" map="" class="crad"/>
1076                 </links>
1077         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1078             <actions>
1079                 <retrieve/>
1080             </actions>
1081         </permacrud>
1082         </class>
1083
1084
1085         <class id="mrs" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="metabib::record_sorter" oils_persist:tablename="metabib.record_sorter" reporter:label="Record Sort Values" oils_persist:field_safe="true">
1086                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.record_sorter_id_seq">
1087                         <field reporter:label="ID" name="id" reporter:datatype="id" oils_obj:required="true"/>
1088                         <field reporter:label="Bib Record ID" name="source" reporter:datatype="int" oils_obj:required="true"/>
1089                         <field reporter:label="Attribute" name="attr" reporter:datatype="text"  oils_obj:required="true"/>
1090                         <field reporter:label="Value" name="value" reporter:datatype="text"  oils_obj:required="true"/>
1091                 </fields>
1092                 <links>
1093                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
1094                         <link field="attr" reltype="has_a" key="name" map="" class="crad"/>
1095                 </links>
1096         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1097             <actions>
1098                 <retrieve/>
1099             </actions>
1100         </permacrud>
1101         </class>
1102
1103
1104         <class id="mravl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="metabib::record_attr_vector_list" oils_persist:tablename="metabib.record_attr_vector_list" reporter:label="MVF Record Attribute Vectors" oils_persist:field_safe="true">
1105                 <fields oils_persist:primary="source">
1106                         <field reporter:label="Record ID" name="source" reporter:datatype="id" oils_obj:required="true"/>
1107                         <field reporter:label="Vector" name="vlist" reporter:datatype="text"  oils_obj:required="true"/> <!-- Actually an int[], but this is the best we can do in fm_IDL.xml -->
1108                 </fields>
1109                 <links>
1110                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
1111                 </links>
1112         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1113             <actions>
1114                 <retrieve/>
1115             </actions>
1116         </permacrud>
1117         </class>
1118
1119         <class id="mraf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="metabib::record_attr_flat" oils_persist:tablename="metabib.record_attr_flat" reporter:label="MVF Record Attribute Flat List" oils_persist:field_safe="true">
1120                 <fields>
1121                         <field reporter:label="Record ID" name="id" reporter:datatype="id" oils_obj:required="true"/>
1122                         <field reporter:label="Attribute" name="attr" reporter:datatype="text"  oils_obj:required="true"/>
1123                         <field reporter:label="Value" name="value" reporter:datatype="text"  oils_obj:required="true"/>
1124                 </fields>
1125                 <links>
1126                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
1127                 </links>
1128         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1129             <actions>
1130                 <retrieve/>
1131             </actions>
1132         </permacrud>
1133         </class>
1134
1135         <class id="mra" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="metabib::record_attr" oils_persist:tablename="metabib.record_attr" reporter:label="SVF Record Attribute" oils_persist:field_safe="true" oils_persist:readonly="true">
1136                 <fields oils_persist:primary="id">
1137                         <field reporter:label="Record ID" name="id" reporter:datatype="id" oils_obj:required="true"/>
1138                         <field reporter:label="Attributes" name="attrs" reporter:datatype="text"  oils_obj:required="true"/>
1139                 </fields>
1140                 <links>
1141                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
1142                 </links>
1143         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1144             <actions>
1145                 <retrieve/>
1146             </actions>
1147         </permacrud>
1148         </class>
1149
1150         <class id="crainm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::record_attr_index_norm_map" oils_persist:tablename="config.record_attr_index_norm_map" reporter:label="SVF Record Attribute to Indexing Normalizer Map" oils_persist:field_safe="true">
1151                 <fields oils_persist:primary="id" oils_persist:sequence="config.record_attr_index_norm_map_id_seq">
1152                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
1153                         <field reporter:label="SVF Attribute" name="attr" reporter:datatype="link"/>
1154                         <field reporter:label="Normalizer" name="norm" reporter:datatype="link"/>
1155                         <field reporter:label="Parameters (JSON Array)" name="params" reporter:datatype="text"/>
1156                         <field reporter:label="Order of Application" name="pos" reporter:datatype="int"/>
1157                 </fields>
1158                 <links>
1159                         <link field="attr" reltype="has_a" key="name" map="" class="crad"/>
1160                         <link field="norm" reltype="has_a" key="id" map="" class="cin"/>
1161                 </links>
1162         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1163             <actions>
1164                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
1165                 <retrieve/>
1166                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
1167                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
1168             </actions>
1169         </permacrud>
1170         </class>
1171
1172         <class id="ccvm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::coded_value_map" oils_persist:tablename="config.coded_value_map" reporter:label="SVF Record Attribute Coded Value Map" oils_persist:field_safe="true">
1173                 <fields oils_persist:primary="id" oils_persist:sequence="config.coded_value_map_id_seq">
1174                         <field reporter:label="ID" name="id" reporter:datatype="id"  oils_obj:required="true" reporter:selector="value"/>
1175                         <field reporter:label="SVF Attribute" name="ctype" reporter:datatype="link"  oils_obj:required="true"/>
1176                         <field reporter:label="Code" name="code" reporter:datatype="text"  oils_obj:required="true"/>
1177                         <field reporter:label="Value" name="value" reporter:datatype="text"  oils_obj:required="true" oils_persist:i18n="true"/>
1178                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1179                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
1180                         <field reporter:label="Search Label" name="search_label" reporter:datatype="text" oils_persist:i18n="true"/>
1181             <field reporter:label="Is Simple Selector" name="is_simple" reporter:datatype="bool"/>
1182             <field reporter:label="Concept URI" name="concept_uri" reporter:datatype="text"/>
1183             <field reporter:label="Composite Definition" name="composite_def" oils_persist:virtual="true" reporter:datatype="link"/>
1184                 </fields>
1185                 <links>
1186                         <link field="ctype" reltype="has_a" key="name" map="" class="crad"/>
1187                         <link field="composite_def" reltype="might_have" key="coded_value" map="" class="ccraed"/>
1188                 </links>
1189         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1190             <actions>
1191                 <create permission="ADMIN_CODED_VALUE" global_required="true"/>
1192                 <retrieve/>
1193                 <update permission="ADMIN_CODED_VALUE" global_required="true"/>
1194                 <delete permission="ADMIN_CODED_VALUE" global_required="true"/>
1195             </actions>
1196         </permacrud>
1197         </class>
1198
1199         <class id="cracct" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::remote_account" oils_persist:tablename="config.remote_account" reporter:label="Remote (3rd party) Account">
1200                 <fields oils_persist:primary="id" oils_persist:sequence="config.remote_account_id_seq">
1201                         <field name="id"            reporter:datatype="id"   reporter:label="ID"/>
1202                         <field name="label"         reporter:datatype="text" reporter:label="Label"/>
1203                         <field name="host"          reporter:datatype="text" reporter:label="Host"/>
1204                         <field name="username"      reporter:datatype="text" reporter:label="Username"/>
1205                         <field name="password"      reporter:datatype="text" reporter:label="Password"/>
1206                         <field name="account"       reporter:datatype="text" reporter:label="Account"/>
1207                         <field name="path"          reporter:datatype="text" reporter:label="Path"/>
1208                         <field name="owner"         reporter:datatype="link" reporter:label="Owner"/>
1209                         <field name="last_activity" reporter:datatype="timestamp" reporter:label="Last Activity"/>
1210                 </fields>
1211                 <links>
1212                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
1213                 </links>
1214         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1215             <actions>
1216                 <create   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
1217                 <retrieve permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
1218                 <update   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
1219                 <delete   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
1220             </actions>
1221         </permacrud>
1222         </class>
1223
1224     <class id="czs" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::z3950_source" oils_persist:tablename="config.z3950_source" reporter:label="Z39.50 Source">
1225         <fields oils_persist:primary="name">
1226             <field reporter:label="Z39.50 Source" name="name" reporter:datatype="id"/>
1227             <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1228             <field reporter:label="Host" name="host"  reporter:datatype="text"/>
1229             <field reporter:label="Port" name="port"  reporter:datatype="int"/>
1230             <field reporter:label="DB" name="db"  reporter:datatype="text"/>
1231             <field reporter:label="Record Format" name="record_format"  reporter:datatype="text"/>
1232             <field reporter:label="Transmission Format" name="transmission_format"  reporter:datatype="text"/>
1233             <field reporter:label="Auth" name="auth"  reporter:datatype="bool"/>
1234             <field reporter:label="Attrs" name="attrs" oils_persist:virtual="true"  reporter:datatype="link"/>
1235             <field reporter:label="Use Permission" name="use_perm"  reporter:datatype="link"/>
1236         </fields>
1237         <links>
1238             <link field="attrs" reltype="has_many" key="source" map="" class="cza"/>
1239             <link field="use_perm" reltype="has_a" key="id" map="" class="ppl"/>
1240         </links>
1241         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1242             <actions>
1243                 <create permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1244                 <retrieve/>
1245                 <update permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1246                 <delete permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1247             </actions>
1248         </permacrud>
1249     </class>
1250
1251     <class id="cza" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::z3950_attr" oils_persist:tablename="config.z3950_attr" reporter:label="Z39.50 Attribute">
1252         <fields oils_persist:primary="id" oils_persist:sequence="config.z3950_attr_id_seq">
1253             <field reporter:label="Z39.50 Attribute ID" name="id" reporter:datatype="id" reporter:selector="label"/>
1254             <field reporter:label="Z39.50 Source" name="source" reporter:datatype="link"/>
1255             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1256             <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1257             <field reporter:label="Code" name="code"  reporter:datatype="int"/>
1258             <field reporter:label="Format" name="format"  reporter:datatype="int"/>
1259             <field reporter:label="Truncation" name="truncation"  reporter:datatype="int"/>
1260         </fields>
1261         <links>
1262             <link field="source" reltype="has_a" key="name" map="" class="czs"/>
1263         </links>
1264         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1265             <actions>
1266                 <create permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1267                 <retrieve/>
1268                 <update permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1269                 <delete permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1270             </actions>
1271         </permacrud>
1272     </class>
1273
1274     <class id="czifm" controller="open-ils.cstore open-ils.pcrud" 
1275                         oils_obj:fieldmapper="config::z3950_index_field_map" 
1276                         oils_persist:tablename="config.z3950_index_field_map" 
1277                         reporter:label="Z39.50 Index Field Map">
1278         <fields oils_persist:primary="id" oils_persist:sequence="config.z3950_index_field_map_id_seq">
1279             <field reporter:label="Map ID" name="id" reporter:datatype="id"/>
1280             <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1281             <field reporter:label="Metabib Field" name="metabib_field" reporter:datatype="link"/>
1282             <field reporter:label="Record Attribute" name="record_attr" reporter:datatype="link"/>
1283             <field reporter:label="Z39.50 Attribute" name="z3950_attr"  reporter:datatype="link"/>
1284             <field reporter:label="Z39.50 Attribute Type" name="z3950_attr_type" reporter:datatype="text"/>
1285         </fields>
1286         <links>
1287             <link field="metabib_field" reltype="has_a" key="id" map="" class="cmf"/>
1288             <link field="record_attr" reltype="has_a" key="name" map="" class="crad"/>
1289             <link field="z3950_attr" reltype="has_a" key="id" map="" class="cza"/>
1290         </links>
1291         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1292             <actions>
1293                 <create permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1294                 <retrieve/>
1295                 <update permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1296                 <delete permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1297             </actions>
1298         </permacrud>
1299     </class>
1300
1301
1302         <class id="ateo" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action_trigger::event_output" oils_persist:tablename="action_trigger.event_output" reporter:label="Event Output">
1303                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_output_id_seq">
1304                         <field reporter:label="Output ID" name="id" reporter:datatype="id"/>
1305                         <field reporter:label="Create Date/Time" name="create_time" reporter:datatype="timestamp"/>
1306                         <field reporter:label="Data" name="data" reporter:datatype="text"/>
1307                         <field reporter:label="Is Error" name="is_error" reporter:datatype="bool"/>
1308                         <field reporter:label="Events" name="events" oils_persist:virtual="true"  reporter:datatype="link"/>
1309                         <field reporter:label="Error Events" name="error_events" oils_persist:virtual="true"  reporter:datatype="link"/>
1310                 </fields>
1311                 <links>
1312             <link field="events" reltype="has_many" key="template_output" map="" class="atev"/>
1313             <link field="error_events" reltype="has_many" key="error_output" map="" class="atev"/>
1314                 </links>
1315                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1316                         <actions>
1317                                 <retrieve/>
1318                                 <delete permission="ADMIN_TRIGGER_TEMPLATE_OUTPUT DELETE_TRIGGER_TEMPLATE_OUTPUT" global_required="true"/>
1319                         </actions>
1320                 </permacrud>
1321         </class>
1322
1323         <class id="ath" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action_trigger::hook" oils_persist:tablename="action_trigger.hook" reporter:label="Trigger Hook Point">
1324                 <fields oils_persist:primary="key">
1325                         <field reporter:label="Hook Key" name="key" reporter:datatype="text" reporter:selector="key"/>
1326                         <field reporter:label="Core Type" name="core_type" reporter:datatype="text"/>
1327                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1328                         <field reporter:label="Passive" name="passive"  reporter:datatype="bool"/>
1329                 </fields>
1330                 <links/>
1331                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1332                         <actions>
1333                                 <create permission="ADMIN_TRIGGER_HOOK CREATE_TRIGGER_HOOK" global_required="true"/>
1334                                 <retrieve/>
1335                                 <update permission="ADMIN_TRIGGER_HOOK UPDATE_TRIGGER_HOOK" global_required="true"/>
1336                                 <delete permission="ADMIN_TRIGGER_HOOK DELETE_TRIGGER_HOOK" global_required="true"/>
1337                         </actions>
1338                 </permacrud>
1339         </class>
1340
1341         <class id="atcol" controller="open-ils.cstore" oils_obj:fieldmapper="action_trigger::collector" oils_persist:tablename="action_trigger.collector" reporter:label="Trigger Environment Collector">
1342                 <fields oils_persist:primary="module">
1343                         <field reporter:label="Module Name" name="module" reporter:datatype="text" reporter:selector="module"/>
1344                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1345                 </fields>
1346                 <links/>
1347         </class>
1348
1349         <class id="atval" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action_trigger::validator" oils_persist:tablename="action_trigger.validator" reporter:label="Trigger Condition Validator">
1350                 <fields oils_persist:primary="module">
1351                         <field reporter:label="Module Name" name="module" reporter:datatype="text" reporter:selector="module"/>
1352                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1353                 </fields>
1354                 <links/>
1355                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1356                         <actions>
1357                                 <create permission="ADMIN_TRIGGER_VALIDATOR CREATE_TRIGGER_VALIDATOR" global_required="true"/>
1358                                 <retrieve/>
1359                                 <update permission="ADMIN_TRIGGER_VALIDATOR UPDATE_TRIGGER_VALIDATOR" global_required="true"/>
1360                                 <delete permission="ADMIN_TRIGGER_VALIDATOR DELETE_TRIGGER_VALIDATOR" global_required="true"/>
1361                         </actions>
1362                 </permacrud>
1363         </class>
1364
1365         <class id="atreact" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action_trigger::reactor" oils_persist:tablename="action_trigger.reactor" reporter:label="Trigger Event Reactor">
1366                 <fields oils_persist:primary="module">
1367                         <field reporter:label="Module Name" name="module" reporter:datatype="text" reporter:selector="module"/>
1368                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1369                 </fields>
1370                 <links/>
1371                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1372                         <actions>
1373                                 <create permission="ADMIN_TRIGGER_REACTOR CREATE_TRIGGER_REACTOR" global_required="true"/>
1374                                 <retrieve/>
1375                                 <update permission="ADMIN_TRIGGER_REACTOR UPDATE_TRIGGER_REACTOR" global_required="true"/>
1376                                 <delete permission="ADMIN_TRIGGER_REACTOR DELETE_TRIGGER_REACTOR" global_required="true"/>
1377                         </actions>
1378                 </permacrud>
1379         </class>
1380
1381         <class id="atclean" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action_trigger::cleanup" oils_persist:tablename="action_trigger.cleanup" reporter:label="Trigger Event Cleanup">
1382                 <fields oils_persist:primary="module">
1383                         <field reporter:label="Module Name" name="module" reporter:datatype="text" reporter:selector="module"/>
1384                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1385                 </fields>
1386                 <links/>
1387                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1388                         <actions>
1389                                 <create permission="ADMIN_TRIGGER_CLEANUP CREATE_TRIGGER_CLEANUP" global_required="true"/>
1390                                 <retrieve/>
1391                                 <update permission="ADMIN_TRIGGER_CLEANUP UPDATE_TRIGGER_CLEANUP" global_required="true"/>
1392                                 <delete permission="ADMIN_TRIGGER_CLEANUP DELETE_TRIGGER_CLEANUP" global_required="true"/>
1393                         </actions>
1394                 </permacrud>
1395         </class>
1396
1397         <class id="atenv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action_trigger::environment" oils_persist:tablename="action_trigger.environment" reporter:label="Trigger Event Environment Entry">
1398                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.environment_id_seq">
1399                         <field reporter:label="Environment ID" name="id" reporter:datatype="id"/>
1400                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
1401                         <field reporter:label="Field Path" name="path" reporter:datatype="text"/>
1402                         <field reporter:label="Collector" name="collector" reporter:datatype="link"/>
1403                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
1404                 </fields>
1405                 <links>
1406                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
1407                         <link field="collector" reltype="has_a" key="id" map="" class="atcol"/>
1408                 </links>
1409                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1410                         <actions>
1411                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF">
1412                     <context link="event_def" field="owner"/>
1413                 </create>
1414                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF">
1415                     <context link="event_def" field="owner"/>
1416                 </retrieve>
1417                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF">
1418                     <context link="event_def" field="owner"/>
1419                 </update>
1420                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF">
1421                     <context link="event_def" field="owner"/>
1422                 </delete>
1423                         </actions>
1424                 </permacrud>
1425         </class>
1426
1427         <class id="atevdef" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action_trigger::event_definition" oils_persist:tablename="action_trigger.event_definition" reporter:label="Trigger Event Definition">
1428                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_definition_id_seq">
1429                         <field reporter:label="Definition ID" name="id" reporter:datatype="id"/>
1430                         <field reporter:label="Enabled" name="active" reporter:datatype="bool"/>
1431                         <field reporter:label="Owning Library" name="owner"  reporter:datatype="org_unit"/>
1432                         <field reporter:label="Hook" name="hook"  reporter:datatype="link"/>
1433                         <field reporter:label="Validator" name="validator"  reporter:datatype="link"/>
1434                         <field reporter:label="Reactor" name="reactor"  reporter:datatype="link"/>
1435                         <field reporter:label="Success Cleanup" name="cleanup_success"  reporter:datatype="link"/>
1436                         <field reporter:label="Failure Cleanup" name="cleanup_failure"  reporter:datatype="link"/>
1437                         <field reporter:label="Processing Delay" name="delay"  reporter:datatype="interval"/>
1438                         <field reporter:label="Max Event Validity Delay" name="max_delay"  reporter:datatype="interval"/>
1439                         <field reporter:label="Processing Delay Context Field" name="delay_field"  reporter:datatype="text"/>
1440                         <field reporter:label="Processing Group Context Field" name="group_field"  reporter:datatype="text"/>
1441                         <field reporter:label="Template" name="template"  reporter:datatype="text"/>
1442                         <field reporter:label="Name" name="name"  reporter:datatype="text"/>
1443                         <field reporter:label="Granularity" name="granularity"  reporter:datatype="text"/>
1444                         <field reporter:label="Opt-In User Field" name="usr_field"  reporter:datatype="text"/>
1445                         <field reporter:label="Opt-In Setting Type" name="opt_in_setting"  reporter:datatype="link"/>
1446                         <field reporter:label="Event Repeatability Delay" name="repeat_delay"  reporter:datatype="interval"/>
1447                         <field reporter:label="Message Template" name="message_template" reporter:datatype="text"/>
1448                         <field reporter:label="Message Title" name="message_title" reporter:datatype="text"/>
1449                         <field reporter:label="Message User Path" name="message_usr_path" reporter:datatype="text"/>
1450                         <field reporter:label="Message Library Path" name="message_library_path" reporter:datatype="text"/>
1451                         <field reporter:label="Environment Entries" name="env" oils_persist:virtual="true"  reporter:datatype="link"/>
1452                         <field reporter:label="Parameters" name="params" oils_persist:virtual="true"  reporter:datatype="link"/>
1453                         <field reporter:label="Retention Interval" name="retention_interval" reporter:datatype="interval"/>
1454                 </fields>
1455                 <links>
1456                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
1457                         <link field="hook" reltype="has_a" key="key" map="" class="ath"/>
1458                         <link field="validator" reltype="has_a" key="module" map="" class="atval"/>
1459                         <link field="reactor" reltype="has_a" key="module" map="" class="atreact"/>
1460                         <link field="cleanup_success" reltype="has_a" key="module" map="" class="atclean"/>
1461                         <link field="cleanup_failure" reltype="has_a" key="module" map="" class="atclean"/>
1462                         <link field="env" reltype="has_many" key="event_def" map="" class="atenv"/>
1463                         <link field="params" reltype="has_many" key="event_def" map="" class="atevparam"/>
1464                         <link field="opt_in_setting" reltype="has_a" key="name" map="" class="cust"/>
1465                 </links>
1466                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1467                         <actions>
1468                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF" context_field="owner"/>
1469                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF" context_field="owner"/>
1470                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF" context_field="owner"/>
1471                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF" context_field="owner"/>
1472                         </actions>
1473                 </permacrud>
1474         </class>
1475
1476         <class id="atev" controller="open-ils.cstore" oils_obj:fieldmapper="action_trigger::event" oils_persist:tablename="action_trigger.event" reporter:label="Trigger Event Entry">
1477                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_id_seq">
1478                         <field reporter:label="Event ID" name="id" reporter:datatype="id"/>
1479                         <field reporter:label="Target ID" name="target" reporter:datatype="int"/>
1480                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
1481                         <field reporter:label="Add Time" name="add_time" reporter:datatype="timestamp"/>
1482                         <field reporter:label="Run Time" name="run_time" reporter:datatype="timestamp"/>
1483                         <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
1484                         <field reporter:label="Update Time" name="update_time" reporter:datatype="timestamp"/>
1485                         <field reporter:label="Complete Time" name="complete_time" reporter:datatype="timestamp"/>
1486                         <field reporter:label="State" name="state" reporter:datatype="text"/>
1487                         <field reporter:label="User Data" name="user_data" reporter:datatype="text"/>
1488                         <field reporter:label="Template Output" name="template_output" reporter:datatype="link"/>
1489                         <field reporter:label="Error Output" name="error_output" reporter:datatype="text"/>
1490                         <field reporter:label="Asynchronous Output" name="async_output" reporter:datatype="link"/>
1491                         <field reporter:label="Update Process" name="update_process" reporter:datatype="int"/>
1492                 </fields>
1493                 <links>
1494                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
1495                         <link field="template_output" reltype="has_a" key="id" map="" class="ateo"/>
1496                         <link field="error_output" reltype="has_a" key="id" map="" class="ateo"/>
1497                         <link field="async_output" reltype="has_a" key="id" map="" class="ateo"/>
1498                 </links>
1499         </class>
1500
1501         <class id="atevparam" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action_trigger::event_param" oils_persist:tablename="action_trigger.event_params" reporter:label="Trigger Event Parameter">
1502                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_params_id_seq">
1503                         <field reporter:label="Parameter ID" name="id" reporter:datatype="id"/>
1504                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
1505                         <field reporter:label="Parameter Name" name="param" reporter:datatype="text"/>
1506                         <field reporter:label="Parameter Value" name="value" reporter:datatype="text"/>
1507                 </fields>
1508                 <links>
1509                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
1510                 </links>
1511                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1512                         <actions>
1513                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF">
1514                     <context link="event_def" field="owner"/>
1515                 </create>
1516                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF">
1517                     <context link="event_def" field="owner"/>
1518                 </retrieve>
1519                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF">
1520                     <context link="event_def" field="owner"/>
1521                 </update>
1522                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF">
1523                     <context link="event_def" field="owner"/>
1524                 </delete>
1525                         </actions>
1526                 </permacrud>
1527         </class>
1528
1529         <class id="atul" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action_trigger::user_log" reporter:label="Action Trigger User Log" oils_persist:readonly="true">
1530                 <oils_persist:source_definition><![CDATA[
1531                 SELECT  atevdef.hook,
1532                         atevdef.name,
1533                         atevdef.reactor,
1534                         atev.id,
1535                         atev.event_def,
1536                         atev.add_time,
1537                         atev.run_time,
1538                         atev.start_time,
1539                         atev.update_time,
1540                         atev.complete_time,
1541                         atev.update_process,
1542                         atev.state,
1543                         atev.user_data,
1544                         atev.template_output,
1545                         atev.error_output,
1546                         atev.async_output,
1547                         targ_circ.id AS target_circ,
1548                         targ_ahr.id AS target_hold,
1549                         COALESCE(
1550                                 targ_circ.circ_lib,
1551                                 targ_ahr.pickup_lib
1552                         ) AS perm_lib
1553                 FROM action_trigger.event atev
1554                 JOIN action_trigger.event_definition atevdef ON
1555                         (atevdef.id = atev.event_def)
1556                 JOIN action_trigger.hook ath ON
1557                         (ath.key = atevdef.hook)
1558                 LEFT JOIN action.circulation targ_circ ON
1559                         (ath.core_type = 'circ' AND targ_circ.id = atev.target)
1560                 LEFT JOIN action.hold_request targ_ahr ON
1561                         (ath.core_type = 'ahr' AND targ_ahr.id = atev.target)
1562                 WHERE atev.add_time > NOW() - (SELECT MIN(value) FROM (
1563                         SELECT value::INTERVAL FROM actor.org_unit_ancestor_setting(
1564                                 'circ.staff.max_visible_event_age',
1565                                 COALESCE(targ_circ.circ_lib, targ_ahr.pickup_lib)
1566                         ) UNION
1567                         SELECT '1000 YEARS'::INTERVAL AS value
1568                 ) ous)
1569                 ]]></oils_persist:source_definition>
1570                 <fields oils_persist:primary="id">
1571                         <field reporter:label="Hook" name="hook" reporter:datatype="link" />
1572                         <field reporter:label="Name" name="name" reporter:datatype="text" />
1573                         <field reporter:label="Reactor" name="reactor" reporter:datatype="text" />
1574                         <field reporter:label="Event ID" name="id" reporter:datatype="id" />
1575                         <field reporter:label="Event Definition ID" name="event_def" reporter:datatype="int" />
1576                         <field reporter:label="Event Add Time" name="add_time" reporter:datatype="timestamp" />
1577                         <field reporter:label="Event Run Time" name="run_time" reporter:datatype="timestamp" />
1578                         <field reporter:label="Event Start Time" name="start_time" reporter:datatype="timestamp" />
1579                         <field reporter:label="Event Update Time" name="update_time" reporter:datatype="timestamp" />
1580                         <field reporter:label="Event Complete Time" name="complete_time" reporter:datatype="timestamp" />
1581                         <field reporter:label="Event Update PID" name="update_process" reporter:datatype="int" />
1582                         <field reporter:label="Event State" name="state" reporter:datatype="text" />
1583                         <field reporter:label="Event User Data" name="user_data" reporter:datatype="text" />
1584                         <field reporter:label="Event Template Output" name="template_output" reporter:datatype="link" />
1585                         <field reporter:label="Event Error Output" name="error_output" reporter:datatype="link" />
1586                         <field reporter:label="Event Async Output" name="async_output" reporter:datatype="link" />
1587                         <field reporter:label="Target Circulation" name="target_circ" reporter:datatype="link" />
1588                         <field reporter:label="Target Hold" name="target_hold" reporter:datatype="link" />
1589                         <field reporter:label="Permission Context" name="perm_lib" reporter:datatype="org_unit" />
1590                 </fields>
1591                 <links>
1592                         <link field="hook" reltype="has_a" key="key" map="" class="ath" />
1593                         <link field="template_output" reltype="has_a" key="id" map="" class="ateo" />
1594                         <link field="error_output" reltype="has_a" key="id" map="" class="ateo" />
1595                         <link field="async_output" reltype="has_a" key="id" map="" class="ateo" />
1596                         <link field="target_circ" reltype="has_a" key="id" map="" class="circ" />
1597                         <link field="target_hold" reltype="has_a" key="id" map="" class="ahr" />
1598                         <link field="perm_lib" reltype="has_a" key="id" map="" class="aou" />
1599                 </links>
1600                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1601                         <actions>
1602                                 <retrieve permission="VIEW_TRIGGER_EVENT" context_field="perm_lib" />
1603                         </actions>
1604                 </permacrud>
1605         </class>
1606
1607         <class id="aws" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::workstation" oils_persist:tablename="actor.workstation" reporter:label="Workstation">
1608                 <fields oils_persist:primary="id" oils_persist:sequence="actor.workstation_id_seq">
1609                         <field reporter:label="Workstation ID" name="id" reporter:datatype="id"/>
1610                         <field reporter:label="Workstation Name" name="name" reporter:datatype="text"/>
1611                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
1612                         <field reporter:label="Toolbars" name="toolbars" oils_persist:virtual="true" reporter:datatype="link"/>
1613                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
1614                 </fields>
1615                 <links>
1616                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
1617                         <link field="toolbars" reltype="has_many" key="ws" map="" class="atb"/>
1618                         <link field="circulations" reltype="has_many" key="workstation" map="" class="circ"/>
1619                 </links>
1620                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1621                         <actions>
1622                                 <retrieve permission="STAFF_LOGIN" context_field="owning_lib" />
1623                         </actions>
1624                 </permacrud>
1625         </class>
1626
1627         <class id="ccm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::circ_modifier" oils_persist:tablename="config.circ_modifier" reporter:label="Circulation Modifier">
1628                 <fields oils_persist:primary="code">
1629                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1630                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1631                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1632                         <field reporter:label="SIP2 Media Type" name="sip2_media_type" reporter:datatype="text" oils_persist:i18n="true"/>
1633                         <field reporter:label="Magnetic Media" name="magnetic_media" reporter:datatype="bool"/>
1634                         <field reporter:label="Average Wait Time" name="avg_wait_time" reporter:datatype="interval"/>
1635                 </fields>
1636                 <links/>
1637         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1638             <actions>
1639                 <create permission="ADMIN_CIRC_MOD" global_required="true"/>
1640                 <retrieve/>
1641                 <update permission="ADMIN_CIRC_MOD" global_required="true"/>
1642                 <delete permission="ADMIN_CIRC_MOD" global_required="true"/>
1643             </actions>
1644         </permacrud>
1645         </class>
1646
1647         <class id="aiit" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::invoice_item_type" oils_persist:tablename="acq.invoice_item_type" reporter:label="Non-bibliographic Invoice Item Type" oils_persist:field_safe="true">
1648                 <fields oils_persist:primary="code">
1649                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1650                         <field reporter:label="Label" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1651                         <field reporter:label="Prorate?" name="prorate" reporter:datatype="bool"/>
1652                         <field reporter:label="Blanket?" name="blanket" reporter:datatype="bool"/>
1653                 </fields>
1654                 <links/>
1655         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1656             <actions>
1657                 <create permission="CREATE_INVOICE_ITEM_TYPE" global_required="true"/>
1658                 <retrieve/>
1659                 <update permission="UPDATE_INVOICE_ITEM_TYPE" global_required="true"/>
1660                 <delete permission="DELETE_INVOICE_ITEM_TYPE" global_required="true"/>
1661             </actions>
1662         </permacrud>
1663         </class>
1664
1665         <class id="acqim" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::invoice_method" oils_persist:tablename="acq.invoice_method" reporter:label="Invoice Method used by Vendor" oils_persist:field_safe="true">
1666                 <fields oils_persist:primary="code">
1667                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1668                         <field reporter:label="Label" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1669                 </fields>
1670                 <links/>
1671         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1672             <actions>
1673                 <create permission="ADMIN_INVOICE_METHOD CREATE_INVOICE_METHOD" global_required="true"/>
1674                 <retrieve/>
1675                 <update permission="ADMIN_INVOICE_METHOD UPDATE_INVOICE_METHOD" global_required="true"/>
1676                 <delete permission="ADMIN_INVOICE_METHOD DELETE_INVOICE_METHOD" global_required="true"/>
1677             </actions>
1678         </permacrud>
1679         </class>
1680
1681         <class id="ccpbt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="container::copy_bucket_type" oils_persist:tablename="container.copy_bucket_type" reporter:label="Copy Bucket Type" oils_persist:field_safe="true">
1682                 <fields oils_persist:primary="code">
1683                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1684                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1685                 </fields>
1686                 <links/>
1687         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1688             <actions>
1689                 <create permission="CREATE_COPY_BTYPE" global_required="true"/>
1690                 <retrieve/>
1691                 <update permission="UPDATE_COPY_BTYPE" global_required="true"/>
1692                 <delete permission="DELETE_COPY_BTYPE" global_required="true"/>
1693             </actions>
1694         </permacrud>
1695         </class>
1696
1697         <class id="ccnbt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="container::call_number_bucket_type" oils_persist:tablename="container.call_number_bucket_type" reporter:label="Call Number Bucket Type" oils_persist:field_safe="true">
1698                 <fields oils_persist:primary="code">
1699                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1700                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1701                 </fields>
1702                 <links/>
1703         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1704             <actions>
1705                 <create permission="CREATE_CN_BTYPE" global_required="true"/>
1706                 <retrieve/>
1707                 <update permission="UPDATE_CN_BTYPE" global_required="true"/>
1708                 <delete permission="DELETE_CN_BTYPE" global_required="true"/>
1709             </actions>
1710         </permacrud>
1711         </class>
1712
1713         <class id="bpt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="biblio::peer_type" oils_persist:tablename="biblio.peer_type" reporter:label="Bibliographic Record Peer Type" oils_persist:field_safe="true">
1714                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.peer_type_id_seq">
1715                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
1716                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1717                 </fields>
1718                 <links/>
1719         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1720             <actions>
1721                 <create permission="CREATE_BIB_PTYPE" global_required="true"/>
1722                 <retrieve/>
1723                 <update permission="UPDATE_BIB_PTYPE" global_required="true"/>
1724                 <delete permission="DELETE_BIB_PTYPE" global_required="true"/>
1725             </actions>
1726         </permacrud>
1727         </class>
1728
1729         <class id="bpbcm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="biblio::peer_bib_copy_map" oils_persist:tablename="biblio.peer_bib_copy_map" reporter:label="Bibliographic Record Peer Copy Map">
1730                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.peer_bib_copy_map_id_seq">
1731                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
1732                         <field reporter:label="Peer Type" name="peer_type" reporter:datatype="link"/>
1733                         <field reporter:label="Peer Record" name="peer_record" reporter:datatype="link"/>
1734                         <field reporter:label="Target Copy" name="target_copy" reporter:datatype="link"/>
1735                 </fields>
1736         <links>
1737             <link field="peer_type" reltype="has_a" key="id" map="" class="bpt"/>
1738             <link field="peer_record" reltype="has_a" key="id" map="" class="bre"/>
1739             <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
1740         </links>
1741         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1742             <actions>
1743                 <create permission="UPDATE_COPY">
1744                     <context link="target_copy" field="circ_lib"/>
1745                 </create>
1746                 <retrieve/>
1747                 <update permission="UPDATE_COPY">
1748                     <context link="target_copy" field="circ_lib"/>
1749                 </update>
1750                 <delete permission="UPDATE_COPY">
1751                     <context link="target_copy" field="circ_lib"/>
1752                 </delete>
1753             </actions>
1754         </permacrud>
1755         </class>
1756
1757         <class id="cbrebt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="container::biblio_record_entry_bucket_type" oils_persist:tablename="container.biblio_record_entry_bucket_type" reporter:label="Bibliographic Record Bucket Type" oils_persist:field_safe="true">
1758                 <fields oils_persist:primary="code">
1759                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1760                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1761                 </fields>
1762                 <links/>
1763         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1764             <actions>
1765                 <create permission="CREATE_BIB_BTYPE" global_required="true"/>
1766                 <retrieve/>
1767                 <update permission="UPDATE_BIB_BTYPE" global_required="true"/>
1768                 <delete permission="DELETE_BIB_BTYPE" global_required="true"/>
1769             </actions>
1770         </permacrud>
1771         </class>
1772
1773         <class id="cubt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="container::user_bucket_type" oils_persist:tablename="container.user_bucket_type" reporter:label="User Bucket Type" oils_persist:field_safe="true">
1774                 <fields oils_persist:primary="code">
1775                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1776                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1777                 </fields>
1778                 <links/>
1779         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1780             <actions>
1781                 <create permission="CREATE_USER_BTYPE" global_required="true"/>
1782                 <retrieve/>
1783                 <update permission="UPDATE_USER_BTYPE" global_required="true"/>
1784                 <delete permission="DELETE_USER_BTYPE" global_required="true"/>
1785             </actions>
1786         </permacrud>
1787         </class>
1788
1789         <class id="cvrfm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::videorecording_format_map" oils_persist:tablename="config.videorecording_format_map" reporter:label="Videorecording Format" oils_persist:field_safe="true">
1790                 <fields oils_persist:primary="code">
1791                         <field reporter:label="Code" name="code" reporter:selector="value" reporter:datatype="id"/>
1792                         <field reporter:label="Format" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
1793                 </fields>
1794                 <links/>
1795         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1796             <actions>
1797                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
1798                 <retrieve/>
1799                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
1800                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
1801             </actions>
1802         </permacrud>
1803         </class>
1804
1805     <class id="chmw" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::hold_matrix_weights" oils_persist:tablename="config.hold_matrix_weights" reporter:label="Hold Matrix Weights">
1806         <fields oils_persist:primary="id" oils_persist:sequence="config.hold_matrix_weights_id_seq">
1807             <field reporter:label="Hold Weights ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1808             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1809             <field reporter:label="User Home Library" name="user_home_ou" reporter:datatype="float"/>
1810             <field reporter:label="Request Library" name="request_ou" reporter:datatype="float"/>
1811             <field reporter:label="Pickup Library" name="pickup_ou" reporter:datatype="float"/>
1812             <field reporter:label="Owning Library" name="item_owning_ou" reporter:datatype="float"/>
1813             <field reporter:label="Item Circ Library" name="item_circ_ou" reporter:datatype="float"/>
1814             <field reporter:label="User Permission Group" name="usr_grp" reporter:datatype="float"/>
1815             <field reporter:label="Requestor Permission Group" name="requestor_grp" reporter:datatype="float"/>
1816             <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="float"/>
1817             <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="float"/>
1818             <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="float"/>
1819             <field reporter:label="MARC Bib Level" name="marc_bib_level" oils_persist:primitive="string" reporter:datatype="float"/>
1820             <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="float"/>
1821             <field reporter:label="Juvenile?" name="juvenile_flag" oils_persist:primitive="string" reporter:datatype="float"/>
1822             <field reporter:label="Reference?" name="ref_flag" reporter:datatype="float"/>
1823             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="float"/>
1824         </fields>
1825         <links/>
1826         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1827             <actions>
1828                 <create permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1829                 <retrieve/>
1830                 <update permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1831                 <delete permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1832             </actions>
1833         </permacrud>
1834     </class>
1835
1836     <class id="ccmw" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::circ_matrix_weights" oils_persist:tablename="config.circ_matrix_weights" reporter:label="Circ Matrix Weights">
1837         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_weights_id_seq">
1838             <field reporter:label="Circ Weights ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1839             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1840             <field reporter:label="Renewal?" name="is_renewal" reporter:datatype="float"/>
1841             <field reporter:label="Org Unit" name="org_unit" reporter:datatype="float"/>
1842             <field reporter:label="Copy Circ Lib" name="copy_circ_lib" reporter:datatype="float"/>
1843             <field reporter:label="Copy Owning Lib" name="copy_owning_lib" reporter:datatype="float"/>
1844             <field reporter:label="User Home Lib" name="user_home_ou" reporter:datatype="float"/>
1845             <field reporter:label="Permission Group" name="grp" reporter:datatype="float"/>
1846             <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="float"/>
1847             <field reporter:label="Copy Location" name="copy_location" reporter:datatype="float"/>
1848             <field reporter:label="MARC Type" name="marc_type" reporter:datatype="float"/>
1849             <field reporter:label="MARC Form" name="marc_form" reporter:datatype="float"/>
1850             <field reporter:label="MARC Bib Level" name="marc_bib_level" reporter:datatype="float"/>
1851             <field reporter:label="Videorecording Format" name="marc_vr_format" reporter:datatype="float"/>
1852             <field reporter:label="Reference?" name="ref_flag" reporter:datatype="float"/>
1853             <field reporter:label="Juvenile?" name="juvenile_flag" reporter:datatype="float"/>
1854             <field reporter:label="User Age: Lower Bound" name="usr_age_lower_bound" reporter:datatype="float"/>
1855             <field reporter:label="User Age: Upper Bound" name="usr_age_upper_bound" reporter:datatype="float"/>
1856             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="float"/>
1857         </fields>
1858         <links/>
1859         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1860             <actions>
1861                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1862                 <retrieve/>
1863                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1864                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1865             </actions>
1866         </permacrud>
1867     </class>
1868
1869     <class id="cwa" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::weight_assoc" oils_persist:tablename="config.weight_assoc" reporter:label="Matrix Weight Association">
1870         <fields oils_persist:primary="id" oils_persist:sequence="config.weight_assoc_id_seq">
1871             <field reporter:label="Assoc ID" name="id" reporter:datatype="id"/>
1872             <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
1873             <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
1874             <field reporter:label="Circ Weights" name="circ_weights" reporter:datatype="link"/>
1875             <field reporter:label="Hold Weights" name="hold_weights" reporter:datatype="link"/>
1876         </fields>
1877         <links>
1878             <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1879             <link field="circ_weights" reltype="has_a" key="id" map="" class="ccmw"/>
1880             <link field="hold_weights" reltype="has_a" key="id" map="" class="chmw"/>
1881         </links>
1882         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1883             <actions>
1884                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1885                 <retrieve permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT VIEW_CIRC_MATRIX_MATCHPOINT VIEW_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1886                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1887                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1888             </actions>
1889         </permacrud>
1890     </class>
1891
1892         <class id="chmm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::hold_matrix_matchpoint" oils_persist:tablename="config.hold_matrix_matchpoint" reporter:label="Hold Matrix Matchpoint">
1893                 <fields oils_persist:primary="id" oils_persist:sequence="config.hold_matrix_matchpoint_id_seq">
1894                         <field reporter:label="Matchpoint ID" name="id" reporter:datatype="id"/>
1895                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
1896                         <field reporter:label="Strict OU matches?" name="strict_ou_match" reporter:datatype="bool"/>
1897                         <field reporter:label="User Home Library" name="user_home_ou" reporter:datatype="org_unit"/>
1898                         <field reporter:label="Request Library" name="request_ou" reporter:datatype="org_unit"/>
1899                         <field reporter:label="Pickup Library" name="pickup_ou" reporter:datatype="org_unit"/>
1900                         <field reporter:label="Owning Library" name="item_owning_ou" reporter:datatype="org_unit"/>
1901                         <field reporter:label="Item Circ Library" name="item_circ_ou" reporter:datatype="org_unit"/>
1902                         <field reporter:label="User Permission Group" name="usr_grp" reporter:datatype="link"/>
1903                         <field reporter:label="Requestor Permission Group" name="requestor_grp" reporter:datatype="link"/>
1904                         <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="link"/>
1905                         <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="link"/>
1906                         <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="link"/>
1907                         <field reporter:label="MARC Bib Level" name="marc_bib_level" oils_persist:primitive="string" reporter:datatype="link"/>
1908                         <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="link"/>
1909                         <field reporter:label="Reference?" name="ref_flag" reporter:datatype="bool"/>
1910             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="text"/>
1911                         <field reporter:label="Holdable?" name="holdable" reporter:datatype="bool"/>
1912                         <field reporter:label="Range is from Owning Lib?" name="distance_is_from_owner" reporter:datatype="bool"/>
1913                         <field reporter:label="Transit Range" name="transit_range" reporter:datatype="link"/>
1914                         <field reporter:label="Max Holds" name="max_holds" reporter:datatype="int"/>
1915                         <field reporter:label="Max includes Frozen" name="include_frozen_holds" reporter:datatype="bool"/>
1916                         <field reporter:label="Copy Age Hold Protection Rule" name="age_hold_protect_rule" reporter:datatype="link"/>
1917                         <field name="description" reporter:datatype="text" reporter:label="Description"/>
1918                 </fields>
1919                 <links>
1920                         <link field="user_home_ou" reltype="has_a" key="id" map="" class="aou"/>
1921                         <link field="request_ou" reltype="has_a" key="id" map="" class="aou"/>
1922                         <link field="pickup_ou" reltype="has_a" key="id" map="" class="aou"/>
1923                         <link field="item_owning_ou" reltype="has_a" key="id" map="" class="aou"/>
1924                         <link field="item_circ_ou" reltype="has_a" key="id" map="" class="aou"/>
1925                         <link field="usr_grp" reltype="has_a" key="id" map="" class="pgt"/>
1926                         <link field="requestor_grp" reltype="has_a" key="id" map="" class="pgt"/>
1927                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
1928                         <link field="marc_type" reltype="has_a" key="code" map="" class="citm"/>
1929                         <link field="marc_form" reltype="has_a" key="code" map="" class="cifm"/>
1930                         <link field="marc_bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
1931                         <link field="marc_vr_format" reltype="has_a" key="code" map="" class="cvrfm"/>
1932                         <link field="age_hold_protect_rule" reltype="has_a" key="id" map="" class="crahp"/>
1933             <link field="transit_range" reltype="has_a" key="id" map="" class="aout"/>
1934                 </links>
1935         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1936             <actions>
1937                 <create permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1938                 <retrieve permission="ADMIN_HOLD_MATRIX_MATCHPOINT VIEW_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1939                 <update permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1940                 <delete permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1941             </actions>
1942         </permacrud>
1943         </class>
1944
1945         <class id="ccmm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::circ_matrix_matchpoint" oils_persist:tablename="config.circ_matrix_matchpoint" reporter:label="Circulation Matrix Matchpoint">
1946                 <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_matchpoint_id_seq">
1947                         <field reporter:label="Matchpoint ID" name="id" reporter:datatype="id"/>
1948                         <field reporter:label="Renewal?" name="is_renewal" reporter:datatype="bool"/>
1949                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
1950                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit" oils_obj:required="true"/>
1951                         <field reporter:label="Copy Circ Lib" name="copy_circ_lib" reporter:datatype="org_unit"/>
1952                         <field reporter:label="Copy Owning Lib" name="copy_owning_lib" reporter:datatype="org_unit"/>
1953                         <field reporter:label="User Home Lib" name="user_home_ou" reporter:datatype="org_unit"/>
1954                         <field reporter:label="Permission Group" name="grp" reporter:datatype="link" oils_obj:required="true"/>
1955                         <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="link"/>
1956                         <field reporter:label="Copy Location" name="copy_location" reporter:datatype="link"/>
1957                         <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="link"/>
1958                         <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="link"/>
1959                         <field reporter:label="MARC Bib Level" name="marc_bib_level" oils_persist:primitive="string" reporter:datatype="link"/>
1960                         <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="link"/>
1961                         <field reporter:label="Reference?" name="ref_flag" reporter:datatype="bool"/>
1962             <field reporter:label="Juvenile?" name="juvenile_flag" reporter:datatype="bool"/>
1963                         <field reporter:label="User Age: Lower Bound" name="usr_age_lower_bound" reporter:datatype="text"/>
1964                         <field reporter:label="User Age: Upper Bound" name="usr_age_upper_bound" reporter:datatype="text"/>
1965             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="text"/>
1966                         <field reporter:label="Circulate?" name="circulate" reporter:datatype="bool"/>
1967                         <field reporter:label="Duration Rule" name="duration_rule" reporter:datatype="link"/>
1968                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
1969                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
1970             <field reporter:label="Hard Due Date" name="hard_due_date" reporter:datatype="link"/>
1971             <field reporter:label="Renewals Override" name="renewals" reporter:datatype="int"/>
1972             <field reporter:label="Grace Period Override" name="grace_period" reporter:datatype="interval"/>
1973                         <field reporter:label="Script Test" name="script_test" reporter:datatype="text"/>
1974                         <field name="total_copy_hold_ratio" reporter:datatype="float" reporter:label="Minimum Total Copy/Hold Ratio"/>
1975                         <field name="available_copy_hold_ratio" reporter:datatype="float" reporter:label="Minimum Available Copy/Hold Ratio"/>
1976                         <field name="description" reporter:datatype="text" reporter:label="Description"/>
1977                 </fields>
1978                 <links>
1979                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1980                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
1981                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
1982                         <link field="user_home_ou" reltype="has_a" key="id" map="" class="aou"/>
1983                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
1984                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
1985                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
1986                         <link field="marc_type" reltype="has_a" key="code" map="" class="citm"/>
1987                         <link field="marc_form" reltype="has_a" key="code" map="" class="cifm"/>
1988                         <link field="marc_bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
1989                         <link field="marc_vr_format" reltype="has_a" key="code" map="" class="cvrfm"/>
1990                         <link field="duration_rule" reltype="has_a" key="id" map="" class="crcd"/>
1991                         <link field="max_fine_rule" reltype="has_a" key="id" map="" class="crmf"/>
1992                         <link field="recurring_fine_rule" reltype="has_a" key="id" map="" class="crrf"/>
1993             <link field="hard_due_date" reltype="has_a" key="id" map="" class="chdd"/>
1994                 </links>
1995         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1996             <actions>
1997                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1998                 <retrieve permission="ADMIN_CIRC_MATRIX_MATCHPOINT VIEW_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1999                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
2000                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
2001             </actions>
2002         </permacrud>
2003         </class>
2004
2005     <class id="cclg" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::circ_limit_group" oils_persist:tablename="config.circ_limit_group" reporter:label="Circulation Limit Group">
2006         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_group_id_seq">
2007             <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2008             <field reporter:label="Name" name="name" reporter:datatype="text"/>
2009             <field reporter:label="Description" name="description" reporter:datatype="text"/>
2010         </fields>
2011         <links/>
2012         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2013             <actions>
2014                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
2015                 <retrieve/>
2016                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
2017                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
2018             </actions>
2019         </permacrud>
2020     </class>
2021
2022     <class id="ccls" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::circ_limit_set" oils_persist:tablename="config.circ_limit_set" reporter:label="Circulation Limit Set">
2023         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_id_seq">
2024             <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2025             <field reporter:label="Name" name="name" reporter:datatype="text"/>
2026             <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
2027             <field reporter:label="Items Out" name="items_out" reporter:datatype="int"/>
2028             <field reporter:label="Min Depth" name="depth" reporter:datatype="int"/>
2029             <field reporter:label="Global" name="global" reporter:datatype="bool"/>
2030             <field reporter:label="Description" name="description" reporter:datatype="text"/>
2031         </fields>
2032         <links>
2033             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2034         </links>
2035         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2036             <actions>
2037                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field="owning_lib"/>
2038                 <retrieve/>
2039                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field="owning_lib"/>
2040                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field="owning_lib"/>
2041             </actions>
2042         </permacrud>
2043     </class>
2044
2045     <class id="ccmlsm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::circ_matrix_limit_set_map" oils_persist:tablename="config.circ_matrix_limit_set_map" reporter:label="Circulation Matrix Limit Set Map">
2046         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_limit_set_map_id_seq">
2047             <field reporter:label="ID" name="id" reporter:datatype="id"/>
2048             <field reporter:label="Matchpoint" name="matchpoint" reporter:datatype="link"/>
2049             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
2050             <field reporter:label="Fallthrough" name="fallthrough" reporter:datatype="bool"/>
2051             <field reporter:label="Active" name="active" reporter:datatype="bool"/>
2052         </fields>
2053         <links>
2054             <link field="matchpoint" reltype="has_a" key="id" map="" class="ccmm"/>
2055             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
2056         </links>
2057         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2058             <actions>
2059                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2060                     <context link="matchpoint" field="org_unit"/>
2061                 </create>
2062                 <retrieve/>
2063                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2064                     <context link="matchpoint" field="org_unit"/>
2065                 </update>
2066                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2067                     <context link="matchpoint" field="org_unit"/>
2068                 </delete>
2069             </actions>
2070         </permacrud>
2071     </class>
2072
2073     <class id="cclscmm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::circ_limit_set_circ_mod_map" oils_persist:tablename="config.circ_limit_set_circ_mod_map" reporter:label="Circulation Limit Set Circ Mod Map">
2074         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_circ_mod_map_id_seq">
2075             <field reporter:label="ID" name="id" reporter:datatype="id"/>
2076             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
2077             <field reporter:label="Circulation Modifier" name="circ_mod" reporter:datatype="link"/>
2078         </fields>
2079         <links>
2080             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
2081             <link field="circ_mod" reltype="has_a" key="code" map="" class="ccm"/>
2082         </links>
2083         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2084             <actions>
2085                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2086                     <context link="limit_set" field="owning_lib"/>
2087                 </create>
2088                 <retrieve/>
2089                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2090                     <context link="limit_set" field="owning_lib"/>
2091                 </update>
2092                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2093                     <context link="limit_set" field="owning_lib"/>
2094                 </delete>
2095             </actions>
2096         </permacrud>
2097     </class>
2098     <class id="cclsacpl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::circ_limit_set_copy_loc_map" oils_persist:tablename="config.circ_limit_set_copy_loc_map" reporter:label="Circulation Limit Set Copy Location Map">
2099         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_copy_loc_map_id_seq">
2100             <field reporter:label="ID" name="id" reporter:datatype="id"/>
2101             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
2102             <field reporter:label="Copy Location" name="copy_loc" reporter:datatype="link"/>
2103         </fields>
2104         <links>
2105             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
2106             <link field="copy_loc" reltype="has_a" key="id" map="" class="acpl"/>
2107         </links>
2108         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2109             <actions>
2110                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2111                     <context link="limit_set" field="owning_lib"/>
2112                 </create>
2113                 <retrieve/>
2114                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2115                     <context link="limit_set" field="owning_lib"/>
2116                 </update>
2117                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2118                     <context link="limit_set" field="owning_lib"/>
2119                 </delete>
2120             </actions>
2121         </permacrud>
2122     </class>
2123
2124     <class id="cclsgm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::circ_limit_set_group_map" oils_persist:tablename="config.circ_limit_set_group_map" reporter:label="Circulation Limit Set Group Map">
2125         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_group_map_id_seq">
2126             <field reporter:label="ID" name="id" reporter:datatype="id"/>
2127             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
2128             <field reporter:label="Limit Group" name="limit_group" reporter:datatype="link"/>
2129             <field reporter:label="Check Only" name="check_only" reporter:datatype="bool"/>
2130         </fields>
2131         <links>
2132             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
2133             <link field="limit_group" reltype="has_a" key="id" map="" class="cclg"/>
2134         </links>
2135         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2136             <actions>
2137                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2138                     <context link="limit_set" field="owning_lib"/>
2139                 </create>
2140                 <retrieve/>
2141                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2142                     <context link="limit_set" field="owning_lib"/>
2143                 </update>
2144                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2145                     <context link="limit_set" field="owning_lib"/>
2146                 </delete>
2147             </actions>
2148         </permacrud>
2149     </class>
2150
2151         <class id="cit" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::identification_type" oils_persist:tablename="config.identification_type" reporter:label="Identification Type">
2152                 <fields oils_persist:primary="id" oils_persist:sequence="config.identification_type_id_seq">
2153                         <field reporter:label="Identification ID" name="id" reporter:selector="name" reporter:datatype="id"/>
2154                         <field reporter:label="Identification Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
2155                 </fields>
2156                 <links/>
2157         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2158             <actions>
2159                 <create permission="ADMIN_IDENT_TYPE" global_required="true"/>
2160                 <retrieve/>
2161                 <update permission="ADMIN_IDENT_TYPE" global_required="true"/>
2162                 <delete permission="ADMIN_IDENT_TYPE" global_required="true"/>
2163             </actions>
2164         </permacrud>
2165         </class>
2166
2167         <class id="asvq" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::survey_question" oils_persist:tablename="action.survey_question" reporter:label="User Survey Question">
2168                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_question_id_seq">
2169                         <field reporter:label="Answers" name="answers" oils_persist:virtual="true" reporter:datatype="link"/>
2170                         <field reporter:label="Responses" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
2171                         <field reporter:label="Question ID" name="id" reporter:datatype="id" />
2172                         <field reporter:label="Question" name="question" reporter:datatype="text"/>
2173                         <field reporter:label="Survey" name="survey" reporter:datatype="link"/>
2174                 </fields>
2175                 <links>
2176                         <link field="survey" reltype="has_a" key="id" map="" class="asv"/>
2177                         <link field="responses" reltype="has_many" key="question" map="" class="asvr"/>
2178                         <link field="answers" reltype="has_many" key="question" map="" class="asva"/>
2179                 </links>
2180         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2181             <actions>
2182                 <create permission="ADMIN_SURVEY">
2183                     <context link="survey" field="owner"/>
2184                 </create>
2185                 <retrieve/>
2186                 <update permission="ADMIN_SURVEY">
2187                     <context link="survey" field="owner"/>
2188                 </update>
2189                 <delete permission="ADMIN_SURVEY">
2190                     <context link="survey" field="owner"/>
2191                 </delete>
2192             </actions>
2193         </permacrud>
2194         </class>
2195         <class id="mbts" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::billable_transaction_summary" oils_persist:tablename="money.materialized_billable_xact_summary" reporter:label="Billable Transaction Summary" oils_persist:readonly="true">
2196                 <fields oils_persist:primary="id" oils_persist:sequence="">
2197                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
2198                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id"/>
2199                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
2200                         <field reporter:label="Last Billing Timestamp" name="last_billing_ts" reporter:datatype="timestamp"/>
2201                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
2202                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
2203                         <field reporter:label="Last Payment Timestamp" name="last_payment_ts" reporter:datatype="timestamp"/>
2204                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
2205                         <field reporter:label="Total Owed" name="total_owed" reporter:datatype="money"/>
2206                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
2207                         <field reporter:label="Billed User" name="usr" reporter:datatype="link"/>
2208                         <field reporter:label="Transaction Finish Time" name="xact_finish" reporter:datatype="timestamp" />
2209                         <field reporter:label="Transaction Start Time" name="xact_start" reporter:datatype="timestamp" />
2210                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
2211                 </fields>
2212                 <links>
2213                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2214                 </links>
2215                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2216                         <actions>
2217                                 <retrieve permission="VIEW_USER_TRANSACTIONS">
2218                                         <context link="usr" field="home_ou" />
2219                                 </retrieve>
2220                         </actions>
2221                 </permacrud>
2222         </class>
2223         <class id="mbtslv" controller="open-ils.cstore" oils_obj:fieldmapper="money::billable_transaction_summary_location_view" oils_persist:tablename="money.billable_xact_summary_location_view" reporter:label="Billable Transaction Summary with Billing Location" oils_persist:readonly="true" reporter:core="true">
2224                 <fields oils_persist:primary="id" oils_persist:sequence="">
2225                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
2226                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id"/>
2227                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
2228                         <field reporter:label="Last Billing Timestamp" name="last_billing_ts" reporter:datatype="timestamp"/>
2229                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
2230                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
2231                         <field reporter:label="Last Payment Timestamp" name="last_payment_ts" reporter:datatype="timestamp"/>
2232                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
2233                         <field reporter:label="Total Owed" name="total_owed" reporter:datatype="money"/>
2234                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
2235                         <field reporter:label="Billed User" name="usr" reporter:datatype="link"/>
2236                         <field reporter:label="Transaction Finish Time" name="xact_finish" reporter:datatype="timestamp" />
2237                         <field reporter:label="Transaction Start Time" name="xact_start" reporter:datatype="timestamp" />
2238                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
2239                         <field reporter:label="Billing Location" name="billing_location" reporter:datatype="link"/>
2240                 </fields>
2241                 <links>
2242                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2243                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
2244                 </links>
2245         </class>
2246         <class id="aum" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::usr_message" oils_persist:tablename="actor.usr_message" reporter:label="User Message">
2247                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_message_id_seq">
2248                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2249                         <field reporter:label="Read Date/Time" name="read_date" reporter:datatype="timestamp"/>
2250                         <field reporter:label="Creating Library" name="sending_lib" reporter:datatype="link"/>
2251                         <field reporter:label="Message ID" name="id" reporter:datatype="id" />
2252                         <field reporter:label="Deleted?" name="deleted" reporter:datatype="bool"/>
2253                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
2254                         <field reporter:label="User" name="usr" reporter:datatype="link" />
2255                         <field reporter:label="Message" name="message" reporter:datatype="text"/>
2256                 </fields>
2257                 <links>
2258                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2259                         <link field="sending_lib" reltype="has_a" key="id" map="" class="aou"/>
2260                 </links>
2261                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2262                         <actions> <!-- created magically, so no create action -->
2263                                 <retrieve permission="VIEW_USER" context_field="sending_lib" />
2264                                 <update permission="UPDATE_USER" context_field="sending_lib" />
2265                                 <delete permission="UPDATE_USER" context_field="sending_lib" />
2266                         </actions>
2267                 </permacrud>
2268         </class>
2269         <class id="auml" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::usr_message_limited" oils_persist:tablename="actor.usr_message_limited" reporter:label="User Message (Limited Access)">
2270                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_message_id_seq">
2271                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2272                         <field reporter:label="Read Date/Time" name="read_date" reporter:datatype="timestamp"/>
2273                         <field reporter:label="Creating Library" name="sending_lib" reporter:datatype="link"/>
2274                         <field reporter:label="Message ID" name="id" reporter:datatype="id" />
2275                         <field reporter:label="Deleted?" name="deleted" reporter:datatype="bool"/>
2276                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
2277                         <field reporter:label="User" name="usr" reporter:datatype="link" />
2278                         <field reporter:label="Message" name="message" reporter:datatype="text"/>
2279                 </fields>
2280                 <links>
2281                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2282                         <link field="sending_lib" reltype="has_a" key="id" map="" class="aou"/>
2283                 </links>
2284                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2285                         <actions> <!-- created magically, so no create action -->
2286                                 <retrieve permission="UPDATE_USER" context_field="sending_lib" owning_user="usr"/>
2287                                 <update   permission="UPDATE_USER" context_field="sending_lib" owning_user="usr"/>
2288                         </actions>
2289                 </permacrud>
2290         </class>
2291         <class id="aun" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::usr_note" oils_persist:tablename="actor.usr_note" reporter:label="User Note">
2292                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_note_id_seq">
2293                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2294                         <field reporter:label="Creating Staff" name="creator" reporter:datatype="link"/>
2295                         <field reporter:label="Note ID" name="id" reporter:datatype="id" />
2296                         <field reporter:label="Is OPAC Visible?" name="pub" reporter:datatype="bool"/>
2297                         <field reporter:label="Note Title" name="title" reporter:datatype="text"/>
2298                         <field reporter:label="User" name="usr" reporter:datatype="link" />
2299                         <field reporter:label="Note Content" name="value" reporter:datatype="text"/>
2300                 </fields>
2301                 <links>
2302                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2303                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2304                 </links>
2305         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2306             <actions>
2307                 <create permission="UPDATE_USER" context_field="owner">
2308                     <context link="usr" field="home_ou"/>
2309                 </create>
2310                                 <!-- note: public notes are still accessible via API -->
2311                 <retrieve permission="UPDATE_USER">
2312                     <context link="usr" field="home_ou"/>
2313                                 </retrieve>
2314                 <update permission="UPDATE_USER">
2315                     <context link="usr" field="home_ou"/>
2316                                 </update>
2317                 <delete permission="UPDATE_USER">
2318                     <context link="usr" field="home_ou"/>
2319                                 </delete>
2320             </actions>
2321         </permacrud>
2322         </class>
2323         <class id="aupw" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::usr_privacy_waiver" oils_persist:tablename="actor.usr_privacy_waiver" reporter:label="Privacy Waiver">
2324                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_privacy_waiver_id_seq">
2325                         <field reporter:label="ID" name="id" reporter:datatype="id" />
2326                         <field reporter:label="User" name="usr" reporter:datatype="link" />
2327                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2328                         <field reporter:label="Place Holds?" name="place_holds" reporter:datatype="bool" />
2329                         <field reporter:label="Pick Up Holds?" name="pickup_holds" reporter:datatype="bool" />
2330                         <field reporter:label="View Borrowing History?" name="view_history" reporter:datatype="bool" />
2331                         <field reporter:label="Check Out Items?" name="checkout_items" reporter:datatype="bool" />
2332                 </fields>
2333                 <links>
2334                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2335                 </links>
2336                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2337                         <actions>
2338                                 <create permission="UPDATE_USER">
2339                                         <context link="usr" field="home_ou"/>
2340                                 </create>
2341                                 <retrieve permission="VIEW_USER">
2342                                         <context link="usr" field="home_ou"/>
2343                                 </retrieve>
2344                                 <update permission="UPDATE_USER">
2345                                         <context link="usr" field="home_ou"/>
2346                                 </update>
2347                                 <delete permission="UPDATE_USER">
2348                                         <context link="usr" field="home_ou"/>
2349                                 </delete>
2350                         </actions>
2351                 </permacrud>
2352         </class>
2353         <class id="aupr" controller="open-ils.cstore" oils_obj:fieldmapper="actor::usr_password_reset" oils_persist:tablename="actor.usr_password_reset" reporter:label="User password reset requests">
2354                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_password_reset_id_seq">
2355                         <field reporter:label="Request ID" name="id" reporter:datatype="id"/>
2356                         <field reporter:label="UUID" name="uuid" reporter:datatype="text"/>
2357                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
2358                         <field reporter:label="Request Time" name="request_time" reporter:datatype="timestamp"/>
2359                         <field reporter:label="Was Reset?" name="has_been_reset" reporter:datatype="bool"/>
2360                 </fields>
2361                 <links>
2362                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2363                 </links>
2364         </class>
2365         <class id="aus" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::user_setting" oils_persist:tablename="actor.usr_setting" reporter:label="User Setting">
2366                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_setting_id_seq">
2367                         <field reporter:label="Setting ID" name="id" reporter:datatype="id" />
2368                         <field reporter:label="Name" name="name" reporter:datatype="link"/>
2369                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
2370                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
2371                 </fields>
2372                 <links>
2373                         <link field="name" reltype="has_a" key="name" map="" class="cust"/>
2374                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2375                 </links>
2376                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2377                         <actions>
2378                                 <retrieve permission="VIEW_USER">
2379                                         <context link="usr" field="home_ou" />
2380                                 </retrieve>
2381                         </actions>
2382                 </permacrud>
2383         </class>
2384         <class id="mafe" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::author_field_entry" oils_persist:tablename="metabib.author_field_entry" reporter:label="Author Field Entry">
2385                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.author_field_entry_id_seq">
2386                         <field name="field" reporter:datatype="link"/>
2387                         <field name="id" reporter:datatype="id" />
2388                         <field name="source" reporter:datatype="link"/>
2389                         <field name="value" reporter:datatype="text"/>
2390                 </fields>
2391                 <links>
2392                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
2393                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
2394                 </links>
2395         </class>
2396         <class id="aihu" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::in_house_use" oils_persist:tablename="action.in_house_use" reporter:core="true" reporter:label="In House Use">
2397                 <fields oils_persist:primary="id" oils_persist:sequence="action.in_house_use_id_seq">
2398                         <field reporter:label="Use ID" name="id" reporter:datatype="id" />
2399                         <field reporter:label="Item" name="item" reporter:datatype="int" />
2400                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
2401                         <field reporter:label="Recording Staff" name="staff" reporter:datatype="link"/>
2402                         <field reporter:label="Use Date/Time" name="use_time" reporter:datatype="timestamp"/>
2403                 </fields>
2404                 <links>
2405                         <link field="item" reltype="has_a" key="id" map="" class="acp"/>
2406                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
2407                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
2408                 </links>
2409                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2410                         <actions>
2411                                 <retrieve/>
2412                         </actions>
2413                 </permacrud>
2414         </class>
2415         <class id="ancihu" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::non_cat_in_house_use" oils_persist:tablename="action.non_cat_in_house_use" reporter:core="true" reporter:label="Non-cataloged In House Use">
2416                 <fields oils_persist:primary="id" oils_persist:sequence="action.non_cat_in_house_use_id_seq">
2417                         <field reporter:label="Use ID" name="id" reporter:datatype="id" />
2418                         <field reporter:label="Item Type" name="item_type" reporter:datatype="link"/>
2419                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
2420                         <field reporter:label="Recording Staff" name="staff" reporter:datatype="link"/>
2421                         <field reporter:label="Use Date/Time" name="use_time" reporter:datatype="timestamp"/>
2422                 </fields>
2423                 <links>
2424                         <link field="item_type" reltype="has_a" key="id" map="" class="cnct"/>
2425                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
2426                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
2427                 </links>
2428                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2429                         <actions>
2430                                 <retrieve/>
2431                         </actions>
2432                 </permacrud>
2433         </class>
2434         <class id="atc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::transit_copy" oils_persist:tablename="action.transit_copy" reporter:core="true" reporter:label="Copy Transit">
2435                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
2436                         <field reporter:label="Pretransit Copy Status" name="copy_status" reporter:datatype="bool"/>
2437                         <field reporter:label="Destination" name="dest" reporter:datatype="link"/>
2438                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
2439                         <field reporter:label="Transit ID" name="id" reporter:datatype="id"/>
2440                         <field reporter:label="Is Persistent? (unused)" name="persistant_transfer" reporter:datatype="bool"/>
2441                         <field reporter:label="Previous Hop (unused)" name="prev_hop" reporter:datatype="link"/>
2442                         <field reporter:label="Source" name="source" reporter:datatype="link"/>
2443                         <field reporter:label="Prev Destination" name="prev_dest" reporter:datatype="org_unit"/>
2444                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
2445                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
2446                         <field reporter:label="Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
2447                         <field reporter:label="Hold Transit" name="hold_transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
2448                 </fields>
2449                 <links>
2450                         <link field="hold_transit_copy" reltype="might_have" key="id" map="" class="ahtc"/>
2451                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
2452                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
2453                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
2454                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
2455                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
2456                 </links>
2457         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2458             <actions>
2459                 <create permission="TRANSIT_COPY" context_field="owner">
2460                     <context link="target_copy" field="circ_lib"/>
2461                 </create>
2462                 <retrieve/>
2463                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
2464                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
2465             </actions>
2466         </permacrud>
2467         </class>
2468         <class id="asvr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::survey_response" oils_persist:tablename="action.survey_response" reporter:label="Survey Response">
2469                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_response_id_seq">
2470                         <field reporter:label="Answer" name="answer" reporter:datatype="link"/>
2471                         <field reporter:label="Answer Date/Time" name="answer_date" reporter:datatype="timestamp"/>
2472                         <field reporter:label="Effective Answer Date/Time" name="effective_date" reporter:datatype="timestamp"/>
2473                         <field reporter:label="Answer ID" name="id" reporter:datatype="id" />
2474                         <field reporter:label="Question" name="question" reporter:datatype="link"/>
2475                         <field reporter:label="Response Group ID" name="response_group_id" reporter:datatype="int" />
2476                         <field reporter:label="Survey" name="survey" reporter:datatype="link"/>
2477                         <field reporter:label="Responding User" name="usr" reporter:datatype="link"/>
2478                 </fields>
2479                 <links>
2480                         <link field="question" reltype="has_a" key="id" map="" class="asvq"/>
2481                         <link field="survey" reltype="has_a" key="id" map="" class="asv"/>
2482                         <link field="answer" reltype="has_a" key="id" map="" class="asva"/>
2483                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2484                 </links>
2485         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2486             <actions>
2487                 <create permission="ADMIN_SURVEY">
2488                     <context link="survey" field="owner"/>
2489                 </create>
2490                 <retrieve permission="VIEW_USER">
2491                     <context link="usr" field="home_ou"/>
2492                 </retrieve>
2493                 <update permission="ADMIN_SURVEY">
2494                     <context link="survey" field="owner"/>
2495                 </update>
2496                 <delete permission="ADMIN_SURVEY">
2497                     <context link="survey" field="owner"/>
2498                 </delete>
2499             </actions>
2500         </permacrud>
2501         </class>
2502         <class id="ccbi" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="container::copy_bucket_item" oils_persist:tablename="container.copy_bucket_item" reporter:label="Copy Bucket Item">
2503                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_item_id_seq">
2504                         <field name="bucket" />
2505                         <field name="id" reporter:datatype="id" />
2506                         <field name="target_copy" reporter:datatype="link"/>
2507                         <field name="create_time" reporter:datatype="timestamp" />
2508                         <field name="pos" reporter:datatype="int" />
2509                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
2510                 </fields>
2511                 <links>
2512                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
2513                         <link field="bucket" reltype="has_a" key="id" map="" class="ccb"/>
2514             <link field="notes" reltype="has_many" map="" key="item" class="ccbin"/>
2515                 </links>
2516                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2517                         <actions>
2518                                 <retrieve permission="ADMIN_COPY_BUCKET">
2519                     <context link="bucket" owning_lib="owning_lib"/>
2520                 </retrieve>
2521             </actions>
2522         </permacrud>
2523         </class>
2524         <class id="ccbin" controller="open-ils.cstore" oils_obj:fieldmapper="container::copy_bucket_item_note" oils_persist:tablename="container.copy_bucket_item_note" reporter:label="Copy Bucket Item Note">
2525                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_item_note_id_seq">
2526                         <field name="id" reporter:datatype="id" />
2527                         <field name="item" reporter:datatype="link"/>
2528                         <field name="note" reporter:datatype="text" />
2529                 </fields>
2530                 <links>
2531                         <link field="item" reltype="has_a" key="id" map="" class="ccbi"/>
2532                 </links>
2533         </class>
2534
2535         <class id="acs" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="authority::control_set" oils_persist:tablename="authority.control_set" reporter:label="Authority Control Set" oils_persist:field_safe="true">
2536                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_id_seq">
2537                         <field reporter:label="Control Set ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2538                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
2539                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2540                         <field reporter:label="Controlling Authority Fields" name="authority_fields" reporter:datatype="link" oils_persist:virtual="true"/>
2541                         <field reporter:label="Thesauri" name="thesauri" reporter:datatype="link" oils_persist:virtual="true"/>
2542                 </fields>
2543                 <links>
2544                         <link field="authority_fields" reltype="has_many" key="control_set" map="" class="acsaf"/>
2545                         <link field="thesauri" reltype="has_many" key="control_set" map="" class="at"/>
2546                 </links>
2547                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2548                         <actions>
2549                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2550                                 <retrieve/>
2551                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2552                                 <delete permission="DELETE_AUTHORITY_CONTROL_SET" global_required="true"/>
2553                         </actions>
2554                 </permacrud>
2555         </class>
2556
2557         <class id="acsaf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="authority::control_set_authority_field" oils_persist:tablename="authority.control_set_authority_field" reporter:label="Authority Control Set Authority Field" oils_persist:field_safe="true">
2558                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_authority_field_id_seq">
2559                         <field reporter:label="Control Set Authority Field ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2560                         <field reporter:label="Main Entry" name="main_entry" reporter:datatype="link"/>
2561                         <field reporter:label="Control Set" name="control_set" reporter:datatype="link"/>
2562                         <field reporter:label="Tag" name="tag" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.{3}$"/>
2563                         <field reporter:label="Subfield List" name="sf_list" reporter:datatype="text" />
2564                         <field reporter:label="Subfield List for Display" name="display_sf_list" reporter:datatype="text" />
2565                         <field reporter:label="Non-filing Indicator" name="nfi" reporter:datatype="text" />
2566                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
2567                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2568                         <field reporter:label="Linking Subfield" name="linking_subfield" reporter:datatype="text" />
2569                         <field reporter:label="Subordinate Entries" name="sub_entries" reporter:datatype="link" oils_persist:virtual="true"/>
2570                         <field reporter:label="Controlled Bib Fields" name="bib_fields" reporter:datatype="link" oils_persist:virtual="true"/>
2571                         <field reporter:label="Thesauri" name="thesauri" reporter:datatype="link" oils_persist:virtual="true"/>
2572                         <field reporter:label="Browse Axis Maps" name="axis_maps" reporter:datatype="link" oils_persist:virtual="true"/>
2573                         <field reporter:label="Joiner" name="joiner" reporter:datatype="text" />
2574                         <field reporter:label="Heading Field" name="heading_field" reporter:datatype="link" />
2575                 </fields>
2576                 <links>
2577                         <link field="axis_maps" reltype="has_many" key="field" map="" class="abaafm"/>
2578                         <link field="control_set" reltype="has_a" key="id" map="" class="acs"/>
2579                         <link field="bib_fields" reltype="has_many" key="authority_field" map="" class="acsbf"/>
2580                         <link field="thesauri" reltype="has_many" key="control_set" map="" class="at"/>
2581                         <link field="main_entry" reltype="has_a" key="id" map="" class="acsaf"/>
2582                         <link field="sub_entries" reltype="has_many" key="main_entry" map="" class="acsaf"/>
2583                         <link field="heading" reltype="has_a" key="id" map="" class="ahf"/>
2584                 </links>
2585                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2586                         <actions>
2587                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2588                                 <retrieve/>
2589                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2590                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2591                         </actions>
2592                 </permacrud>
2593         </class>
2594
2595         <class id="acsbf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="authority::control_set_bib_field" oils_persist:tablename="authority.control_set_bib_field" reporter:label="Authority Control Set Bib Field" oils_persist:field_safe="true">
2596                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_bib_field_id_seq">
2597                         <field reporter:label="Controlled Bib Field ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2598                         <field reporter:label="Controlling Authority Field" name="authority_field" reporter:datatype="link"/>
2599                         <field reporter:label="Tag" name="tag" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.{3}$"/>
2600                 </fields>
2601                 <links>
2602                         <link field="authority_field" reltype="has_a" key="id" map="" class="acsaf"/>
2603                 </links>
2604                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2605                         <actions>
2606                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2607                                 <retrieve/>
2608                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2609                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2610                         </actions>
2611                 </permacrud>
2612         </class>
2613
2614         <class id="acsbfmfm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="authority::control_set_bib_field_metabib_field_map" oils_persist:tablename="authority.control_set_bib_field_metabib_field_map" reporter:label="Authority Control Set Bib Field to Metabib Field Map" oils_persist:field_safe="true">
2615                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_bib_field_metabib_field_map_id_seq">
2616                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2617                         <field reporter:label="Bib Field" name="bib_field" reporter:datatype="link"/>
2618                         <field reporter:label="Metabib Field" name="metabib_field" reporter:datatype="link"/>
2619                 </fields>
2620                 <links>
2621                         <link field="bib_field" reltype="has_a" key="id" map="" class="acsbf"/>
2622                         <link field="metabib_field" reltype="has_a" key="id" map="" class="cmf"/>
2623                 </links>
2624                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2625                         <actions>
2626                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2627                                 <retrieve/>
2628                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2629                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2630                         </actions>
2631                 </permacrud>
2632         </class>
2633
2634         <class id="at" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="authority::thesaurus" oils_persist:tablename="authority.thesaurus" reporter:label="Authority Thesaurus" oils_persist:field_safe="true">
2635                 <fields oils_persist:primary="code">
2636                         <field reporter:label="Thesaurus Code" name="code" reporter:datatype="id" reporter:selector="name"/>
2637                         <field reporter:label="Control Set" name="control_set" reporter:datatype="link"/>
2638                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
2639                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2640                         <field reporter:label="Short Code" name="short_code" reporter:datatype="text" />
2641                         <field reporter:label="URI" name="uri" reporter:datatype="text" />
2642                 </fields>
2643                 <links>
2644                         <link field="control_set" reltype="has_a" key="id" map="" class="acs"/>
2645                 </links>
2646                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2647                         <actions>
2648                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2649                                 <retrieve/>
2650                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2651                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2652                         </actions>
2653                 </permacrud>
2654         </class>
2655
2656         <class id="aba" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="authority::browse_axis" oils_persist:tablename="authority.browse_axis" reporter:label="Authority Browse Axis" oils_persist:field_safe="true">
2657                 <fields oils_persist:primary="code">
2658                         <field reporter:label="Code" name="code" reporter:datatype="id" reporter:selector="name" oils_obj:validate="^\S+$"/>
2659                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true"/>
2660                         <field reporter:label="Sorter Attribute" name="sorter" reporter:datatype="link"/>
2661                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
2662                         <field reporter:label="Authority Fields" name="fields" reporter:datatype="link" oils_persist:virtual="true"/>
2663                         <field reporter:label="Authority Field Maps" name="maps" reporter:datatype="link" oils_persist:virtual="true"/>
2664                 </fields>
2665                 <links>
2666                         <link field="sorter" reltype="has_a" key="name" map="" class="crad"/>
2667                         <link field="fields" reltype="has_many" key="axis" map="field" class="abaafm"/>
2668                         <link field="maps" reltype="has_many" key="axis" map="" class="abaafm"/>
2669                 </links>
2670                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2671                         <actions>
2672                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2673                                 <retrieve/>
2674                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2675                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2676                         </actions>
2677                 </permacrud>
2678         </class>
2679
2680     <class id="abaafm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="authority::browse_axis_authority_field_map" oils_persist:tablename="authority.browse_axis_authority_field_map" reporter:label="Authority Browse Axis Field Map" oils_persist:field_safe="true">
2681         <fields oils_persist:primary="id" oils_persist:sequence="authority.browse_axis_authority_field_map_id_seq">
2682             <field reporter:label="Axis Authority Field Map ID" name="id" reporter:datatype="id"/>
2683             <field reporter:label="Authority Field" name="field" oils_obj:required="true" reporter:datatype="link"/>
2684             <field reporter:label="Axis" name="axis" reporter:datatype="link" oils_obj:required="true"/>
2685         </fields>
2686         <links>
2687             <link field="field" reltype="has_a" key="id" map="" class="acsaf"/>
2688             <link field="axis" reltype="has_a" key="code" map="" class="aba"/>
2689         </links>
2690         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2691             <actions>
2692                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2693                 <retrieve/>
2694                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2695                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2696             </actions>
2697         </permacrud>
2698     </class>
2699
2700         <class id="are" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="authority::record_entry" oils_persist:tablename="authority.record_entry" reporter:label="Authority Record Entry">
2701                 <fields oils_persist:primary="id" oils_persist:sequence="authority.record_entry_id_seq">
2702                         <field name="active" reporter:datatype="bool"/>
2703                         <field name="create_date" reporter:datatype="timestamp"/>
2704                         <field name="creator" />
2705                         <field name="deleted" reporter:datatype="bool"/>
2706                         <field name="edit_date" reporter:datatype="timestamp"/>
2707                         <field name="editor" />
2708                         <field name="id" reporter:datatype="id" />
2709                         <field name="last_xact_id" />
2710                         <field name="marc" />
2711                         <field name="source" />
2712                         <field reporter:label="Control Set" name="control_set" reporter:datatype="link"/>
2713                         <field reporter:label="Owner" name="owner"  reporter:datatype="org_unit"/>
2714                         <field name="heading" />
2715                         <field name="simple_heading" />
2716                         <field name="fixed_fields" oils_persist:virtual="true" reporter:datatype="link"/>
2717                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
2718                         <field name="bib_links" oils_persist:virtual="true" reporter:datatype="link"/>
2719                 </fields>
2720                 <links>
2721                         <link field="control_set" reltype="has_a" key="id" map="" class="acs"/>
2722                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
2723                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
2724                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2725                         <link field="notes" reltype="has_many" key="record" map="" class="arn"/>
2726                         <link field="bib_links" reltype="has_many" key="authority" map="" class="abl"/>
2727                         <link field="fixed_fields" reltype="might_have" key="record" map="" class="ard"/>
2728                 </links>
2729                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2730                         <actions>
2731                                 <create permission="CREATE_AUTHORITY_RECORD IMPORT_MARC" global_required="true"/>
2732                                 <retrieve/>
2733                                 <update permission="UPDATE_AUTHORITY_RECORD" global_required="true"/>
2734                                 <delete permission="DELETE_AUTHORITY_RECORD" global_required="true"/>
2735                         </actions>
2736                 </permacrud>
2737         </class>
2738         <class id="ard" controller="open-ils.cstore" oils_obj:fieldmapper="authority::record_descriptor" oils_persist:tablename="authority.rec_descriptor" reporter:label="Authority Record Descriptor">
2739                 <fields oils_persist:primary="id" oils_persist:sequence="authority.rec_descriptor_id_seq">
2740                         <field name="char_encoding" />
2741                         <field name="id" />
2742                         <field name="record" />
2743                         <field name="record_status" />
2744                         <field name="thesaurus" />
2745                 </fields>
2746                 <links>
2747                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
2748                         <link field="thesaurus" reltype="might_have" key="code" map="" class="at"/>
2749                 </links>
2750         </class>
2751         <class id="abl" controller="open-ils.cstore" oils_obj:fieldmapper="authority::bib_linking" oils_persist:tablename="authority.bib_linking" reporter:label="Authority-Bibliographic Record Link">
2752                 <fields oils_persist:primary="id" oils_persist:sequence="authority.bib_linking_id_seq">
2753                         <field name="id" reporter:datatype="id" />
2754                         <field name="bib" reporter:datatype="link" />
2755                         <field name="authority" reporter:datatype="link" />
2756                 </fields>
2757                 <links>
2758                         <link field="bib" reltype="has_a" key="id" map="" class="bre"/>
2759                         <link field="authority" reltype="has_a" key="id" map="" class="are"/>
2760                 </links>
2761         </class>
2762         <class id="ash" controller="open-ils.cstore" oils_obj:fieldmapper="authority::simple_heading" oils_persist:tablename="authority.simple_heading" reporter:label="Authority Simple Heading">
2763                 <fields oils_persist:primary="id" oils_persist:sequence="authority.simple_heading_id_seq">
2764                         <field name="id" reporter:datatype="id" />
2765                         <field name="record" reporter:datatype="link" />
2766                         <field name="atag" reporter:datatype="link" />
2767                         <field name="value" reporter:datatype="text" />
2768                 </fields>
2769                 <links>
2770                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
2771                         <link field="atag" reltype="has_a" key="id" map="" class="acsaf"/>
2772                 </links>
2773         </class>
2774
2775         <class id="ahf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="authority::heading_field" oils_persist:tablename="authority.heading_field" reporter:label="Authority Heading Fields">
2776                 <fields oils_persist:primary="id" oils_persist:sequence="authority.heading_fields_id_seq">
2777                         <field name="id" reporter:datatype="id" />
2778                         <field name="heading_type" reporter:datatype="text" reporter:label="Heading Type" />
2779                         <field name="heading_purpose" reporter:datatype="text" reporter:label="Heading Purpose" />
2780                         <field name="label" reporter:datatype="text" reporter:label="Heading Field Label" />
2781                         <field name="format" reporter:datatype="text" reporter:label="Heading XSLT Format" />
2782                         <field name="heading_xpath" reporter:datatype="text" reporter:label="Heading XPath" />
2783                         <field name="component_xpath" reporter:datatype="text" reporter:label="Heading Component XPath" />
2784                         <field name="type_xpath" reporter:datatype="text" reporter:label="Related/Variant Type XPath" />
2785                         <field name="thesaurus_xpath" reporter:datatype="text" reporter:label="Thesaurus XPath" />
2786                         <field name="thesaurus_override_xpath" reporter:datatype="text" reporter:label="Thesaurus Override XPath" />
2787                         <field name="joiner" reporter:datatype="text" reporter:label="Joiner string" />
2788                 </fields>
2789                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2790                         <actions>
2791                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2792                                 <retrieve/>
2793                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2794                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2795                         </actions>
2796                 </permacrud>
2797         </class>
2798
2799         <class id="clm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::language_map" oils_persist:tablename="config.language_map" reporter:label="Language Map" oils_persist:field_safe="true">
2800                 <fields oils_persist:primary="code" oils_persist:sequence="">
2801                         <field reporter:label="Language Code" name="code" reporter:selector="value" reporter:datatype="text"/>
2802                         <field reporter:label="Language" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
2803                 </fields>
2804                 <links/>
2805         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2806             <actions>
2807                 <create permission="CREATE_MARC_CODE" global_required="true"/>
2808                 <retrieve/>
2809                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
2810                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
2811             </actions>
2812         </permacrud>
2813         </class>
2814         <class id="mccp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::credit_card_payment" oils_persist:tablename="money.credit_card_payment" reporter:label="Credit Card Payment">
2815                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
2816                         <field name="accepting_usr" />
2817                         <field name="amount" reporter:datatype="money" />
2818                         <field name="amount_collected" reporter:datatype="money" />
2819                         <field name="approval_code" reporter:datatype="text"/>
2820                         <field name="cash_drawer" reporter:datatype="link"/>
2821                         <field name="cc_number" reporter:datatype="text"/>
2822                         <field name="cc_order_number" reporter:datatype="text"/>
2823                         <field name="cc_processor" reporter:datatype="text"/>
2824                         <field name="id" reporter:datatype="id" />
2825                         <field name="note" reporter:datatype="text"/>
2826                         <field name="payment_ts" reporter:datatype="timestamp"/>
2827                         <field name="xact" reporter:datatype="link"/>
2828                         <field name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
2829                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
2830                 </fields>
2831                 <links>
2832                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
2833                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
2834                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
2835                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
2836                 </links>
2837         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2838             <actions>
2839                 <retrieve permission="VIEW_USER_TRANSACTIONS">
2840                     <context link="xact" jump="usr" field="home_ou"/>
2841                 </retrieve>
2842                         </actions>
2843                 </permacrud>
2844         </class>
2845         <class id="cxt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::xml_transform" oils_persist:tablename="config.xml_transform" reporter:label="XML/XSLT Transform Definition" oils_persist:field_safe="true">
2846                 <fields oils_persist:primary="name">
2847                         <field reporter:label="Name" name="name" reporter:datatype="text" />
2848                         <field reporter:label="Namespace URI" name="namespace_uri" reporter:datatype="text"/>
2849                         <field reporter:label="Namespace Prefix" name="prefix" reporter:datatype="text"/>
2850                         <field reporter:label="XSLT" name="xslt" reporter:datatype="text" />
2851                 </fields>
2852                 <links/>
2853         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2854             <actions>
2855                 <create permission="CREATE_XML_TRANSFORM" global_required="true"/>
2856                 <retrieve/>
2857                 <update permission="UPDATE_XML_TRANSFORM" global_required="true"/>
2858                 <delete permission="DELETE_XML_TRANSFORM" global_required="true"/>
2859             </actions>
2860         </permacrud>
2861         </class>
2862
2863         <class id="cmsa" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::metabib_search_alias" oils_persist:tablename="config.metabib_search_alias" reporter:label="Metabib Search Alias" oils_persist:field_safe="true">
2864                 <fields oils_persist:primary="alias">
2865                         <field reporter:label="Alias (RegExp)" name="alias" reporter:datatype="text"/>
2866                         <field reporter:label="Class" name="field_class" reporter:datatype="link"/>
2867                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
2868                 </fields>
2869                 <links>
2870                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
2871                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
2872                 </links>
2873         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2874             <actions>
2875                 <create permission="CREATE_METABIB_SEARCH_ALIAS" global_required="true"/>
2876                 <retrieve/>
2877                 <update permission="UPDATE_METABIB_SEARCH_ALIAS" global_required="true"/>
2878                 <delete permission="DELETE_METABIB_SEARCH_ALIAS" global_required="true"/>
2879             </actions>
2880         </permacrud>
2881         </class>
2882
2883         <class id="cmc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::metabib_class" oils_persist:tablename="config.metabib_class" reporter:label="Metabib Class" oils_persist:field_safe="true">
2884                 <fields oils_persist:primary="name">
2885                         <field reporter:label="Name" name="name" reporter:datatype="text" reporter:selector="label"/>
2886                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
2887                         <field reporter:label="Buoyant?" name="buoyant" reporter:datatype="bool" />
2888                         <field reporter:label="Restrict?" name="restrict" reporter:datatype="bool" />
2889                         <field reporter:label="Combined?" name="combined" reporter:datatype="bool" />
2890                         <field reporter:label="A Weight" name="a_weight" reporter:datatype="float" />
2891                         <field reporter:label="B Weight" name="b_weight" reporter:datatype="float" />
2892                         <field reporter:label="C Weight" name="c_weight" reporter:datatype="float" />
2893                         <field reporter:label="D Weight" name="d_weight" reporter:datatype="float" />
2894                         <field reporter:label="Fields" name="fields" reporter:datatype="link" oils_persist:virtual="true"/>
2895                 </fields>
2896                 <links>
2897                         <link field="fields" reltype="has_many" key="name" map="" class="cmf"/>
2898                 </links>
2899         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2900             <actions>
2901                 <create permission="CREATE_METABIB_CLASS" global_required="true"/>
2902                 <retrieve/>
2903                 <update permission="UPDATE_METABIB_CLASS" global_required="true"/>
2904                 <delete permission="DELETE_METABIB_CLASS" global_required="true"/>
2905             </actions>
2906         </permacrud>
2907         </class>
2908
2909         <class id="cmf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::metabib_field" oils_persist:tablename="config.metabib_field" reporter:label="Metabib Field" oils_persist:field_safe="true">
2910                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_id_seq">
2911                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="label"/>
2912                         <field reporter:label="Class" name="field_class" reporter:datatype="link"/>
2913                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
2914                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2915                         <field reporter:label="Weight" name="weight" reporter:datatype="int" />
2916                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
2917                         <field reporter:label="Joiner" name="joiner" reporter:datatype="text"/>
2918                         <field reporter:label="Format" name="format" reporter:datatype="link"/>
2919                         <field reporter:label="Search Field" name="search_field" reporter:datatype="bool" />
2920                         <field reporter:label="Facet Field" name="facet_field" reporter:datatype="bool" />
2921                         <field reporter:label="Facet XPath" name="facet_xpath" reporter:datatype="text" />
2922                         <field reporter:label="Display Field?" name="display_field" reporter:datatype="bool" />
2923                         <field reporter:label="Display XPath" name="display_xpath" reporter:datatype="text" />
2924                         <field reporter:label="Browse Field" name="browse_field" reporter:datatype="bool" />
2925                         <field reporter:label="Browse XPath" name="browse_xpath" reporter:datatype="text" />
2926                         <field reporter:label="Browse Sort XPath" name="browse_sort_xpath" reporter:datatype="text" />
2927                         <field reporter:label="Authority XPath" name="authority_xpath" reporter:datatype="text" />
2928                         <field reporter:label="Restrict?" name="restrict" reporter:datatype="bool" />
2929                         <field reporter:label="Display Field Map" name="display_field_map" oils_persist:virtual="true" reporter:datatype="link"/>
2930                         <field reporter:label="Virtual Field Data Suppliers" name="data_sources" oils_persist:virtual="true" reporter:datatype="link"/>
2931                 </fields>
2932                 <links>
2933                         <link field="format" reltype="has_a" key="name" map="" class="cxt"/>
2934                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
2935                         <link field="display_field_map" reltype="might_have" key="field" map="" class="cdfm"/>
2936                         <link field="data_sources" reltype="has_many" key="virtual" map="" class="cmfvm"/>
2937                 </links>
2938         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2939             <actions>
2940                 <create permission="CREATE_METABIB_FIELD" global_required="true"/>
2941                 <retrieve/>
2942                 <update permission="UPDATE_METABIB_FIELD" global_required="true"/>
2943                 <delete permission="DELETE_METABIB_FIELD" global_required="true"/>
2944             </actions>
2945         </permacrud>
2946         </class>
2947
2948         <class id="cmfvm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::metabib_field_virtual_map" oils_persist:tablename="config.metabib_field_virtual_map" reporter:label="Metabib Field Virtual Map" oils_persist:field_safe="true">
2949                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_virtual_map_id_seq">
2950                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
2951                         <field reporter:label="Real" name="real" reporter:datatype="link"/>
2952                         <field reporter:label="Virtual" name="virtual" reporter:datatype="link"/>
2953                         <field reporter:label="Weight" name="weight" reporter:datatype="int"/>
2954                 </fields>
2955                 <links>
2956                         <link field="real" reltype="has_a" key="id" map="" class="cmf"/>
2957                         <link field="virtual" reltype="has_a" key="id" map="" class="cmf"/>
2958                 </links>
2959         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2960             <actions>
2961                 <create permission="CREATE_METABIB_FIELD ADMIN_METABIB_FIELD" global_required="true"/>
2962                 <retrieve/>
2963                 <update permission="UPDATE_METABIB_FIELD ADMIN_METABIB_FIELD" global_required="true"/>
2964                 <delete permission="DELETE_METABIB_FIELD ADMIN_METABIB_FIELD" global_required="true"/>
2965             </actions>
2966         </permacrud>
2967         </class>
2968
2969         <class id="cbho" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::best_hold_order" oils_persist:tablename="config.best_hold_order" reporter:label="Best-Hold Sort Order">
2970                 <fields oils_persist:primary="id" oils_persist:sequence="config.best_hold_order_id_seq">
2971                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name" />
2972                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2973                         <field reporter:label="Capture Lib to Pickup Lib Proximity" name="pprox" reporter:datatype="int" />
2974                         <field reporter:label="Circ Lib to Request Lib Proximity" name="hprox" reporter:datatype="int" />
2975                         <field reporter:label="Adjusted Circ Lib to Pickup Lib Proximity" name="aprox" reporter:datatype="int" />
2976                         <field reporter:label="Adjusted Capture Location to Pickup Lib Proximity" name="approx" reporter:datatype="int" />
2977                         <field reporter:label="Hold Priority" name="priority" reporter:datatype="int" />
2978                         <field reporter:label="Hold Cut-in-line State" name="cut" reporter:datatype="int" />
2979                         <field reporter:label="Hold Selection Depth" name="depth" reporter:datatype="int" />
2980                         <field reporter:label="Copy Has Circulated From Home Lately" name="htime" reporter:datatype="int" />
2981                         <field reporter:label="Hold Request Time" name="rtime" reporter:datatype="int" />
2982                         <field reporter:label="Copy Has Been Home At All Lately" name="shtime" reporter:datatype="int" />
2983                 </fields>
2984                 <links>
2985                 </links>
2986                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2987                         <actions>
2988                                 <create permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
2989                                 <retrieve permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
2990                                 <update permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
2991                                 <delete permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
2992                         </actions>
2993                 </permacrud>
2994         </class>
2995         <class id="cbfp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::biblio_fingerprint" oils_persist:tablename="config.biblio_fingerprint" reporter:label="Fingerprint Definition">
2996                 <fields oils_persist:primary="id" oils_persist:sequence="config.biblio_fingerprint_id_seq">
2997                         <field name="id" reporter:datatype="id" />
2998                         <field name="name" reporter:datatype="text"/>
2999                         <field name="xpath" reporter:datatype="text"/>
3000                         <field name="format" reporter:datatype="link"/>
3001                         <field name="first_word" reporter:datatype="bool" />
3002                 </fields>
3003                 <links/>
3004         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3005             <actions>
3006                 <create permission="CREATE_BIBLIO_FINGERPRINT" global_required="true"/>
3007                 <retrieve/>
3008                 <update permission="UPDATE_BIBLIO_FINGERPRINT" global_required="true"/>
3009                 <delete permission="DELETE_BIBLIO_FINGERPRINT" global_required="true"/>
3010             </actions>
3011         </permacrud>
3012         </class>
3013         <class id="cam" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::audience_map" oils_persist:tablename="config.audience_map" reporter:label="Audience Map" oils_persist:field_safe="true">
3014                 <fields oils_persist:primary="code" oils_persist:sequence="">
3015                         <field reporter:label="Audience Code" name="code" reporter:selector="value" reporter:datatype="text"/>
3016                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
3017                         <field reporter:label="Audience" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
3018                 </fields>
3019                 <links/>
3020         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3021             <actions>
3022                 <create permission="CREATE_MARC_CODE" global_required="true"/>
3023                 <retrieve/>
3024                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
3025                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
3026             </actions>
3027         </permacrud>
3028         </class>
3029         <class id="cifm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::item_form_map" oils_persist:tablename="config.item_form_map" reporter:label="Item Form Map" oils_persist:field_safe="true">
3030                 <fields oils_persist:primary="code" oils_persist:sequence="">
3031                         <field reporter:label="Item Form Code" name="code" reporter:selector="value" reporter:datatype="text"/>
3032                         <field reporter:label="Item Form" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
3033                 </fields>
3034                 <links/>
3035         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3036             <actions>
3037                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
3038                 <retrieve/>
3039                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
3040                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
3041             </actions>
3042         </permacrud>
3043         </class>
3044     <class id="acnc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::call_number_class" oils_persist:tablename="asset.call_number_class" reporter:label="Call number classification scheme">
3045         <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_class_id_seq">
3046             <field reporter:label="Call number class ID" name="id" reporter:datatype="id"/>
3047             <field reporter:label="Name" name="name" reporter:datatype="text"/>
3048             <field reporter:label="Normalizer function" name="normalizer" reporter:datatype="text"/>
3049             <field reporter:label="Call number fields" name="field" reporter:datatype="text"/>
3050         </fields>
3051         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3052             <actions>
3053                 <retrieve/>
3054             </actions>
3055         </permacrud>
3056     </class>
3057         <class id="acns" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::call_number_suffix" oils_persist:tablename="asset.call_number_suffix" reporter:label="Call Number/Volume Suffix">
3058                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_suffix_id_seq">
3059                         <field reporter:label="ID" name="id" reporter:datatype="id" />
3060                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
3061                         <field reporter:label="Label Sort Key" name="label_sortkey" reporter:datatype="text"/>
3062                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
3063                 </fields>
3064                 <links>
3065                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
3066                 </links>
3067         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3068             <actions>
3069                 <create permission="CREATE_VOLUME_SUFFIX" context_field="owning_lib"/>
3070                 <retrieve/>
3071                 <update permission="UPDATE_VOLUME_SUFFIX" context_field="owning_lib"/>
3072                 <delete permission="DELETE_VOLUME_SUFFIX" context_field="owning_lib"/>
3073             </actions>
3074         </permacrud>
3075         </class>
3076         <class id="acnp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::call_number_prefix" oils_persist:tablename="asset.call_number_prefix" reporter:label="Call Number/Volume Prefix">
3077                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_prefix_id_seq">
3078                         <field reporter:label="ID" name="id" reporter:datatype="id" />
3079                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
3080                         <field reporter:label="Label Sort Key" name="label_sortkey" reporter:datatype="text"/>
3081                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
3082                 </fields>
3083                 <links>
3084                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
3085                 </links>
3086         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3087             <actions>
3088                 <create permission="CREATE_VOLUME_PREFIX" context_field="owning_lib"/>
3089                 <retrieve/>
3090                 <update permission="UPDATE_VOLUME_PREFIX" context_field="owning_lib"/>
3091                 <delete permission="DELETE_VOLUME_PREFIX" context_field="owning_lib"/>
3092             </actions>
3093         </permacrud>
3094         </class>
3095         <class id="acn" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::call_number" oils_persist:tablename="asset.call_number" reporter:label="Call Number/Volume">
3096                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_id_seq">
3097                         <field reporter:label="Copies" name="copies" oils_persist:virtual="true" reporter:datatype="link"/>
3098                         <field reporter:label="Create Date/Time" name="create_date" reporter:datatype="timestamp"/>
3099                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
3100                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
3101                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
3102                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
3103                         <field reporter:label="Call Number/Volume ID" name="id" reporter:datatype="id" />
3104                         <field reporter:label="Call Number Label" name="label" reporter:datatype="text"/>
3105                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
3106                         <field reporter:label="Bib Record" name="record" reporter:datatype="link"/>
3107                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
3108                         <field reporter:label="URI Maps" name="uri_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3109                         <field reporter:label="URIs" name="uris" oils_persist:virtual="true" reporter:datatype="link"/>
3110                         <field reporter:label="Call Number Sort Key" name="label_sortkey" reporter:datatype="text"/>
3111                         <field reporter:label="Classification Scheme" name="label_class" reporter:datatype="link"/>
3112                         <field reporter:label="Prefix" name="prefix" reporter:datatype="link"/>
3113                         <field reporter:label="Suffix" name="suffix" reporter:datatype="link"/>
3114                 </fields>
3115                 <links>
3116                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
3117                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3118                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3119                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
3120                         <link field="notes" reltype="has_many" key="call_number" map="" class="acnn"/>
3121                         <link field="copies" reltype="has_many" key="call_number" map="" class="acp"/>
3122                         <link field="uris" reltype="has_many" key="call_number" map="uri" class="auricnm"/>
3123                         <link field="uri_maps" reltype="has_many" key="call_number" map="" class="auricnm"/>
3124                         <link field="label_class" reltype="has_a" key="id" map="" class="acnc"/>
3125                         <link field="prefix" reltype="has_a" key="id" map="" class="acnp"/>
3126                         <link field="suffix" reltype="has_a" key="id" map="" class="acns"/>
3127                 </links>
3128         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3129             <actions>
3130                 <create permission="CREATE_VOLUME" context_field="owning_lib"/>
3131                 <retrieve/>
3132                 <update permission="UPDATE_VOLUME" context_field="owning_lib"/>
3133                 <delete permission="DELETE_VOLUME" context_field="owning_lib"/>
3134             </actions>
3135         </permacrud>
3136         </class>
3137         <class id="auri" controller="open-ils.cstore" oils_obj:fieldmapper="asset::uri" oils_persist:tablename="asset.uri" reporter:label="Electronic Access URI">
3138                 <fields oils_persist:primary="id" oils_persist:sequence="asset.uri_id_seq">
3139                         <field reporter:label="URI ID" name="id" reporter:datatype="id"/>
3140                         <field reporter:label="URI" name="href" reporter:datatype="text"/>
3141                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
3142                         <field reporter:label="Use Information" name="use_restriction" reporter:datatype="text"/>
3143                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
3144                         <field reporter:label="Call Number Maps" name="call_number_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3145                         <field reporter:label="Call Numbers" name="call_numbers" oils_persist:virtual="true" reporter:datatype="link"/>
3146                 </fields>
3147                 <links>
3148                         <link field="call_numbers" reltype="has_many" key="uri" map="call_number" class="auricnm"/>
3149                         <link field="call_number_maps" reltype="has_many" key="uri" map="" class="auricnm"/>
3150         </links>
3151         </class>
3152         <class id="auricnm" controller="open-ils.cstore" oils_obj:fieldmapper="asset::uri_call_number_map" oils_persist:tablename="asset.uri_call_number_map" reporter:label="Electronic Access URI to Call Number Map">
3153                 <fields oils_persist:primary="id" oils_persist:sequence="asset.uri_call_number_map_id_seq">
3154                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3155                         <field reporter:label="URI" name="uri" reporter:datatype="int"/>
3156                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
3157                 </fields>
3158                 <links>
3159                         <link field="uri" reltype="has_a" key="id" map="" class="auri"/>
3160                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
3161                 </links>
3162         </class>
3163         <class id="cst" controller="open-ils.cstore" oils_obj:fieldmapper="config::standing" oils_persist:tablename="config.standing" reporter:label="Standing Penalty">
3164                 <fields oils_persist:primary="id" oils_persist:sequence="config.standing_id_seq">
3165                         <field name="id" reporter:datatype="id" />
3166                         <field name="value" oils_persist:i18n="true" />
3167                 </fields>
3168                 <links/>
3169         </class>
3170         <class id="mous" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::open_user_summary" oils_persist:tablename="money.open_usr_summary" reporter:label="Open User Summary">
3171                 <fields oils_persist:primary="usr" oils_persist:sequence="">
3172                         <field name="balance_owed" reporter:datatype="money" />
3173                         <field name="total_owed" reporter:datatype="money" />
3174                         <field name="total_paid" reporter:datatype="money" />
3175                         <field name="usr" reporter:datatype="link"/>
3176                 </fields>
3177                 <links>
3178                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3179         </links>
3180         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3181             <actions>
3182                 <retrieve permission="VIEW_USER">
3183                     <context link="usr" field="home_ou"/>
3184                 </retrieve>
3185             </actions>
3186         </permacrud>
3187         </class>
3188         <class id="mct" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::collections_tracker" oils_persist:tablename="money.collections_tracker" reporter:label="Collections Tracker">
3189                 <fields oils_persist:primary="id" oils_persist:sequence="money.collections_tracker_id_seq">
3190                         <field name="collector" />
3191                         <field name="enter_time" reporter:datatype="timestamp"/>
3192                         <field name="id" reporter:datatype="id" />
3193                         <field name="location" reporter:datatype="link"/>
3194                         <field name="usr" reporter:datatype="link"/>
3195                 </fields>
3196                 <links>
3197                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3198                         <link field="collector" reltype="has_a" key="id" map="" class="au"/>
3199                         <link field="location" reltype="has_a" key="id" map="" class="aou"/>
3200                 </links>
3201         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3202             <actions>
3203                 <create permission="money.collections_tracker.create" context_field="location"/>
3204                 <retrieve permission="money.collections_tracker.create" context_field="location"/> 
3205                 <delete permission="money.collections_tracker.create" context_field="location"/>
3206             </actions>
3207         </permacrud>
3208         </class>
3209         <class id="bre" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="biblio::record_entry" oils_persist:tablename="biblio.record_entry" reporter:core="true" reporter:label="Bibliographic Record">
3210                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry_id_seq">
3211                         <field reporter:label="Call Numbers" name="call_numbers" oils_persist:virtual="true" reporter:datatype="link"/>
3212                         <field reporter:label="Fixed Field Entry" name="fixed_fields" oils_persist:virtual="true" reporter:datatype="link"/>
3213                         <field reporter:label="Is Active?" name="active" reporter:datatype="bool"/>
3214                         <field reporter:label="Record Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
3215                         <field reporter:label="Record Creator" name="creator" reporter:datatype="link"/>
3216                         <field reporter:label="Is Deleted?" name="deleted" reporter:datatype="bool"/>
3217                         <field reporter:label="Last Edit Data/Time" name="edit_date" reporter:datatype="timestamp"/>
3218                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
3219                         <field reporter:label="Fingerprint" name="fingerprint"  reporter:datatype="text"/>
3220                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
3221                         <field reporter:label="Last Transaction ID" name="last_xact_id"  reporter:datatype="text"/>
3222                         <field reporter:label="MARC21Slim" name="marc"  reporter:datatype="text"/>
3223                         <field reporter:label="Overall Quality" name="quality" reporter:datatype="int" />
3224                         <field reporter:label="Record Source" name="source" reporter:datatype="link"/>
3225                         <field reporter:label="TCN Source" name="tcn_source"  reporter:datatype="text"/>
3226                         <field reporter:label="TCN Value" name="tcn_value"  reporter:datatype="text"/>
3227                         <field reporter:label="Owner" name="owner"  reporter:datatype="org_unit"/>
3228                         <field reporter:label="Share Depth" name="share_depth"  reporter:datatype="int"/>
3229                         <field reporter:label="Metarecord" name="metarecord" oils_persist:virtual="true" reporter:datatype="link"/>
3230                         <field reporter:label="Language Code" name="language" oils_persist:virtual="true" reporter:datatype="link"/>
3231                         <field reporter:label="Non-MARC Record Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
3232                         <field reporter:label="Indexed Keyword Field Entries" name="keyword_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3233                         <field reporter:label="Indexed Subject Field Entries" name="subject_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3234                         <field reporter:label="Indexed Title Field Entries" name="title_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3235                         <field reporter:label="Indexed Identifier Field Entries" name="identifier_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3236                         <field reporter:label="Indexed Author Field Entries" name="author_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3237                         <field reporter:label="Indexed Series Field Entries" name="series_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3238                         <field reporter:label="Flattened MARC Fields " name="full_record_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3239                         <field reporter:label="Simple Record Extracts " name="simple_record" oils_persist:virtual="true" reporter:datatype="link"/>
3240                         <field reporter:label="Authority Links" name="authority_links" oils_persist:virtual="true" reporter:datatype="link"/>
3241                         <field reporter:label="Subscriptions" name="subscriptions" oils_persist:virtual="true" reporter:datatype="link"/>
3242                         <field reporter:label="SVF Attributes" name="attrs" oils_persist:virtual="true" reporter:datatype="link"/>
3243                         <field reporter:label="MVF Attributes" name="mattrs" oils_persist:virtual="true" reporter:datatype="link"/>
3244                         <field reporter:label="Display Fields" name="display_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3245                         <field reporter:label="Flat Display Entries" name="flat_display_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3246                         <field reporter:label="Compressed Display Entries" name="compressed_display_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3247                         <field reporter:label="Wide Display Entries" name="wide_display_entry" oils_persist:virtual="true" reporter:datatype="link"/>
3248                         <field reporter:label="Merge Date" name="merge_date" reporter:datatype="timestamp"/>
3249                         <field reporter:label="Merged To" name="merged_to" reporter:datatype="link"/>
3250                 </fields>
3251                 <links>
3252                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3253                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
3254                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3255                         <link field="simple_record" reltype="might_have" key="id" map="" class="rmsr"/>
3256                         <link field="metarecord" reltype="might_have" key="source" map="metarecord" class="mmrsm"/>
3257                         <link field="call_numbers" reltype="has_many" key="record" map="" class="acn"/>
3258                         <link field="keyword_field_entries" reltype="has_many" key="source" map="" class="mkfe"/>
3259                         <link field="fixed_fields" reltype="might_have" key="record" map="" class="mrd"/>
3260                         <link field="language" reltype="might_have" key="record" map="item_lang" class="mrd"/>
3261                         <link field="subject_field_entries" reltype="has_many" key="source" map="" class="msfe"/>
3262                         <link field="title_field_entries" reltype="has_many" key="source" map="" class="mtfe"/>
3263                         <link field="identifier_field_entries" reltype="has_many" key="source" map="" class="mife"/>
3264                         <link field="notes" reltype="has_many" key="record" map="" class="bren"/>
3265                         <link field="author_field_entries" reltype="has_many" key="source" map="" class="mafe"/>
3266                         <link field="series_field_entries" reltype="has_many" key="source" map="" class="msefe"/>
3267                         <link field="full_record_entries" reltype="has_many" key="record" map="" class="mfr"/>
3268                         <link field="authority_links" reltype="has_many" key="bib" map="" class="abl"/>
3269                         <link field="subscriptions" reltype="has_many" key="record_entry" map="" class="ssub"/>
3270                         <link field="attrs" reltype="might_have" key="id" map="" class="mra"/>
3271                         <link field="mattrs" reltype="has_many" key="id" map="" class="mraf"/>
3272                         <link field="source" reltype="has_a" key="id" map="" class="cbs"/>
3273                         <link field="display_entries" reltype="has_many" key="source" map="" class="mde"/>
3274                         <link field="flat_display_entries" reltype="has_many" key="source" map="" class="mfde"/>
3275                         <link field="compressed_display_entries" reltype="has_many" key="source" map="" class="mcde"/>
3276                         <link field="wide_display_entry" reltype="might_have" key="source" map="" class="mwde"/>
3277                         <link field="merged_to" reltype="has_a" key="id" map="" class="bre"/>
3278                 </links>
3279         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3280             <actions>
3281                 <create permission="CREATE_MARC IMPORT_MARC" global_required="true"/>
3282                 <retrieve/>
3283                 <update permission="UPDATE_MARC" global_required="true"/>
3284                 <!-- WARNING: Deleting records via PCRUD does NOT check that any prerequisite conditions have been handled first. It is your responsibility to check for those conditions before deleting bib records. -->
3285                 <delete permission="DELETE_RECORD" global_required="true"/>
3286             </actions>
3287         </permacrud>
3288         </class>
3289         <class id="aouhoo" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::org_unit::hours_of_operation" oils_persist:tablename="actor.hours_of_operation" reporter:label="Hours of Operation">
3290                 <fields oils_persist:primary="id">
3291                         <field name="dow_0_close" />
3292                         <field name="dow_0_open" />
3293                         <field name="dow_1_close" />
3294                         <field name="dow_1_open" />
3295                         <field name="dow_2_close" />
3296                         <field name="dow_2_open" />
3297                         <field name="dow_3_close" />
3298                         <field name="dow_3_open" />
3299                         <field name="dow_4_close" />
3300                         <field name="dow_4_open" />
3301                         <field name="dow_5_close" />
3302                         <field name="dow_5_open" />
3303                         <field name="dow_6_close" />
3304                         <field name="dow_6_open" />
3305                         <field name="id" reporter:datatype="id" />
3306                         <field name="org_unit" oils_persist:virtual="true" reporter:datatype="org_unit"/>
3307                 </fields>
3308                 <links>
3309                         <link field="id" reltype="might_have" key="id" map="" class="aou"/>
3310                 </links>
3311         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3312             <actions>
3313                 <create permission="CREATE_HOURS_OF_OPERATION" context_field="id"/>
3314                 <retrieve/>
3315                 <update permission="UPDATE_HOURS_OF_OPERATION" context_field="id"/>
3316                 <delete permission="DELETE_HOURS_OF_OPERATION" context_field="id"/>
3317             </actions>
3318         </permacrud>
3319         </class>
3320         <class id="bmp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="biblio::monograph_part" oils_persist:tablename="biblio.monograph_part" reporter:label="Monograph Parts" oils_persist:field_safe="true">
3321                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.monograph_part_id_seq">
3322                         <field name="id" reporter:datatype="id" />
3323                         <field name="record" reporter:datatype="link"/>
3324                         <field name="label" reporter:datatype="text"/>
3325                         <field name="label_sortkey" reporter:datatype="text"/>
3326                         <field name="deleted" reporter:datatype="bool"/>
3327                 </fields>
3328                 <links>
3329                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3330                 </links>
3331         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3332             <actions>
3333                 <create permission="CREATE_MONOGRAPH_PART" global_required="true"/>
3334                 <retrieve/>
3335                 <update permission="UPDATE_MONOGRAPH_PART" global_required="true"/>
3336                 <delete permission="DELETE_MONOGRAPH_PART" global_required="true"/>
3337             </actions>
3338         </permacrud>
3339         </class>
3340         <class id="acpm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::copy_part_map" oils_persist:tablename="asset.copy_part_map" reporter:label="Copy Monograph Part Map">
3341                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_part_map_id_seq">
3342                         <field name="id" reporter:datatype="id" />
3343                         <field name="target_copy" reporter:datatype="link" />
3344                         <field name="part" reporter:datatype="link"/>
3345                 </fields>
3346                 <links>
3347                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
3348                         <link field="part" reltype="has_a" key="id" map="" class="bmp"/>
3349                 </links>
3350         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3351             <actions>
3352                 <create permission="MAP_MONOGRAPH_PART" global_required="true"/>
3353                 <retrieve/>
3354                 <update permission="MAP_MONOGRAPH_PART" global_required="true"/>
3355                 <delete permission="MAP_MONOGRAPH_PART" global_required="true"/>
3356             </actions>
3357         </permacrud>
3358         </class>
3359     <class  id="aecc"
3360             controller="open-ils.cstore open-ils.pcrud"
3361             oils_obj:fieldmapper="action::emergency_closing_circulation"
3362             oils_persist:tablename="action.emergency_closing_circulation"
3363             reporter:label="Emergency Closing Circulation Entry"
3364             oils_persist:readonly="true"
3365     > <!-- This is not a view, but is managed via functions, so it's readonly. -->
3366         <fields oils_persist:primary="id">
3367             <field name="id" reporter:datatype="id" />
3368             <field name="circulation" reporter:datatype="link" />
3369                         <field name="emergency_closing" reporter:datatype="link"/>
3370             <field name="original_due_date" reporter:datatype="timestamp" />
3371             <field name="process_time" reporter:datatype="timestamp" />
3372         </fields>
3373         <links>
3374             <link field="circulation" reltype="has_a" key="id" map="" class="circ"/>
3375             <link field="emergency_closing" reltype="has_a" key="id" map="" class="aec"/>
3376         </links>
3377         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3378             <actions>
3379                 <retrieve/>
3380             </actions>
3381         </permacrud>
3382     </class>
3383     <class  id="aecr"
3384             controller="open-ils.cstore open-ils.pcrud"
3385             oils_obj:fieldmapper="action::emergency_closing_reservation"
3386             oils_persist:tablename="action.emergency_closing_reservation"
3387             reporter:label="Emergency Closing Reservation Entry"
3388             oils_persist:readonly="true"
3389     > <!-- This is not a view, but is managed via functions, so it's readonly. -->
3390         <fields oils_persist:primary="id">
3391             <field name="id" reporter:datatype="id" />
3392             <field name="reservation" reporter:datatype="link" />
3393                         <field name="emergency_closing" reporter:datatype="link"/>
3394             <field name="original_end_time" reporter:datatype="timestamp" />
3395             <field name="process_time" reporter:datatype="timestamp" />
3396         </fields>
3397         <links>
3398             <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
3399             <link field="emergency_closing" reltype="has_a" key="id" map="" class="aec"/>
3400         </links>
3401         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3402             <actions>
3403                 <retrieve/>
3404             </actions>
3405         </permacrud>
3406     </class>
3407     <class  id="aech"
3408             controller="open-ils.cstore open-ils.pcrud"
3409             oils_obj:fieldmapper="action::emergency_closing_hold"
3410             oils_persist:tablename="action.emergency_closing_hold"
3411             reporter:label="Emergency Closing Hold Entry"
3412             oils_persist:readonly="true"
3413     > <!-- This is not a view, but is managed via functions, so it's readonly. -->
3414         <fields oils_persist:primary="id">
3415             <field name="id" reporter:datatype="id" />
3416             <field name="hold" reporter:datatype="link" />
3417                         <field name="emergency_closing" reporter:datatype="link"/>
3418             <field name="original_shelf_expire_time" reporter:datatype="timestamp" />
3419             <field name="process_time" reporter:datatype="timestamp" />
3420         </fields>
3421         <links>
3422             <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
3423             <link field="emergency_closing" reltype="has_a" key="id" map="" class="aec"/>
3424         </links>
3425         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3426             <actions>
3427                 <retrieve/>
3428             </actions>
3429         </permacrud>
3430     </class>
3431     <class  id="aecs"
3432             controller="open-ils.cstore open-ils.pcrud"
3433             oils_obj:fieldmapper="action::emergency_closing_status"
3434             oils_persist:tablename="action.emergency_closing_status"
3435             reporter:label="Emergency Closing Status"
3436             oils_persist:readonly="true"
3437     >
3438         <fields oils_persist:primary="id">
3439             <field name="id" reporter:datatype="id" />
3440             <field name="creator" reporter:datatype="link" />
3441             <field name="create_time" reporter:datatype="timestamp" />
3442             <field name="process_start_time" reporter:datatype="timestamp" />
3443             <field name="process_end_time" reporter:datatype="timestamp" />
3444             <field name="last_update_time" reporter:datatype="timestamp" />
3445             <field name="circulations" reporter:datatype="int" />
3446             <field name="circulations_complete" reporter:datatype="int" />
3447             <field name="reservations" reporter:datatype="int" />
3448             <field name="reservations_complete" reporter:datatype="int" />
3449             <field name="holds" reporter:datatype="int" />
3450             <field name="holds_complete" reporter:datatype="int" />
3451         </fields>
3452         <links>
3453             <link field="id" reltype="has_a" key="id" map="" class="aec"/>
3454         </links>
3455         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3456             <actions>
3457                 <retrieve/>
3458             </actions>
3459         </permacrud>
3460     </class>
3461     <class id="aec" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::emergency_closing" oils_persist:tablename="action.emergency_closing" reporter:label="Emergency Closing">
3462         <fields oils_persist:primary="id" oils_persist:sequence="action.emergency_closing_id_seq">
3463             <field name="id" reporter:datatype="id" />
3464             <field name="creator" reporter:datatype="link" />
3465             <field name="create_time" reporter:datatype="timestamp" />
3466             <field name="process_start_time" reporter:datatype="timestamp" />
3467             <field name="process_end_time" reporter:datatype="timestamp" />
3468             <field name="last_update_time" reporter:datatype="timestamp" />
3469             <field name="closing" oils_persist:virtual="true" reporter:datatype="link"/>
3470             <field name="status" oils_persist:virtual="true" reporter:datatype="link"/>
3471             <field name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
3472             <field name="reservations" oils_persist:virtual="true" reporter:datatype="link"/>
3473             <field name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
3474         </fields>
3475         <links>
3476             <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3477             <link field="closing" reltype="might_have" key="emergency_closing" map="" class="aoucd"/>
3478             <link field="status" reltype="might_have" key="id" map="" class="aecs"/>
3479             <link field="circulations" reltype="has_many" key="emergency_closing" map="" class="aecc"/>
3480             <link field="reservations" reltype="has_many" key="emergency_closing" map="" class="aecr"/>
3481             <link field="holds" reltype="has_many" key="emergency_closing" map="" class="aech"/>
3482         </links>
3483         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3484             <actions>
3485                 <create permission="EMERGENCY_CLOSING">
3486                     <context link="closing" field="org_unit" />
3487                 </create>
3488                 <retrieve/>
3489                 <update permission="EMERGENCY_CLOSING">
3490                     <context link="closing" field="org_unit" />
3491                 </update>
3492                 <delete permission="EMERGENCY_CLOSING">
3493                     <context link="closing" field="org_unit" />
3494                 </delete>
3495             </actions>
3496         </permacrud>
3497     </class>
3498         <class id="aoucd" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::org_unit::closed_date" oils_persist:tablename="actor.org_unit_closed" reporter:label="Closed Dates">
3499                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_closed_id_seq">
3500                         <field name="close_end" reporter:datatype="timestamp" />
3501                         <field name="close_start" reporter:datatype="timestamp" />
3502                         <field name="id" reporter:datatype="id" />
3503                         <field name="org_unit" reporter:datatype="org_unit"/>
3504                         <field name="reason" reporter:datatype="text"/>
3505                         <field name="full_day" reporter:datatype="bool"/>
3506                         <field name="multi_day" reporter:datatype="bool"/>
3507                         <field name="emergency_closing" reporter:datatype="link"/>
3508                 </fields>
3509                 <links>
3510                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3511                         <link field="emergency_closing" reltype="has_a" key="id" map="" class="aec"/>
3512                 </links>
3513         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3514             <actions>
3515                 <create permission="CREATE_ORG_UNIT_CLOSING" context_field="org_unit"/>
3516                 <retrieve/>
3517                 <update permission="UPDATE_ORG_UNIT_CLOSING" context_field="org_unit"/>
3518                 <delete permission="DELETE_ORG_UNIT_CLOSING" context_field="org_unit"/>
3519             </actions>
3520         </permacrud>
3521         </class>
3522         <class id="crcd" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::rules::circ_duration" oils_persist:tablename="config.rule_circ_duration" reporter:label="Circulation Duration Rule">
3523                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_circ_duration_id_seq">
3524                         <field name="extended" reporter:datatype="interval"/>
3525                         <field name="id" reporter:datatype="id" reporter:selector="name"/>
3526                         <field name="max_renewals" reporter:datatype="int" />
3527                         <field name="name" reporter:datatype="text"/>
3528                         <field name="normal" reporter:datatype="interval"/>
3529                         <field name="shrt" reporter:datatype="interval"/>
3530                         <field name="max_auto_renewals" reporter:datatype="int" />
3531                 </fields>
3532                 <links>
3533                 </links>
3534         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3535             <actions>
3536                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
3537                 <retrieve/>
3538                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
3539                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
3540             </actions>
3541         </permacrud>
3542         </class>
3543
3544         <class id="chdd" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::hard_due_date" oils_persist:tablename="config.hard_due_date" reporter:label="Hard Due Date">
3545                 <fields oils_persist:primary="id" oils_persist:sequence="config.hard_due_date_id_seq">
3546                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
3547                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
3548             <field reporter:label="Always Use?" name="forceto" reporter:datatype="bool"/>
3549                         <field reporter:label="Current Ceiling Date" name="ceiling_date" reporter:datatype="timestamp"/>
3550             <field reporter:label="Owner" name="owner" reporter:datatype="org_unit"/>
3551                 </fields>
3552                 <links>
3553             <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3554                 </links>
3555                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3556             <actions>
3557                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
3558                 <retrieve/>
3559                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
3560                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
3561             </actions>
3562                 </permacrud>
3563         </class>
3564
3565         <class id="chddv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::hard_due_date_values" oils_persist:tablename="config.hard_due_date_values" reporter:label="Hard Due Date Values">
3566                 <fields oils_persist:primary="id" oils_persist:sequence="config.hard_due_date_values_id_seq">
3567                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3568                         <field reporter:label="Hard Due Date" name="hard_due_date" reporter:datatype="link"/>
3569                         <field reporter:label="Ceiling Date" name="ceiling_date" reporter:datatype="timestamp"/>
3570             <field reporter:label="Active Date" name="active_date" reporter:datatype="timestamp"/>
3571                 </fields>
3572                 <links>
3573                         <link field="hard_due_date" reltype="has_a" key="id" map="" class="chdd"/>
3574                 </links>
3575                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3576             <actions>
3577                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
3578                 <retrieve/>
3579                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
3580                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
3581             </actions>
3582                 </permacrud>
3583         </class>
3584
3585         <class id="mobts" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::open_billable_transaction_summary" oils_persist:tablename="money.open_billable_xact_summary" reporter:label="Open Billable Transaction Summary">
3586                 <fields oils_persist:primary="id" oils_persist:sequence="">
3587                         <field name="balance_owed" reporter:datatype="money"/>
3588                         <field name="id" reporter:datatype="id" />
3589                         <field name="last_billing_note" reporter:datatype="text"/>
3590                         <field name="last_billing_ts" reporter:datatype="timestamp"/>
3591                         <field name="last_billing_type" reporter:datatype="text"/>
3592                         <field name="last_payment_note" reporter:datatype="text"/>
3593                         <field name="last_payment_ts" reporter:datatype="timestamp"/>
3594                         <field name="last_payment_type" reporter:datatype="text"/>
3595                         <field name="total_owed" reporter:datatype="money"/>
3596                         <field name="total_paid" reporter:datatype="money"/>
3597                         <field name="usr" reporter:datatype="link"/>
3598                         <field name="xact_finish" reporter:datatype="timestamp" />
3599                         <field name="xact_start" reporter:datatype="timestamp" />
3600                         <field name="xact_type" reporter:datatype="text"/>
3601                         <field name="xact" oils_persist:virtual="true" reporter:datatype="link"/>
3602                         <field name="grocery" oils_persist:virtual="true" reporter:datatype="link"/>
3603                         <field name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
3604                         <field name="reservation" oils_persist:virtual="true" reporter:datatype="link"/>
3605                         <field name="billing_location" reporter:datatype="link"/>
3606                 </fields>
3607                 <links>
3608                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3609                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
3610                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
3611                         <link field="grocery" reltype="might_have" key="id" map="" class="mg"/>
3612                         <link field="reservation" reltype="might_have" key="id" map="" class="bresv"/>
3613                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
3614                 </links>
3615                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3616                         <actions>
3617                                 <retrieve permission="VIEW_USER_TRANSACTIONS">
3618                                         <context link="usr" field="home_ou" />
3619                                 </retrieve>
3620                         </actions>
3621                 </permacrud>
3622         </class>
3623         <class id="au" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::user" oils_persist:tablename="actor.usr" reporter:core="true" reporter:label="ILS User">
3624                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_id_seq">
3625                         <field reporter:label="All Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>
3626                         <field reporter:label="All Library Cards" name="cards" oils_persist:virtual="true" reporter:datatype="link"/>
3627                         <field reporter:label="All Circulations" name="checkouts" oils_persist:virtual="true" reporter:datatype="link"/>
3628                         <field reporter:label="All Hold Requests" name="hold_requests" oils_persist:virtual="true" reporter:datatype="link"/>
3629                         <field reporter:label="All Permissions" name="permissions" oils_persist:virtual="true" reporter:datatype="link"/>
3630                         <field reporter:label="All User Settings" name="settings" oils_persist:virtual="true" reporter:datatype="link"/>
3631                         <field reporter:label="Standing Penalties" name="standing_penalties" oils_persist:virtual="true" reporter:datatype="link"/>
3632                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3633                         <field reporter:label="Survey Responses" name="survey_responses" oils_persist:virtual="true" reporter:datatype="link"/>
3634                         <field reporter:label="Privacy Waiver Entries" name = "waiver_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3635                         <field reporter:label="Workstation Org Unit" name="ws_ou" oils_persist:virtual="true" reporter:datatype="link"/>
3636                         <field reporter:label="Workstation ID" name="wsid" oils_persist:virtual="true" reporter:datatype="link"/>
3637                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
3638                         <field reporter:label="Alert Message" name="alert_message"  reporter:datatype="text"/>
3639                         <field reporter:label="Barred" name="barred" reporter:datatype="bool"/>
3640                         <field reporter:label="Physical Address" name="billing_address" reporter:datatype="link"/>
3641                         <field reporter:label="Current Library Card" name="card" reporter:datatype="link"/>
3642                         <field reporter:label="Claims-returned Count" name="claims_returned_count" reporter:datatype="int" />
3643                         <field reporter:label="Claims Never Checked Out Count" name="claims_never_checked_out_count" reporter:datatype="int" />
3644                         <field reporter:label="Record Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
3645                         <field reporter:label="User Credit Balance" name="credit_forward_balance" reporter:datatype="money" />
3646                         <field reporter:label="Daytime Phone" name="day_phone"  reporter:datatype="text"/>
3647                         <field reporter:label="Date of Birth" name="dob" reporter:datatype="timestamp"/>
3648                         <field reporter:label="Email Address" name="email"  reporter:datatype="text"/>
3649                         <field reporter:label="Evening Phone" name="evening_phone"  reporter:datatype="text"/>
3650                         <field reporter:label="Privilege Expiration Date" name="expire_date" reporter:datatype="timestamp"/>
3651                         <field reporter:label="Last Name" name="family_name"  reporter:datatype="text"/>
3652                         <field reporter:label="First Name" name="first_given_name"  reporter:datatype="text"/>
3653                         <field reporter:label="Home Library" name="home_ou" reporter:datatype="org_unit"/>
3654                         <field reporter:label="User ID" name="id" reporter:datatype="id" reporter:selector="usrname" />
3655                         <field reporter:label="Primary Identification Type" name="ident_type" reporter:datatype="link"/>
3656                         <field reporter:label="Secondary Identification Type" name="ident_type2" reporter:datatype="link"/>
3657                         <field reporter:label="Primary Identification" name="ident_value"  reporter:datatype="text"/>
3658                         <field reporter:label="Secondary Identification" name="ident_value2"  reporter:datatype="text"/>
3659                         <field reporter:label="Last Transaction ID" name="last_xact_id" reporter:datatype="text"/>
3660                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="link"/>
3661                         <field reporter:label="Is Group Lead Account" name="master_account" reporter:datatype="bool"/>
3662                         <field reporter:label="Internet Access Level" name="net_access_level" reporter:datatype="link"/>
3663                         <field reporter:label="Other Phone" name="other_phone"  reporter:datatype="text"/>
3664                         <field reporter:label="Password" name="passwd" suppress_controller="open-ils.pcrud open-ils.reporter-store" reporter:datatype="text"/>
3665                         <field reporter:label="Photo URL" name="photo_url"  reporter:datatype="text"/>
3666                         <field reporter:label="Prefix/Title" name="prefix"  reporter:datatype="text"/>
3667                         <field reporter:label="Main (Profile) Permission Group" name="profile" reporter:datatype="link"/>
3668                         <field reporter:label="Middle Name" name="second_given_name"  reporter:datatype="text"/>
3669                         <field reporter:label="Standing (unused)" name="standing" reporter:datatype="link"/>
3670                         <field reporter:label="Suffix" name="suffix"  reporter:datatype="text"/>
3671                         <field reporter:label="Is Super User" name="super_user" reporter:datatype="bool"/>
3672                         <field reporter:label="Family Linkage or other Group" name="usrgroup" reporter:datatype="int"/>
3673                         <field reporter:label="OPAC/Staff Client User Name" name="usrname"  reporter:datatype="text"/>
3674                         <field reporter:label="OPAC/Staff Client Holds Alias" name="alias"  reporter:datatype="text"/>
3675                         <field reporter:label="Juvenile" name="juvenile"  reporter:datatype="bool"/>
3676                         <field reporter:label="Record Last Update Time" name="last_update_time" reporter:datatype="timestamp"/>
3677                         <field reporter:label="Preferred Prefix" name="pref_prefix" reporter:datatype="text"/>
3678                         <field reporter:label="Preferred First Name" name="pref_first_given_name" reporter:datatype="text"/>
3679                         <field reporter:label="Preferred Middle Name" name="pref_second_given_name" reporter:datatype="text"/>
3680                         <field reporter:label="Preferred Last Name" name="pref_family_name"  reporter:datatype="text"/>
3681                         <field reporter:label="Preferred Suffix" name="pref_suffix" reporter:datatype="text"/>
3682                         <field reporter:label="Parent/Guardian" name="guardian" reporter:datatype="text"/>
3683                         <field reporter:label="Name Keywords" name="name_keywords" reporter:datatype="text"/>
3684                         <field reporter:label="Additional Permission Groups" name="groups" oils_persist:virtual="true" reporter:datatype="link"/>
3685                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
3686                         <field reporter:label="User Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
3687                         <field reporter:label="Demographic Info" name="demographic" oils_persist:virtual="true" reporter:datatype="link"/>
3688                         <field reporter:label="Billable Transactions" name="billable_transactions" oils_persist:virtual="true" reporter:datatype="link"/>
3689                         <field reporter:label="Money Summary" name="money_summary" oils_persist:virtual="true" reporter:datatype="link"/>
3690                         <field reporter:label="Open Billable Transactions" name="open_billable_transactions_summary" oils_persist:virtual="true" reporter:datatype="link"/>
3691                         <field reporter:label="Checkins" name="checkins" oils_persist:virtual="true" reporter:datatype="link"/>
3692                         <field reporter:label="Circulations Performed as Staff" name="performed_circulations" oils_persist:virtual="true" reporter:datatype="link"/>
3693                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
3694                         <field reporter:label="Reservations" name="reservations" oils_persist:virtual="true" reporter:datatype="link"/>
3695                         <field reporter:label="User Activity Entries" name="usr_activity" oils_persist:virtual="true" reporter:datatype="link"/>
3696                         <field reporter:label="User/Working Location Map" name="usr_work_ou_map" oils_persist:virtual="true" reporter:datatype="link"/>
3697                 </fields>
3698                 <links>
3699                         <link field="demographic" reltype="might_have" key="id" map="" class="rud"/>
3700                         <link field="net_access_level" reltype="has_a" key="id" map="" class="cnal"/>
3701                         <link field="profile" reltype="has_a" key="id" map="" class="pgt"/>
3702                         <link field="ident_type" reltype="has_a" key="id" map="" class="cit"/>
3703                         <link field="billing_address" reltype="has_a" key="id" map="" class="aua"/>
3704                         <link field="mailing_address" reltype="has_a" key="id" map="" class="aua"/>
3705                         <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
3706                         <link field="standing" reltype="has_a" key="id" map="" class="cst"/>
3707                         <link field="card" reltype="has_a" key="id" map="" class="ac"/>
3708                         <link field="ident_type2" reltype="has_a" key="id" map="" class="cit"/>
3709                         <link field="stat_cat_entries" reltype="has_many" key="target_usr" map="" class="actscecm"/>
3710                         <link field="waiver_entries" reltype="has_many" key="usr" map="" class="aupw"/>
3711                         <link field="groups" reltype="has_many" key="usr" map="grp" class="pugm"/>
3712                         <link field="usrgroup" reltype="has_many" key="usrgroup" map="" class="au"/>
3713                         <link field="checkouts" reltype="has_many" key="usr" map="" class="circ"/>
3714                         <link field="hold_requests" reltype="has_many" key="usr" map="" class="ahr"/>
3715                         <link field="permissions" reltype="has_many" key="usr" map="perm" class="pupm"/>
3716                         <link field="settings" reltype="has_many" key="usr" map="" class="aus"/>
3717                         <link field="billable_transactions" reltype="has_many" key="usr" map="" class="mbt"/>
3718                         <link field="open_billable_transactions_summary" reltype="has_many" key="usr" map="" class="mobts"/>
3719                         <link field="money_summary" reltype="might_have" key="usr" map="" class="mus"/>
3720                         <link field="standing_penalties" reltype="has_many" key="usr" map="" class="ausp"/>
3721                         <link field="addresses" reltype="has_many" key="usr" map="" class="aua"/>
3722                         <link field="survey_responses" reltype="has_many" key="usr" map="" class="asvr"/>
3723                         <link field="notes" reltype="has_many" key="usr" map="" class="aun"/>
3724                         <link field="checkins" reltype="has_many" key="checkin_staff" map="" class="circ"/>
3725                         <link field="cards" reltype="has_many" key="usr" map="" class="ac"/>
3726                         <link field="performed_circulations" reltype="has_many" key="circ_staff" map="" class="circ"/>
3727                         <link field="fund_alloc_pcts" reltype="has_many" key="allocator" map="" class="acqfap"/>
3728                         <link field="reservations" reltype="has_many" key="usr" map="" class="bresv"/>
3729                         <link field="usr_activity" reltype="has_many" key="usr" map="" class="auact"/>
3730                         <link field="usr_work_ou_map" reltype="has_many" key="usr" map="" class="puwoum"/>
3731                 </links>
3732                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3733                         <actions>
3734                                 <retrieve permission="VIEW_USER user_request.view" context_field="home_ou" />
3735                         </actions>
3736                 </permacrud>
3737         </class>
3738         <class id="cuat" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::usr_activity_type" oils_persist:tablename="config.usr_activity_type" reporter:label="User Activity Type">
3739                 <fields oils_persist:primary="id" oils_persist:sequence="config.usr_activity_type_id_seq">
3740                         <field name="id" reporter:label="ID" reporter:datatype="id" reporter:selector="label"/>
3741                         <field name="ewho" reporter:label="Event Caller" reporter:datatype="text"/>
3742                         <field name="ewhat" reporter:label="Event Type" reporter:datatype="text"/>
3743                         <field name="ehow" reporter:label="Event Mechanism" reporter:datatype="text"/>
3744                         <field name="label" reporter:label="Label" reporter:datatype="text"/>
3745                         <field name="egroup" reporter:label="Activity Group" reporter:datatype="text"/>
3746                         <field name="enabled" reporter:label="Enabled" reporter:datatype="bool"/>
3747                         <field name="transient" reporter:label="Transient" reporter:datatype="bool"/>
3748         </fields>
3749                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3750                         <actions>
3751                                 <create permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>
3752                                 <retrieve/>
3753                                 <update permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>
3754                                 <delete permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>
3755                         </actions>
3756                 </permacrud>
3757         </class>
3758         <class id="auact" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::usr_activity" oils_persist:tablename="actor.usr_activity" reporter:label="User Activity">
3759                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_activity_id_seq">
3760                         <field name="id" reporter:label="ID" reporter:datatype="id" />
3761                         <field name="usr" reporter:label="User" reporter:datatype="link" />
3762                         <field name="etype" reporter:label="Activity Type" reporter:datatype="link" />
3763                         <field name="event_time" reporter:label="Event Time" reporter:datatype="timestamp" />
3764         </fields>
3765         <links>
3766                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3767                         <link field="etype" reltype="has_a" key="id" map="" class="cuat"/>
3768                 </links>
3769                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3770                         <actions>
3771                                 <retrieve permission="RUN_REPORTS">
3772                                         <context link="usr" field="home_ou" />
3773                                 </retrieve>
3774                         </actions>
3775                 </permacrud>
3776         </class>
3777         <class id="atb" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::toolbar" oils_persist:tablename="actor.toolbar" reporter:label="Custom Toolbar">
3778                 <fields oils_persist:primary="id" oils_persist:sequence="actor.toolbar_id_seq">
3779                         <field name="id" reporter:label="ID" reporter:datatype="id" />
3780                         <field name="usr" reporter:label="Owning User" reporter:datatype="link" />
3781                         <field name="org" reporter:label="Owning Org Unit" reporter:datatype="link" />
3782                         <field name="ws" reporter:label="Owning Workstation" reporter:datatype="link" />
3783                         <field name="label" reporter:label="Label" reporter:datatype="text" oils_persist:i18n="true" />
3784                         <field name="layout" reporter:label="Layout" reporter:datatype="text" />
3785         </fields>
3786         <links>
3787                         <link field="usr" reltype="might_have" key="id" map="" class="au"/>
3788                         <link field="org" reltype="might_have" key="id" map="" class="aou"/>
3789                         <link field="ws" reltype="might_have" key="id" map="" class="aws"/>
3790                 </links>
3791                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3792                         <actions>
3793                                 <retrieve permission="ADMIN_TOOLBAR STAFF_LOGIN" context_field="org">
3794                                         <context link="usr" field="home_ou" />
3795                                         <context link="ws" field="owning_lib" />
3796                                 </retrieve>
3797                                 <create permission="ADMIN_TOOLBAR" context_field="org">
3798                                         <context link="usr" field="home_ou" />
3799                                         <context link="ws" field="owning_lib" />
3800                                 </create>
3801                                 <update permission="ADMIN_TOOLBAR" context_field="org">
3802                                         <context link="usr" field="home_ou" />
3803                                         <context link="ws" field="owning_lib" />
3804                                 </update>
3805                                 <delete permission="ADMIN_TOOLBAR" context_field="org">
3806                                         <context link="usr" field="home_ou" />
3807                                         <context link="ws" field="owning_lib" />
3808                                 </delete>
3809                         </actions>
3810                 </permacrud>
3811         </class>
3812         <class id="csg" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::settings_group" oils_persist:tablename="config.settings_group" reporter:label="Settings Group">
3813                 <fields oils_persist:primary="name">
3814                         <field name="name" reporter:datatype="text"/>
3815                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
3816                 </fields>
3817                 <links/>
3818                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3819                         <actions>
3820                                 <create permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
3821                                 <retrieve/>
3822                                 <update permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
3823                                 <delete permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
3824                         </actions>
3825                 </permacrud>
3826         </class>
3827         <class id="cust" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::usr_setting_type" oils_persist:tablename="config.usr_setting_type" reporter:label="User Setting Type">
3828                 <fields oils_persist:primary="name">
3829                         <field name="name" reporter:label="Name" reporter:datatype="text"/>
3830                         <field name="label" reporter:label="Label" reporter:datatype="text" oils_persist:i18n="true"/>
3831                         <field name="description" reporter:label="Description" reporter:datatype="text" oils_persist:i18n="true"/>
3832                         <field name="datatype" reporter:label="Datatype" reporter:datatype="text"/>
3833                         <field name="fm_class" reporter:label="Fieldmapper Class" reporter:datatype="text"/>
3834                         <field name="grp" reporter:label="Settings Group" reporter:datatype="link"/>
3835                         <field name="opac_visible" reporter:label="OPAC/Patron Visible" reporter:datatype="bool"/>
3836                         <field name="reg_default" reporter:label="Registration Default" reporter:datatype="text"/>
3837                 </fields>
3838                 <links>
3839                         <link field="name" reltype="has_many" key="name" map="" class="aus"/>
3840                         <link field="grp" reltype="has_a" key="name" map="" class="csg"/>
3841                 </links>
3842                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3843                         <actions>
3844                                 <create permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
3845                                 <retrieve/>
3846                                 <update permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
3847                                 <delete permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
3848                         </actions>
3849                 </permacrud>
3850         </class>
3851         <class id="coust" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::org_unit_setting_type" oils_persist:tablename="config.org_unit_setting_type" reporter:label="Organizational Unit Setting Type">
3852                 <fields oils_persist:primary="name">
3853                         <field name="name" reporter:datatype="text"/>
3854                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
3855                         <field name="description" reporter:datatype="text" oils_persist:i18n="true"/>
3856                         <field name="datatype" reporter:datatype="text"/>
3857                         <field name="view_perm" reporter:datatype="link"/>
3858                         <field name="update_perm" reporter:datatype="link"/>
3859                         <field name="fm_class" reporter:datatype="text"/>
3860                         <field name="grp" reporter:datatype="link"/>
3861                 </fields>
3862                 <links>
3863                         <link field="name" reltype="has_many" key="name" map="" class="aous"/>
3864                         <link field="view_perm" reltype="has_a" key="id" map="" class="ppl"/>
3865                         <link field="update_perm" reltype="has_a" key="id" map="" class="ppl"/>
3866                         <link field="grp" reltype="has_a" key="name" map="" class="csg"/>
3867                 </links>
3868                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3869                         <actions>
3870                                 <create permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
3871                                 <retrieve/>
3872                                 <update permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
3873                                 <delete permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
3874                         </actions>
3875                 </permacrud>
3876         </class>
3877         <class id="aous" controller="open-ils.cstore" oils_obj:fieldmapper="actor::org_unit_setting" oils_persist:tablename="actor.org_unit_setting" reporter:label="Organizational Unit Setting">
3878                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_setting_id_seq">
3879                         <field name="id" />
3880                         <field name="name"  reporter:datatype="text"/>
3881                         <field name="org_unit" reporter:datatype="org_unit"/>
3882                         <field name="value"  reporter:datatype="text"/>
3883                 </fields>
3884                 <links>
3885                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3886                         <link field="name" reltype="has_a" key="name" map="" class="coust"/>
3887                 </links>
3888         </class>
3889         <class id="acpn" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::copy_note" oils_persist:tablename="asset.copy_note" reporter:label="Copy Note">
3890                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_note_id_seq">
3891                         <field reporter:label="Note Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
3892                         <field reporter:label="Note Creator" name="creator" reporter:datatype="link"/>
3893                         <field reporter:label="Note ID" name="id" reporter:datatype="id" />
3894                         <field reporter:label="Copy" name="owning_copy" reporter:datatype="link"/>
3895                         <field reporter:label="Is OPAC Visible?" name="pub" reporter:datatype="bool"/>
3896                         <field reporter:label="Note Title" name="title"  reporter:datatype="text"/>
3897                         <field reporter:label="Note Content" name="value"  reporter:datatype="text"/>
3898                 </fields>
3899                 <links>
3900                         <link field="owning_copy" reltype="has_a" key="id" map="" class="acp"/>
3901                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3902                 </links>
3903         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3904             <actions>
3905                 <create permission="CREATE_COPY_NOTE">
3906                     <context link="owning_copy" field="circ_lib"/>
3907                 </create>
3908                 <retrieve permission="VIEW_COPY_NOTES">
3909                     <context link="owning_copy" field="circ_lib"/>
3910                 </retrieve>
3911                 <update permission="UPDATE_COPY_NOTE">
3912                     <context link="owning_copy" field="circ_lib"/>
3913                 </update>
3914                 <delete permission="DELETE_COPY_NOTE">
3915                     <context link="owning_copy" field="circ_lib"/>
3916                 </delete>
3917             </actions>
3918         </permacrud>
3919         </class>
3920         <class id="mfr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::full_rec" oils_persist:tablename="metabib.full_rec" reporter:label="Flattened MARC Fields">
3921                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.full_rec_id_seq">
3922                         <field reporter:label="Field ID" name="id" reporter:datatype="id" />
3923                         <field reporter:label="Indicator 1" name="ind1" oils_persist:primitive="string"  reporter:datatype="text"/>
3924                         <field reporter:label="Indicator 2" name="ind2" oils_persist:primitive="string"  reporter:datatype="text"/>
3925                         <field reporter:label="Bib Record Entry" name="record" reporter:datatype="link"/>
3926                         <field reporter:label="Subfield" name="subfield" oils_persist:primitive="string"  reporter:datatype="text"/>
3927                         <field reporter:label="Tag" name="tag"  reporter:datatype="text"/>
3928                         <field reporter:label="Normalized Value" name="value"  reporter:datatype="text"/>
3929                 </fields>
3930                 <links>
3931                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3932                 </links>
3933         </class>
3934         <class id="mmr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="metabib::metarecord" oils_persist:tablename="metabib.metarecord" reporter:label="Metarecord">
3935                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.metarecord_id_seq">
3936                         <field name="fingerprint"  reporter:datatype="text"/>
3937                         <field name="id" reporter:datatype="id" reporter:selector="fingerprint" />
3938                         <field name="master_record" reporter:datatype="link"/>
3939                         <field name="mods"  reporter:datatype="text"/>
3940                         <field name="source_records" oils_persist:virtual="true" reporter:datatype="link"/>
3941                         <field name="source_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3942                 </fields>
3943                 <links>
3944                         <link field="master_record" reltype="has_a" key="id" map="" class="bre"/>
3945                         <link field="source_records" reltype="has_many" key="metarecord" map="source" class="mmrsm"/>
3946                         <link field="source_maps" reltype="has_many" key="metarecord" class="mmrsm"/>
3947                 </links>
3948                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3949                         <actions>
3950                                 <retrieve/>
3951                         </actions>
3952                 </permacrud>
3953         </class>
3954         <class id="cnal" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::net_access_level" oils_persist:tablename="config.net_access_level" reporter:label="Net Access Level">
3955                 <fields oils_persist:primary="id" oils_persist:sequence="config.net_access_level_id_seq">
3956                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
3957                         <field name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
3958                 </fields>
3959                 <links/>
3960         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3961             <actions>
3962                 <create permission="CREATE_NET_ACCESS_LEVEL" global_required="true"/>
3963                 <retrieve/>
3964                 <update permission="UPDATE_NET_ACCESS_LEVEL" global_required="true"/>
3965                 <delete permission="DELETE_NET_ACCESS_LEVEL" global_required="true"/>
3966             </actions>
3967         </permacrud>
3968         </class>
3969         <class id="ppl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="permission::perm_list" oils_persist:tablename="permission.perm_list" reporter:label="Permission List">
3970                 <fields oils_persist:primary="id" oils_persist:sequence="permission.perm_list_id_seq">
3971                         <field name="code"  reporter:datatype="text"/>
3972                         <field name="description"  reporter:datatype="text" oils_persist:i18n="true"/>
3973                         <field name="id" reporter:selector="code" reporter:datatype="id"/>
3974                 </fields>
3975                 <links/>
3976         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3977             <actions>
3978                 <create permission="CREATE_PERM" global_required="true"/>
3979                 <retrieve permission="CREATE_PERM UPDATE_PERM DELETE_PERM" global_required="true"/>
3980                 <update permission="UPDATE_PERM" global_required="true"/>
3981                 <delete permission="DELETE_PERM" global_required="true"/>
3982             </actions>
3983         </permacrud>
3984         </class>
3985         <class id="mmrsm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="metabib::metarecord_source_map" oils_persist:tablename="metabib.metarecord_source_map" oils_persist:field_safe="true" reporter:label="Metarecord Source Map">
3986                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.metarecord_source_map_id_seq">
3987                         <field name="id" reporter:datatype="id" />
3988                         <field name="metarecord" reporter:datatype="link"/>
3989                         <field name="source" reporter:datatype="link"/>
3990                 </fields>
3991                 <links>
3992                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3993                         <link field="metarecord" reltype="has_a" key="id" map="" class="mmr"/>
3994                 </links>
3995                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3996                         <actions>
3997                                 <retrieve/>
3998                         </actions>
3999                 </permacrud>
4000         </class>
4001         <class id="mde" controller="open-ils.cstore open-ils.pcrud" 
4002                         oils_obj:fieldmapper="metabib::display_entry" 
4003                         oils_persist:tablename="metabib.display_entry" 
4004                         oils_persist:field_safe="true"
4005                         reporter:label="Display Field Entry" oils_persist:readonly="true">
4006                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.display_entry_id_seq">
4007                         <field name="id" reporter:datatype="id" />
4008                         <field name="field" reporter:datatype="link"/>
4009                         <field name="source" reporter:datatype="link"/>
4010                         <field name="value"  reporter:datatype="text"/>
4011                         <field name="highlight" oils_persist:virtual="true"  reporter:datatype="text"/>
4012                 </fields>
4013                 <links>
4014                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
4015                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
4016                 </links>
4017                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4018                         <actions>
4019                                 <retrieve/>
4020                         </actions>
4021                 </permacrud>
4022         </class>
4023         <class id="mfde" controller="open-ils.cstore open-ils.pcrud" 
4024                 oils_persist:tablename="metabib.flat_display_entry"
4025                 oils_obj:fieldmapper="metabib::flat_display_entry" 
4026                 oils_persist:field_safe="true"
4027                 reporter:label="Flat Display Entry" 
4028                 oils_persist:readonly="true">
4029                 <fields>
4030                         <field name="source" reporter:datatype="id" />
4031                         <field name="name" reporter:datatype="text"/>
4032                         <field name="multi" reporter:datatype="bool"/>
4033                         <field name="label" reporter:datatype="text"/>
4034                         <field name="field" reporter:datatype="link"/>
4035                         <field name="value" reporter:datatype="text"/>
4036                 </fields>
4037                 <links>
4038                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
4039                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
4040                         <link field="name" reltype="has_a" key="name" map="" class="cdfm"/>
4041                 </links>
4042                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4043                         <actions>
4044                                 <retrieve/>
4045                         </actions>
4046                 </permacrud>
4047         </class>
4048         <class id="mcde" controller="open-ils.cstore open-ils.pcrud" 
4049                 oils_persist:tablename="metabib.compressed_display_entry"
4050                 oils_obj:fieldmapper="metabib::compressed_display_entry" 
4051                 oils_persist:field_safe="true"
4052                 reporter:label="Compressed Display Entry" 
4053                 oils_persist:readonly="true">
4054                 <fields>
4055                         <field name="source" reporter:datatype="id" />
4056                         <field name="name" reporter:datatype="text"/>
4057                         <field name="multi" reporter:datatype="bool"/>
4058                         <field name="label" reporter:datatype="text"/>
4059                         <field name="field" reporter:datatype="link"/>
4060                         <field name="value" reporter:datatype="text"/>
4061                 </fields>
4062                 <links>
4063                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
4064                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
4065                         <link field="name" reltype="has_a" key="name" map="" class="cdfm"/>
4066                 </links>
4067                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4068                         <actions>
4069                                 <retrieve/>
4070                         </actions>
4071                 </permacrud>
4072         </class>
4073         <class id="mwde" controller="open-ils.cstore open-ils.pcrud" 
4074                 oils_persist:tablename="metabib.wide_display_entry"
4075                 oils_obj:fieldmapper="metabib::wide_display_entry" 
4076                 oils_persist:field_safe="true"
4077                 reporter:label="Wide Display Entry" 
4078                 oils_persist:readonly="true">
4079                 <fields oils_persist:primary="source">
4080                         <field name="source" reporter:label="Record ID" reporter:datatype="id" />
4081                         <field name="title" reporter:label="Title" reporter:datatype="text"/>
4082                         <field name="author" reporter:label="Author" reporter:datatype="text"/>
4083                         <field name="creators" reporter:label="Creators" reporter:datatype="text"/>
4084                         <field name="isbn" reporter:label="ISBN" reporter:datatype="text"/>
4085                         <field name="issn" reporter:label="ISSN" reporter:datatype="text"/>
4086                         <field name="upc" reporter:label="UPC" reporter:datatype="text"/>
4087                         <field name="tcn" reporter:label="TCN" reporter:datatype="text"/>
4088                         <field name="edition" reporter:label="Edition" reporter:datatype="text"/>
4089                         <field name="physical_description" reporter:label="Physical Description" reporter:datatype="text"/>
4090                         <field name="publisher" reporter:label="Publisher" reporter:datatype="text"/>
4091                         <field name="series_title" reporter:label="Series Title" reporter:datatype="text"/>
4092                         <field name="subject_geographic" reporter:label="Geographic Subject" reporter:datatype="text"/>
4093                         <field name="subject_name" reporter:label="Name Subject" reporter:datatype="text"/>
4094                         <field name="subject_temporal" reporter:label="Temporal Subject" reporter:datatype="text"/>
4095                         <field name="subject_topic" reporter:label="Topic Subject" reporter:datatype="text"/>
4096                         <field name="abstract" reporter:label="Abstract" reporter:datatype="text"/>
4097                         <field name="toc" reporter:label="Table of Contents" reporter:datatype="text"/>
4098                         <field name="pubdate" reporter:label="Publication Date" reporter:datatype="text"/>
4099                         <field name="type_of_resource" reporter:label="Type of Resource" reporter:datatype="text"/>
4100                 </fields>
4101                 <links>
4102                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
4103                 </links>
4104                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4105                         <actions>
4106                                 <retrieve/>
4107                         </actions>
4108                 </permacrud>
4109         </class>
4110
4111         <class id="cdfm" controller="open-ils.cstore open-ils.pcrud" 
4112                 oils_persist:tablename="config.display_field_map"
4113                 oils_obj:fieldmapper="config::display_field_map"
4114                 oils_persist:field_safe="true"
4115                 reporter:label="Display Field Map">
4116                 <fields oils_persist:primary="name">
4117                         <field name="name" reporter:datatype="text"/>
4118                         <field name="field" reporter:datatype="link"/>
4119                         <field name="multi" reporter:datatype="bool"/>
4120                 </fields>
4121                 <links>
4122                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
4123                 </links>
4124                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4125                         <actions>
4126                                 <retrieve/>
4127                                 <create permission="CREATE_METABIB_FIELD" global_required="true"/>
4128                                 <update permission="UPDATE_METABIB_FIELD" global_required="true"/>
4129                                 <delete permission="DELETE_METABIB_FIELD" global_required="true"/>
4130                         </actions>
4131                 </permacrud>
4132         </class>
4133
4134         <class id="mfae" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="metabib::facet_entry" oils_persist:tablename="metabib.facet_entry" reporter:label="Combined Facet Entry" oils_persist:readonly="true">
4135                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.facet_entry_id_seq">
4136                         <field name="id" reporter:datatype="id" />
4137                         <field name="field" reporter:datatype="link"/>
4138                         <field name="source" reporter:datatype="link"/>
4139                         <field name="value"  reporter:datatype="text"/>
4140                 </fields>
4141                 <links>
4142                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
4143                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
4144                 </links>
4145         </class>
4146         <class id="mbe" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="metabib::browse_entry" oils_persist:tablename="metabib.browse_entry" reporter:label="Combined Browse Entry" oils_persist:readonly="true">
4147                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.browse_entry_id_seq">
4148                         <field name="id" reporter:datatype="id" />
4149                         <field name="value" reporter:datatype="text"/>
4150                         <field name="def_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4151                 </fields>
4152                 <links>
4153                         <link field="def_maps" reltype="has_many" key="entry" map="" class="mbedm"/>
4154                 </links>
4155                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4156                         <actions>
4157                                 <retrieve/>
4158                         </actions>
4159                 </permacrud>
4160         </class>
4161         <class id="mbedm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="metabib::browse_entry_def_map" oils_persist:tablename="metabib.browse_entry_def_map" reporter:label="Combined Browse Entry Definition Map" oils_persist:readonly="true">
4162                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.browse_entry_def_map_id_seq">
4163                         <field name="id" reporter:datatype="id" />
4164                         <field name="entry" reporter:datatype="link"/>
4165                         <field name="def" reporter:datatype="link"/>
4166                         <field name="source" reporter:datatype="link"/>
4167                 </fields>
4168                 <links>
4169                         <link field="entry" reltype="has_a" key="id" map="" class="mbe"/>
4170                         <link field="def" reltype="has_a" key="id" map="" class="cmf"/>
4171                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
4172                 </links>
4173         </class>
4174         <class id="mbeshm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="metabib::browse_entry_simple_heading_map" oils_persist:tablename="metabib.browse_entry_simple_heading_map" reporter:label="Combined Browse Entry Simple Authority Heading Map" oils_persist:readonly="true">
4175                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.browse_entry_simple_heading_map_id_seq">
4176                         <field name="id" reporter:datatype="id" />
4177                         <field name="entry" reporter:datatype="link"/>
4178                         <field name="simple_heading" reporter:datatype="link"/>
4179                 </fields>
4180                 <links>
4181                         <link field="entry" reltype="has_a" key="id" map="" class="mbe"/>
4182                         <link field="simple_heading" reltype="has_a" key="id" map="" class="ash"/>
4183                 </links>
4184         </class>
4185         <class id="mfe" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="metabib::field_entry" reporter:label="Combined Field Entry View" oils_persist:readonly="true">
4186                 <oils_persist:source_definition><![CDATA[
4187                         SELECT * FROM metabib.author_field_entry
4188                                                 UNION ALL
4189                         SELECT * FROM metabib.keyword_field_entry
4190                                                 UNION ALL
4191                         SELECT * FROM metabib.identifier_field_entry
4192                                                 UNION ALL
4193                         SELECT * FROM metabib.title_field_entry
4194                                                 UNION ALL
4195                         SELECT * FROM metabib.subject_field_entry
4196                                                 UNION ALL
4197                         SELECT * FROM metabib.series_field_entry
4198                 ]]></oils_persist:source_definition>
4199                 <fields>
4200                         <field name="field" reporter:datatype="link"/>
4201                         <field name="id" reporter:datatype="id" />
4202                         <field name="source" reporter:datatype="link"/>
4203                         <field name="value"  reporter:datatype="text"/>
4204                 </fields>
4205                 <links>
4206                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
4207                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
4208                 </links>
4209         </class>
4210         <class id="mkfe" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::keyword_field_entry" oils_persist:tablename="metabib.keyword_field_entry" reporter:label="Keyword Field Entry">
4211                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.keyword_field_entry_id_seq">
4212                         <field name="field" reporter:datatype="link"/>
4213                         <field name="id" reporter:datatype="id" />
4214                         <field name="source" reporter:datatype="link"/>
4215                         <field name="value"  reporter:datatype="text"/>
4216                 </fields>
4217                 <links>
4218                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
4219                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
4220                 </links>
4221         </class>
4222         <class id="mcp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::cash_payment" oils_persist:tablename="money.cash_payment" reporter:label="Cash Payment">
4223                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
4224                         <field name="accepting_usr" reporter:datatype="link"/>
4225                         <field name="amount" reporter:datatype="money" />
4226                         <field name="amount_collected" reporter:datatype="money" />
4227                         <field name="cash_drawer" reporter:datatype="link"/>
4228                         <field name="id" reporter:datatype="id" />
4229                         <field name="note"  reporter:datatype="text"/>
4230                         <field name="payment_ts" reporter:datatype="timestamp"/>
4231                         <field name="xact" reporter:datatype="link"/>
4232                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
4233                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
4234                 </fields>
4235                 <links>
4236                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
4237                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
4238                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
4239                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
4240                 </links>
4241         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4242             <actions>
4243                 <retrieve permission="VIEW_USER_TRANSACTIONS">
4244                     <context link="xact" jump="usr" field="home_ou"/>
4245                 </retrieve>
4246                         </actions>
4247                 </permacrud>
4248         </class>
4249         <class id="mfp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::forgive_payment" oils_persist:tablename="money.forgive_payment" reporter:label="Forgive Payment">
4250                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
4251                         <field name="accepting_usr" reporter:datatype="link"/>
4252                         <field name="amount" reporter:datatype="money" />
4253                         <field name="amount_collected" reporter:datatype="money" />
4254                         <field name="id" reporter:datatype="id" />
4255                         <field name="note"  reporter:datatype="text"/>
4256                         <field name="payment_ts" reporter:datatype="timestamp"/>
4257                         <field name="xact" reporter:datatype="link"/>
4258                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
4259                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
4260                 </fields>
4261                 <links>
4262                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
4263                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
4264                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
4265                 </links>
4266         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4267             <actions>
4268                 <retrieve permission="VIEW_USER_TRANSACTIONS">
4269                     <context link="xact" jump="usr" field="home_ou"/>
4270                 </retrieve>
4271                         </actions>
4272                 </permacrud>
4273         </class>
4274         <class id="maa" controller="open-ils.cstore" oils_obj:fieldmapper="money::account_adjustment" oils_persist:tablename="money.account_adjustment" reporter:label="Account Adjustment">
4275                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
4276                         <field name="accepting_usr" reporter:datatype="link"/>
4277                         <field name="amount" reporter:datatype="money" />
4278                         <field name="amount_collected" reporter:datatype="money" />
4279                         <field name="id" reporter:datatype="id" />
4280                         <field name="note"  reporter:datatype="text"/>
4281                         <field name="payment_ts" reporter:datatype="timestamp"/>
4282                         <field name="xact" reporter:datatype="link"/>
4283                         <field name="billing" reporter:datatype="link"/>
4284                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
4285                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
4286                 </fields>
4287                 <links>
4288                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
4289                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
4290                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
4291                         <link field="billing" reltype="might_have" key="id" class="mb"/>
4292                 </links>
4293         </class>
4294         <class id="mrd" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::record_descriptor" oils_persist:tablename="metabib.rec_descriptor" reporter:label="Basic Record Descriptor">
4295                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.rec_descriptor_id_seq">
4296                         <field reporter:label="Audn" name="audience" oils_persist:primitive="string"  reporter:datatype="text"/>
4297                         <field reporter:label="BLvl" name="bib_level" oils_persist:primitive="string"  reporter:datatype="text"/>
4298                         <field reporter:label="Cat Form" name="cat_form" oils_persist:primitive="string"  reporter:datatype="text"/>
4299                         <field reporter:label="Character Encoding" name="char_encoding" oils_persist:primitive="string"  reporter:datatype="text"/>
4300                         <field reporter:label="Ctrl" name="control_type" oils_persist:primitive="string"  reporter:datatype="text"/>
4301                         <field reporter:label="ELvl" name="enc_level" oils_persist:primitive="string"  reporter:datatype="text"/>
4302                         <field reporter:label="Descriptor ID" name="id" reporter:datatype="id" />
4303                         <field reporter:label="Form" name="item_form" oils_persist:primitive="string"  reporter:datatype="text"/>
4304                         <field reporter:label="Lang" name="item_lang" oils_persist:primitive="string"  reporter:datatype="text"/>
4305                         <field reporter:label="Type" name="item_type" oils_persist:primitive="string"  reporter:datatype="text"/>
4306                         <field reporter:label="LitF" name="lit_form" oils_persist:primitive="string"  reporter:datatype="text"/>
4307                         <field reporter:label="Pub Status" name="pub_status" oils_persist:primitive="string"  reporter:datatype="text"/>
4308                         <field reporter:label="Bib Record Entry" name="record" reporter:datatype="link"/>
4309                         <field reporter:label="TMat" name="type_mat" oils_persist:primitive="string"  reporter:datatype="text"/>
4310                         <field reporter:label="Video Recording Format" name="vr_format" oils_persist:primitive="string"  reporter:datatype="text"/>
4311                         <field reporter:label="Date1" name="date1" oils_persist:primitive="string"  reporter:datatype="text"/>
4312                         <field reporter:label="Date2" name="date2" oils_persist:primitive="string"  reporter:datatype="text"/>
4313                 </fields>
4314                 <links>
4315                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
4316                         <link field="item_lang" reltype="has_a" key="code" map="" class="clm"/>
4317                         <link field="item_type" reltype="has_a" key="code" map="" class="citm"/>
4318                         <link field="bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
4319                         <link field="item_form" reltype="has_a" key="code" map="" class="cifm"/>
4320                         <link field="audience" reltype="has_a" key="code" map="" class="cam"/>
4321                         <link field="lit_form" reltype="has_a" key="code" map="" class="clfm"/>
4322                 </links>
4323         </class>
4324
4325         <class id="csp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::standing_penalty" oils_persist:tablename="config.standing_penalty" reporter:label="Standing Penalty">
4326                 <fields oils_persist:primary="id" oils_persist:sequence="config.standing_penalty_id_seq">
4327                         <field reporter:label="Penalty ID" name="id" reporter:selector="name" reporter:datatype="id"/>
4328                         <field reporter:label="Name" name="name"  reporter:datatype="text"/>
4329                         <field reporter:label="Label" name="label"  reporter:datatype="text" oils_persist:i18n="true"/>
4330                         <field reporter:label="Block List" name="block_list" reporter:datatype="text"/>
4331                         <field reporter:label="Staff Alert" name="staff_alert" reporter:datatype="bool"/>
4332                         <field reporter:label="Org Depth" name="org_depth" reporter:datatype="int"/>
4333                         <field reporter:label="Ignore Proximity" name="ignore_proximity" reporter:datatype="int"/>
4334                 </fields>
4335                 <links/>
4336         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4337             <actions>
4338                 <create permission="ADMIN_STANDING_PENALTY" global_required="true"/>
4339                 <retrieve permission="ADMIN_STANDING_PENALTY VIEW_STANDING_PENALTY" global_required="true"/>
4340                 <update permission="ADMIN_STANDING_PENALTY" global_required="true"/>
4341                 <delete permission="ADMIN_STANDING_PENALTY" global_required="true"/>
4342             </actions>
4343         </permacrud>
4344         </class>
4345         <class id="pgpt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="permission::grp_penalty_threshold" oils_persist:tablename="permission.grp_penalty_threshold" reporter:label="Group Penalty Threshold">
4346                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_penalty_threshold_id_seq">
4347                         <field name="id" reporter:selector="name" reporter:datatype="id" reporter:label="ID"/>
4348                         <field name="grp"  reporter:datatype="link" reporter:label="Group"/>
4349                         <field name="penalty"  reporter:datatype="link" reporter:label="Penalty"/>
4350                         <field name="threshold" reporter:datatype="float" reporter:label="Threshold"/>
4351                         <field name="org_unit" reporter:datatype="org_unit" reporter:label="Org Unit"/>
4352                 </fields>
4353                 <links>
4354                         <link field="penalty" reltype="has_a" key="id" map="" class="csp"/>
4355                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
4356                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
4357         </links>
4358         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4359             <actions>
4360                 <create permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
4361                 <retrieve permission="VIEW_GROUP_PENALTY_THRESHOLD ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
4362                 <update permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
4363                 <delete permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
4364             </actions>
4365         </permacrud>
4366         </class>
4367         <class id="ccs" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::copy_status" oils_persist:tablename="config.copy_status" oils_persist:restrict_primary="100" reporter:label="Copy Status" oils_persist:field_safe="true">
4368                 <fields oils_persist:primary="id" oils_persist:sequence="config.copy_status_id_seq">
4369                         <field name="holdable" reporter:datatype="bool"/>
4370                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
4371                         <field name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
4372                         <field name="opac_visible" reporter:datatype="bool"/>
4373             <field name="copy_active" reporter:datatype="bool"/>
4374             <field name="restrict_copy_delete" reporter:datatype="bool"/>
4375             <field name="is_available" reporter:datatype="bool"/>
4376                 </fields>
4377                 <links/>
4378         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4379             <actions>
4380                 <create permission="CREATE_COPY_STATUS" global_required="true"/>
4381                 <retrieve/>
4382                 <update permission="UPDATE_COPY_STATUS" global_required="true"/>
4383                 <delete permission="DELETE_COPY_STATUS" global_required="true"/>
4384             </actions>
4385         </permacrud>
4386         </class>
4387         <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">
4388                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_standing_penalty_id_seq">
4389                         <field name="id" reporter:datatype="id" reporter:label="ID" />
4390                         <field name="set_date" reporter:datatype="timestamp" reporter:label="Set Date"/>
4391                         <field name="usr" reporter:datatype="link" reporter:label="User"/>
4392                         <field name="staff" reporter:datatype="link" reporter:label="Staff"/>
4393                         <field name="standing_penalty" reporter:datatype="link" reporter:label="Standing Penalty"/>
4394                         <field name="org_unit" reporter:datatype="link" reporter:label="Org Unit"/>
4395                         <field name="stop_date" reporter:datatype="timestamp" reporter:label="Stop Date"/>
4396                         <field name="note" reporter:datatype="text" reporter:label="Note"/>
4397                 </fields>
4398                 <links>
4399                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4400                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
4401                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
4402                         <link field="standing_penalty" reltype="has_a" key="id" map="" class="csp"/>
4403                 </links>
4404                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4405                         <actions>
4406                                 <create permission="UPDATE_USER"><context link="usr" field="home_ou"/></create>
4407                                 <retrieve permission="VIEW_USER"><context link="usr" field="home_ou"/></retrieve>
4408                                 <update permission="UPDATE_USER"><context link="usr" field="home_ou"/></update>
4409                                 <delete permission="UPDATE_USER"><context link="usr" field="home_ou"/></delete>
4410                         </actions>
4411                 </permacrud>
4412         </class>
4413         <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">
4414                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_address_id_seq">
4415                         <field reporter:label="Type" name="address_type"  reporter:datatype="text"/>
4416                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
4417                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
4418                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
4419                         <field reporter:label="Address ID" name="id" reporter:datatype="id" />
4420                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
4421                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
4422                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
4423                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
4424                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
4425                         <field reporter:label="Valid Address?" name="valid" reporter:datatype="bool"/>
4426                         <field reporter:label="Within City Limits?" name="within_city_limits" reporter:datatype="bool"/>
4427                         <field reporter:label="Replaces" name="replaces" reporter:datatype="link"/>
4428                         <field reporter:label="Pending" name="pending" reporter:datatype="bool"/>
4429                 </fields>
4430                 <links>
4431                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4432                         <link field="replaces" reltype="has_a" key="id" map="" class="aua"/>
4433                 </links>
4434                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4435                         <actions>
4436                                 <create permission="UPDATE_USER"><context link="usr" field="home_ou"/></create>
4437                                 <retrieve permission="VIEW_USER"><context link="usr" field="home_ou"/></retrieve>
4438                                 <update permission="UPDATE_USER"><context link="usr" field="home_ou"/></update>
4439                                 <delete permission="UPDATE_USER"><context link="usr" field="home_ou"/></delete>
4440                         </actions>
4441                 </permacrud>
4442         </class>
4443         <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">
4444                 <fields oils_persist:primary="id" oils_persist:sequence="actor.address_alert_id_seq">
4445                         <field reporter:label="Address Alert ID" name="id" reporter:datatype="id" />
4446                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" oils_obj:required="true"/>
4447                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
4448                         <field reporter:label="Match All Fields" name="match_all" reporter:datatype="bool" />
4449                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text" oils_obj:required="true"/>
4450                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
4451                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
4452                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
4453                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
4454                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
4455                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
4456                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
4457                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="bool"/>
4458                         <field reporter:label="Billing Address" name="billing_address" reporter:datatype="bool"/>
4459                 </fields>
4460                 <links>
4461                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4462                 </links>
4463                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4464                         <actions>
4465                                 <create   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
4466                                 <retrieve context_field='owner' permission="ADMIN_ADDRESS_ALERT VIEW_ADDRESS_ALERT CREATE_USER"/>
4467                                 <update   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
4468                                 <delete   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
4469                         </actions>
4470                 </permacrud>
4471         </class>
4472
4473
4474         <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">
4475                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_saved_search_id_seq">
4476                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4477                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
4478                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
4479                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4480                         <field reporter:label="Query Text" name="query_text" reporter:datatype="text"/>
4481                         <field reporter:label="Query Type" name="query_type" reporter:datatype="text"/>
4482                         <field reporter:label="Target" name="target" reporter:datatype="text"/>
4483                 </fields>
4484                 <links>
4485                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
4486                 </links>
4487         </class>
4488
4489         <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">
4490                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_note_id_seq">
4491                         <field name="call_number" />
4492                         <field name="create_date" reporter:datatype="timestamp"/>
4493                         <field name="creator" reporter:datatype="link"/>
4494                         <field name="id" reporter:datatype="id" />
4495                         <field name="pub" reporter:datatype="bool"/>
4496                         <field name="title"  reporter:datatype="text"/>
4497                         <field name="value"  reporter:datatype="text"/>
4498                 </fields>
4499                 <links>
4500                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
4501                 </links>
4502         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4503             <actions>
4504                 <create permission="CREATE_VOLUME_NOTE">
4505                     <context link="call_number" field="owning_lib"/>
4506                 </create>
4507                 <retrieve permission="VIEW_VOLUME_NOTES">
4508                     <context link="call_number" field="owning_lib"/>
4509                 </retrieve>
4510                 <update permission="UPDATE_VOLUME_NOTE">
4511                     <context link="call_number" field="owning_lib"/>
4512                 </update>
4513                 <delete permission="DELETE_VOLUME_NOTE">
4514                     <context link="call_number" field="owning_lib"/>
4515                 </delete>
4516             </actions>
4517         </permacrud>
4518         </class>
4519         <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">
4520                 <fields oils_persist:primary="id" oils_persist:sequence="authority.record_note_id_seq">
4521                         <field name="create_date" reporter:datatype="timestamp"/>
4522                         <field name="creator" reporter:datatype="link"/>
4523                         <field name="edit_date" reporter:datatype="timestamp"/>
4524                         <field name="editor" reporter:datatype="link"/>
4525                         <field name="id" reporter:datatype="id" />
4526                         <field name="record" reporter:datatype="link"/>
4527                         <field name="value" reporter:datatype="text"/>
4528                 </fields>
4529                 <links>
4530                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
4531                 </links>
4532         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4533             <actions>
4534                 <create permission="CREATE_AUTHORITY_RECORD_NOTE" global_required='true'/>
4535                 <retrieve/>
4536                 <update permission="UPDATE_AUTHORITY_RECORD_NOTE" global_required='true'/>
4537                 <delete permission="DELETE_AUTHORITY_RECORD_NOTE" global_required='true'/>
4538             </actions>
4539         </permacrud>
4540         </class>
4541         <class id="ocirccount" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circ_count" reporter:label="Open Circulation Count" oils_persist:readonly="true">
4542         <oils_persist:source_definition><![CDATA[
4543 SELECT  usr,
4544         SUM(
4545             CASE
4546                 WHEN (
4547                     ((fine_interval >= '1 day' AND due_date >= 'today') OR (fine_interval < '1 day'  AND due_date > 'now'))
4548                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
4549                 ) THEN 1
4550                 ELSE 0
4551             END
4552         ) AS out,
4553
4554         SUM(
4555             CASE
4556                 WHEN (
4557                     ((fine_interval >= '1 day' AND due_date < 'today') OR (fine_interval < '1 day'  AND due_date < 'now'))
4558                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
4559                 ) THEN 1
4560                 ELSE 0
4561             END
4562         ) AS overdue,
4563
4564         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LOST') THEN 1 ELSE 0 END) AS lost,
4565         SUM( CASE WHEN stop_fines = 'CLAIMSRETURNED' THEN 1 ELSE 0 END) AS claims_returned,
4566         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LONGOVERDUE') THEN 1 ELSE 0 END) AS long_overdue
4567   FROM  action.circulation
4568   WHERE checkin_time IS NULL
4569   GROUP BY 1
4570         ]]></oils_persist:source_definition>
4571         <fields oils_persist:primary="usr">
4572             <field reporter:label="User ID" name="usr" reporter:datatype="link"/>
4573             <field reporter:label="Out" name="out" reporter:datatype="text"/>
4574             <field reporter:label="Overdue" name="overdue" reporter:datatype="text"/>
4575             <field reporter:label="Lost" name="lost" reporter:datatype="text"/>
4576             <field reporter:label="Claims Returned" name="claims_returned" reporter:datatype="text"/>
4577             <field reporter:label="Long Overdue" name="long_overdue" reporter:datatype="text"/>
4578         </fields>
4579         <links>
4580             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4581         </links>
4582         </class>
4583         <class id="ocirclist" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circ_list" reporter:label="Open Circulation List" oils_persist:readonly="true">
4584         <oils_persist:source_definition><![CDATA[
4585 SELECT  usr,
4586         STRING_AGG(
4587             CASE
4588                 WHEN (
4589                     ((fine_interval >= '1 day' AND due_date >= 'today') OR (fine_interval < '1 day'  AND due_date > 'now'))
4590                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
4591                 ) THEN id::TEXT
4592                 ELSE '0'
4593             END
4594         ,',') AS out,
4595
4596         STRING_AGG(
4597             CASE
4598                 WHEN (
4599                     ((fine_interval >= '1 day' AND due_date < 'today') OR (fine_interval < '1 day'  AND due_date < 'now'))
4600                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
4601                 ) THEN id::TEXT
4602                 ELSE '0'
4603             END
4604         ,',') AS overdue,
4605
4606         STRING_AGG( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LOST') THEN id::TEXT ELSE '0' END,',') AS lost,
4607         STRING_AGG( CASE WHEN stop_fines = 'CLAIMSRETURNED' THEN id::TEXT ELSE '0' END,',') AS claims_returned,
4608         STRING_AGG( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LONGOVERDUE') THEN id::TEXT ELSE '0' END,',') AS long_overdue
4609   FROM  action.circulation
4610   WHERE checkin_time IS NULL
4611   GROUP BY 1
4612         ]]></oils_persist:source_definition>
4613         <fields oils_persist:primary="usr">
4614             <field reporter:label="User ID" name="usr" reporter:datatype="link"/>
4615             <field reporter:label="Out" name="out" reporter:datatype="text"/>
4616             <field reporter:label="Overdue" name="overdue" reporter:datatype="text"/>
4617             <field reporter:label="Lost" name="lost" reporter:datatype="text"/>
4618             <field reporter:label="Claims Returned" name="claims_returned" reporter:datatype="text"/>
4619             <field reporter:label="Long Overdue" name="long_overdue" reporter:datatype="text"/>
4620         </fields>
4621         <links>
4622             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4623         </links>
4624         </class>
4625         <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">
4626                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
4627                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
4628                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
4629                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
4630                         <field reporter:label="Checkout / Renewal Library" name="circ_lib"  reporter:datatype="org_unit"/>
4631                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
4632                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
4633                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
4634                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
4635                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
4636                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4637                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
4638                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
4639                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
4640                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
4641                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
4642                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
4643                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
4644                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
4645                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
4646                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
4647                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
4648                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
4649                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
4650                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
4651                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
4652                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
4653                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
4654                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
4655                         <field reporter:label="Checkin Scan Date/Time" name="checkin_scan_time" reporter:datatype="timestamp" />
4656                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
4657                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4658                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4659                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
4660                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
4661                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4662                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4663                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
4664                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
4665                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4666                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4667                         <field reporter:label="Auto Renewal" name="auto_renewal" reporter:datatype="bool"/>
4668                         <field reporter:label="Remaining Auto Renewals" name="auto_renewal_remaining" reporter:datatype="int" />
4669                 </fields>
4670                 <links>
4671                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
4672                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
4673                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
4674                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4675                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
4676                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4677                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4678                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
4679                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
4680                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
4681                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
4682                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
4683                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
4684                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4685                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4686                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
4687                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
4688                         <link field="parent_circ" reltype="has_a" key="id" map="" class="circ"/>
4689                         <link field="renewals" reltype="has_many" key="parent_circ" map="" class="circ"/>
4690                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
4691                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
4692                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
4693                 </links>
4694                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4695                         <actions>
4696                                 <retrieve permission="VIEW_CIRCULATIONS" context_field="circ_lib" />
4697                         </actions>
4698                 </permacrud>
4699         </class>
4700         <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">
4701                 <fields>
4702                         <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
4703                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
4704                         <field reporter:label="Circ ID" name="id" reporter:datatype="int" />
4705                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
4706                         <field reporter:label="Create Date/Time" name="create_time" reporter:datatype="timestamp" />
4707                         <field reporter:label="Circulation Type" name="circ_type" reporter:datatype="text"/>
4708                         <field reporter:label="Item Type" name="item_type" reporter:datatype="text"/>
4709                 </fields>
4710                 <links>
4711                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
4712                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4713                 </links>
4714                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4715                         <actions>
4716                                 <retrieve permission="VIEW_CIRCULATIONS" context_field="circ_lib" />
4717                         </actions>
4718                 </permacrud>
4719         </class>
4720         <class id="aacs" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::all_circulation_slim" oils_persist:tablename="action.all_circulation_slim" reporter:core="true" reporter:label="Combined Aged and Active circulations" oils_persist:readonly="true">
4721                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
4722                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
4723                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
4724                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
4725                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
4726                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
4727                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
4728                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
4729                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
4730                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
4731                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4732                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
4733                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
4734                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
4735                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
4736                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
4737                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
4738                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
4739                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
4740                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
4741                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
4742                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
4743                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
4744                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
4745                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
4746                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
4747                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
4748                         <field reporter:label="Checkin Scan Time" name="checkin_scan_time" reporter:datatype="timestamp"/>
4749                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
4750                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
4751                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4752                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4753                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
4754                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
4755                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
4756                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4757                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4758                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4759                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4760                         <field reporter:label="Linked Active Circulation" name="active_circ" oils_persist:virtual="true" reporter:datatype="link"/>
4761                         <field reporter:label="Linked Aged Circulation" name="aged_circ" oils_persist:virtual="true" reporter:datatype="link"/>
4762                         <field reporter:label="Auto Renewal" name="auto_renewal" reporter:datatype="bool"/>
4763                         <field reporter:label="Remaining Auto Renewals" name="auto_renewal_remaining" reporter:datatype="int" />
4764                 </fields>
4765                 <links>
4766                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
4767                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
4768                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
4769                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4770                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
4771                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4772                         <link field="payments" reltype="has_many" key="xact" map="" class="mallp"/>
4773                         <link field="billings" reltype="has_many" key="xact" map="" class="mallb"/>
4774                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
4775                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
4776                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
4777                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
4778                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4779                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4780                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
4781                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
4782                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
4783                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
4784                         <link field="active_circ" reltype="might_have" key="id" map="" class="circ"/>
4785                         <link field="aged_circ" reltype="might_have" key="id" map="" class="acirc"/>
4786                         <link field="parent_circ" reltype="might_have" key="id" map="" class="acirc"/>
4787                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4788                 </links>
4789                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4790                         <actions>
4791                                 <retrieve permission="VIEW_CIRCULATIONS" context_field="circ_lib" />
4792                         </actions>
4793                 </permacrud>
4794         </class>
4795
4796         <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">
4797                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
4798                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
4799                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
4800                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
4801                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
4802                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
4803                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
4804                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
4805                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
4806                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
4807                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4808                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
4809                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
4810                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
4811                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
4812                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
4813                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
4814                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
4815                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
4816                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
4817                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
4818                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
4819                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
4820                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
4821                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
4822                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
4823                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
4824                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
4825                         <field reporter:label="Checkin Scan Time" name="checkin_scan_time" reporter:datatype="timestamp"/>
4826                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
4827                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
4828                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4829                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4830                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
4831                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
4832                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
4833                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4834                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4835                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
4836                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
4837                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
4838                         <field reporter:label="Call Number" name="copy_call_number" reporter:datatype="link"/>
4839                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
4840                         <field reporter:label="Copy Owning Library" name="copy_owning_lib" reporter:datatype="link"/>
4841                         <field reporter:label="Copy Circulating Library" name="copy_circ_lib" reporter:datatype="link"/>
4842                         <field reporter:label="Bib Record" name="copy_bib_record" reporter:datatype="link"/>
4843                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4844                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4845                         <field reporter:label="Linked Active Circulation" name="active_circ" oils_persist:virtual="true" reporter:datatype="link"/>
4846                         <field reporter:label="Linked Aged Circulation" name="aged_circ" oils_persist:virtual="true" reporter:datatype="link"/>
4847                         <field reporter:label="Auto Renewal" name="auto_renewal" reporter:datatype="bool"/>
4848                         <field reporter:label="Remaining Auto Renewals" name="auto_renewal_remaining" reporter:datatype="int" />
4849                 </fields>
4850                 <links>
4851                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
4852                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
4853                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
4854                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4855                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
4856                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4857                         <link field="payments" reltype="has_many" key="xact" map="" class="mallp"/>
4858                         <link field="billings" reltype="has_many" key="xact" map="" class="mallb"/>
4859                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
4860                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
4861                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
4862                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
4863                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4864                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4865                         <link field="copy_call_number" reltype="has_a" key="id" map="" class="acn"/>
4866                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
4867                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4868                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4869                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
4870                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
4871                         <link field="copy_bib_record" reltype="has_a" key="id" map="" class="bre"/>
4872                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
4873                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
4874                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
4875                         <link field="usr_profile" reltype="has_a" key="id" map="" class="pgt"/>
4876                         <link field="active_circ" reltype="might_have" key="id" map="" class="circ"/>
4877                         <link field="aged_circ" reltype="might_have" key="id" map="" class="acirc"/>
4878                         <link field="parent_circ" reltype="might_have" key="id" map="" class="acirc"/>
4879                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4880                 </links>
4881                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4882                         <actions>
4883                                 <retrieve permission="VIEW_CIRCULATIONS" context_field="circ_lib" />
4884                         </actions>
4885                 </permacrud>
4886         </class>
4887         <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">
4888                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
4889                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
4890                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
4891                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
4892                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
4893                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
4894                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
4895                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
4896                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
4897                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
4898                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4899                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
4900                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
4901                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
4902                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
4903                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
4904                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
4905                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
4906                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
4907                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
4908                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
4909                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
4910                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
4911                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
4912                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
4913                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
4914                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
4915                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
4916                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
4917                         <field reporter:label="Checkin Scan Date/Time" name="checkin_scan_time" reporter:datatype="timestamp" />
4918                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
4919                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4920                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4921                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
4922                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
4923                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4924                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4925                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
4926                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
4927                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
4928                         <field reporter:label="Call Number" name="copy_call_number" reporter:datatype="link"/>
4929                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
4930                         <field reporter:label="Copy Owning Library" name="copy_owning_lib" reporter:datatype="link"/>
4931                         <field reporter:label="Copy Circulating Library" name="copy_circ_lib" reporter:datatype="link"/>
4932                         <field reporter:label="Bib Record" name="copy_bib_record" reporter:datatype="link"/>
4933                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4934                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4935                         <field reporter:label="Auto Renewal" name="auto_renewal" reporter:datatype="bool"/>
4936                         <field reporter:label="Remaining Auto Renewals" name="auto_renewal_remaining" reporter:datatype="int" />
4937                 </fields>
4938                 <links>
4939                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
4940                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
4941                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
4942                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4943                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
4944                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4945                         <link field="payments" reltype="has_many" key="xact" map="" class="map"/>
4946                         <link field="billings" reltype="has_many" key="xact" map="" class="mab"/>
4947                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
4948                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
4949                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
4950                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
4951                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4952                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4953                         <link field="copy_call_number" reltype="has_a" key="id" map="" class="acn"/>
4954                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
4955                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4956                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4957                         <link field="copy_bib_record" reltype="has_a" key="id" map="" class="bre"/>
4958                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
4959                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
4960                         <link field="parent_circ" reltype="might_have" key="id" map="" class="circ"/>
4961                         <link field="renewals" reltype="has_many" key="parent_circ" map="" class="circ"/>
4962                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
4963                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
4964                 </links>
4965         </class>
4966         <class id="auch" 
4967                 controller="open-ils.cstore" 
4968                 oils_obj:fieldmapper="action::user_circ_history" 
4969                 oils_persist:tablename="action.usr_circ_history" 
4970                 reporter:label="User Checkout History">
4971                 <fields oils_persist:primary="id" oils_persist:sequence="action.usr_circ_history_id_seq">
4972                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4973                         <!-- prevent reporting on the user that owns the checkout history -->
4974                         <field reporter:label="User" name="usr" reporter:datatype="link" suppress_controller="open-ils.reporter-store"/>
4975                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
4976                         <field reporter:label="Checkin Time" name="checkin_time" reporter:datatype="timestamp" />
4977                         <field reporter:label="Due Date" name="due_date" reporter:datatype="timestamp" />
4978                         <field reporter:label="Checkout Time" name="xact_start" reporter:datatype="timestamp" />
4979                         <field reporter:label="Source Circulation" name="source_circ" reporter:datatype="link" />
4980                 </fields>
4981                 <links>
4982                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4983                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4984                         <link field="source_circ" reltype="has_a" key="id" map="" class="circ"/>
4985                 </links>
4986         </class>
4987         <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">
4988                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_type_id_seq">
4989                         <field reporter:label="Resource Type ID" name="id" reporter:datatype="id" reporter:selector="name"/>
4990                         <field reporter:label="Resource Type Name" name="name" reporter:datatype="text" oils_obj:required="true"/>
4991                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4992                         <field reporter:label="Fine Amount" name="fine_amount" reporter:datatype="money"/>
4993                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money"/>
4994                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit" oils_obj:required="true"/>
4995                         <field reporter:label="Catalog Item" name="catalog_item" reporter:datatype="bool"/>
4996                         <field reporter:label="Bibliographic Record" name="record" reporter:datatype="link"/>
4997                         <field reporter:label="Transferable" name="transferable" reporter:datatype="bool"/>
4998                         <field reporter:label="Inter-booking and Inter-circulation Interval" name="elbow_room" reporter:datatype="interval"/>
4999                         <field reporter:label="Resources" name="resources" oils_persist:virtual="true" reporter:datatype="link"/>
5000                         <field reporter:label="Resource Attributes" name="resource_attrs" oils_persist:virtual="true" reporter:datatype="link"/>
5001                         <field reporter:label="Target Resource Types" name="tgt_rsrc_types" oils_persist:virtual="true" reporter:datatype="link"/>
5002                 </fields>
5003                 <links>
5004                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5005                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
5006                         <link field="resources" reltype="has_many" key="type" map="" class="brsrc"/>
5007                         <link field="resource_attrs" reltype="has_many" key="type" map="" class="bra"/>
5008                         <link field="tgt_rsrc_types" reltype="has_many" key="type" map="" class="bresv"/>
5009                 </links>
5010                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5011                         <actions>
5012                                 <create permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
5013                                 <retrieve/>
5014                                 <update permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
5015                                 <delete permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
5016                         </actions>
5017                 </permacrud>
5018         </class>
5019
5020         <class id="brsrc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::resource" oils_persist:tablename="booking.resource" reporter:label="Resource">
5021                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_id_seq">
5022                         <field reporter:label="Resource ID" name="id" reporter:datatype="id" reporter:selector="barcode" />
5023                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit" oils_obj:required="true"/>
5024                         <field reporter:label="Resource Type" name="type" reporter:datatype="link" oils_obj:required="true"/>
5025                         <field reporter:label="Overbook" name="overbook" reporter:datatype="bool"/>
5026                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text" oils_obj:required="true"/>
5027                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
5028                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
5029                         <field reporter:label="User Fee" name="user_fee" reporter:datatype="money"/>
5030                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
5031                         <field reporter:label="Reservation Target Resources" name="tgt_rsrcs" oils_persist:virtual="true" reporter:datatype="link"/>
5032                         <field reporter:label="Reservation Current Resources" name="curr_rsrcs" oils_persist:virtual="true" reporter:datatype="link"/>
5033                         <field reporter:label="Catalog Item" name="catalog_item" oils_persist:virtual="true" reporter:datatype="link"/>
5034                 </fields>
5035                 <links>
5036                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5037                         <link field="type" reltype="has_a" key="id" map="" class="brt"/>
5038                         <link field="attr_maps" reltype="has_many" key="resource" map="" class="bram"/>
5039                         <link field="tgt_rsrcs" reltype="has_many" key="targeted_resource" map="" class="bresv"/>
5040                         <link field="curr_rsrcs" reltype="has_many" key="current_resource" map="" class="bresv"/>
5041                 </links>
5042                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5043                         <actions>
5044                                 <create permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
5045                                 <retrieve/>
5046                                 <update permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
5047                                 <delete permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
5048                         </actions>
5049                 </permacrud>
5050         </class>
5051         
5052         <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">
5053                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_id_seq">
5054                         <field reporter:label="Resource Attribute ID" name="id" reporter:datatype="id" reporter:selector="name" />
5055                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit" oils_obj:required="true"/>
5056                         <field reporter:label="Resource Attribute Name" name="name" reporter:datatype="text" oils_obj:required="true"/>
5057                         <field reporter:label="Resource Type" name="resource_type" reporter:datatype="link"/>
5058                         <field reporter:label="Is Required" name="required" reporter:datatype="bool"/>
5059                         <field reporter:label="Valid Values" name="valid_values" oils_persist:virtual="true" reporter:datatype="link"/>
5060                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
5061                 </fields>
5062                 <links>
5063                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5064                         <link field="resource_type" reltype="has_a" key="id" map="" class="brt"/>
5065                         <link field="valid_values" reltype="has_many" key="attr" map="" class="brav"/>
5066                         <link field="attr_maps" reltype="has_many" key="attr" map="" class="bram"/>
5067                 </links>
5068                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5069                         <actions>
5070                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
5071                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
5072                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
5073                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
5074                         </actions>
5075                 </permacrud>
5076         </class>
5077         
5078         <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">
5079                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_value_id_seq">
5080                         <field reporter:label="Resource Attribute Value ID" name="id" reporter:datatype="id" reporter:selector="valid_value" />
5081                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit" oils_obj:required="true"/>
5082                         <field reporter:label="Resource Attribute" name="attr" reporter:datatype="link" oils_obj:required="true"/>
5083                         <field reporter:label="Valid Value" name="valid_value" reporter:datatype="text" oils_obj:required="true"/>
5084                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
5085                         <field reporter:label="Resource Attribute Value Maps" name="attr_val_maps" oils_persist:virtual="true" reporter:datatype="link"/>
5086                 </fields>
5087                 <links>
5088                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5089                         <link field="attr" reltype="has_a" key="id" map="" class="bra"/>
5090                         <link field="attr_maps" reltype="has_many" key="id" map="" class="bram"/>
5091                         <link field="attr_val_maps" reltype="has_many" key="attr_value" map="" class="bravm"/>
5092                 </links>
5093                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5094                         <actions>
5095                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
5096                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
5097                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
5098                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
5099                         </actions>
5100                 </permacrud>
5101         </class>
5102         
5103         <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">
5104                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_map_id_seq">
5105                         <field reporter:label="Resource Attribute Map ID" name="id" reporter:datatype="id"/>
5106                         <field reporter:label="Resource" name="resource" reporter:datatype="link" oils_obj:required="true"/>
5107                         <field reporter:label="Resource Attribute" name="resource_attr" reporter:datatype="link" oils_obj:required="true"/>
5108                         <field reporter:label="Attribute Value" name="value" reporter:datatype="link" oils_obj:required="true"/>
5109                 </fields>
5110                 <links>
5111                         <link field="resource" reltype="has_a" key="id" map="" class="brsrc"/>
5112                         <link field="resource_attr" reltype="has_a" key="id" map="" class="bra"/>
5113                         <link field="value" reltype="has_a" key="id" map="" class="brav"/>
5114                 </links>
5115                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5116                         <actions>
5117                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
5118                     <context link="resource" field="owner" />
5119                 </create>
5120                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
5121                     <context link="resource" field="owner" />
5122                 </retrieve>
5123                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
5124                     <context link="resource" field="owner" />
5125                 </update>
5126                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
5127                     <context link="resource" field="owner" />
5128                 </delete>
5129                         </actions>
5130                 </permacrud>
5131         </class>
5132         
5133         <class id="bresv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::reservation" oils_persist:tablename="booking.reservation" reporter:label="Reservation">
5134                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
5135                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
5136                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
5137                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
5138                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
5139                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
5140                         <field reporter:label="Billing Line Items" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
5141                         <field reporter:label="Payment Line Items" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
5142                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
5143                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
5144                         <field reporter:label="Payment Summary" name="summary" oils_persist:virtual="true" reporter:datatype="link"/>
5145                         <field reporter:label="Request Time" name="request_time" reporter:datatype="timestamp"/>
5146                         <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp" oils_obj:required="true"/>
5147                         <field reporter:label="End Time" name="end_time" reporter:datatype="timestamp" oils_obj:required="true"/>
5148                         <field reporter:label="Capture Time" name="capture_time" reporter:datatype="timestamp"/>
5149                         <field reporter:label="Cancel Time" name="cancel_time" reporter:datatype="timestamp"/>
5150                         <field reporter:label="Pickup Time" name="pickup_time" reporter:datatype="timestamp"/>
5151                         <field reporter:label="Return Time" name="return_time" reporter:datatype="timestamp"/>
5152                         <field reporter:label="Booking Interval" name="booking_interval" reporter:datatype="interval"/>
5153                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
5154                         <field reporter:label="Fine Amount" name="fine_amount" reporter:datatype="money"/>
5155                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money"/>
5156                         <field reporter:label="Target Resource Type" name="target_resource_type" reporter:datatype="link"/>
5157                         <field reporter:label="Target Resource" name="target_resource" reporter:datatype="link"/>
5158                         <field reporter:label="Current Resource" name="current_resource" reporter:datatype="link"/>
5159                         <field reporter:label="Request Library" name="request_lib" reporter:datatype="link"/>
5160                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link"/>
5161                         <field reporter:label="Capture Staff" name="capture_staff" reporter:datatype="link"/>
5162                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
5163                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5164                         <field reporter:label="Attribute Value Maps" name="attr_val_maps" oils_persist:virtual="true" reporter:datatype="link"/>
5165                 </fields>
5166                 <links>
5167                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5168                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
5169                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
5170                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
5171                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
5172                         <link field="summary" reltype="might_have" key="id" map="" class="mbts"/>
5173                         <link field="target_resource_type" reltype="has_a" key="id" map="" class="brt"/>
5174                         <link field="target_resource" reltype="has_a" key="id" map="" class="brsrc"/>
5175                         <link field="current_resource" reltype="has_a" key="id" map="" class="brsrc"/>
5176                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
5177                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5178                         <link field="capture_staff" reltype="might_have" key="id" map="" class="au"/>
5179                         <link field="attr_val_maps" reltype="has_many" key="reservation" map="" class="bravm"/>
5180                 </links>
5181                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5182                         <actions>
5183                                 <create permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
5184                                 <retrieve permission="STAFF_LOGIN" global_required='true'/>
5185                                 <update permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
5186                                 <delete permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
5187                         </actions>
5188                 </permacrud>
5189         </class>
5190         
5191         <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">
5192                 <fields oils_persist:primary="id" oils_persist:sequence="booking.reservation_attr_value_map_id_seq">
5193                         <field reporter:label="Reservation Attribute Value Map" name="id" reporter:datatype="id"/>
5194                         <field reporter:label="Reservation" name="reservation" reporter:datatype="link"/>
5195                         <field reporter:label="Attribute Map" name="attr_value" reporter:datatype="link"/>
5196                 </fields>
5197                 <links>
5198                         <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
5199                         <link field="attr_value" reltype="has_a" key="id" map="" class="brav"/>
5200                 </links>
5201                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5202                         <actions>
5203                                 <create permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
5204                                 <retrieve permission="STAFF_LOGIN" global_required='true'/>
5205                                 <update permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
5206                                 <delete permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
5207                         </actions>
5208                 </permacrud>
5209         </class>
5210
5211         <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">
5212                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_item_id_seq">
5213                         <field name="bucket" reporter:datatype="link"/>
5214                         <field name="id" reporter:datatype="id" />
5215                         <field name="target_call_number" reporter:datatype="link" />
5216                         <field name="create_time" reporter:datatype="timestamp" />
5217                         <field name="pos" reporter:datatype="int" />
5218                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
5219                 </fields>
5220                 <links>
5221                         <link field="target_call_number" reltype="has_a" key="id" map="" class="acn"/>
5222                         <link field="bucket" reltype="has_a" key="id" map="" class="ccnb"/>
5223             <link field="notes" reltype="has_many" map="" key="item" class="ccnbin"/>
5224                 </links>
5225                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5226                         <actions>
5227                                 <retrieve permission="ADMIN_CALLNUMBER_BUCKET">
5228                     <context link="bucket" owning_lib="owning_lib"/>
5229                 </retrieve>
5230             </actions>
5231         </permacrud>
5232         </class>
5233         <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">
5234                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_item_note_id_seq">
5235                         <field name="id" reporter:datatype="id" />
5236                         <field name="item" reporter:datatype="link"/>
5237                         <field name="note" reporter:datatype="text" />
5238                 </fields>
5239                 <links>
5240                         <link field="item" reltype="has_a" key="id" map="" class="ccnbi"/>
5241                 </links>
5242         </class>
5243         <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">
5244                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_id_seq">
5245                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
5246                         <field name="btype" reporter:datatype="text"/>
5247                         <field name="id" reporter:datatype="id" />
5248                         <field name="name" reporter:datatype="text"/>
5249                         <field name="description" reporter:datatype="text"/>
5250                         <field name="owner" reporter:datatype="link"/>
5251                         <field name="pub" reporter:datatype="bool"/>
5252                         <field name="create_time" reporter:datatype="timestamp" />
5253                         <field name="owning_lib" reporter:datatype="org_unit" />
5254                 </fields>
5255                 <links>
5256                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5257                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
5258                         <link field="items" reltype="has_many" key="bucket" map="" class="cbrebi"/>
5259                 </links>
5260                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5261                         <actions>
5262                                 <create permission="CREATE_BIB_BUCKET ADMIN_BIB_BUCKET" context="owning_lib" owning_user="owner"/>
5263                                 <retrieve permission="CREATE_BIB_BUCKET ADMIN_BIB_BUCKET" context="owning_lib" owning_user="owner"/>
5264                                 <update permission="CREATE_BIB_BUCKET ADMIN_BIB_BUCKET" context="owning_lib" owning_user="owner"/>
5265                                 <delete permission="CREATE_BIB_BUCKET ADMIN_BIB_BUCKET" context="owning_lib" owning_user="owner"/>
5266                         </actions>
5267                 </permacrud>
5268         </class>
5269         <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">
5270                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_note_id_seq">
5271                         <field name="id" reporter:datatype="id" />
5272                         <field name="bucket" reporter:datatype="link"/>
5273                         <field name="note" reporter:datatype="text" />
5274                 </fields>
5275                 <links>
5276                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
5277                 </links>
5278         </class>
5279         <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">
5280                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_copy_map_id_seq">
5281                         <field name="hold" reporter:datatype="link"/>
5282                         <field name="id" reporter:datatype="id" />
5283                         <field name="target_copy" reporter:datatype="link"/>
5284                         <field name="proximity" reporter:datatype="number"/>
5285                 </fields>
5286                 <links>
5287                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
5288                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
5289                 </links>
5290         </class>
5291         <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">
5292                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_notification_id_seq">
5293                         <field reporter:label="Hold" name="hold" reporter:datatype="link"/>
5294                         <field reporter:label="Notification ID" name="id" reporter:datatype="id" />
5295                         <field reporter:label="Notification Method" name="method"  reporter:datatype="text"/>
5296                         <field reporter:label="Notification Note" name="note"  reporter:datatype="text"/>
5297                         <field reporter:label="Notifying Staff" name="notify_staff" reporter:datatype="link"/>
5298                         <field reporter:label="Notification Date/Time" name="notify_time" reporter:datatype="timestamp"/>
5299                 </fields>
5300                 <links>
5301                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
5302                         <link field="notify_staff" reltype="has_a" key="id" map="" class="au"/>
5303                 </links>
5304         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5305             <actions>
5306                 <create permission="CREATE_HOLD_NOTIFICATION">
5307                                         <context link="hold" jump="usr" field="home_ou" />
5308                                 </create>
5309                 <retrieve permission="VIEW_HOLD_NOTIFICATION">
5310                                         <context link="hold" jump="usr" field="home_ou" />
5311                                 </retrieve>
5312                 <update permission="CREATE_HOLD_NOTIFICATION">
5313                                         <context link="hold" jump="usr" field="home_ou" />
5314                                 </update>
5315                 <delete permission="CREATE_HOLD_NOTIFICATION">
5316                                         <context link="hold" jump="usr" field="home_ou" />
5317                                 </delete>
5318             </actions>
5319         </permacrud>
5320         </class>
5321         <class id="acpl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::copy_location" oils_persist:tablename="asset.copy_location" reporter:label="Copy/Shelving Location"  oils_persist:field_safe="true">
5322                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_id_seq">
5323                         <field reporter:label="Can Circulate?" name="circulate"  reporter:datatype="bool"/>
5324                         <field reporter:label="Is Holdable?" name="holdable" reporter:datatype="bool"/>
5325                         <field reporter:label="Hold Capture Requires Verification" name="hold_verify" reporter:datatype="bool"/>
5326                         <field reporter:label="Location ID" name="id" reporter:selector="name" reporter:datatype="id"/>
5327                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
5328                         <field reporter:label="Is OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
5329                         <field reporter:label="Owning Org Unit" name="owning_lib"  reporter:datatype="org_unit"/>
5330                         <field reporter:label="Copy Location Orders" name="orders" oils_persist:virtual="true" reporter:datatype="link"/>
5331                         <field reporter:label="Copies" name="copies" oils_persist:virtual="true" reporter:datatype="link"/>
5332                         <field reporter:label="Label Prefix" name="label_prefix"  reporter:datatype="text" oils_persist:i18n="true"/>
5333                         <field reporter:label="Label Suffix" name="label_suffix"  reporter:datatype="text" oils_persist:i18n="true"/>
5334                         <field reporter:label="Checkin Alert" name="checkin_alert" reporter:datatype="bool" />
5335                         <field reporter:label="Is Deleted?" name="deleted" reporter:datatype="bool" />
5336                         <field reporter:label="URL" name="url" reporter:datatype="text" />
5337                 </fields>
5338                 <links>
5339                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5340                         <link field="distribution_formula_entries" reltype="has_many" key="location" map="" class="acqdfe"/>
5341                         <link field="orders" reltype="has_many" key="location" map="" class="acplo"/>
5342                         <link field="copies" reltype="has_many" key="location" map="" class="acp"/>
5343                 </links>
5344         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5345             <actions>
5346                 <create permission="CREATE_COPY_LOCATION" context_field="owning_lib"/>
5347                 <retrieve/>
5348                 <update permission="UPDATE_COPY_LOCATION" context_field="owning_lib"/>
5349                 <delete permission="DELETE_COPY_LOCATION" context_field="owning_lib"/>
5350             </actions>
5351         </permacrud>
5352         </class>
5353         <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">
5354                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_group_id_seq">
5355                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
5356                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
5357                         <field reporter:label="Is OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
5358                         <field reporter:label="Owning Org Unit" name="owner"  reporter:datatype="org_unit"/>
5359             <field reporter:label="Position" name="pos" reporter:datatype="int"/>
5360             <field reporter:label="Display Above Orgs" name="top" reporter:datatype="bool"/>
5361             <field reporter:label="Copy Location Mappings" name="location_maps" oils_persist:virtual="true" reporter:datatype="link"/>
5362                 </fields>
5363                 <links>
5364                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5365                         <link field="location_maps" reltype="has_many" key="lgroup" map="" class="acplgm"/>
5366                 </links>
5367         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5368             <actions>
5369                 <create permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
5370                 <retrieve/>
5371                 <update permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
5372                 <delete permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
5373             </actions>
5374         </permacrud>
5375         </class>
5376         <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">
5377                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_group_map_id_seq">
5378                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
5379             <field reporter:label="Group" name="lgroup" reporter:datatype="link"/>
5380             <field reporter:label="Copy Location" name="location" reporter:datatype="link"/>
5381                 </fields>
5382                 <links>
5383                         <link field="lgroup" reltype="has_a" key="id" map="" class="acplg"/>
5384                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
5385                 </links>
5386         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5387             <actions>
5388                 <create permission="ADMIN_COPY_LOCATION_GROUP">
5389                                         <context link="lgroup" field="owner" />
5390                 </create>
5391                 <retrieve/>
5392                 <update permission="ADMIN_COPY_LOCATION_GROUP">
5393                                         <context link="lgroup" field="owner" />
5394                 </update>
5395                 <delete permission="ADMIN_COPY_LOCATION_GROUP">
5396                                         <context link="lgroup" field="owner" />
5397                 </delete>
5398             </actions>
5399         </permacrud>
5400         </class>
5401
5402     <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">
5403         <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_order_id_seq">
5404             <field reporter:label="Location Order ID" name="id" reporter:datatype="id"/>
5405             <field reporter:label="Location ID" name="location" reporter:datatype="link"/>
5406             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit"/>
5407             <field reporter:label="Position" name="position" reporter:datatype="int"/>
5408         </fields>
5409         <links>
5410             <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
5411             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
5412         </links>
5413         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5414             <actions>
5415                                 <create permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
5416                 <retrieve/>
5417                                 <update permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
5418                                 <delete permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
5419             </actions>
5420         </permacrud>
5421     </class>
5422
5423         <class id="svr" controller="open-ils.cstore" oils_obj:fieldmapper="serial::virtual_record" oils_persist:virtual="true" reporter:label="Serial Virtual Record">
5424                 <fields>
5425                         <field name="sre_id" oils_persist:virtual="true" />
5426                         <field name="location" oils_persist:virtual="true" />
5427                         <field name="owning_lib" oils_persist:virtual="true" />
5428                         <field name="basic_holdings" oils_persist:virtual="true" />
5429                         <field name="basic_holdings_add" oils_persist:virtual="true" />
5430                         <field name="supplement_holdings" oils_persist:virtual="true" />
5431                         <field name="supplement_holdings_add" oils_persist:virtual="true" />
5432                         <field name="index_holdings" oils_persist:virtual="true" />
5433                         <field name="index_holdings_add" oils_persist:virtual="true" />
5434                         <field name="online" oils_persist:virtual="true" />
5435                         <field name="missing" oils_persist:virtual="true" />
5436                         <field name="incomplete" oils_persist:virtual="true" />
5437                 </fields>
5438         </class>
5439
5440         <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">
5441                 <fields oils_persist:primary="id" oils_persist:sequence="serial.record_entry_id_seq">
5442                         <field reporter:label="Is Active" name="active" reporter:datatype="bool"/>
5443                         <field reporter:label="Bib Record" name="record" reporter:datatype="link"/>
5444                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5445                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5446                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
5447                         <field reporter:label="Edit date" name="edit_date" reporter:datatype="timestamp"/>
5448                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
5449                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5450                         <field reporter:label="Last Transaction ID" name="last_xact_id" reporter:datatype="text"/>
5451                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
5452                         <field reporter:label="Source" name="source" reporter:datatype="int"/>
5453                         <field reporter:label="Owning Org Unit" name="owning_lib" reporter:datatype="org_unit"/>
5454                 </fields>
5455                 <links>
5456                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
5457                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5458                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5459                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5460                 </links>
5461                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5462                         <actions>
5463                                 <create permission="CREATE_MFHD_RECORD" context_field="owning_lib"/>
5464                                 <retrieve/>
5465                                 <update permission="UPDATE_MFHD_RECORD" context_field="owning_lib"/>
5466                                 <delete permission="DELETE_MFHD_RECORD" context_field="owning_lib"/>
5467                         </actions>
5468                 </permacrud>
5469         </class>
5470
5471         <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">
5472                 <fields oils_persist:primary="id" oils_persist:sequence="serial.caption_and_pattern_id_seq">
5473                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5474                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
5475                         <field reporter:label="Type" name="type" reporter:datatype="text"/>
5476                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5477                         <field reporter:label="Start Date" name="start_date" reporter:datatype="timestamp"/>
5478                         <field reporter:label="End Date" name="end_date" reporter:datatype="timestamp"/>
5479                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
5480                         <field reporter:label="Pattern Code" name="pattern_code" reporter:datatype="text"/>
5481                         <field reporter:label="Enum 1" name="enum_1" reporter:datatype="text"/>
5482                         <field reporter:label="Enum 2" name="enum_2" reporter:datatype="text"/>
5483                         <field reporter:label="Enum 3" name="enum_3" reporter:datatype="text"/>
5484                         <field reporter:label="Enum 4" name="enum_4" reporter:datatype="text"/>
5485                         <field reporter:label="Enum 5" name="enum_5" reporter:datatype="text"/>
5486                         <field reporter:label="Enum 6" name="enum_6" reporter:datatype="text"/>
5487                         <field reporter:label="Chron 1" name="chron_1" reporter:datatype="text"/>
5488                         <field reporter:label="Chron 2" name="chron_2" reporter:datatype="text"/>
5489                         <field reporter:label="Chron 3" name="chron_3" reporter:datatype="text"/>
5490                         <field reporter:label="Chron 4" name="chron_4" reporter:datatype="text"/>
5491                         <field reporter:label="Chron 5" name="chron_5" reporter:datatype="text"/>
5492                 </fields>
5493                 <links>
5494                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
5495                 </links>
5496                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5497                         <actions>
5498                                 <create permission="ADMIN_SERIAL_CAPTION_PATTERN">
5499                                         <context link="subscription" field="owning_lib" />
5500                                 </create>
5501                                 <retrieve />
5502                                 <update permission="ADMIN_SERIAL_CAPTION_PATTERN">
5503                                         <context link="subscription" field="owning_lib" />
5504                                 </update>
5505                                 <delete permission="ADMIN_SERIAL_CAPTION_PATTERN">
5506                                         <context link="subscription" field="owning_lib" />
5507                                 </delete>
5508                         </actions>
5509                 </permacrud>
5510         </class>
5511
5512         <class id="ssub" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::subscription" oils_persist:tablename="serial.subscription" reporter:label="Subscription">
5513                 <fields oils_persist:primary="id" oils_persist:sequence="serial.subscription_id_seq">
5514                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5515                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
5516                         <field reporter:label="Start Date" name="start_date" reporter:datatype="timestamp"/>
5517                         <field reporter:label="End Date" name="end_date" reporter:datatype="timestamp"/>
5518                         <field reporter:label="Bibliographic Record Entry" name="record_entry" reporter:datatype="link"/>
5519                         <field reporter:label="Expected Date Offset" name="expected_date_offset" reporter:datatype="interval"/>
5520                         <field reporter:label="Distributions" name="distributions" oils_persist:virtual="true" reporter:datatype="link"/>
5521                         <field reporter:label="Issuances" name="issuances" oils_persist:virtual="true" reporter:datatype="link"/>
5522                         <field reporter:label="Captions and Patterns" name="scaps" oils_persist:virtual="true" reporter:datatype="link"/>
5523                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
5524                 </fields>
5525                 <links>
5526                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5527                         <link field="record_entry" reltype="has_a" key="id" map="" class="bre"/>
5528                         <link field="distributions" reltype="has_many" key="subscription" map="" class="sdist"/>
5529                         <link field="issuances" reltype="has_many" key="subscription" map="" class="siss"/>
5530                         <link field="scaps" reltype="has_many" key="subscription" map="" class="scap"/>
5531                         <link field="notes" reltype="has_many" key="subscription" map="" class="ssubn"/>
5532                 </links>
5533                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5534                         <actions>
5535                                 <create permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
5536                                 <retrieve />
5537                                 <update permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
5538                                 <delete permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
5539                         </actions>
5540                 </permacrud>
5541         </class>
5542
5543         <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">
5544                 <fields oils_persist:primary="id" oils_persist:sequence="serial.subscription_note_id_seq">
5545                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5546                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
5547                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5548                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5549                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
5550                         <field reporter:label="Alert?" name="alert" reporter:datatype="bool"/>
5551                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
5552                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
5553                 </fields>
5554                 <links>
5555                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
5556                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5557                 </links>
5558                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5559                         <actions>
5560                                 <create permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib">
5561                     <context link="subscription" field="owning_lib"/>
5562                 </create>
5563                                 <retrieve />
5564                                 <update permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib">
5565                     <context link="subscription" field="owning_lib"/>
5566                 </update>
5567                                 <delete permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib">
5568                     <context link="subscription" field="owning_lib"/>
5569                 </delete>
5570                         </actions>
5571                 </permacrud>
5572         </class>
5573
5574         <class id="sdist" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::distribution" oils_persist:tablename="serial.distribution" reporter:label="Distribution">
5575                 <fields oils_persist:primary="id" oils_persist:sequence="serial.distribution_id_seq">
5576                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5577                         <field reporter:label="Legacy Record Entry" name="record_entry" reporter:datatype="link"/>
5578                         <field reporter:label="Summary Method" name="summary_method" reporter:datatype="text"/>
5579                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
5580                         <field reporter:label="Holding Lib" name="holding_lib" reporter:datatype="org_unit"/>
5581                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
5582                         <field reporter:label="Receive Call Number" name="receive_call_number" reporter:datatype="link"/>
5583                         <field reporter:label="Receive Unit Template" name="receive_unit_template" reporter:datatype="link"/>
5584                         <field reporter:label="Bind Call Number" name="bind_call_number" reporter:datatype="link"/>
5585                         <field reporter:label="Bind Unit Template" name="bind_unit_template" reporter:datatype="link"/>
5586                         <field reporter:label="Unit Label Prefix" name="unit_label_prefix" reporter:datatype="text"/>
5587                         <field reporter:label="Unit Label Suffix" name="unit_label_suffix" reporter:datatype="text"/>
5588                         <field reporter:label="Display Grouping" name="display_grouping" reporter:datatype="text"/>
5589                         <field reporter:label="Streams" name="streams" oils_persist:virtual="true" reporter:datatype="link"/>
5590                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
5591                         <field reporter:label="Basic Issue Summary" name="basic_summary" oils_persist:virtual="true" reporter:datatype="link"/>
5592                         <field reporter:label="Supplemental Issue Summary" name="supplement_summary" oils_persist:virtual="true" reporter:datatype="link"/>
5593                         <field reporter:label="Index Issue Summary" name="index_summary" oils_persist:virtual="true" reporter:datatype="link"/>
5594                 </fields>
5595                 <links>
5596                         <link field="record_entry" reltype="has_a" key="id" map="" class="sre"/>
5597                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
5598                         <link field="holding_lib" reltype="has_a" key="id" map="" class="aou"/>
5599                         <link field="receive_call_number" reltype="has_a" key="id" map="" class="acn"/>
5600                         <link field="receive_unit_template" reltype="has_a" key="id" map="" class="act"/>
5601                         <link field="bind_call_number" reltype="has_a" key="id" map="" class="acn"/>
5602                         <link field="bind_unit_template" reltype="has_a" key="id" map="" class="act"/>
5603                         <link field="streams" reltype="has_many" key="distribution" map="" class="sstr"/>
5604                         <link field="notes" reltype="has_many" key="distribution" map="" class="sdistn"/>
5605                         <link field="basic_summary" reltype="might_have" key="distribution" map="" class="sbsum"/>
5606                         <link field="supplement_summary" reltype="might_have" key="distribution" map="" class="sssum"/>
5607                         <link field="index_summary" reltype="might_have" key="distribution" map="" class="sisum"/>
5608                 </links>
5609                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5610                         <actions>
5611                                 <create permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
5612                                 <retrieve />
5613                                 <update permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
5614                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
5615                         </actions>
5616                 </permacrud>
5617         </class>
5618
5619         <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">
5620                 <fields oils_persist:primary="id" oils_persist:sequence="serial.distribution_note_id_seq">
5621                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5622                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
5623                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5624                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5625                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
5626                         <field reporter:label="Alert?" name="alert" reporter:datatype="bool"/>
5627                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
5628                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
5629                 </fields>
5630                 <links>
5631                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
5632                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5633                 </links>
5634                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5635                         <actions>
5636                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
5637                                         <context link="distribution" field="holding_lib" />
5638                                 </create>
5639                                 <retrieve permission="ADMIN_SERIAL_DISTRIBUTION">
5640                                         <context link="distribution" field="holding_lib" />
5641                                 </retrieve>
5642                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
5643                                         <context link="distribution" field="holding_lib" />
5644                                 </update>
5645                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
5646                                         <context link="distribution" field="holding_lib" />
5647                                 </delete>
5648                         </actions>
5649                 </permacrud>
5650         </class>
5651
5652         <class id="sstr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::stream" oils_persist:tablename="serial.stream" reporter:label="Stream">
5653                 <fields oils_persist:primary="id" oils_persist:sequence="serial.stream_id_seq">
5654                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5655                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
5656                         <field reporter:label="Routing Label" name="routing_label" reporter:datatype="text"/>
5657                         <field reporter:label="Items" name="items" oils_persist:virtual="true" reporter:datatype="link" />
5658                         <field reporter:label="Routing List Users" name="routing_list_users" oils_persist:virtual="true" reporter:datatype="link"/>
5659                 </fields>
5660                 <links>
5661                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
5662                         <link field="items" reltype="has_many" key="stream" map="" class="sitem"/>
5663                         <link field="routing_list_users" reltype="has_many" key="stream" map="" class="srlu"/>
5664                 </links>
5665                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5666                         <actions>
5667                                 <create permission="ADMIN_SERIAL_STREAM">
5668                                         <context link="distribution" field="holding_lib" />
5669                                 </create>
5670                                 <retrieve />
5671                                 <update permission="ADMIN_SERIAL_STREAM">
5672                                         <context link="distribution" field="holding_lib" />
5673                                 </update>
5674                                 <delete permission="ADMIN_SERIAL_STREAM">
5675                                         <context link="distribution" field="holding_lib" />
5676                                 </delete>
5677                         </actions>
5678                 </permacrud>
5679         </class>
5680
5681         <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">
5682                 <fields oils_persist:primary="id" oils_persist:sequence="serial.routing_list_user_id_seq">
5683                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5684                         <field reporter:label="Stream" name="stream" reporter:datatype="link"/>
5685                         <field reporter:label="Position" name="pos" reporter:datatype="int"/>
5686                         <field reporter:label="Reader" name="reader" reporter:datatype="link"/>
5687                         <field reporter:label="Department" name="department" reporter:datatype="text"/>
5688                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5689                 </fields>
5690                 <links>
5691                         <link field="stream" reltype="has_a" key="id" map="" class="sstr"/>
5692                         <link field="reader" reltype="has_a" key="id" map="" class="au"/>
5693                 </links>
5694                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5695                         <actions>
5696                                 <create permission="ADMIN_SERIAL_STREAM">
5697                                         <context link="stream" jump="distribution" field="holding_lib" />
5698                                 </create>
5699                                 <retrieve permission="RECEIVE_SERIAL">
5700                                         <context link="stream" jump="distribution" field="holding_lib" />
5701                                 </retrieve>
5702                                 <update permission="ADMIN_SERIAL_STREAM">
5703                                         <context link="stream" jump="distribution" field="holding_lib" />
5704                                 </update>
5705                                 <delete permission="ADMIN_SERIAL_STREAM">
5706                                         <context link="stream" jump="distribution" field="holding_lib" />
5707                                 </delete>
5708                         </actions>
5709                 </permacrud>
5710         </class>
5711
5712         <class id="siss" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::issuance" oils_persist:tablename="serial.issuance" reporter:label="Issuance">
5713                 <fields oils_persist:primary="id" oils_persist:sequence="serial.issuance_id_seq">
5714                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5715                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5716                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
5717                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5718                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
5719                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
5720                         <field reporter:label="Caption/Pattern" name="caption_and_pattern" reporter:datatype="link"/>
5721                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
5722                         <field reporter:label="Date Published" name="date_published" reporter:datatype="timestamp"/>
5723                         <field reporter:label="Holding Code" name="holding_code" reporter:datatype="text"/>
5724                         <field reporter:label="Holding Type" name="holding_type" reporter:datatype="text"/>
5725                         <field reporter:label="Holding Link ID" name="holding_link_id" reporter:datatype="int"/>
5726                         <field reporter:label="Items" name="items" oils_persist:virtual="true" reporter:datatype="link" />
5727                 </fields>
5728                 <links>
5729                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5730                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5731                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
5732                         <link field="caption_and_pattern" reltype="has_a" key="id" map="" class="scap"/>
5733                         <link field="items" reltype="has_many" key="issuance" map="" class="sitem"/>
5734                 </links>
5735                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5736                         <actions>
5737                                 <create permission="ADMIN_SERIAL_SUBSCRIPTION">
5738                                         <context link="subscription" field="owning_lib" />
5739                                 </create>
5740                                 <retrieve/>
5741                                 <update permission="ADMIN_SERIAL_SUBSCRIPTION">
5742                                         <context link="subscription" field="owning_lib" />
5743                                 </update>
5744                                 <delete permission="ADMIN_SERIAL_SUBSCRIPTION">
5745                                         <context link="subscription" field="owning_lib" />
5746                                 </delete>
5747                         </actions>
5748                 </permacrud>
5749         </class>
5750
5751         <class id="sunit" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::unit" oils_persist:tablename="serial.unit" reporter:label="Unit">
5752                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_id_seq">
5753                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5754                         <field reporter:label="Age Hold Protection" name="age_protect" reporter:datatype="link"/>
5755                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
5756                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
5757                         <field reporter:label="Call Number/Volume" name="call_number" reporter:datatype="link"/>
5758                         <field reporter:label="Circulation Type (MARC)" name="circ_as_type" reporter:datatype="text"/>
5759                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
5760                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
5761                         <field reporter:label="Can Circulate" name="circulate" reporter:datatype="bool"/>
5762                         <field reporter:label="Copy Number on Volume" name="copy_number" reporter:datatype="text"/>
5763                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
5764                         <field reporter:label="Active Date/Time" name="active_date" reporter:datatype="timestamp"/>
5765                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
5766                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
5767                         <field reporter:label="Dummy ISBN" name="dummy_isbn" reporter:datatype="text"/>
5768                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
5769                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money" />
5770                         <field reporter:label="Precat Dummy Author" name="dummy_author" reporter:datatype="text"/>
5771                         <field reporter:label="Precat Dummy Title" name="dummy_title" reporter:datatype="text"/>
5772                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
5773                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
5774                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
5775                         <field reporter:label="Is Holdable" name="holdable" reporter:datatype="bool" />
5776                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
5777                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link"/>
5778                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool" />
5779                         <field reporter:label="Price" name="price" reporter:datatype="money" />
5780                         <field reporter:label="Is Reference" name="ref" reporter:datatype="bool"/>
5781                         <field reporter:label="Copy Status" name="status" reporter:datatype="link"/>
5782                         <field reporter:label="Copy Status Changed Time" name="status_changed_time" reporter:datatype="timestamp"/>
5783                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool"/>
5784                         <field reporter:label="Floating Group" name="floating" reporter:datatype="link"/>
5785                         <field reporter:label="Cost" name="cost" reporter:datatype="money"/>
5786                         <field reporter:label="Sort Key" name="sort_key" reporter:datatype="text"/>
5787                         <field reporter:label="Summary Contents" name="summary_contents" reporter:datatype="text"/>
5788                         <field reporter:label="Detailed Contents" name="detailed_contents" reporter:datatype="text"/>
5789                         <field reporter:label="Copy Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
5790                         <field reporter:label="Stat-Cat entry maps" name="stat_cat_entry_copy_maps" oils_persist:virtual="true" reporter:datatype="link"/>
5791                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
5792                         <field reporter:label="Total Circulations" name="total_circ_count" oils_persist:virtual="true" reporter:datatype="link"/>
5793                         <field reporter:label="Holds" name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
5794                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
5795                 </fields>
5796                 <links>
5797                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
5798                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
5799                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
5800                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5801                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5802                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
5803                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5804                         <link field="holds" reltype="has_many" key="target_copy" map="hold" class="ahcm"/>
5805                         <link field="stat_cat_entry_copy_maps" reltype="has_many" key="owning_copy" map="" class="ascecm"/>
5806                         <link field="notes" reltype="has_many" key="owning_copy" map="" class="acpn"/>
5807                         <link field="stat_cat_entries" reltype="has_many" key="owning_copy" map="stat_cat_entry" class="ascecm"/>
5808                         <link field="circulations" reltype="has_many" key="target_copy" map="" class="circ"/>
5809                         <link field="total_circ_count" reltype="might_have" key="id" map="" class="erfcc"/>
5810                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
5811                         <link field="floating" reltype="has_a" key="id" map="" class="cfg"/>
5812                 </links>
5813                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5814                         <actions>
5815                                 <create permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
5816                                 <retrieve/>
5817                                 <update permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
5818                                 <delete permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
5819                         </actions>
5820                 </permacrud>
5821         </class>
5822
5823         <class id="sitem" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::item" oils_persist:tablename="serial.item" reporter:label="Item">
5824                 <fields oils_persist:primary="id" oils_persist:sequence="serial.item_id_seq">
5825                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5826                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5827                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
5828                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5829                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
5830                         <field reporter:label="Issuance" name="issuance" reporter:datatype="link"/>
5831                         <field reporter:label="Stream" name="stream" reporter:datatype="link"/>
5832                         <field reporter:label="Unit" name="unit" reporter:datatype="link"/>
5833                         <field reporter:label="URI" name="uri" reporter:datatype="link"/>
5834                         <field reporter:label="Date Expected" name="date_expected" reporter:datatype="timestamp"/>
5835                         <field reporter:label="Date Received" name="date_received" reporter:datatype="timestamp"/>
5836                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
5837                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
5838                         <field reporter:label="Shadowed?" name="shadowed" reporter:datatype="bool"/>
5839                 </fields>
5840                 <links>
5841                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5842                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5843                         <link field="issuance" reltype="has_a" key="id" map="" class="siss"/>
5844                         <link field="stream" reltype="has_a" key="id" map="" class="sstr"/>
5845                         <link field="unit" reltype="has_a" key="id" map="" class="sunit"/>
5846                         <link field="uri" reltype="has_a" key="id" map="" class="auri"/>
5847                         <link field="notes" reltype="has_many" key="item" map="" class="sin"/>
5848                 </links>
5849                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5850                         <actions>
5851                                 <create permission="ADMIN_SERIAL_ITEM">
5852                                         <context link="stream" jump="distribution" field="holding_lib" />
5853                                 </create>
5854                                 <retrieve permission="ADMIN_SERIAL_ITEM">
5855                                         <context link="stream" jump="distribution" field="holding_lib" />
5856                                 </retrieve>
5857                                 <update permission="ADMIN_SERIAL_ITEM">
5858                                         <context link="stream" jump="distribution" field="holding_lib" />
5859                                 </update>
5860                                 <delete permission="ADMIN_SERIAL_ITEM">
5861                                         <context link="stream" jump="distribution" field="holding_lib" />
5862                                 </delete>
5863                         </actions>
5864                 </permacrud>
5865         </class>
5866
5867         <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">
5868                 <fields oils_persist:primary="id" oils_persist:sequence="serial.item_note_id_seq">
5869                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5870                         <field reporter:label="Item" name="item" reporter:datatype="link"/>
5871                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5872                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5873                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
5874                         <field reporter:label="Alert?" name="alert" reporter:datatype="bool"/>
5875                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
5876                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
5877                 </fields>
5878                 <links>
5879                         <link field="item" reltype="has_a" key="id" map="" class="sitem"/>
5880                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5881                 </links>
5882                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5883                         <actions>
5884                                 <create permission="ADMIN_SERIAL_ITEM">
5885                                         <context link="item" jump="stream.distribution" field="holding_lib" />
5886                                 </create>
5887                                 <retrieve permission="ADMIN_SERIAL_ITEM">
5888                                         <context link="item" jump="stream.distribution" field="holding_lib" />
5889                                 </retrieve>
5890                                 <update permission="ADMIN_SERIAL_ITEM">
5891                                         <context link="item" jump="stream.distribution" field="holding_lib" />
5892                                 </update>
5893                                 <delete permission="ADMIN_SERIAL_ITEM">
5894                                         <context link="item" jump="stream.distribution" field="holding_lib" />
5895                                 </delete>
5896                         </actions>
5897                 </permacrud>
5898         </class>
5899         <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">
5900                 <fields>
5901                         <field name="summary_type" reporter:label="Summary Type" reporter:datatype="text" />
5902                         <field name="id" reporter:label="Native ID" reporter:datatype="int" /><!-- not datatype="id", because id is not unique in this view -->
5903                         <field name="distribution" reporter:label="Distribution" reporter:datatype="link" />
5904                         <field name="generated_coverage" reporter:label="Generated Coverage" reporter:datatype="text" />
5905                         <field name="show_generated" reporter:label="Show Generated?" reporter:datatype="bool" />
5906                 </fields>
5907                 <links>
5908                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
5909                 </links>
5910         </class>
5911         <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">
5912                 <fields oils_persist:primary="id" oils_persist:sequence="serial.materialized_holding_code_id_seq">
5913                         <field name="id" reporter:label="ID" reporter:datatype="id" />
5914                         <field name="issuance" reporter:label="Issuance" reporter:datatype="link" />
5915                         <field name="holding_type" reporter:label="Holding Type" reporter:datatype="text" />
5916                         <field name="ind1" reporter:label="First Indicator" reporter:datatype="text" />
5917                         <field name="ind2" reporter:label="Second Indicator" reporter:datatype="text" />
5918                         <field name="subfield" reporter:label="Subfield" reporter:datatype="text" />
5919                         <field name="value" reporter:label="Value" reporter:datatype="text" oils_obj:validate="^\w$" />
5920                 </fields>
5921                 <links>
5922                         <link field="issuance" reltype="has_a" key="id" map="" class="siss"/>
5923                 </links>
5924         </class>
5925         <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">
5926                 <fields oils_persist:primary="id" oils_persist:sequence="serial.basic_summary_id_seq">
5927                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5928                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
5929                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
5930                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
5931                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
5932                 </fields>
5933                 <links>
5934                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
5935                 </links>
5936                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5937                         <actions>
5938                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
5939                                         <context link="distribution" field="holding_lib" />
5940                                 </create>
5941                                 <retrieve/>
5942                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
5943                                         <context link="distribution" field="holding_lib" />
5944                                 </update>
5945                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
5946                                         <context link="distribution" field="holding_lib" />
5947                                 </delete>
5948                         </actions>
5949                 </permacrud>
5950         </class>
5951
5952         <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">
5953                 <fields oils_persist:primary="id" oils_persist:sequence="serial.supplement_summary_id_seq">
5954                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5955                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
5956                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
5957                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
5958                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
5959                 </fields>
5960                 <links>
5961                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
5962                 </links>
5963                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5964                         <actions>
5965                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
5966                                         <context link="distribution" field="holding_lib" />
5967                                 </create>
5968                                 <retrieve/>
5969                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
5970                                         <context link="distribution" field="holding_lib" />
5971                                 </update>
5972                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
5973                                         <context link="distribution" field="holding_lib" />
5974                                 </delete>
5975                         </actions>
5976                 </permacrud>
5977         </class>
5978
5979         <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">
5980                 <fields oils_persist:primary="id" oils_persist:sequence="serial.index_summary_id_seq">
5981                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5982                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
5983                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
5984                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
5985                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
5986                 </fields>
5987                 <links>
5988                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
5989                 </links>
5990                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5991                         <actions>
5992                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
5993                                         <context link="distribution" field="holding_lib" />
5994                                 </create>
5995                                 <retrieve/>
5996                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
5997                                         <context link="distribution" field="holding_lib" />
5998                                 </update>
5999                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
6000                                         <context link="distribution" field="holding_lib" />
6001                                 </delete>
6002                         </actions>
6003                 </permacrud>
6004         </class>
6005
6006         <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">
6007                 <fields oils_persist:primary="id" oils_persist:sequence="serial.pattern_template_id_seq">
6008                         <field reporter:label="ID" name="id" reporter:datatype="id" />
6009                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_obj:required="true"/>
6010                         <field reporter:label="Pattern Code" name="pattern_code" reporter:datatype="text" oils_obj:required="true"/>
6011                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" oils_obj:required="true"/>
6012                         <field reporter:label="Share Depth" name="share_depth"  reporter:datatype="int"/>
6013                 </fields>
6014                 <links>
6015                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
6016                 </links>
6017                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6018                         <actions>
6019                                 <create permission="ADMIN_SERIAL_PATTERN_TEMPLATE" context_field="owning_lib"/>
6020                                 <retrieve/>
6021                                 <update permission="ADMIN_SERIAL_PATTERN_TEMPLATE" context_field="owning_lib"/>
6022                                 <delete permission="ADMIN_SERIAL_PATTERN_TEMPLATE" context_field="owning_lib"/>
6023                         </actions>
6024                 </permacrud>
6025         </class>
6026
6027         <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">
6028                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_entry_copy_map_id_seq">
6029                         <field name="id" reporter:datatype="id" />
6030                         <field name="owning_copy" reporter:datatype="link"/>
6031                         <field name="stat_cat" reporter:datatype="link"/>
6032                         <field name="stat_cat_entry" reporter:datatype="link"/>
6033                 </fields>
6034                 <links>
6035                         <link field="owning_copy" reltype="has_a" key="id" map="" class="acp"/>
6036                         <link field="stat_cat_entry" reltype="has_a" key="id" map="" class="asce"/>
6037                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
6038                 </links>
6039                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6040                         <actions>
6041                                 <retrieve/>
6042                         </actions>
6043                 </permacrud>
6044         </class>
6045         <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">
6046                 <fields oils_persist:primary="code">
6047                         <field reporter:label="Item Type Code" name="code" reporter:selector="value" reporter:datatype="text"/>
6048                         <field reporter:label="Item Type" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
6049                 </fields>
6050                 <links/>
6051         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6052             <actions>
6053                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
6054                 <retrieve/>
6055                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
6056                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
6057             </actions>
6058         </permacrud>
6059         </class>
6060         <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">
6061                 <fields oils_persist:primary="code">
6062                         <field reporter:label="Bib Level Code" name="code"  reporter:datatype="text"/>
6063                         <field reporter:label="Bib Level" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
6064                 </fields>
6065                 <links/>
6066         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6067             <actions>
6068                 <create permission="CREATE_MARC_CODE" global_required="true"/>
6069                 <retrieve/>
6070                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
6071                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
6072             </actions>
6073         </permacrud>
6074         </class>
6075         <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">
6076                 <fields oils_persist:primary="id" oils_persist:sequence="search.relevance_adjustment_id_seq">
6077                         <field reporter:label="ID" name="id"  reporter:datatype="id"/>
6078                         <field reporter:label="Active" name="active"  reporter:datatype="bool"/>
6079                         <field reporter:label="Index Field" name="field"  reporter:datatype="link"/>
6080                         <field reporter:label="Bump Type" name="bump_type"  reporter:datatype="text"/>
6081                         <field reporter:label="Multiplier" name="multiplier"  reporter:datatype="number"/>
6082                 </fields>
6083                 <links>
6084             <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
6085         </links>
6086         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6087             <actions>
6088                 <create permission="CREATE_RELEVANCE_ADJUSTMENT" global_required="true"/>
6089                 <retrieve permission="CREATE_RELEVANCE_ADJUSTMENT UPDATE_RELEVANCE_ADJUSTMENT DELETE_RELEVANCE_ADJUSTMENT" global_required="true"/>
6090                 <update permission="UPDATE_RELEVANCE_ADJUSTMENT" global_required="true"/>
6091                 <delete permission="DELETE_RELEVANCE_ADJUSTMENT" global_required="true"/>
6092             </actions>
6093         </permacrud>
6094         </class>
6095         <class id="lasso" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::org_lasso" oils_persist:tablename="actor.org_lasso" reporter:label="Org Lasso">
6096                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_lasso_id_seq">
6097                         <field name="id" reporter:datatype="id" />
6098                         <field name="name" reporter:datatype="text"/>
6099                 </fields>
6100                 <links/>
6101         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6102             <actions>
6103                 <create permission="CREATE_LASSO" global_required="true"/>
6104                 <retrieve permission="CREATE_LASSO UPDATE_LASSO DELETE_LASSO" global_required="true"/>
6105                 <update permission="UPDATE_LASSO" global_required="true"/>
6106                 <delete permission="DELETE_LASSO" global_required="true"/>
6107             </actions>
6108         </permacrud>
6109         </class>
6110         <class id="lmap" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::org_lasso_map" oils_persist:tablename="actor.org_lasso_map" reporter:label="Org Lasso Map">
6111                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_lasso_map_id_seq">
6112                         <field name="id" reporter:datatype="id" />
6113                         <field name="lasso" reporter:datatype="link"/>
6114                         <field name="org_unit" reporter:datatype="org_unit"/>
6115                 </fields>
6116                 <links>
6117                         <link field="lasso" reltype="has_a" key="id" map="" class="lasso"/>
6118                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
6119                 </links>
6120         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6121             <actions>
6122                 <create permission="CREATE_LASSO_MAP" global_required="true"/>
6123                 <retrieve permission="CREATE_LASSO_MAP UPDATE_LASSO_MAP DELETE_LASSO_MAP" global_required="true"/>
6124                 <update permission="UPDATE_LASSO_MAP" global_required="true"/>
6125                 <delete permission="DELETE_LASSO_MAP" global_required="true"/>
6126             </actions>
6127         </permacrud>
6128         </class>
6129         <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">
6130                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_adjustment_id_seq">
6131                         <field name="id" reporter:label="ID" reporter:datatype="id" />
6132                         <field name="item_circ_lib" reporter:label="Item Circ Lib" reporter:datatype="org_unit"/>
6133                         <field name="item_owning_lib" reporter:label="Item Owning Lib" reporter:datatype="org_unit"/>
6134                         <field name="hold_pickup_lib" reporter:label="Hold Pickup Lib" reporter:datatype="org_unit"/>
6135                         <field name="hold_request_lib" reporter:label="Hold Request Lib" reporter:datatype="org_unit"/>
6136                         <field name="copy_location" reporter:label="Copy Location" reporter:datatype="link"/>
6137                         <field name="circ_mod" reporter:label="Circ Modifier" reporter:datatype="link"/>
6138                         <field name="pos" reporter:label="Position" reporter:datatype="int" />
6139                         <field name="absolute_adjustment" reporter:label="Absolute adjustment?" reporter:datatype="bool" />
6140                         <field name="prox_adjustment" reporter:label="Proximity Adjustment" reporter:datatype="number" />
6141                 </fields>
6142                 <links>
6143                         <link field="item_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
6144                         <link field="item_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
6145                         <link field="hold_pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
6146                         <link field="hold_request_lib" reltype="has_a" key="id" map="" class="aou"/>
6147                         <link field="circ_mod" reltype="has_a" key="code" map="" class="ccm"/>
6148                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
6149                 </links>
6150         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6151             <actions>
6152                 <create permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
6153                 <retrieve permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
6154                 <update permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
6155                 <delete permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
6156             </actions>
6157         </permacrud>
6158         </class>
6159         <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">
6160                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_id_seq">
6161                         <field name="id" reporter:datatype="id" />
6162                         <field name="from_org" reporter:datatype="org_unit"/>
6163                         <field name="to_org" reporter:datatype="org_unit"/>
6164                         <field name="prox" reporter:datatype="int" />
6165                 </fields>
6166                 <links>
6167                         <link field="from_org" reltype="has_a" key="id" map="" class="aou"/>
6168                         <link field="to_org" reltype="has_a" key="id" map="" class="aou"/>
6169                 </links>
6170         </class>
6171         <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">
6172                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_id_seq">
6173                         <field reporter:label="ID" name="id" reporter:datatype="id" />
6174                         <field reporter:label="Relevance" name="rel" reporter:datatype="float"/>
6175                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
6176                         <field reporter:label="Total Results" name="total" reporter:datatype="int" />
6177                         <field reporter:label="Checked" name="checked" reporter:datatype="int"/>
6178                         <field reporter:label="Visible" name="visible" reporter:datatype="int"/>
6179                         <field reporter:label="Deleted" name="deleted" reporter:datatype="int"/>
6180                         <field reporter:label="Excluded" name="excluded" reporter:datatype="int"/>
6181                 </fields>
6182                 <links/>
6183         </class>
6184         <class id="asv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::survey" oils_persist:tablename="action.survey" reporter:label="Survey">
6185                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_id_seq">
6186                         <field reporter:label="Questions" name="questions" oils_persist:virtual="true" reporter:datatype="link"/>
6187                         <field reporter:label="Responses" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
6188                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
6189                         <field reporter:label="Survey End Date/Time" name="end_date" reporter:datatype="timestamp"/>
6190                         <field reporter:label="Survey ID" name="id" reporter:datatype="id"/>
6191                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
6192                         <field reporter:label="OPAC Survey?" name="opac" reporter:datatype="bool"/>
6193                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
6194                         <field reporter:label="Poll Style?" name="poll" reporter:datatype="bool"/>
6195                         <field reporter:label="Is Required?" name="required" reporter:datatype="bool"/>
6196                         <field reporter:label="Survey Start Date/Time" name="start_date" reporter:datatype="timestamp"/>
6197                         <field reporter:label="Display in User Summary" name="usr_summary" reporter:datatype="bool"/>
6198                 </fields>
6199                 <links>
6200                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6201                         <link field="responses" reltype="has_many" key="survey" map="" class="asvr"/>
6202                         <link field="questions" reltype="has_many" key="survey" map="" class="asvq"/>
6203                 </links>
6204         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6205             <actions>
6206                 <create permission="ADMIN_SURVEY" context_field="owner"/>
6207                 <retrieve/>
6208                 <update permission="ADMIN_SURVEY" context_field="owner"/>
6209                 <delete permission="ADMIN_SURVEY" context_field="owner"/>
6210             </actions>
6211         </permacrud>
6212         </class>
6213         <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">
6214                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_address_id_seq">
6215                         <field name="address_type" reporter:label="Address Type" reporter:datatype="text" oils_obj:required="true" />
6216                         <field name="city" reporter:label="City" reporter:datatype="text" oils_obj:required="true"/>
6217                         <field name="country" reporter:label="Country" reporter:datatype="text" oils_obj:required="true"/>
6218                         <field name="county" reporter:label="County" reporter:datatype="text"/>
6219                         <field name="id" reporter:label="ID" reporter:datatype="id" />
6220                         <field name="org_unit" reporter:label="Org Unit" reporter:datatype="org_unit" oils_obj:required="true"/>
6221                         <field name="post_code" reporter:label="Post Code" reporter:datatype="text" oils_obj:required="true"/>
6222                         <field name="state" reporter:label="State" reporter:datatype="text"/>
6223                         <field name="street1" reporter:label="Street1" reporter:datatype="text" oils_obj:required="true"/>
6224                         <field name="street2" reporter:label="Street2" reporter:datatype="text"/>
6225                         <field name="valid" reporter:label="Is Valid?" reporter:datatype="bool" oils_obj:required="true"/>
6226                         <field name="san" reporter:label="SAN" reporter:datatype="text"/>
6227                 </fields>
6228                 <links>
6229                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
6230                 </links>
6231         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6232             <actions>
6233                 <create permission="CREATE_ORG_ADDRESS" context_field="org_unit"/>
6234                 <retrieve/>
6235                 <update permission="UPDATE_ORG_ADDRESS" context_field="org_unit"/>
6236                 <delete permission="DELETE_ORG_ADDRESS" context_field="org_unit"/>
6237             </actions>
6238         </permacrud>
6239         </class>
6240         <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">
6241                 <fields oils_persist:primary="id" oils_persist:sequence="actor.search_query_id_seq">
6242                         <field name="id" reporter:datatype="id" reporter:selector="label"/>
6243                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
6244                         <field name="query_text" reporter:datatype="text"/>
6245                 </fields>
6246         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6247             <actions>
6248                 <retrieve/>
6249             </actions>
6250         </permacrud>
6251         </class>
6252
6253         <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">
6254                 <fields oils_persist:primary="id" oils_persist:sequence="actor.search_filter_group_id_seq">
6255                         <field name="id" reporter:datatype="id" reporter:selector="label"/>
6256                         <field name="owner" reporter:datatype="org_unit"/>
6257                         <field name="code" reporter:datatype="text"/>
6258                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
6259                         <field name="create_date" reporter:datatype="timestamp"/>
6260                         <field name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
6261                 </fields>
6262                 <links>
6263                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6264                         <link field="entries" reltype="has_many" key="grp" map="" class="asfge"/>
6265                 </links>
6266         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6267             <actions>
6268                 <create permission="ADMIN_SEARCH_FILTER_GROUP" context_field="owner"/>
6269                 <retrieve/>
6270                 <update permission="ADMIN_SEARCH_FILTER_GROUP" context_field="owner"/>
6271                 <delete permission="ADMIN_SEARCH_FILTER_GROUP" context_field="owner"/>
6272             </actions>
6273         </permacrud>
6274         </class>
6275         <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">
6276                 <fields oils_persist:primary="id" oils_persist:sequence="actor.search_filter_group_entry_id_seq">
6277                         <field name="id" reporter:datatype="id"/>
6278                         <field name="grp" reporter:datatype="link"/>
6279                         <field name="pos" reporter:datatype="int"/>
6280                         <field name="query" reporter:datatype="link"/>
6281                 </fields>
6282                 <links>
6283                         <link field="grp" reltype="has_a" key="id" map="" class="asfg"/>
6284                         <link field="query" reltype="has_a" key="id" map="" class="asq"/>
6285                 </links>
6286         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6287             <actions>
6288                 <create permission="ADMIN_SEARCH_FILTER_GROUP">
6289                     <context link="grp" field="owner"/>
6290                 </create>
6291                 <retrieve/>
6292                 <update permission="ADMIN_SEARCH_FILTER_GROUP">
6293                     <context link="grp" field="owner"/>
6294                 </update>
6295                 <delete permission="ADMIN_SEARCH_FILTER_GROUP">
6296                     <context link="grp" field="owner"/>
6297                 </delete>
6298             </actions>
6299         </permacrud>
6300         </class>
6301
6302         <!-- A note: Please update alhr and ahopl when updating ahr -->
6303         <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">
6304                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
6305                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
6306                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
6307                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
6308                         <field reporter:label="Currently Targeted Copy" name="current_copy" reporter:datatype="link"/>
6309                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
6310                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
6311                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
6312                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
6313                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
6314                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
6315                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
6316                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
6317                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
6318                         <field reporter:label="Notifications SMS Number" name="sms_notify" reporter:datatype="text"/>
6319                         <field reporter:label="Notifications SMS Carrier" name="sms_carrier" reporter:datatype="link"/>
6320                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
6321                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
6322                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
6323                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
6324                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
6325                         <field reporter:label="Item Selection Depth" name="selection_depth" />
6326                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
6327                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
6328                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
6329                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
6330                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
6331                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
6332                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
6333                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
6334                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
6335                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
6336                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
6337                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
6338                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
6339                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
6340                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
6341                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
6342                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
6343                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
6344                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
6345                         <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>
6346                         <field reporter:label="Acquisition Request" name="acq_request" reporter:datatype="link" />
6347                 </fields>
6348                 <links>
6349                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
6350                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
6351                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
6352                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
6353                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
6354                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
6355                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6356                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
6357                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
6358                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
6359                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
6360                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
6361                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
6362                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
6363                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
6364                         <link field="sms_carrier" reltype="has_a" key="id" map="" class="csc"/>
6365                         <link field="acq_request" reltype="has_a" key="id" map="" class="aur"/>
6366                         <link field="hold_type" reltype="has_a" key="hold_type" map="" class="cht"/>
6367                 </links>
6368                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6369                         <actions>
6370                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
6371                         </actions>
6372                 </permacrud>
6373         </class>
6374         <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">
6375                 <oils_persist:source_definition><![CDATA[
6376                 SELECT
6377                         ahr.*,
6378                         COALESCE(acplo.position, acpl_ordered.fallback_position) AS
6379                                 copy_location_order_position,
6380                         CASE WHEN au.alias IS NOT NULL THEN
6381                                 au.alias
6382                         ELSE
6383                                 au.first_given_name
6384                         END AS usr_alias_or_first_given_name,
6385                         au.first_given_name AS usr_first_given_name,
6386                         au.second_given_name AS usr_second_given_name,
6387                         au.family_name AS usr_family_name,
6388                         au.prefix AS usr_prefix,
6389                         au.suffix AS usr_suffix,
6390                         au.alias AS usr_alias,
6391                         CASE WHEN au.alias IS NOT NULL THEN
6392                                 au.alias
6393                         ELSE
6394                                 REGEXP_REPLACE(ARRAY_TO_STRING(ARRAY[
6395                                         COALESCE(au.family_name, ''),
6396                                         COALESCE(au.suffix, ''),
6397                                         ', ',
6398                                         COALESCE(au.prefix, ''),
6399                                         COALESCE(au.first_given_name, ''),
6400                                         COALESCE(au.second_given_name, '')
6401                                 ], ' '), E'\\s+,', ',')
6402                         END AS usr_alias_or_display_name,
6403                         REGEXP_REPLACE(ARRAY_TO_STRING(ARRAY[
6404                                 COALESCE(au.family_name, ''),
6405                                 COALESCE(au.suffix, ''),
6406                                 ', ',
6407                                 COALESCE(au.prefix, ''),
6408                                 COALESCE(au.first_given_name, ''),
6409                                 COALESCE(au.second_given_name, '')
6410                         ], ' '), E'\\s+,', ',') AS usr_display_name,
6411                         TRIM(acnp.label || ' ' || acn.label || ' ' || acns.label)
6412                                 AS call_number_label,
6413                         siss.label AS issuance_label,
6414                         (ahr.usr <> ahr.requestor) AS is_staff_hold,
6415                         ahcm_1.copy_count AS potential_copies
6416                 FROM action.hold_request ahr
6417                 JOIN asset.copy acp ON (acp.id = ahr.current_copy)
6418                 JOIN asset.call_number acn ON (acp.call_number = acn.id)
6419                 JOIN asset.call_number_prefix acnp ON (acn.prefix = acnp.id)
6420                 JOIN asset.call_number_suffix acns ON (acn.suffix = acns.id)
6421                 JOIN actor.usr au ON (au.id = ahr.usr)
6422                 JOIN (
6423                         SELECT *, (ROW_NUMBER() OVER (ORDER BY name) + 1000000) AS fallback_position
6424                         FROM asset.copy_location
6425                 ) acpl_ordered ON (acpl_ordered.id = acp.location)
6426                 LEFT JOIN actor.usr_standing_penalty ausp 
6427                         ON (ahr.usr = ausp.usr AND (ausp.stop_date IS NULL OR ausp.stop_date > NOW()))
6428                 LEFT JOIN config.standing_penalty csp
6429                         ON (
6430                                 csp.id = ausp.standing_penalty AND 
6431                                 csp.block_list LIKE '%CAPTURE%' AND (
6432                                         (csp.org_depth IS NULL AND ahr.pickup_lib = ausp.org_unit) OR
6433                                         (csp.org_depth IS NOT NULL AND ahr.pickup_lib IN (
6434                                                 SELECT id FROM actor.org_unit_descendants(ausp.org_unit, csp.org_depth))
6435                                         )
6436                                 )
6437                         )
6438                 JOIN (
6439                         SELECT COUNT(target_copy) AS copy_count, hold
6440                         FROM action.hold_copy_map
6441                         GROUP BY 2
6442                 ) ahcm_1 ON (ahcm_1.hold = ahr.id)
6443                 LEFT JOIN serial.issuance siss
6444                         ON (ahr.hold_type = 'I' AND siss.id = ahr.target)
6445                 LEFT JOIN asset.copy_location_order acplo
6446                         ON (acp.location = acplo.location AND
6447                                 acp.circ_lib = acplo.org)
6448                 WHERE
6449                         ahr.capture_time IS NULL AND
6450                         ahr.cancel_time IS NULL AND
6451                         csp.id IS NULL AND
6452                         (ahr.expire_time is NULL OR ahr.expire_time > NOW()) AND
6453                         acp.status IN (0,7)
6454                 ]]></oils_persist:source_definition>
6455                 <fields oils_persist:primary="id">
6456                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
6457                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
6458                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
6459                         <field reporter:label="Currently Targeted Copy" name="current_copy" reporter:datatype="link"/>
6460                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
6461                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
6462                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
6463                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
6464                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
6465                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
6466                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
6467                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
6468                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
6469                         <field reporter:label="Notifications SMS Number" name="sms_notify" reporter:datatype="text"/>
6470                         <field reporter:label="Notifications SMS Carrier" name="sms_carrier" reporter:datatype="link"/>
6471                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
6472                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
6473                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
6474                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
6475                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
6476                         <field reporter:label="Item Selection Depth" name="selection_depth" />
6477                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
6478                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
6479                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
6480                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
6481                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
6482                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
6483                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
6484                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
6485                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
6486                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
6487                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
6488                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
6489                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
6490                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
6491                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
6492                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
6493                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
6494                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
6495                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
6496                         <field reporter:label="Acquisition Request" name="acq_request" reporter:datatype="link" />
6497                         <field reporter:label="Copy Location Sort Order" name="copy_location_order_position" reporter:datatype="int" />
6498                         <field reporter:label="User First Given Name" name="usr_first_given_name" reporter:datatype="text" />
6499                         <field reporter:label="User Second Given Name" name="usr_second_given_name" reporter:datatype="text" />
6500                         <field reporter:label="User Family Name" name="usr_family_name" reporter:datatype="text" />
6501                         <field reporter:label="User Prefix" name="usr_prefix" reporter:datatype="text" />
6502                         <field reporter:label="User Suffix" name="usr_suffix" reporter:datatype="text" />
6503                         <field reporter:label="User Alias or First Given Name" name="usr_alias_or_first_given_name" reporter:datatype="text" />
6504                         <field reporter:label="User Display Name" name="usr_display_name" reporter:datatype="text" />
6505                         <field reporter:label="User Alias or Display Name" name="usr_alias_or_display_name" reporter:datatype="text" />
6506                         <field reporter:label="User Alias" name="usr_alias" reporter:datatype="text" />
6507                         <field reporter:label="Call Number Label" name="call_number_label" reporter:datatype="text" />
6508                         <field reporter:label="Issuance Label" name="issuance_label" reporter:datatype="text" />
6509                         <field reporter:label="Is Staff Hold?" name="is_staff_hold" reporter:datatype="bool" />
6510                         <field reporter:label="Potential Copies" name="potential_copies" reporter:datatype="int" />
6511                         <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>
6512                 </fields>
6513                 <links>
6514                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
6515                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
6516                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
6517                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
6518                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
6519                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
6520                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6521                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
6522                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
6523                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
6524                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
6525                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
6526                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
6527                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
6528                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
6529                         <link field="sms_carrier" reltype="has_a" key="id" map="" class="csc"/>
6530                         <link field="acq_request" reltype="has_a" key="id" map="" class="aur"/>
6531                 </links>
6532                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6533                         <actions>
6534                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
6535                         </actions>
6536                 </permacrud>
6537         </class>
6538         <class id="alhr" controller="open-ils.cstore" oils_obj:fieldmapper="action::last_hold_request" reporter:label="Last Captured Hold Request" oils_persist:readonly="true">
6539                 <oils_persist:source_definition><![CDATA[
6540                         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)
6541                 ]]></oils_persist:source_definition>
6542                 <fields oils_persist:primary="id">
6543                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
6544                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
6545                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
6546                         <field reporter:label="Currently Targeted Copy" name="current_copy" reporter:datatype="link"/>
6547                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
6548                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
6549                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
6550                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
6551                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
6552                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
6553                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
6554                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
6555                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
6556                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
6557                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
6558                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
6559                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
6560                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
6561                         <field reporter:label="Item Selection Depth" name="selection_depth" />
6562                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
6563                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
6564                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
6565                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
6566                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
6567                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
6568                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
6569                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
6570                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
6571                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
6572                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
6573                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
6574                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
6575                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
6576                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
6577                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
6578                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
6579                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
6580                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
6581                         <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>
6582                         <field reporter:label="Acquisition Request" name="acq_request" reporter:datatype="link" />
6583                 </fields>
6584                 <links>
6585                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
6586                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
6587                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
6588                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
6589                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
6590                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
6591                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6592                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
6593                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
6594                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
6595                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
6596                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
6597                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
6598                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
6599                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
6600                         <link field="acq_request" reltype="has_a" key="id" map="" class="aur"/>
6601                 </links>
6602         </class>
6603
6604         <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">
6605                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_note_id_seq">
6606                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6607                         <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
6608                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
6609                         <field reporter:label="Body" name="body" reporter:datatype="text"/>
6610                         <field reporter:label="Slip?" name="slip" reporter:datatype="bool"/>
6611                         <field reporter:label="Pub?" name="pub" reporter:datatype="bool"/>
6612                         <field reporter:label="Staff?" name="staff" reporter:datatype="bool"/>
6613                 </fields>
6614                 <links>
6615                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
6616                 </links>
6617                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6618                         <actions>
6619                                 <create permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></create>
6620                                 <retrieve permission="VIEW_USER"><context link="hold" field="request_lib"/></retrieve>
6621                                 <update permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></update>
6622                                 <delete permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></delete>
6623                         </actions>
6624                 </permacrud>
6625         </class>
6626         <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">
6627                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
6628                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
6629                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
6630                         <field reporter:label="Currently Targeted Copy" name="current_copy" reporter:datatype="link"/>
6631                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
6632                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
6633                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
6634                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
6635                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
6636                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
6637                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
6638                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
6639                         <field reporter:label="Notify by Phone?" name="phone_notify" reporter:datatype="bool"/>
6640                         <field reporter:label="Notify by SMS?" name="sms_notify" reporter:datatype="bool"/>
6641                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
6642                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
6643                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
6644                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
6645                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
6646                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
6647                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
6648                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
6649                         <field reporter:label="Staff Placed?" name="staff_placed" reporter:datatype="bool"/>
6650                         <field reporter:label="Item Selection Depth" name="selection_depth" />
6651                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
6652                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
6653                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
6654                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
6655                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
6656                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
6657                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
6658                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
6659                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
6660                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
6661                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
6662                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
6663                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
6664                         <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>
6665                 </fields>
6666                 <links>
6667                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
6668                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
6669                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
6670                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
6671                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
6672                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
6673                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
6674                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
6675                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
6676                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
6677                         <link field="usr_profile" reltype="has_a" key="id" map="" class="pgt"/>
6678                 </links>
6679                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6680                         <actions>
6681                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
6682                         </actions>
6683                 </permacrud>
6684         </class>
6685         <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">
6686                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
6687                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
6688                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
6689                         <field reporter:label="Currently Targeted Copy" name="current_copy" reporter:datatype="link"/>
6690                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
6691                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
6692                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
6693                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
6694                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
6695                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
6696                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
6697                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
6698                         <field reporter:label="Notify by Phone?" name="phone_notify" reporter:datatype="bool"/>
6699                         <field reporter:label="Notify by SMS?" name="sms_notify" reporter:datatype="bool"/>
6700                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
6701                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
6702                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
6703                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
6704                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
6705                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
6706                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
6707                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
6708                         <field reporter:label="Staff Placed?" name="staff_placed" reporter:datatype="bool"/>
6709                         <field reporter:label="Item Selection Depth" name="selection_depth" />
6710                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
6711                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
6712                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
6713                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
6714                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
6715                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
6716                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
6717                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
6718                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
6719                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
6720                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
6721                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
6722                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
6723                 </fields>
6724                 <links>
6725                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
6726                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
6727                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
6728                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
6729                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
6730                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
6731                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
6732                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
6733                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
6734                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
6735                         <link field="usr_profile" reltype="has_a" key="id" map="" class="pgt"/>
6736                 </links>
6737                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6738                         <actions>
6739                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
6740                         </actions>
6741                 </permacrud>
6742         </class>
6743
6744         <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">
6745                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_id_seq">
6746                         <field reporter:label="Subordinate Organizational Units" name="children" oils_persist:virtual="true" reporter:datatype="org_unit"/>
6747                         <field reporter:label="Billing Address" name="billing_address" reporter:datatype="link"/>
6748                         <field reporter:label="Holds Receiving Address" name="holds_address" reporter:datatype="link"/>
6749                         <field reporter:label="Organizational Unit ID" name="id" reporter:datatype="org_unit" reporter:selector="shortname"/>
6750                         <field reporter:label="ILL Receiving Address" name="ill_address" reporter:datatype="link"/>
6751                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="link"/>
6752                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true"/>
6753                         <field reporter:label="Organizational Unit Type" name="ou_type" reporter:datatype="link" oils_obj:required="true"/>
6754                         <field reporter:label="Parent Organizational Unit" name="parent_ou" reporter:datatype="link"/>
6755                         <field reporter:label="Short (Policy) Name" name="shortname" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.+$"/>
6756                         <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
6757                         <field reporter:label="Phone Number" name="phone" reporter:datatype="text"/>
6758                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
6759                         <field reporter:label="Fiscal Calendar" name="fiscal_calendar" reporter:datatype="link" oils_obj:required="true"/>
6760                         <field reporter:label="Users" name="users" oils_persist:virtual="true" reporter:datatype="link"/>
6761                         <field reporter:label="Closed Dates" name="closed_dates" oils_persist:virtual="true" reporter:datatype="link"/>
6762                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
6763                         <field reporter:label="Settings" name="settings" oils_persist:virtual="true" reporter:datatype="link"/>
6764                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>
6765                         <field reporter:label="Checkins" name="checkins" oils_persist:virtual="true" reporter:datatype="link"/>
6766                         <field reporter:label="Workstations" name="workstations" oils_persist:virtual="true" reporter:datatype="link"/>
6767                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
6768                         <field reporter:label="Copy Location Orders" name="copy_location_orders" oils_persist:virtual="true" reporter:datatype="link"/>
6769                         <field reporter:label="Transit Copy Prev Destinations" name="atc_prev_dests" oils_persist:virtual="true" reporter:datatype="link"/>
6770                         <field reporter:label="Reservation Requests" name="resv_requests" oils_persist:virtual="true" reporter:datatype="link"/>
6771                         <field reporter:label="Reservation Pickups" name="resv_pickups" oils_persist:virtual="true" reporter:datatype="link"/>
6772                         <field reporter:label="Resource Types" name="rsrc_types" oils_persist:virtual="true" reporter:datatype="link"/>
6773                         <field reporter:label="Resources" name="resources" oils_persist:virtual="true" reporter:datatype="link"/>
6774                         <field reporter:label="Resource Attributes" name="rsrc_attrs" oils_persist:virtual="true" reporter:datatype="link"/>
6775                         <field reporter:label="Attribute Values" name="attr_vals" oils_persist:virtual="true" reporter:datatype="link"/>
6776                         <field reporter:label="Hours of Operation" name="hours_of_operation" oils_persist:virtual="true" reporter:datatype="link"/>
6777                 </fields>
6778                 <links>
6779                         <link field="billing_address" reltype="has_a" key="id" map="" class="aoa"/>
6780                         <link field="holds_address" reltype="has_a" key="id" map="" class="aoa"/>
6781                         <link field="ou_type" reltype="has_a" key="id" map="" class="aout"/>
6782                         <link field="mailing_address" reltype="has_a" key="id" map="" class="aoa"/>
6783                         <link field="parent_ou" reltype="has_a" key="id" map="" class="aou"/>
6784                         <link field="ill_address" reltype="has_a" key="id" map="" class="aoa"/>
6785                         <link field="fiscal_calendar" reltype="has_a" key="id" map="" class="acqfc"/>
6786                         <link field="users" reltype="has_many" key="home_ou" map="" class="au"/>
6787                         <link field="closed_dates" reltype="has_many" key="org_unit" map="" class="aoucd"/>
6788                         <link field="children" reltype="has_many" key="parent_ou" map="" class="aou"/>
6789                         <link field="circulations" reltype="has_many" key="circ_lib" map="" class="circ"/>
6790                         <link field="settings" reltype="has_many" key="org_unit" map="" class="aous"/>
6791                         <link field="addresses" reltype="has_many" key="org_unit" map="" class="aoa"/>
6792                         <link field="checkins" reltype="has_many" key="checkin_lib" map="" class="circ"/>
6793                         <link field="workstations" reltype="has_many" key="owning_lib" map="" class="aws"/>
6794                         <link field="fund_alloc_pcts" reltype="has_many" key="org" map="" class="acqfap"/>
6795                         <link field="copy_location_orders" reltype="has_many" key="org" map="" class="acplo"/>
6796                         <link field="atc_prev_dests" reltype="has_many" key="prev_dest" map="" class="atc"/>
6797                         <link field="resv_requests" reltype="has_many" key="request_lib" map="" class="bresv"/>
6798                         <link field="resv_pickups" reltype="has_many" key="pickup_lib" map="" class="bresv"/>
6799                         <link field="rsrc_types" reltype="has_many" key="owner" map="" class="brt"/>
6800                         <link field="resources" reltype="has_many" key="owner" map="" class="brsrc"/>
6801                         <link field="rsrc_attrs" reltype="has_many" key="owner" map="" class="bra"/>
6802                         <link field="attr_vals" reltype="has_many" key="owner" map="" class="brav"/>
6803                         <link field="hours_of_operation" reltype="might_have" key="id" map="" class="aouhoo"/>
6804                 </links>
6805         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6806             <actions>
6807                 <create permission="CREATE_ORG_UNIT" context_field="parent_ou"/>
6808                 <retrieve />
6809                 <update permission="UPDATE_ORG_UNIT" context_field="id"/>
6810                 <delete permission="DELETE_ORG_UNIT" context_field="parent_ou"/>
6811             </actions>
6812         </permacrud>
6813         </class>
6814         <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">
6815                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_custom_tree_id_seq">
6816                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6817                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
6818                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
6819                 </fields>
6820                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6821                         <actions>
6822                                 <create permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
6823                                 <retrieve/>
6824                                 <update permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
6825                                 <delete permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
6826                         </actions>
6827                 </permacrud>
6828         </class>
6829         <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">
6830                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_custom_tree_node_id_seq">
6831                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6832                         <field reporter:label="Tree" name="tree" reporter:datatype="link"/>
6833                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="link"/>
6834                         <field reporter:label="Parent" name="parent_node" reporter:datatype="link"/>
6835                         <field reporter:label="Sibling Sort Order" name="sibling_order" reporter:datatype="int"/>
6836                         <field reporter:label="Children" name="children" reporter:datatype="link" oils_persist:virtual="true" />
6837                 </fields>
6838                 <links>
6839                         <link field="tree" reltype="has_a" key="id" map="" class="aouct"/>
6840                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
6841                         <link field="parent_node" reltype="has_a" key="id" map="" class="aouctn"/>
6842                         <link field="children" reltype="has_many" key="parent_node" map="" class="aouctn"/>
6843                 </links>
6844                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6845                         <actions>
6846                                 <create permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
6847                                 <retrieve/>
6848                                 <update permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
6849                                 <delete permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
6850                         </actions>
6851                 </permacrud>
6852         </class>
6853         <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">
6854                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_id_seq">
6855                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
6856                         <field name="btype" reporter:datatype="text"/>
6857                         <field name="id" reporter:datatype="id" />
6858                         <field name="name"  reporter:datatype="text"/>
6859                         <field name="description" reporter:datatype="text"/>
6860                         <field name="owner" reporter:datatype="link"/>
6861                         <field name="pub" reporter:datatype="bool"/>
6862                         <field name="create_time" reporter:datatype="timestamp" />
6863                         <field name="owning_lib" reporter:datatype="org_unit" />
6864                 </fields>
6865                 <links>
6866                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
6867                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
6868                         <link field="items" reltype="has_many" key="bucket" map="" class="ccnbi"/>
6869                 </links>
6870                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6871                         <actions>
6872                                 <create permission="CREATE_CALLNUMBER_BUCKET ADMIN_CALLNUMBER_BUCKET" context="owning_lib" owning_user="owner"/>
6873                                 <retrieve permission="CREATE_CALLNUMBER_BUCKET ADMIN_CALLNUMBER_BUCKET" context="owning_lib" owning_user="owner"/>
6874                                 <update permission="CREATE_CALLNUMBER_BUCKET ADMIN_CALLNUMBER_BUCKET" context="owning_lib" owning_user="owner"/>
6875                                 <delete permission="CREATE_CALLNUMBER_BUCKET ADMIN_CALLNUMBER_BUCKET" context="owning_lib" owning_user="owner"/>
6876                         </actions>
6877                 </permacrud>
6878         </class>
6879         <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">
6880                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_note_id_seq">
6881                         <field name="id" reporter:datatype="id" />
6882                         <field name="bucket" reporter:datatype="link"/>
6883                         <field name="note" reporter:datatype="text" />
6884                 </fields>
6885                 <links>
6886                         <link field="bucket" reltype="has_a" key="id" map="" class="ccnb"/>
6887                 </links>
6888         </class>
6889         <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">
6890                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_id_seq">
6891                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
6892                         <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>
6893                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
6894                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
6895                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
6896                         <field reporter:label="SIP Field" name="sip_field" reporter:datatype="link"/>
6897                         <field reporter:label="SIP Format" name="sip_format" reporter:datatype="text"/>
6898                         <field reporter:label="Required" name="required" reporter:datatype="bool"/>
6899                         <field reporter:label="Checkout Archive" name="checkout_archive" reporter:datatype="bool"/>
6900                 </fields>
6901                 <links>
6902                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6903                         <link field="sip_field" reltype="has_a" key="field" map="" class="ascsf"/>
6904                         <link field="entries" reltype="has_many" key="stat_cat" map="" class="asce"/>
6905                 </links>
6906                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6907                         <actions>
6908                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
6909                         </actions>
6910                 </permacrud>
6911         </class>
6912         <class id="ac" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::card" oils_persist:tablename="actor.card" reporter:label="Library Card">
6913                 <fields oils_persist:primary="id" oils_persist:sequence="actor.card_id_seq">
6914                         <field reporter:label="IsActive?" name="active" reporter:datatype="bool"/>
6915                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
6916                         <field reporter:label="Card ID" name="id" reporter:datatype="id" />
6917                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
6918                 </fields>
6919                 <links>
6920                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6921                 </links>
6922                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6923                         <actions>
6924                                 <retrieve permission="VIEW_USER user_request.view">
6925                                         <context link="usr" field="home_ou" />
6926                                 </retrieve>
6927                         </actions>
6928                 </permacrud>
6929         </class>
6930     <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">
6931         <fields oils_persist:primary="field">
6932             <field reporter:label="Field Identifier" name="field" reporter:datatype="text" reporter:selector="name"/>
6933             <field reporter:label="Field Name" name="name" reporter:datatype="text"/>
6934             <field reporter:label="Exclusive?" name="one_only" reporter:datatype="bool"/>
6935         </fields>
6936         <links/>
6937         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6938             <actions>
6939                 <create permission="CREATE_PATRON_STAT_CAT" global_required="true"/>
6940                 <retrieve />
6941                 <update permission="UPDATE_PATRON_STAT_CAT" global_required="true"/>
6942                 <delete permission="DELETE_PATRON_STAT_CAT" global_required="true"/>
6943             </actions>
6944         </permacrud>
6945     </class>
6946         <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">
6947                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_id_seq">
6948                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
6949                         <field reporter:label="Default Entries" name="default_entries" oils_persist:virtual="true" reporter:datatype="link"/>
6950                         <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>
6951                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
6952                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
6953                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
6954                         <field reporter:label="User Summary" name="usr_summary" reporter:datatype="bool"/>
6955                         <field reporter:label="SIP Field" name="sip_field" reporter:datatype="link"/>
6956                         <field reporter:label="SIP Format" name="sip_format" reporter:datatype="text"/>
6957                         <field reporter:label="Checkout Archive" name="checkout_archive" reporter:datatype="bool"/>
6958                         <field reporter:label="Required" name="required" reporter:datatype="bool"/>
6959                         <field reporter:label="Free Text" name="allow_freetext" reporter:datatype="bool"/>
6960                 </fields>
6961                 <links>
6962                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6963                         <link field="sip_field" reltype="has_a" key="field" map="" class="actscsf"/>
6964                         <link field="entries" reltype="has_many" key="stat_cat" map="" class="actsce"/>
6965                         <link field="default_entries" reltype="has_many" key="stat_cat" map="" class="actsced"/>
6966                 </links>
6967         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6968             <actions>
6969                 <create permission="CREATE_PATRON_STAT_CAT" context_field="owner"/>
6970                 <retrieve />
6971                 <update permission="UPDATE_PATRON_STAT_CAT" context_field="owner"/>
6972                 <delete permission="DELETE_PATRON_STAT_CAT" context_field="owner"/>
6973             </actions>
6974         </permacrud>
6975         </class>
6976         <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">
6977                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.series_field_entry_id_seq">
6978                         <field name="field" reporter:datatype="link"/>
6979                         <field name="id" reporter:datatype="id" />
6980                         <field name="source" reporter:datatype="link"/>
6981                         <field name="value"  reporter:datatype="text"/>
6982                 </fields>
6983                 <links>
6984                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
6985                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
6986                 </links>
6987         </class>
6988         <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">
6989                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_id_seq">
6990                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
6991                         <field name="btype" reporter:datatype="text"/>
6992                         <field name="id" reporter:datatype="id" />
6993                         <field name="name"  reporter:datatype="text"/>
6994                         <field name="description" reporter:datatype="text"/>
6995                         <field name="owner" reporter:datatype="link"/>
6996                         <field name="pub" reporter:datatype="bool"/>
6997                         <field name="create_time" reporter:datatype="timestamp" />
6998                         <field name="owning_lib" reporter:datatype="org_unit" />
6999                 </fields>
7000                 <links>
7001                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
7002                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7003                         <link field="items" reltype="has_many" key="bucket" map="" class="cubi"/>
7004                 </links>
7005                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7006                         <actions>
7007                                 <create permission="CREATE_USER_BUCKET ADMIN_USER_BUCKET" context="owning_lib" owning_user="owner"/>
7008                                 <retrieve permission="CREATE_USER_BUCKET ADMIN_USER_BUCKET" context="owning_lib" owning_user="owner"/>
7009                                 <update permission="CREATE_USER_BUCKET ADMIN_USER_BUCKET" context="owning_lib" owning_user="owner"/>
7010                                 <delete permission="CREATE_USER_BUCKET ADMIN_USER_BUCKET" context="owning_lib" owning_user="owner"/>
7011                         </actions>
7012                 </permacrud>
7013         </class>
7014         <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">
7015                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_note_id_seq">
7016                         <field name="id" reporter:datatype="id" />
7017                         <field name="bucket" reporter:datatype="link"/>
7018                         <field name="note" reporter:datatype="text" />
7019                 </fields>
7020                 <links>
7021                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
7022                 </links>
7023         </class>
7024         <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">
7025                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
7026                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
7027                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7028                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
7029                         <field reporter:label="Pyament ID" name="id" reporter:datatype="id" />
7030                         <field reporter:label="Payment Note" name="note"  reporter:datatype="text"/>
7031                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
7032                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
7033                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
7034                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
7035                 </fields>
7036                 <links>
7037                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
7038                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
7039                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7040                 </links>
7041         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7042             <actions>
7043                 <retrieve permission="VIEW_USER_TRANSACTIONS">
7044                     <context link="xact" jump="usr" field="home_ou"/>
7045                 </retrieve>
7046                         </actions>
7047                 </permacrud>
7048         </class>
7049         <class id="afr" controller="open-ils.cstore" oils_obj:fieldmapper="authority::full_rec" oils_persist:tablename="authority.full_rec" reporter:label="Full Authority Record">
7050                 <fields oils_persist:primary="id" oils_persist:sequence="authority.full_rec_id_seq">
7051                         <field name="id" reporter:datatype="id" />
7052                         <field name="ind1" />
7053                         <field name="ind2" />
7054                         <field name="record" />
7055                         <field name="subfield" />
7056                         <field name="tag" />
7057                         <field name="value" />
7058                 </fields>
7059                 <links>
7060                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
7061                 </links>
7062         </class>
7063         <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">
7064                 <fields oils_persist:primary="id" oils_persist:sequence="authority.authority_linking_id_seq">
7065                         <field name="id" reporter:label="ID" reporter:datatype="id" />
7066                         <field name="source" reporter:label="Source Record" reporter:datatype="link" />
7067                         <field name="target" reporter:label="Target Record" reporter:datatype="link" />
7068                         <field name="field" reporter:label="Authority Field" reporter:datatype="link" />
7069                 </fields>
7070                 <links>
7071                         <link field="source" reltype="has_a" key="id" map="" class="are"/>
7072                         <link field="target" reltype="has_a" key="id" map="" class="are"/>
7073                         <link field="field" reltype="has_a" key="id" map="" class="acsaf"/>
7074                 </links>
7075         </class>
7076         <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">
7077                 <fields oils_persist:primary="id" oils_persist:sequence="config.non_cataloged_type_id_seq">
7078                         <field reporter:label="Circulation Duration" name="circ_duration" reporter:datatype="interval"/>
7079                         <field reporter:label="Non-cat Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>
7080                         <field reporter:label="In House?" name="in_house" reporter:datatype="bool"/>
7081                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
7082                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
7083                 </fields>
7084                 <links>
7085                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
7086                 </links>
7087         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7088             <actions>
7089                 <create permission="CREATE_NON_CAT_TYPE" context_field="owning_lib"/>
7090                 <retrieve/>
7091                 <update permission="CREATE_NON_CAT_TYPE" context_field="owning_lib"/>
7092                 <delete permission="CREATE_NON_CAT_TYPE" context_field="owning_lib"/>
7093             </actions>
7094         </permacrud>
7095
7096         </class>
7097         <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">
7098                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_type_id_seq">
7099                         <field reporter:label="Subordinate Types" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
7100                         <field reporter:label="Can Have Users?" name="can_have_users" reporter:datatype="bool"/>
7101                         <field reporter:label="Can Have Volumes?" name="can_have_vols" reporter:datatype="bool"/>
7102                         <field reporter:label="Type Depth" name="depth" reporter:datatype="int" />
7103                         <field reporter:label="Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>
7104                         <field reporter:label="Type Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
7105                         <field reporter:label="OPAC Label" name="opac_label"  reporter:datatype="text" oils_persist:i18n="true"/>
7106                         <field reporter:label="Parent Type" name="parent" reporter:datatype="link"/>
7107                         <field reporter:label="Org Units" name="org_units" oils_persist:virtual="true"  reporter:datatype="org_unit"/>
7108                 </fields>
7109                 <links>
7110                         <link field="parent" reltype="has_a" key="id" map="" class="aout"/>
7111                         <link field="children" reltype="has_many" key="parent" map="" class="aout"/>
7112                         <link field="org_units" reltype="has_many" key="ou_type" map="" class="aou"/>
7113                 </links>
7114         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7115             <actions>
7116                 <create permission="CREATE_ORG_TYPE" global_required="true"/>
7117                 <retrieve/>
7118                 <update permission="UPDATE_ORG_TYPE" global_required="true"/>
7119                 <delete permission="DELETE_ORG_TYPE" global_required="true"/>
7120             </actions>
7121         </permacrud>
7122         </class>
7123         <class id="bren" controller="open-ils.cstore" oils_obj:fieldmapper="biblio::record_note" oils_persist:tablename="biblio.record_note" reporter:label="Bib Record Note">
7124                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_note_id_seq">
7125                         <field name="create_date" reporter:datatype="timestamp"/>
7126                         <field name="creator" reporter:datatype="link"/>
7127                         <field name="edit_date" reporter:datatype="timestamp"/>
7128                         <field name="editor" reporter:datatype="link"/>
7129                         <field name="id" reporter:datatype="id" />
7130                         <field name="pub" reporter:datatype="bool"/>
7131                         <field name="record" reporter:datatype="link"/>
7132                         <field name="value"  reporter:datatype="text"/>
7133                 </fields>
7134                 <links>
7135                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7136                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7137                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
7138                 </links>
7139         </class>
7140         <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">
7141                 <fields oils_persist:primary="usr" oils_persist:sequence="">
7142                         <field name="balance_owed" reporter:datatype="money" />
7143                         <field name="total_owed" reporter:datatype="money" />
7144                         <field name="total_paid" reporter:datatype="money" />
7145                         <field name="usr" reporter:datatype="link"/>
7146                 </fields>
7147                 <links>
7148                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7149                 </links>
7150         </class>
7151     <class id="mg" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::grocery" oils_persist:tablename="money.grocery" reporter:label="Grocery Transaction">
7152                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
7153                         <field reporter:label="Billing Location" name="billing_location" reporter:datatype="link"/>
7154                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
7155                         <field reporter:label="Note" name="note"  reporter:datatype="text"/>
7156                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
7157                         <field reporter:label="Transaction Finish Timestamp" name="xact_finish" reporter:datatype="timestamp" />
7158                         <field reporter:label="Transaction Start Timestamp" name="xact_start" reporter:datatype="timestamp" />
7159                         <field reporter:label="Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
7160                         <field reporter:label="Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
7161                         <field reporter:label="Billable Transaction link" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
7162                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
7163                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
7164                 </fields>
7165                 <links>
7166                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7167                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
7168                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
7169                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
7170                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
7171                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
7172                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
7173                 </links>
7174         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7175             <actions>
7176                 <retrieve permission="VIEW_USER_TRANSACTIONS" context_field="billing_location"/>
7177             </actions>
7178         </permacrud>
7179         </class>
7180         <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">
7181                 <fields oils_persist:primary="id" oils_persist:sequence="config.bib_source_id_seq">
7182                         <field name="id" reporter:selector="source" reporter:datatype="id"/>
7183                         <field name="quality" reporter:datatype="int" />
7184                         <field name="source" reporter:datatype="text"/>
7185                         <field name="transcendant" reporter:datatype="bool"/>
7186                         <field name="can_have_copies" reporter:datatype="bool"/>
7187                 </fields>
7188                 <links/>
7189         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7190             <actions>
7191                 <create permission="CREATE_BIB_SOURCE" global_required="true"/>
7192                 <retrieve/>
7193                 <update permission="UPDATE_BIB_SOURCE" global_required="true"/>
7194                 <delete permission="DELETE_BIB_SOURCE" global_required="true"/>
7195             </actions>
7196         </permacrud>
7197         </class>
7198         <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">
7199                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
7200                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
7201                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
7202                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
7203                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
7204                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
7205                         <field reporter:label="Grocery Billing link" name="grocery" oils_persist:virtual="true" reporter:datatype="link"/>
7206                         <field reporter:label="Circulation Billing link" name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
7207                         <field reporter:label="Billing Line Items" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
7208                         <field reporter:label="Payment Line Items" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
7209                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
7210                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
7211                         <field reporter:label="Payment Summary" name="summary" oils_persist:virtual="true" reporter:datatype="link"/>
7212                 </fields>
7213                 <links>
7214                         <link field="grocery" reltype="might_have" key="id" map="" class="mg"/>
7215                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
7216                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7217                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
7218                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
7219                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
7220                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
7221                         <link field="summary" reltype="might_have" key="id" map="" class="mbts"/>
7222                 </links>
7223                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7224                         <actions>
7225                                 <retrieve permission="VIEW_USER_TRANSACTIONS">
7226                                         <context link="usr" field="home_ou" />
7227                                 </retrieve>
7228                         </actions>
7229                 </permacrud>
7230         </class>
7231         <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">
7232                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_id_seq">
7233                         <field reporter:label="Entry ID" name="id" reporter:datatype="id" />
7234                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
7235                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
7236                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
7237                         <field reporter:label="Default Entries" name="default_entries" oils_persist:virtual="true" reporter:datatype="link"/>
7238                 </fields>
7239                 <links>
7240                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
7241                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7242                         <link field="default_entries" reltype="has_many" key="stat_cat_entry" map="" class="actsced"/>
7243                 </links>
7244         </class>
7245         <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">
7246                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_default_id_seq">
7247                         <field reporter:label="Default Entry ID" name="id" reporter:datatype="id" />
7248                         <field reporter:label="Default Entry Value" name="stat_cat_entry" reporter:datatype="link"/>
7249                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
7250                         <field reporter:label="Default for Owner" name="owner" reporter:datatype="link"/>
7251                 </fields>
7252                 <links>
7253                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
7254                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7255                         <link field="stat_cat_entry" reltype="has_a" key="id" map="" class="actsce"/>
7256                 </links>
7257         </class>
7258         <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">
7259                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_id_seq">
7260                         <field name="bucket" reporter:datatype="link"/>
7261                         <field name="id" reporter:datatype="id" />
7262                         <field name="target_user" reporter:datatype="link"/>
7263                         <field name="create_time" reporter:datatype="timestamp" />
7264                         <field name="pos" reporter:datatype="int" />
7265                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
7266                 </fields>
7267                 <links>
7268                         <link field="target_user" reltype="has_a" key="id" map="" class="au"/>
7269                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
7270             <link field="notes" reltype="has_many" map="" key="item" class="cubin"/>
7271                 </links>
7272                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7273                         <actions>
7274                                 <retrieve permission="ADMIN_USER_BUCKET">
7275                     <context link="bucket" owning_lib="owning_lib"/>
7276                 </retrieve>
7277             </actions>
7278         </permacrud>
7279         </class>
7280         <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">
7281                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_note_id_seq">
7282                         <field name="id" reporter:datatype="id" />
7283                         <field name="item" reporter:datatype="link"/>
7284                         <field name="note" reporter:datatype="text" />
7285                 </fields>
7286                 <links>
7287                         <link field="item" reltype="has_a" key="id" map="" class="cubi"/>
7288                 </links>
7289         </class>
7290         <class id="mus" controller="open-ils.cstore" oils_obj:fieldmapper="money::user_summary" oils_persist:tablename="money.usr_summary" reporter:label="User Summary">
7291                 <fields oils_persist:primary="usr" oils_persist:sequence="">
7292                         <field name="balance_owed" reporter:datatype="money" />
7293                         <field name="total_owed" reporter:datatype="money" />
7294                         <field name="total_paid" reporter:datatype="money" />
7295                         <field name="usr" reporter:datatype="link"/>
7296                 </fields>
7297                 <links>
7298                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7299                 </links>
7300         </class>
7301         <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">
7302                 <fields oils_persist:primary="code" oils_persist:sequence="">
7303                         <field reporter:label="LitF Code" name="code" reporter:datatype="text"/>
7304                         <field reporter:label="LitF Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
7305                         <field reporter:label="LitF Name" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
7306                 </fields>
7307                 <links/>
7308         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7309             <actions>
7310                 <create permission="CREATE_MARC_CODE" global_required="true"/>
7311                 <retrieve/>
7312                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
7313                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
7314             </actions>
7315         </permacrud>
7316         </class>
7317         <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">
7318                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
7319                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
7320                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7321                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
7322                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
7323                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7324                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
7325                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>
7326                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
7327                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
7328                 </fields>
7329                 <links>
7330                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
7331                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
7332                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7333                 </links>
7334         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7335             <actions>
7336                 <retrieve permission="VIEW_USER_TRANSACTIONS">
7337                     <context link="xact" jump="usr" field="home_ou"/>
7338                 </retrieve>
7339                         </actions>
7340                 </permacrud>
7341         </class>
7342         <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">
7343                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
7344                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
7345                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7346                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
7347                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
7348                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7349                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
7350                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>
7351                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
7352                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
7353                 </fields>
7354                 <links>
7355                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
7356                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
7357                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7358                 </links>
7359         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7360             <actions>
7361                 <retrieve permission="VIEW_USER_TRANSACTIONS">
7362                     <context link="xact" jump="usr" field="home_ou"/>
7363                 </retrieve>
7364                         </actions>
7365                 </permacrud>
7366         </class>
7367         <class id="aoc" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circulation" oils_persist:tablename="action.open_circulation" reporter:label="Open Circulation">
7368                 <fields oils_persist:primary="id" oils_persist:sequence="">
7369                         <field name="checkin_lib" reporter:datatype="link"/>
7370                         <field name="checkin_staff" reporter:datatype="link"/>
7371                         <field name="checkin_time" reporter:datatype="timestamp"/>
7372                         <field name="circ_lib"  reporter:datatype="org_unit"/>
7373                         <field name="circ_staff" reporter:datatype="link"/>
7374                         <field name="desk_renewal" reporter:datatype="bool"/>
7375                         <field name="due_date" reporter:datatype="timestamp"/>
7376                         <field name="duration" reporter:datatype="interval"/>
7377                         <field name="duration_rule" reporter:datatype="link"/>
7378                         <field name="fine_interval" reporter:datatype="interval"/>
7379                         <field name="id" reporter:datatype="id" />
7380                         <field name="max_fine" reporter:datatype="money" />
7381                         <field name="max_fine_rule" reporter:datatype="link"/>
7382                         <field name="opac_renewal" reporter:datatype="bool"/>
7383                         <field name="phone_renewal" reporter:datatype="bool"/>
7384                         <field name="recurring_fine" reporter:datatype="money" />
7385                         <field name="recurring_fine_rule" reporter:datatype="link"/>
7386                         <field name="renewal_remaining" reporter:datatype="int" />
7387             <field name="grace_period" reporter:datatype="interval" />
7388                         <field name="stop_fines" reporter:datatype="text"/>
7389                         <field name="stop_fines_time" reporter:datatype="timestamp"/>
7390                         <field name="target_copy" reporter:datatype="link"/>
7391                         <field name="usr" reporter:datatype="link"/>
7392                         <field name="xact_finish" reporter:datatype="timestamp" />
7393                         <field name="xact_start" reporter:datatype="timestamp" />
7394                         <field name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
7395                         <field name="auto_renewal" reporter:datatype="bool"/>
7396                         <field name="auto_renewal_remaining" reporter:datatype="int" />
7397                 </fields>
7398                 <links>
7399                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
7400                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
7401                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
7402                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
7403                 </links>
7404         </class>
7405         <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">
7406                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.subject_field_entry_id_seq">
7407                         <field name="field" reporter:datatype="link"/>
7408                         <field name="id" reporter:datatype="id" />
7409                         <field name="source" reporter:datatype="link"/>
7410                         <field name="value" reporter:datatype="text"/>
7411                 </fields>
7412                 <links>
7413                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
7414                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
7415                 </links>
7416         </class>
7417         <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">
7418                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_recurring_fine_id_seq">
7419                         <field name="high" reporter:datatype="money" />
7420                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
7421                         <field name="low" reporter:datatype="money" />
7422                         <field name="name" reporter:datatype="text"/>
7423                         <field name="normal" reporter:datatype="money" />
7424                         <field name="recurrence_interval" reporter:datatype="interval"/>
7425             <field name="grace_period" reporter:datatype="interval" />
7426                 </fields>
7427                 <links/>
7428         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7429             <actions>
7430                 <create permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
7431                 <retrieve/>
7432                 <update permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
7433                 <delete permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
7434             </actions>
7435         </permacrud>
7436         </class>
7437         <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">
7438                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
7439                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
7440                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7441                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
7442                         <field reporter:label="Workstation link" name="cash_drawer" reporter:datatype="link"/>
7443                         <field reporter:label="Check Number" name="check_number" reporter:datatype="int" />
7444                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
7445                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7446                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
7447                         <field reporter:label="Transaction link" name="xact" reporter:datatype="link"/>
7448                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
7449                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
7450                 </fields>
7451                 <links>
7452                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
7453                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
7454                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
7455                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7456                 </links>
7457         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7458             <actions>
7459                 <retrieve permission="VIEW_USER_TRANSACTIONS">
7460                     <context link="xact" jump="usr" field="home_ou"/>
7461                 </retrieve>
7462                         </actions>
7463                 </permacrud>
7464         </class>
7465         <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">
7466                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_id_seq">
7467                         <field reporter:label="Age Hold Protection" name="age_protect" reporter:datatype="link"/>
7468                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
7469                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
7470                         <field reporter:label="Call Number/Volume" name="call_number" reporter:datatype="link"/>
7471                         <field reporter:label="Circulation Type (MARC)" name="circ_as_type" reporter:datatype="link"/>
7472                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
7473                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
7474                         <field reporter:label="Can Circulate" name="circulate" reporter:datatype="bool"/>
7475                         <field reporter:label="Copy Number on Volume" name="copy_number" reporter:datatype="text"/>
7476                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
7477                         <field reporter:label="Active Date/Time" name="active_date" reporter:datatype="timestamp"/>
7478                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
7479                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
7480                         <field reporter:label="Dummy ISBN" name="dummy_isbn" reporter:datatype="text"/>
7481                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
7482                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money" />
7483                         <field reporter:label="Precat Dummy Author" name="dummy_author" reporter:datatype="text"/>
7484                         <field reporter:label="Precat Dummy Title" name="dummy_title" reporter:datatype="text"/>
7485                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
7486                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
7487                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
7488                         <field reporter:label="Is Holdable" name="holdable" reporter:datatype="bool" />
7489                         <field reporter:label="Copy ID" name="id" reporter:selector="barcode" reporter:datatype="id"/>
7490                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
7491                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link"/>
7492                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool" />
7493                         <field reporter:label="Price" name="price" reporter:datatype="money" />
7494                         <field reporter:label="Is Reference" name="ref" reporter:datatype="bool"/>
7495                         <field reporter:label="Copy Status" name="status" reporter:datatype="link"/>
7496                         <field reporter:label="Copy Status Changed Time" name="status_changed_time" reporter:datatype="timestamp"/>
7497                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool"/>
7498                         <field reporter:label="Floating Group" name="floating" reporter:datatype="link"/>
7499                         <field reporter:label="Cost" name="cost" reporter:datatype="money"/>
7500                         <field reporter:label="Copy Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
7501                         <field reporter:label="Stat-Cat entry maps" name="stat_cat_entry_copy_maps" oils_persist:virtual="true" reporter:datatype="link"/>
7502                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
7503                         <field reporter:label="Aged (patronless) Circulations" name="aged_circulations" oils_persist:virtual="true" reporter:datatype="link"/>
7504                         <field reporter:label="Combined Aged and Active Circulations" name="all_circulations" oils_persist:virtual="true" reporter:datatype="link"/>
7505                         <field reporter:label="Total Circulations" name="total_circ_count" oils_persist:virtual="true" reporter:datatype="link"/>
7506                         <field reporter:label="Last Circulation Date" name="last_circ" oils_persist:virtual="true" reporter:datatype="link"/>
7507                         <field reporter:label="Holds" name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
7508                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
7509                         <field reporter:label="Monograph Parts" name="parts" oils_persist:virtual="true" reporter:datatype="link"/>
7510                         <field reporter:label="Peer Record Maps" name="peer_record_maps" oils_persist:virtual="true" reporter:datatype="link"/>
7511                         <field reporter:label="Peer Records" name="peer_records" oils_persist:virtual="true" reporter:datatype="link"/>
7512                         <field reporter:label="Last Captured Hold" name="last_captured_hold" oils_persist:virtual="true" reporter:datatype="link"/>
7513                         <field reporter:label="Latest Inventory" name="latest_inventory" oils_persist:virtual="true" reporter:datatype="link"/>
7514                         <field reporter:label="Has Holds" name="holds_count" oils_persist:virtual="true" reporter:datatype="link"/>
7515                         <field reporter:label="Copy Tags" name="tags" oils_persist:virtual="true" reporter:datatype="link"/>
7516                         <field reporter:label="Copy Alerts" name="copy_alerts" oils_persist:virtual="true" reporter:datatype="link"/>
7517                 </fields>
7518                 <links>
7519                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
7520                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
7521                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
7522                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7523                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7524                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
7525                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
7526                         <link field="holds" reltype="has_many" key="target_copy" map="hold" class="ahcm"/>
7527                         <link field="stat_cat_entry_copy_maps" reltype="has_many" key="owning_copy" map="" class="ascecm"/>
7528                         <link field="notes" reltype="has_many" key="owning_copy" map="" class="acpn"/>
7529                         <link field="stat_cat_entries" reltype="has_many" key="owning_copy" map="stat_cat_entry" class="ascecm"/>
7530                         <link field="circulations" reltype="has_many" key="target_copy" map="" class="circ"/>
7531                         <link field="aged_circulations" reltype="has_many" key="target_copy" map="" class="acirc"/>
7532                         <link field="all_circulations" reltype="has_many" key="target_copy" map="" class="combcirc"/>
7533                         <link field="total_circ_count" reltype="might_have" key="id" map="" class="erfcc"/>
7534                         <link field="last_circ" reltype="might_have" key="id" map="" class="rlc"/>
7535                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
7536                         <link field="parts" reltype="has_many" key="target_copy" map="part" class="acpm"/>
7537                         <link field="peer_record_maps" reltype="has_many" key="target_copy" map="" class="bpbcm"/>
7538                         <link field="peer_records" reltype="has_many" key="target_copy" map="peer_record" class="bpbcm"/>
7539                         <link field="last_captured_hold" reltype="has_a" key="current_copy" map="" class="alhr"/>
7540                         <link field="latest_inventory" reltype="might_have" key="copy" map="" class="alci"/>
7541                         <link field="floating" reltype="has_a" key="id" map="" class="cfg"/>
7542                         <link field="holds_count" reltype="might_have" key="id" map="" class="hasholdscount"/>
7543                         <link field="tags" reltype="has_many" key="copy" map="" class="acptcm"/>
7544                         <link field="copy_alerts" reltype="has_many" key="copy" map="" class="aca"/>
7545                         <link field="circ_as_type" reltype="has_a" key="code" map="" class="citm"/>
7546                 </links>
7547         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7548             <actions>
7549                 <create permission="CREATE_COPY">
7550                     <context link="call_number" field="owning_lib"/>
7551                 </create>
7552                 <retrieve/>
7553                 <update permission="UPDATE_COPY">
7554                     <context link="call_number" field="owning_lib"/>
7555                 </update>
7556                 <delete permission="DELETE_COPY">
7557                     <context link="call_number" field="owning_lib"/>
7558                 </delete>
7559             </actions>
7560         </permacrud>
7561         </class>
7562
7563         <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">
7564                 <fields oils_persist:primary="id" oils_persist:sequence="asset.latest_inventory_id_seq">
7565             <field reporter:label="Latest Inventory ID" name="id" reporter:datatype="id"/>
7566                         <field reporter:label="Latest Inventory Date" name="inventory_date" reporter:datatype="timestamp"/>
7567                         <field reporter:label="Latest Inventory Workstation" name="inventory_workstation" reporter:datatype="link"/>
7568                         <field reporter:label="Copy" name="copy" reporter:datatype="link"/>
7569                 </fields>
7570                 <links>
7571                         <link field="inventory_workstation" reltype="has_a" key="id" map="" class="aws"/>
7572                         <link field="copy" reltype="has_a" key="id" map="" class="acp"/>
7573                 </links>
7574         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7575             <actions>
7576                                 <create/>
7577                                 <retrieve/>
7578                                 <update/>
7579                                 <delete/>
7580             </actions>
7581         </permacrud>
7582         </class>
7583
7584         <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">
7585                 <fields oils_persist:primary="id" oils_persist:sequence="config.copy_alert_type_id_seq">
7586                         <field reporter:label="Id" name="id" reporter:selector="name" reporter:datatype="id"/>
7587                         <field reporter:label="Scope Org Unit" name="scope_org"  reporter:datatype="org_unit"/>
7588                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
7589                         <field reporter:label="Name" name="name" reporter:datatype="text" />
7590                         <field reporter:label="State" name="state" reporter:datatype="text"/>
7591                         <field reporter:label="Event" name="event" reporter:datatype="text" />
7592                         <field reporter:label="During Renewal" name="in_renew" reporter:datatype="bool" />
7593                         <field reporter:label="Allow At Copy Circ Lib" name="at_circ" reporter:datatype="bool"/>
7594                         <field reporter:label="Allow At Copy Owning Lib" name="at_owning" reporter:datatype="bool"/>
7595                         <field reporter:label="Invert allowed locations" name="invert_location" reporter:datatype="bool"/>
7596                         <field reporter:label="Next Statuses" name="next_status" reporter:datatype="text"/>
7597                 </fields>
7598                 <links>
7599                         <link field="scope_org" reltype="has_a" key="id" map="" class="aou"/>
7600                 </links>
7601         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7602             <actions>
7603                 <create permission="ADMIN_COPY_ALERT_TYPE CREATE_COPY_ALERT_TYPE" context_field="scope_org"/>
7604                 <retrieve/>
7605                 <update permission="ADMIN_COPY_ALERT_TYPE UPDATE_COPY_ALERT_TYPE" context_field="scope_org"/>
7606                 <delete permission="ADMIN_COPY_ALERT_TYPE DELETE_COPY_ALERT_TYPE" context_field="scope_org"/>
7607             </actions>
7608         </permacrud>
7609         </class>
7610
7611         <class id="acas" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::copy_alert_suppress" oils_persist:tablename="actor.copy_alert_suppress" reporter:label="Copy Alert Suppression">
7612                 <fields oils_persist:primary="id" oils_persist:sequence="actor.copy_alert_suppress_id_seq">
7613                         <field reporter:label="Id" name="id" reporter:datatype="id"/>
7614                         <field reporter:label="Org Unit" name="org"  reporter:datatype="org_unit"/>
7615                         <field reporter:label="Alert Type" name="alert_type" reporter:datatype="link" />
7616                 </fields>
7617                 <links>
7618                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
7619                         <link field="alert_type" reltype="has_a" key="id" map="" class="ccat"/>
7620                 </links>
7621         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7622             <actions>
7623                 <create permission="ADMIN_COPY_ALERT_SUPPRESS CREATE_COPY_ALERT_SUPPRESS" context_field="org"/>
7624                 <retrieve/>
7625                 <update permission="ADMIN_COPY_ALERT_SUPPRESS UPDATE_COPY_ALERT_SUPPRESS" context_field="org"/>
7626                 <delete permission="ADMIN_COPY_ALERT_SUPPRESS DELETE_COPY_ALERT_SUPPRESS" context_field="org"/>
7627             </actions>
7628         </permacrud>
7629         </class>
7630
7631         <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">
7632                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_alert_id_seq">
7633                         <field reporter:label="Id" name="id" reporter:datatype="id"/>
7634                         <field reporter:label="Alert Type" name="alert_type" reporter:datatype="link" />
7635                         <field reporter:label="Copy" name="copy"  reporter:datatype="link"/>
7636                         <field reporter:label="Temporary" name="temp" reporter:datatype="bool" />
7637                         <field reporter:label="Create Date/Time" name="create_time" reporter:datatype="timestamp" />
7638                         <field reporter:label="Creator" name="create_staff" reporter:datatype="link"/>
7639                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7640                         <field reporter:label="Acknowledge Date/Time" name="ack_time" reporter:datatype="timestamp" />
7641                         <field reporter:label="Acknowledger" name="ack_staff" reporter:datatype="link"/>
7642                 </fields>
7643                 <links>
7644                         <link field="alert_type" reltype="has_a" key="id" map="" class="ccat"/>
7645                         <link field="copy" reltype="has_a" key="id" map="" class="acp"/>
7646                         <link field="create_staff" reltype="has_a" key="id" map="" class="au"/>
7647                         <link field="ack_staff" reltype="has_a" key="id" map="" class="au"/>
7648                 </links>
7649         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7650             <actions>
7651                 <create permission="ADMIN_COPY_ALERT CREATE_COPY_ALERT">
7652                     <context link="copy" field="circ_lib"/>
7653                 </create>
7654                 <retrieve permission="ADMIN_COPY_ALERT VIEW_COPY_ALERT">
7655                     <context link="copy" field="circ_lib"/>
7656                                 </retrieve>
7657                 <update permission="ADMIN_COPY_ALERT UPDATE_COPY_ALERT">
7658                     <context link="copy" field="circ_lib"/>
7659                                 </update>
7660                 <delete permission="ADMIN_COPY_ALERT DELETE_COPY_ALERT">
7661                     <context link="copy" field="circ_lib"/>
7662                                 </delete>
7663             </actions>
7664         </permacrud>
7665         </class>
7666
7667         <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">
7668                 <fields oils_persist:primary="id">
7669                         <field reporter:label="Id" name="id" reporter:datatype="id"/>
7670                         <field reporter:label="Alert Type" name="alert_type" reporter:datatype="link" />
7671                         <field reporter:label="Copy" name="copy"  reporter:datatype="link"/>
7672                         <field reporter:label="Temporary" name="temp" reporter:datatype="bool" />
7673                         <field reporter:label="Create Date/Time" name="create_time" reporter:datatype="timestamp" />
7674                         <field reporter:label="Creator" name="create_staff" reporter:datatype="link"/>
7675                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7676                         <field reporter:label="Acknowledge Date/Time" name="ack_time" reporter:datatype="timestamp" />
7677                         <field reporter:label="Acknowledger" name="ack_staff" reporter:datatype="link"/>
7678                 </fields>
7679                 <links>
7680                         <link field="alert_type" reltype="has_a" key="id" map="" class="ccat"/>
7681                         <link field="copy" reltype="has_a" key="id" map="" class="acp"/>
7682                         <link field="create_staff" reltype="has_a" key="id" map="" class="au"/>
7683                         <link field="ack_staff" reltype="has_a" key="id" map="" class="au"/>
7684                 </links>
7685         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7686             <actions>
7687                 <create permission="ADMIN_COPY_ALERT CREATE_COPY_ALERT">
7688                     <context link="copy" field="circ_lib"/>
7689                 </create>
7690                 <retrieve permission="ADMIN_COPY_ALERT VIEW_COPY_ALERT">
7691                     <context link="copy" field="circ_lib"/>
7692                                 </retrieve>
7693                 <update permission="ADMIN_COPY_ALERT UPDATE_COPY_ALERT">
7694                     <context link="copy" field="circ_lib"/>
7695                                 </update>
7696                 <delete permission="ADMIN_COPY_ALERT DELETE_COPY_ALERT">
7697                     <context link="copy" field="circ_lib"/>
7698                                 </delete>
7699             </actions>
7700         </permacrud>
7701         </class>
7702
7703         <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">
7704                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_template_id_seq">
7705                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name" />
7706                         <field reporter:label="Owning Lib" name="owning_lib" reporter:datatype="org_unit"/>
7707                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
7708                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
7709                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
7710                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
7711                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
7712                         <field reporter:label="Circ Lib" name="circ_lib" reporter:datatype="org_unit"/>
7713                         <field reporter:label="Status" name="status" reporter:datatype="link"/>
7714                         <field reporter:label="Location" name="location" reporter:datatype="link"/>
7715                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
7716                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
7717                         <field reporter:label="Age Protect" name="age_protect" reporter:datatype="link"/>
7718                         <field reporter:label="Circulate?" name="circulate" reporter:datatype="bool"/>
7719                         <field reporter:label="Deposit?" name="deposit" reporter:datatype="bool"/>
7720                         <field reporter:label="Reference?" name="ref" reporter:datatype="bool"/>
7721                         <field reporter:label="Holdable?" name="holdable" reporter:datatype="bool"/>
7722                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
7723                         <field reporter:label="Price" name="price" reporter:datatype="money"/>
7724                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="link"/>
7725                         <field reporter:label="Circ As Type" name="circ_as_type" reporter:datatype="link"/>
7726                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
7727                         <field reporter:label="OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
7728                         <field reporter:label="Floating Group" name="floating" reporter:datatype="link"/>
7729                         <field reporter:label="Mint Condition?" name="mint_condition" reporter:datatype="bool"/>
7730                 </fields>
7731                 <links>
7732                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
7733                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7734                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7735                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
7736                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
7737                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
7738                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
7739                         <link field="floating" reltype="has_a" key="id" map="" class="cfg"/>
7740                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
7741                         <link field="circ_as_type" reltype="has_a" key="code" map="" class="citm"/>
7742                 </links>
7743                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7744                         <actions>
7745                                 <create permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
7746                                 <retrieve />
7747                                 <update permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
7748                                 <delete permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
7749                         </actions>
7750                 </permacrud>
7751         </class>
7752
7753         <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">
7754                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_age_hold_protect_id_seq">
7755                         <field reporter:label="Item Age" name="age" reporter:datatype="interval"/>
7756                         <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
7757                         <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>
7758                         <field reporter:label="Allowed Proximity" name="prox" reporter:datatype="int" />
7759                 </fields>
7760                 <links/>
7761         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7762             <actions>
7763                 <create permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
7764                 <retrieve/>
7765                 <update permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
7766                 <delete permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
7767             </actions>
7768         </permacrud>
7769         </class>
7770         <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">
7771                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_max_fine_id_seq">
7772                         <field reporter:label="Max Fine Amount" name="amount" reporter:datatype="money" />
7773                         <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
7774                         <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>
7775                         <field reporter:label="Is Percent" name="is_percent" reporter:datatype="bool"/>
7776                 </fields>
7777                 <links/>
7778         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7779             <actions>
7780                 <create permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
7781                 <retrieve/>
7782                 <update permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
7783                 <delete permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
7784             </actions>
7785         </permacrud>
7786         </class>
7787         <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">
7788                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_tree_id_seq">
7789                         <field reporter:label="Child Groups" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
7790                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
7791                         <field reporter:label="Group ID" name="id" reporter:selector="name" reporter:datatype="id"/>
7792                         <field reporter:label="Group Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
7793                         <field reporter:label="Parent Group" name="parent" reporter:datatype="link"/>
7794                         <field reporter:label="User Expiration Interval" name="perm_interval" reporter:datatype="interval"/>
7795                         <field reporter:label="Required Permission" name="application_perm" reporter:datatype="text"/>
7796                         <field reporter:label="Is User Group" name="usergroup" reporter:datatype="bool"/>
7797                         <field reporter:label="Hold Priority" name="hold_priority" reporter:datatype="int"/>
7798                 </fields>
7799                 <links>
7800                         <link field="parent" reltype="has_a" key="id" map="" class="pgt"/>
7801                         <link field="children" reltype="has_many" key="parent" map="" class="pgt"/>
7802                 </links>
7803         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7804             <actions>
7805                 <create permission="CREATE_PERM" global_required="true"/>
7806                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
7807                 <update permission="UPDATE_PERM" global_required="true"/>
7808                 <delete permission="DELETE_PERM" global_required="true"/>
7809             </actions>
7810         </permacrud>
7811         </class>
7812         <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">
7813                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_tree_display_entry_id_seq">
7814                         <field reporter:label="Entry ID" name="id" reporter:selector="name" reporter:datatype="id"/>
7815                         <field reporter:label="Group ID" name="grp" reporter:datatype="link" oils_persist:i18n="true"/>
7816                         <field reporter:label="Parent Group" name="parent" reporter:datatype="link"/>
7817                         <field reporter:label="Org Unit" name="org" reporter:datatype="link"/>
7818                         <field reporter:label="Position" name="position" reporter:datatype="int"/>
7819                         <field reporter:label="Child Entries" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
7820                 </fields>
7821                 <links>
7822                         <link field="parent" reltype="has_a" key="id" map="" class="pgtde"/>
7823                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
7824                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
7825                         <link field="children" reltype="has_many" key="parent" map="" class="pgtde"/>
7826                 </links>
7827                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7828                         <actions>
7829                                 <create permission="MANAGE_CUSTOM_PERM_GRP_TREE" global_required="true"/>
7830                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
7831                                 <update permission="MANAGE_CUSTOM_PERM_GRP_TREE" global_required="true"/>
7832                                 <delete permission="MANAGE_CUSTOM_PERM_GRP_TREE" global_required="true"/>
7833                         </actions>
7834                 </permacrud>
7835         </class>
7836         <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">
7837                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_answer_id_seq">
7838                         <field reporter:label="Responses using this Answer" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
7839                         <field reporter:label="Answer Text" name="answer" reporter:datatype="text"/>
7840                         <field reporter:label="Answer ID" name="id" reporter:datatype="id" />
7841                         <field reporter:label="Question" name="question" reporter:datatype="link"/>
7842                 </fields>
7843                 <links>
7844                         <link field="question" reltype="has_a" key="id" map="" class="asvq"/>
7845                         <link field="responses" reltype="has_many" key="answer" map="" class="asvr"/>
7846                 </links>
7847         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7848             <actions>
7849                 <create permission="ADMIN_SURVEY">
7850                     <context link="question" jump="survey" field="owner"/>
7851                 </create>
7852                 <retrieve/>
7853                 <update permission="ADMIN_SURVEY">
7854                     <context link="question" jump="survey" field="owner"/>
7855                 </update>
7856                 <delete permission="ADMIN_SURVEY">
7857                     <context link="question" jump="survey" field="owner"/>
7858                 </delete>
7859             </actions>
7860         </permacrud>
7861         </class>
7862         <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">
7863                 <fields oils_persist:primary="id" oils_persist:sequence="action.non_cataloged_circulation_id_seq">
7864                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
7865                         <field reporter:label="Circulation Date/Time" name="circ_time" reporter:datatype="timestamp"/>
7866                         <field reporter:label="Non-cat Circulation ID" name="id" reporter:datatype="id" />
7867                         <field reporter:label="Non-cat Item Type" name="item_type" reporter:datatype="link"/>
7868                         <field reporter:label="Patron" name="patron" reporter:datatype="link"/>
7869                         <field reporter:label="Circulating Staff" name="staff" reporter:datatype="link"/>
7870                         <field reporter:label="Virtual Due Date/Time" name="duedate" reporter:datatype="timestamp" oils_persist:virtual="true"/>
7871                 </fields>
7872                 <links>
7873                         <link field="item_type" reltype="has_a" key="id" map="" class="cnct"/>
7874                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
7875                         <link field="patron" reltype="has_a" key="id" map="" class="au"/>
7876                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
7877                 </links>
7878                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7879                         <actions>
7880                                 <retrieve permission="VIEW_CIRCULATIONS" context_field="circ_lib" />
7881                         </actions>
7882                 </permacrud>
7883         </class>
7884         <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">
7885                 <fields oils_persist:primary="usr" oils_persist:sequence="">
7886                         <field name="balance_owed" reporter:datatype="money" />
7887                         <field name="total_owed" reporter:datatype="money" />
7888                         <field name="total_paid" reporter:datatype="money" />
7889                         <field name="usr" reporter:datatype="link"/>
7890                 </fields>
7891                 <links>
7892                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7893                 </links>
7894         </class>
7895         <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">
7896                 <fields oils_persist:primary="id" oils_persist:sequence="action.unfulfilled_hold_list_id_seq">
7897                         <field reporter:label="Non-fulfilling Library" name="circ_lib"  reporter:datatype="org_unit"/>
7898                         <field reporter:label="Non-fulfilling Copy" name="current_copy" reporter:datatype="link"/>
7899                         <field reporter:label="Retargeting Date/Time" name="fail_time" reporter:datatype="timestamp"/>
7900                         <field reporter:label="Hold" name="hold" reporter:datatype="link"/>
7901                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
7902                 </fields>
7903                 <links>
7904                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
7905                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
7906                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
7907                 </links>
7908         </class>
7909         <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">
7910                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.identifier_field_entry_id_seq">
7911                         <field name="field" reporter:datatype="link"/>
7912                         <field name="id" reporter:datatype="id" />
7913                         <field name="source" reporter:datatype="link"/>
7914                         <field name="value" reporter:datatype="text"/>
7915                 </fields>
7916                 <links>
7917                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
7918                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
7919                 </links>
7920         </class>
7921         <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">
7922                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.title_field_entry_id_seq">
7923                         <field name="field" reporter:datatype="link"/>
7924                         <field name="id" reporter:datatype="id" />
7925                         <field name="source" reporter:datatype="link"/>
7926                         <field name="value" reporter:datatype="text"/>
7927                 </fields>
7928                 <links>
7929                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
7930                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
7931                 </links>
7932         </class>
7933         <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">
7934                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_usr_map_id_seq">
7935                         <field reporter:label="Entry ID" name="id" reporter:datatype="id" />
7936                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
7937                         <field reporter:label="Entry Text" name="stat_cat_entry" reporter:datatype="text"/>
7938                         <field reporter:label="User" name="target_usr" reporter:datatype="link"/>
7939                 </fields>
7940                 <links>
7941                         <link field="target_usr" reltype="has_a" key="id" map="" class="au"/>
7942                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
7943                 </links>
7944         </class>
7945         <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">
7946                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_perm_map_id_seq">
7947                         <field name="depth" reporter:datatype="int" />
7948                         <field name="grantable" reporter:datatype="bool"/>
7949                         <field name="grp" reporter:datatype="link"/>
7950                         <field name="id" reporter:datatype="id" />
7951                         <field name="perm" reporter:datatype="link"/>
7952                 </fields>
7953                 <links>
7954                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
7955                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
7956                 </links>
7957         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7958             <actions>
7959                 <create permission="ASSIGN_GROUP_PERM" global_required="true"/>
7960                 <retrieve permission="ASSIGN_GROUP_PERM UPDATE_GROUP_PERM REMOVE_GROUP_PERM" global_required="true"/>
7961                 <update permission="UPDATE_GROUP_PERM" global_required="true"/>
7962                 <delete permission="REMOVE_GROUP_PERM" global_required="true"/>
7963             </actions>
7964         </permacrud>
7965         </class>
7966         <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">
7967                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_id_seq">
7968                         <field name="items" oils_persist:virtual="true" />
7969                         <field name="btype" reporter:datatype="text"/>
7970                         <field name="id" reporter:datatype="id" />
7971                         <field name="name" reporter:datatype="text"/>
7972                         <field name="description" reporter:datatype="text"/>
7973                         <field name="owner" reporter:datatype="link"/>
7974                         <field name="pub" reporter:datatype="bool"/>
7975                         <field name="create_time" reporter:datatype="timestamp" />
7976                         <field name="owning_lib" reporter:datatype="org_unit" />
7977                 </fields>
7978                 <links>
7979                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
7980                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7981                         <link field="items" reltype="has_many" key="bucket" map="" class="ccbi"/>
7982                 </links>
7983                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7984                         <actions>
7985                                 <create permission="CREATE_COPY_BUCKET ADMIN_COPY_BUCKET" context="owning_lib" owning_user="owner"/>
7986                                 <retrieve permission="CREATE_COPY_BUCKET ADMIN_COPY_BUCKET" context="owning_lib" owning_user="owner"/>
7987                                 <update permission="CREATE_COPY_BUCKET ADMIN_COPY_BUCKET" context="owning_lib" owning_user="owner"/>
7988                                 <delete permission="CREATE_COPY_BUCKET ADMIN_COPY_BUCKET" context="owning_lib" owning_user="owner"/>
7989                         </actions>
7990                 </permacrud>
7991         </class>
7992         <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">
7993                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_note_id_seq">
7994                         <field name="id" reporter:datatype="id" />
7995                         <field name="bucket" reporter:datatype="link"/>
7996                         <field name="note" reporter:datatype="text" />
7997                 </fields>
7998                 <links>
7999                         <link field="bucket" reltype="has_a" key="id" map="" class="ccb"/>
8000                 </links>
8001         </class>
8002         <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">
8003                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_work_ou_map_id_seq">
8004                         <field reporter:label="User/Working Location Map ID" name="id" reporter:datatype="int" />
8005                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
8006                         <field reporter:label="Working Location" name="work_ou" reporter:datatype="link"/>
8007                 </fields>
8008                 <links>
8009                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
8010                         <link field="work_ou" reltype="has_a" key="id" map="" class="aou"/>
8011                 </links>
8012         </class>
8013         <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">
8014                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_perm_map_id_seq">
8015                         <field name="depth" reporter:datatype="int"/>
8016                         <field name="grantable" reporter:datatype="bool"/>
8017                         <field name="id" reporter:datatype="id" />
8018                         <field name="perm" reporter:datatype="link"/>
8019                         <field name="usr" reporter:datatype="link"/>
8020                 </fields>
8021                 <links>
8022                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
8023                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
8024                 </links>
8025         </class>
8026         <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">
8027                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_object_perm_map_id_seq">
8028                         <field name="object_id" reporter:datatype="text"/>
8029                         <field name="grantable" reporter:datatype="bool"/>
8030                         <field name="id" reporter:datatype="id" />
8031                         <field name="perm" reporter:datatype="link"/>
8032                         <field name="usr" reporter:datatype="link"/>
8033                         <field name="object_type" reporter:datatype="text"/>
8034                 </fields>
8035                 <links>
8036                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
8037                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
8038                 </links>
8039         </class>
8040         <class id="mp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::payment" oils_persist:tablename="money.payment_view" reporter:core="true" reporter:label="Payments: All">
8041                 <fields oils_persist:primary="id" oils_persist:sequence="">
8042                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
8043                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
8044                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8045                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
8046                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
8047                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
8048                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
8049                         <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8050                         <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8051                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8052                         <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8053                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8054                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8055                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8056                         <field reporter:label="Account Adjustment Detail" name="account_adjustment" oils_persist:virtual="true" reporter:datatype="link"/>
8057                 </fields>
8058                 <links>
8059                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
8060                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
8061                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
8062                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
8063                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
8064                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
8065                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
8066                         <link field="account_adjustment" reltype="might_have" key="id" map="" class="maa"/>
8067                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
8068                 </links>
8069         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8070             <actions>
8071                 <retrieve permission="VIEW_USER_TRANSACTIONS">
8072                     <context link="xact" jump="usr" field="home_ou"/>
8073                 </retrieve>
8074                         </actions>
8075                 </permacrud>
8076         </class>
8077         <class id="map" controller="open-ils.cstore open-ils.pcrud" 
8078                 oils_obj:fieldmapper="money::aged_payment" 
8079                 oils_persist:tablename="money.aged_payment" 
8080                 reporter:label="Payments: Aged">
8081                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
8082                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
8083                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
8084                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8085                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
8086                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
8087                         <field reporter:label="Aged Circulation" name="xact" reporter:datatype="link"/>
8088                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
8089                 </fields>
8090                 <links>
8091                         <link field="xact" reltype="has_a" key="id" map="" class="acirc"/>
8092                 </links>
8093                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8094                         <actions>
8095                                 <retrieve permission="VIEW_USER_TRANSACTIONS">
8096                                         <context link="xact" field="usr_home_ou"/>
8097                                 </retrieve>
8098                         </actions>
8099                 </permacrud>
8100         </class>
8101         <class id="mallp" controller="open-ils.cstore" 
8102                 oils_obj:fieldmapper="money::all_payments" 
8103                 oils_persist:tablename="money.all_payments" 
8104                 oils_persist="readonly" reporter:label="All Payments">
8105                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
8106                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
8107                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
8108                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8109                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
8110                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
8111                         <field reporter:label="Aged Circulation" name="xact" reporter:datatype="link"/>
8112                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
8113                 </fields>
8114                 <links>
8115                         <!-- 
8116                                 'xact' may link to a money.billabl_xact or to a money.aged_circulation.
8117                          -->
8118                 </links>
8119         </class>
8120
8121         <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">
8122                 <fields oils_persist:primary="id" oils_persist:sequence="">
8123                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
8124                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
8125                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8126                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
8127                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
8128                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
8129                         <field reporter:label="Accepting User" name="accepting_usr" reporter:datatype="link"/>
8130                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
8131                         <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8132                         <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8133                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8134                         <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8135                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8136                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8137                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8138                         <field reporter:label="Account Adjustment Detail" name="account_adjustment" oils_persist:virtual="true" reporter:datatype="link"/>
8139                 </fields>
8140                 <links>
8141                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
8142                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
8143                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
8144                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
8145                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
8146                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
8147                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
8148                         <link field="account_adjustment" reltype="might_have" key="id" map="" class="maa"/>
8149                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
8150                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
8151                 </links>
8152                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8153                         <actions>
8154                                 <retrieve permission="VIEW_USER_TRANSACTIONS">
8155                                         <context link="xact" jump="usr" field="home_ou"/>
8156                                 </retrieve>
8157                         </actions>
8158                 </permacrud>
8159         </class>
8160         <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">
8161                 <fields oils_persist:primary="id" oils_persist:sequence="">
8162                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
8163                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
8164                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8165                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
8166                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
8167                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
8168                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
8169                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8170                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8171                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8172                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8173                         <field reporter:label="Account Adjustment Detail" name="account_adjustment" oils_persist:virtual="true" reporter:datatype="link"/>
8174                 </fields>
8175                 <links>
8176                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
8177                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
8178                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
8179                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
8180                         <link field="account_adjustment" reltype="might_have" key="id" map="" class="maa"/>
8181                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
8182                 </links>
8183         </class>
8184         <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">
8185                 <fields oils_persist:primary="id" oils_persist:sequence="">
8186                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
8187                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
8188                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8189                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
8190                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
8191                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
8192                         <field reporter:label="Accepting User" name="accepting_usr" reporter:datatype="link"/>
8193                         <field reporter:label="Cash Drawer" name="cash_drawer" reporter:datatype="link"/>
8194                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
8195                         <field reporter:label="Cash Payment" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8196                         <field reporter:label="Credit Card Payment" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8197                         <field reporter:label="Check Payment" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8198                 </fields>
8199                 <links>
8200                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
8201                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
8202                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
8203                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
8204                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
8205                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
8206                 </links>
8207         </class>
8208         <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">
8209                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_id_seq">
8210                         <field name="bucket" reporter:datatype="link"/>
8211                         <field name="id" reporter:datatype="id" />
8212                         <field name="target_biblio_record_entry" reporter:datatype="link"/>
8213                         <field name="create_time" reporter:datatype="timestamp" />
8214                         <field name="pos" reporter:datatype="int" />
8215                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
8216                 </fields>
8217                 <links>
8218                         <link field="target_biblio_record_entry" reltype="has_a" key="id" map="" class="bre"/>
8219                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
8220             <link field="notes" reltype="has_many" map="" key="item" class="cbrebin"/>
8221                 </links>
8222                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8223                         <actions>
8224                                 <retrieve permission="ADMIN_COPY_BUCKET">
8225                     <context link="bucket" owning_lib="owning_lib"/>
8226                 </retrieve>
8227             </actions>
8228         </permacrud>
8229         </class>
8230         <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">
8231                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_note_id_seq">
8232                         <field name="id" reporter:datatype="id" />
8233                         <field name="item" reporter:datatype="link"/>
8234                         <field name="note" reporter:datatype="text" />
8235                 </fields>
8236                 <links>
8237                         <link field="item" reltype="has_a" key="id" map="" class="cbrebi"/>
8238                 </links>
8239         </class>
8240         <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">
8241                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_entry_id_seq">
8242                         <field reporter:label="Entry ID" name="id" reporter:datatype="int" />
8243                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
8244                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
8245                         <field reporter:label="Value" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
8246                 </fields>
8247                 <links>
8248                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
8249                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
8250                 </links>
8251                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8252                         <actions>
8253                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
8254                         </actions>
8255                 </permacrud>
8256         </class>
8257     <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">
8258         <fields oils_persist:primary="field">
8259             <field reporter:label="Field Identifier" name="field" reporter:datatype="text" reporter:selector="name"/>
8260             <field reporter:label="Field Name" name="name" reporter:datatype="text"/>
8261             <field reporter:label="Exclusive?" name="one_only" reporter:datatype="bool"/>
8262         </fields>
8263         <links/>
8264         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8265             <actions>
8266                 <create permission="CREATE_COPY_STAT_CAT" global_required="true"/>
8267                 <retrieve />
8268                 <update permission="UPDATE_COPY_STAT_CAT" global_required="true"/>
8269                 <delete permission="DELETE_COPY_STAT_CAT" global_required="true"/>
8270             </actions>
8271         </permacrud>
8272     </class>
8273         <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">
8274                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_cancel_cause_id_seq">
8275                         <field reporter:label="Cause ID" name="id" reporter:datatype="id" />
8276                         <field reporter:label="Cause Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
8277                 </fields>
8278                 <links/>
8279         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8280             <actions>
8281                 <create permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
8282                 <retrieve/>
8283                 <update permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
8284                 <delete permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
8285             </actions>
8286         </permacrud>
8287         </class>
8288
8289
8290         <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">
8291                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
8292                         <field reporter:label="Copy Status at Transit" name="copy_status" reporter:datatype="link"/>
8293                         <field reporter:label="Destination Library" name="dest" reporter:datatype="org_unit"/>
8294                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
8295                         <field reporter:label="Reservation requiring Transit" name="reservation" reporter:datatype="link"/>
8296                         <field reporter:label="Transit ID" name="id" reporter:datatype="id" />
8297                         <field reporter:label="Is Persistent?" name="persistant_transfer" reporter:datatype="bool"/>
8298                         <field reporter:label="Previous Stop" name="prev_hop" reporter:datatype="link"/>
8299                         <field reporter:label="Sending Library" name="source" reporter:datatype="org_unit"/>
8300                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
8301                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
8302                         <field reporter:label="Base Transit" name="transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
8303                         <field reporter:label="Prev Destination Library" name="prev_dest" reporter:datatype="org_unit"/>
8304                         <field reporter:label="Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
8305                 </fields>
8306                 <links>
8307                         <link field="transit_copy" reltype="might_have" key="id" map="" class="atc"/>
8308                         <link field="target_copy" reltype="has_a" key="id" map="" class="brsrc"/>
8309                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
8310                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
8311                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
8312                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
8313                         <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
8314                 </links>
8315         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8316             <actions>
8317                 <create permission="TRANSIT_COPY">
8318                     <context link="target_copy" field="owner"/>
8319                 </create>
8320                 <retrieve/>
8321                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
8322                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
8323             </actions>
8324         </permacrud>
8325         </class>
8326         <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">
8327                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
8328                         <field reporter:label="Copy Status at Transit" name="copy_status" reporter:datatype="link"/>
8329                         <field reporter:label="Destination Library" name="dest" reporter:datatype="org_unit"/>
8330                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
8331                         <field reporter:label="Hold requiring Transit" name="hold" reporter:datatype="link"/>
8332                         <field reporter:label="Transit ID" name="id" reporter:datatype="id" />
8333                         <field reporter:label="Is Persistent?" name="persistant_transfer" reporter:datatype="bool"/>
8334                         <field reporter:label="Previous Stop" name="prev_hop" reporter:datatype="link"/>
8335                         <field reporter:label="Sending Library" name="source" reporter:datatype="org_unit"/>
8336                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
8337                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
8338                         <field reporter:label="Base Transit" name="transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
8339                         <field reporter:label="Prev Destination Library" name="prev_dest" reporter:datatype="org_unit"/>
8340                         <field reporter:label="Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
8341                 </fields>
8342                 <links>
8343                         <link field="transit_copy" reltype="might_have" key="id" map="" class="atc"/>
8344                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
8345                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
8346                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
8347                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
8348                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
8349                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
8350                 </links>
8351         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8352             <actions>
8353                 <create permission="TRANSIT_COPY" context_field="owner">
8354                     <context link="target_copy" field="circ_lib"/>
8355                 </create>
8356                 <retrieve/>
8357                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
8358                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
8359             </actions>
8360         </permacrud>
8361         </class>
8362         <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">
8363                 <fields oils_persist:primary="id" oils_persist:sequence="money.billing_id_seq">
8364                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
8365                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
8366                         <field reporter:label="Billing Period Start" name="period_start" reporter:datatype="timestamp"/>
8367                         <field reporter:label="Billing Period End" name="period_end" reporter:datatype="timestamp"/>
8368                         <field reporter:label="Legacy Billing Timestamp" name="billing_ts" reporter:datatype="timestamp"/>
8369                         <field reporter:label="Legacy Billing Type" name="billing_type" reporter:datatype="text"/>
8370                         <field reporter:label="Billing ID" name="id" reporter:datatype="id" />
8371                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8372                         <field reporter:label="Void Timestamp" name="void_time" reporter:datatype="timestamp"/>
8373                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
8374                         <field reporter:label="Voiding Staff Member" name="voider" reporter:datatype="link"/>
8375                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
8376                         <field reporter:label="Type" name="btype" reporter:datatype="link"/>
8377                         <field reporter:label="Adjustments" name="adjustments" oils_persist:virtual="true" reporter:datatype="link"/>
8378                 </fields>
8379                 <links>
8380                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
8381                         <link field="voider" reltype="has_a" key="id" map="" class="au"/>
8382                         <link field="btype" reltype="has_a" key="id" map="" class="cbt"/>
8383                         <link field="adjustments" reltype="has_many" key="billing" map="" class="maa"/>
8384                 </links>
8385         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8386             <actions>
8387                 <retrieve permission="VIEW_USER_TRANSACTIONS">
8388                     <context link="xact" jump="usr" field="home_ou"/>
8389                 </retrieve>
8390                         </actions>
8391                 </permacrud>
8392         </class>
8393         <class id="mab" controller="open-ils.cstore open-ils.pcrud" 
8394                 oils_obj:fieldmapper="money::aged_billing" 
8395                 oils_persist:tablename="money.aged_billing" 
8396                 reporter:label="Aged Billing Line Item">
8397                 <fields oils_persist:primary="id" oils_persist:sequence="money.billing_id_seq">
8398                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
8399                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
8400                         <field reporter:label="Billing Period Start" name="period_start" reporter:datatype="timestamp"/>
8401                         <field reporter:label="Billing Period End" name="period_end" reporter:datatype="timestamp"/>
8402                         <field reporter:label="Legacy Billing Timestamp" name="billing_ts" reporter:datatype="timestamp"/>
8403                         <field reporter:label="Legacy Billing Type" name="billing_type" reporter:datatype="text"/>
8404                         <field reporter:label="Billing ID" name="id" reporter:datatype="id" />
8405                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8406                         <field reporter:label="Void Timestamp" name="void_time" reporter:datatype="timestamp"/>
8407                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
8408                         <field reporter:label="Voiding Staff Member" name="voider" reporter:datatype="link"/>
8409                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
8410                         <field reporter:label="Type" name="btype" reporter:datatype="link"/>
8411                 </fields>
8412                 <links>
8413                         <link field="xact" reltype="has_a" key="id" map="" class="acirc"/>
8414                         <link field="voider" reltype="has_a" key="id" map="" class="au"/>
8415                         <link field="btype" reltype="has_a" key="id" map="" class="cbt"/>
8416                 </links>
8417                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8418                         <actions>
8419                                 <retrieve permission="VIEW_USER_TRANSACTIONS">
8420                                         <context link="xact" field="usr_home_ou"/>
8421                                 </retrieve>
8422                         </actions>
8423                 </permacrud>
8424         </class>
8425         <class id="mallb" controller="open-ils.cstore" 
8426                 oils_obj:fieldmapper="money::all_billings" 
8427                 oils_persist:tablename="money.all_billings" 
8428                 oils_persist="readonly" reporter:label="All Billing Line Items">
8429                 <fields oils_persist:primary="id" oils_persist:sequence="">
8430                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
8431                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
8432                         <field reporter:label="Billing Period Start" name="period_start" reporter:datatype="timestamp"/>
8433                         <field reporter:label="Billing Period End" name="period_end" reporter:datatype="timestamp"/>
8434                         <field reporter:label="Legacy Billing Timestamp" name="billing_ts" reporter:datatype="timestamp"/>
8435                         <field reporter:label="Legacy Billing Type" name="billing_type" reporter:datatype="text"/>
8436                         <field reporter:label="Billing ID" name="id" reporter:datatype="id" />
8437                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8438                         <field reporter:label="Void Timestamp" name="void_time" reporter:datatype="timestamp"/>
8439                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
8440                         <field reporter:label="Voiding Staff Member" name="voider" reporter:datatype="link"/>
8441                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
8442                         <field reporter:label="Type" name="btype" reporter:datatype="link"/>
8443                 </fields>
8444                 <links>
8445                         <link field="voider" reltype="has_a" key="id" map="" class="au"/>
8446                         <link field="btype" reltype="has_a" key="id" map="" class="cbt"/>
8447                         <!-- 
8448                                 'xact' may link to a money.billabl_xact or to a money.aged_circulation.
8449                          -->
8450                 </links>
8451         </class>
8452         <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">
8453                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_grp_map_id_seq">
8454                         <field name="grp" />
8455                         <field name="id" reporter:datatype="id" />
8456                         <field name="usr" />
8457                 </fields>
8458                 <links>
8459                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
8460                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
8461                 </links>
8462         </class>
8463         <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">
8464                 <fields oils_persist:primary="id" oils_persist:sequence="config.i18n_core_id_seq">
8465                         <field name="id" reporter:datatype="id" />
8466                         <field name="fq_field" reporter:datatype="text"/>
8467                         <field name="identity_value" reporter:datatype="text"/>
8468                         <field name="translation" reporter:datatype="text"/>
8469                         <field name="string" reporter:datatype="text"/>
8470                 </fields>
8471                 <links>
8472                         <link field="translation" reltype="has_a" key="code" map="" class="i18n_l"/>
8473                 </links>
8474         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8475             <actions>
8476                 <create permission="CREATE_TRANSLATION" global_required="true"/>
8477                 <retrieve permission="CREATE_TRANSLATION UPDATE_TRANSLATION DELETE_TRANSLATION" global_required="true"/>
8478                 <update permission="UPDATE_TRANSLATION" global_required="true"/>
8479                 <delete permission="DELETE_TRANSLATION" global_required="true"/>
8480             </actions>
8481         </permacrud>
8482         </class>
8483         <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">
8484                 <fields oils_persist:primary="id" oils_persist:sequence="config.idl_field_doc_id_seq">
8485                         <field name="id" reporter:datatype="id" />
8486                         <field name="fm_class" reporter:datatype="text"/>
8487                         <field name="field" reporter:datatype="text"/>
8488                         <field name="owner" reporter:datatype="org_unit"/>
8489                         <field name="string" reporter:datatype="text" oils_persist:i18n="true"/>
8490                 </fields>
8491                 <links>
8492                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
8493                 </links>
8494         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8495             <actions>
8496                 <create   permission="ADMIN_FIELD_DOC" context_field="owner"/>
8497                 <retrieve/>
8498                 <update   permission="ADMIN_FIELD_DOC" context_field="owner"/>
8499                 <delete   permission="ADMIN_FIELD_DOC" context_field="owner"/>
8500             </actions>
8501         </permacrud>
8502         </class>
8503         <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">
8504                 <fields oils_persist:primary="code">
8505                         <field name="code" reporter:datatype="id" />
8506                         <field name="marc_code" reporter:datatype="text"/>
8507                         <field name="name" reporter:datatype="text" oils_persist:i18n="true"/>
8508                         <field name="description" reporter:datatype="text" oils_persist:i18n="true"/>
8509                         <field name="rtl" reporter:datatype="bool"/>
8510                 </fields>
8511                 <links/>
8512         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8513             <actions>
8514                 <create permission="CREATE_LOCALE" global_required="true"/>
8515                 <retrieve/>
8516                 <update permission="UPDATE_LOCALE" global_required="true"/>
8517                 <delete permission="DELETE_LOCALE" global_required="true"/>
8518             </actions>
8519         </permacrud>
8520         </class>
8521         <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">
8522                 <fields oils_persist:primary="id" oils_persist:sequence="config.billing_type_id_seq">
8523                         <field name="id" reporter:datatype="id" reporter:label="ID" reporter:selector="name" oils_obj:required="true"/>
8524                         <field name="name" reporter:datatype="text" reporter:label="Name" oils_persist:i18n="true" oils_obj:required="true"/>
8525                         <field name="owner" reporter:datatype="org_unit" reporter:label="Org Unit" oils_obj:required="true"/>
8526                         <field name="default_price" reporter:datatype="money" reporter:label="Default Price"/>
8527                 </fields>
8528                 <links>
8529                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
8530                 </links>
8531         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8532             <actions>
8533                 <create permission="CREATE_BILLING_TYPE" context_field="owner"/>
8534                 <retrieve permission="VIEW_BILLING_TYPE CREATE_BILLING_TYPE UPDATE_BILLING_TYPE DELETE_BILLING_TYPE" context_field="owner"/>
8535                 <update permission="UPDATE_BILLING_TYPE" context_field="owner"/>
8536                 <delete permission="DELETE_BILLING_TYPE" context_field="owner"/>
8537             </actions>
8538         </permacrud>
8539         </class>
8540
8541         <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">
8542                 <fields oils_persist:primary="id">
8543                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
8544                         <field reporter:label="Type Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
8545                 </fields>
8546                 <links/>
8547         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8548             <actions>
8549                 <create permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
8550                 <retrieve/>
8551                 <update permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
8552                 <delete permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
8553             </actions>
8554         </permacrud>
8555         </class>
8556
8557         <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">
8558                 <fields oils_persist:primary="id" oils_persist:sequence="acq.user_request_id_seq">
8559                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
8560                         <field reporter:label="User" name="usr" reporter:datatype="link" />
8561                         <field reporter:label="Request Type" name="request_type" oils_obj:required="true" reporter:datatype="link" />
8562                         <field reporter:label="Place Hold" name="hold" reporter:datatype="bool" />
8563                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link" />
8564                         <field reporter:label="Holdable Formats" name="holdable_formats" reporter:datatype="text" />
8565                         <field reporter:label="Phone Notify" name="phone_notify" reporter:datatype="text" />
8566                         <field reporter:label="Email Notify" name="email_notify" reporter:datatype="bool" />
8567                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
8568                         <field reporter:label="Bib Record" name="eg_bib" reporter:datatype="link" />
8569                         <field reporter:label="Request Date/Time" name="request_date" reporter:datatype="timestamp" />
8570                         <field reporter:label="Need Before Date/Time" name="need_before" reporter:datatype="timestamp" />
8571                         <field reporter:label="Max Acceptable Fee" name="max_fee" reporter:datatype="text" />
8572                         <field reporter:label="ISxN" name="isxn" reporter:datatype="text" />
8573                         <field reporter:label="UPC" name="upc" reporter:datatype="text" />
8574                         <field reporter:label="Title" name="title" reporter:datatype="text" />
8575                         <field reporter:label="Volume" name="volume" reporter:datatype="text" />
8576                         <field reporter:label="Author" name="author" reporter:datatype="text" />
8577                         <field reporter:label="Article Title" name="article_title" reporter:datatype="text" />
8578                         <field reporter:label="Article Pages" name="article_pages" reporter:datatype="text" />
8579                         <field reporter:label="Publisher" name="publisher" reporter:datatype="text" />
8580                         <field reporter:label="Publication Location" name="location" reporter:datatype="text" />
8581                         <field reporter:label="Publication Date" name="pubdate" reporter:datatype="text" />
8582                         <field reporter:label="Mentioned In" name="mentioned" reporter:datatype="text" />
8583                         <field reporter:label="Other Info" name="other_info" reporter:datatype="text" />
8584                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
8585                         <field reporter:label="Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp" />
8586                 </fields>
8587                 <links>
8588                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
8589                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
8590                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
8591                         <link field="eg_bib" reltype="has_a" key="id" map="" class="bre"/>
8592                         <link field="request_type" reltype="has_a" key="id" map="" class="aurt"/>
8593                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
8594                 </links>
8595         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8596             <actions>
8597                 <create permission="user_request.create">
8598                     <context link="usr" field="home_ou"/>
8599                                 </create>
8600                 <retrieve permission="user_request.view">
8601                     <context link="usr" field="home_ou"/>
8602                                 </retrieve>
8603                 <update permission="user_request.update">
8604                     <context link="usr" field="home_ou"/>
8605                                 </update>
8606                 <delete permission="user_request.delete">
8607                     <context link="usr" field="home_ou"/>
8608                                 </delete>
8609             </actions>
8610         </permacrud>
8611         </class>
8612
8613         <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">
8614         <oils_persist:source_definition><![CDATA[
8615             SELECT r.*, CASE
8616                         WHEN r.cancel_reason IS NOT NULL THEN 7 -- Canceled
8617                         WHEN h.fulfillment_time IS NOT NULL THEN 6 -- Fulfilled
8618                         WHEN l.state = 'received' THEN 5 -- Received
8619                         WHEN p.state = 'on-order' AND h.id IS NOT NULL THEN 4 -- Ordered, Hold Placed
8620                         WHEN p.state = 'on-order' AND h.id IS NULL THEN 3 -- Ordered, Hold Not Placed
8621                         WHEN l.id IS NOT NULL THEN 2 -- Pending
8622                         WHEN l.id IS NULL THEN 1 -- New
8623                         ELSE 0 -- Error
8624                     END AS request_status
8625                     ,u.home_ou
8626             FROM      acq.user_request r
8627             JOIN actor.usr u ON (r.usr = u.id)
8628             LEFT JOIN acq.lineitem l ON (r.lineitem = l.id)
8629             LEFT JOIN acq.purchase_order p ON (l.purchase_order = p.id)
8630             LEFT JOIN action.hold_request h ON (h.acq_request = r.id)
8631         ]]></oils_persist:source_definition>
8632                 <fields oils_persist:primary="id">
8633                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
8634                         <field reporter:label="User" name="usr" reporter:datatype="link" />
8635                         <field reporter:label="Request Type" name="request_type" oils_obj:required="true" reporter:datatype="link" />
8636                         <field reporter:label="Place Hold" name="hold" reporter:datatype="bool" />
8637                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link" />
8638                         <field reporter:label="Holdable Formats" name="holdable_formats" reporter:datatype="text" />
8639                         <field reporter:label="Phone Notify" name="phone_notify" reporter:datatype="text" />
8640                         <field reporter:label="Email Notify" name="email_notify" reporter:datatype="bool" />
8641                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
8642                         <field reporter:label="Bib Record" name="eg_bib" reporter:datatype="link" />
8643                         <field reporter:label="Request Date/Time" name="request_date" reporter:datatype="timestamp" />
8644                         <field reporter:label="Need Before Date/Time" name="need_before" reporter:datatype="timestamp" />
8645                         <field reporter:label="Max Acceptable Fee" name="max_fee" reporter:datatype="text" />
8646                         <field reporter:label="ISxN" name="isxn" reporter:datatype="text" />
8647                         <field reporter:label="UPC" name="upc" reporter:datatype="text" />
8648                         <field reporter:label="Title" name="title" reporter:datatype="text" />
8649                         <field reporter:label="Volume" name="volume" reporter:datatype="text" />
8650                         <field reporter:label="Author" name="author" reporter:datatype="text" />
8651                         <field reporter:label="Article Title" name="article_title" reporter:datatype="text" />
8652                         <field reporter:label="Article Pages" name="article_pages" reporter:datatype="text" />
8653                         <field reporter:label="Publisher" name="publisher" reporter:datatype="text" />
8654                         <field reporter:label="Publication Location" name="location" reporter:datatype="text" />
8655                         <field reporter:label="Publication Date" name="pubdate" reporter:datatype="text" />
8656                         <field reporter:label="Mentioned In" name="mentioned" reporter:datatype="text" />
8657                         <field reporter:label="Other Info" name="other_info" reporter:datatype="text" />
8658                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
8659                         <field reporter:label="Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp" />
8660                         <field reporter:label="Request Status" name="request_status" reporter:datatype="link" />
8661                         <field reporter:label="Home Library" name="home_ou" reporter:datatype="link"/>
8662                 </fields>
8663                 <links>
8664                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
8665                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
8666                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
8667                         <link field="eg_bib" reltype="has_a" key="id" map="" class="bre"/>
8668                         <link field="request_type" reltype="has_a" key="id" map="" class="aurt"/>
8669                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
8670                         <link field="request_status" reltype="has_a" key="id" map="" class="aurst"/>
8671                         <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
8672                 </links>
8673         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8674             <actions>
8675                 <retrieve permission="user_request.view">
8676                     <context link="usr" field="home_ou"/>
8677                                 </retrieve>
8678             </actions>
8679         </permacrud>
8680         </class>
8681
8682         <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">
8683                 <fields oils_persist:primary="id">
8684                         <field reporter:label="Status ID" name="id" reporter:datatype="id" reporter:selector='label'/>
8685                         <field reporter:label="Status" name="label" reporter:datatype="text" oils_persist:i18n="true" />
8686                 </fields>
8687                 <links/>
8688         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8689             <actions>
8690                 <retrieve/>
8691             </actions>
8692         </permacrud>
8693         </class>
8694
8695         <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">
8696                 <fields oils_persist:primary="code">
8697                         <field reporter:label="Currency Code" name="code" reporter:datatype="text" reporter:selector='label'/>
8698                         <field reporter:label="Currency Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
8699                 </fields>
8700                 <links/>
8701         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8702             <actions>
8703                 <create permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
8704                 <retrieve/>
8705                 <update permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
8706                 <delete permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
8707             </actions>
8708         </permacrud>
8709         </class>
8710
8711         <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">
8712                 <fields oils_persist:primary="id" oils_persist:sequence="acq.exchange_rate_id_seq">
8713                         <field reporter:label="Exchange Rate ID" name="id" reporter:datatype="id" />
8714                         <field reporter:label="From Currency" name="from_currency" reporter:datatype="link" />
8715                         <field reporter:label="To Currency" name="to_currency" reporter:datatype="link" />
8716                         <field reporter:label="Ratio" name="ratio" />
8717                 </fields>
8718                 <links>
8719                         <link field="from_currency" reltype="has_a" key="code" map="" class="acqct"/>
8720                         <link field="to_currency" reltype="has_a" key="code" map="" class="acqct"/>
8721                 </links>
8722                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8723                         <actions>
8724                                 <create permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
8725                                 <retrieve/>
8726                                 <update permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
8727                                 <delete permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
8728                         </actions>
8729                 </permacrud>
8730         </class>
8731
8732         <class id="acqpro" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::provider" oils_persist:tablename="acq.provider" reporter:label="Provider">
8733                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_id_seq">
8734                         <field reporter:label="Provider ID" name="id" reporter:datatype="id" reporter:selector='code'/>
8735                         <field reporter:label="Provider Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
8736                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" />
8737                         <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" />
8738                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8739                         <field reporter:label="Holdings Tag" name="holding_tag" reporter:datatype="text" />
8740                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link" />
8741                         <field reporter:label="SAN" name="san" reporter:datatype="text" />
8742                         <field reporter:label="EDI Default" name="edi_default" reporter:datatype="link" />
8743                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
8744                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
8745                         <field reporter:label="URL" name="url" reporter:datatype="text" />
8746                         <field reporter:label="Email" name="email" reporter:datatype="text" />
8747                         <field reporter:label="Phone" name="phone" reporter:datatype="text" />
8748                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text" />
8749                         <field reporter:label="Default Claim Policy" name="default_claim_policy" reporter:datatype="link" />
8750                         <field reporter:label="Default # Copies" name="default_copy_count" reporter:datatype="int" />
8751                         <field reporter:label="Notes" name="provider_notes" oils_persist:virtual="true" reporter:datatype="link" />
8752                 </fields>
8753                 <links>
8754                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
8755                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
8756             <link field="addresses" reltype="has_many" map="" key="provider" class="acqpa"/>
8757             <link field="edi_default" reltype="has_a" map="" key="id" class="acqedi"/>
8758                         <link field="default_claim_policy" reltype="has_a" map="" key="id" class="acqclp"/>
8759                         <link field="provider_notes" reltype="has_many" map="" key="provider" class="acqpron"/>
8760                 </links>
8761         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8762             <actions>
8763                 <create   permission="ADMIN_PROVIDER" context_field="owner"/>
8764                 <retrieve permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER" context_field="owner"/>
8765                 <update   permission="ADMIN_PROVIDER" context_field="owner"/>
8766                 <delete   permission="ADMIN_PROVIDER" context_field="owner"/>
8767             </actions>
8768         </permacrud>
8769         </class>
8770
8771         <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">
8772                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_note_id_seq">
8773                         <field reporter:label="PO Note ID" name="id" reporter:datatype="id" />
8774                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
8775                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
8776                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
8777                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
8778                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
8779                         <field reporter:label="Note Value" name="value" reporter:datatype="text" />
8780                 </fields>
8781                 <links>
8782                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8783                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8784                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8785                 </links>
8786         </class>
8787
8788         <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">
8789                 <fields oils_persist:primary="code">
8790                         <field reporter:label="Code" name="code" reporter:datatype="id" reporter:selector="name"/>
8791                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
8792                 </fields>
8793                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8794             <actions>
8795                 <create permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
8796                 <retrieve/>
8797                 <update permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
8798                 <delete permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
8799             </actions>
8800                 </permacrud>
8801         </class>
8802
8803         <class id="acqinv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::invoice" oils_persist:tablename="acq.invoice" reporter:label="Invoice">
8804                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_id_seq">
8805                         <field reporter:label="Internal Invoice ID" name="id" reporter:datatype="id"/>
8806                         <field reporter:label="Receiver" name="receiver" reporter:datatype="org_unit" />
8807                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
8808                         <field reporter:label="Shipper" name="shipper" reporter:datatype="link"/>
8809                         <field reporter:label="Invoice Date" name="recv_date" reporter:datatype="timestamp" />
8810                         <field reporter:label="Receive Method" name="recv_method" reporter:datatype="link" />
8811                         <field reporter:label="Invoice Type" name="inv_type" reporter:datatype="text" />
8812                         <field reporter:label="Vendor Invoice ID" name="inv_ident" reporter:datatype="text" />
8813                         <field reporter:label="Payment Auth" name="payment_auth" reporter:datatype="text" />
8814                         <field reporter:label="Payment Method" name="payment_method" reporter:datatype="link" />
8815                         <field reporter:label="Note" name="note" reporter:datatype="text" />
8816                         <field reporter:label="Close Date" name="close_date" reporter:datatype="timestamp" />
8817                         <field reporter:label="Closed By" name="closed_by" reporter:datatype="link" />
8818                         <field reporter:label="Invoice Entries" name="entries" reporter:datatype="link" oils_persist:virtual="true"/>
8819                         <field reporter:label="Invoice Items" name="items" reporter:datatype="link" oils_persist:virtual="true"/>
8820                 </fields>
8821                 <links>
8822                         <link field="receiver" reltype="has_a" key="id" map="" class="aou"/>
8823                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8824                         <link field="shipper" reltype="has_a" key="id" map="" class="acqpro"/>
8825                         <link field="recv_method" reltype="has_a" key="code" map="" class="acqim"/>
8826                         <link field="payment_method" reltype="has_a" key="code" map="" class="acqipm"/>
8827                         <link field="entries" reltype="has_many" key="invoice" map="" class="acqie"/>
8828                         <link field="items" reltype="has_many" key="invoice" map="" class="acqii"/>
8829                         <link field="closed_by" reltype="has_a" key="id" map="" class="au"/>
8830                 </links>
8831         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8832             <actions>
8833                 <create   permission="CREATE_INVOICE" context_field="receiver"/>
8834                 <retrieve permission="CREATE_INVOICE VIEW_INVOICE" context_field="receiver"/>
8835                 <update   permission="CREATE_INVOICE" context_field="receiver"/>
8836                 <delete   permission="CREATE_INVOICE" context_field="receiver"/>
8837             </actions>
8838         </permacrud>
8839         </class>
8840
8841         <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">
8842                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_entry_id_seq">
8843                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
8844                         <field reporter:label="Invoice" name="invoice" reporter:datatype="link" />
8845                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
8846                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link"/>
8847                         <field reporter:label="Invoice Item Count" name="inv_item_count" reporter:datatype="int" />
8848                         <field reporter:label="Physical Item Count" name="phys_item_count" reporter:datatype="int" />
8849                         <field reporter:label="Note" name="note" reporter:datatype="text" />
8850                         <field reporter:label="Billed Cost per Item" name="billed_per_item" reporter:datatype="bool" />
8851                         <field reporter:label="Cost Billed" name="cost_billed" reporter:datatype="money" />
8852                         <field reporter:label="Actual Cost" name="actual_cost" reporter:datatype="money" />
8853                         <field reporter:label="Amount Paid" name="amount_paid" reporter:datatype="money" />
8854                 </fields>
8855                 <links>
8856                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv"/>
8857                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8858                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
8859                 </links>
8860         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8861             <actions>
8862                 <create   permission="ADMIN_INVOICE">
8863                                         <context link="invoice" field="receiver"/>
8864                                 </create>
8865                 <retrieve permission="ADMIN_INVOICE">
8866                                         <context link="invoice" field="receiver"/>
8867                                 </retrieve>
8868                 <update   permission="ADMIN_INVOICE">
8869                                         <context link="invoice" field="receiver"/>
8870                                 </update>
8871                                 <delete   permission="ADMIN_INVOICE">
8872                                         <context link="invoice" field="receiver"/>
8873                                 </delete>
8874             </actions>
8875         </permacrud>
8876         </class>
8877
8878         <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">
8879                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_item_id_seq">
8880                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
8881                         <field reporter:label="Invoice" name="invoice" reporter:datatype="link" />
8882                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
8883                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
8884                         <field reporter:label="Invoice Item Type" name="inv_item_type" reporter:datatype="link" />
8885                         <field reporter:label="Title or Item Name" name="title" reporter:datatype="text" />
8886                         <field reporter:label="Author" name="author" reporter:datatype="text" />
8887                         <field reporter:label="Note" name="note" reporter:datatype="text" />
8888                         <field reporter:label="Cost Billed" name="cost_billed" reporter:datatype="money" />
8889                         <field reporter:label="Actual Cost" name="actual_cost" reporter:datatype="money" />
8890                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
8891                         <field reporter:label="Amount Paid" name="amount_paid" reporter:datatype="money" />
8892                         <field reporter:label="Purchase Order Item" name="po_item" reporter:datatype="link" />
8893                         <field reporter:label="Target" name="target" reporter:datatype="int" />
8894                 </fields>
8895                 <links>
8896                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv"/>
8897                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8898                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
8899                         <link field="inv_item_type" reltype="has_a" key="code" map="" class="aiit"/>
8900                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8901                         <link field="po_item" reltype="has_a" key="id" map="" class="acqpoi"/>
8902                 </links>
8903         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8904             <actions>
8905                 <create   permission="ADMIN_INVOICE">
8906                                         <context link="invoice" field="receiver"/>
8907                                 </create>
8908                 <retrieve permission="ADMIN_INVOICE">
8909                                         <context link="invoice" field="receiver"/>
8910                                 </retrieve>
8911                 <update   permission="ADMIN_INVOICE">
8912                                         <context link="invoice" field="receiver"/>
8913                                 </update>
8914                                 <delete   permission="ADMIN_INVOICE">
8915                                         <context link="invoice" field="receiver"/>
8916                                 </delete>
8917             </actions>
8918         </permacrud>
8919         </class>
8920
8921         <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">
8922                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_address_id_seq">
8923                         <field reporter:label="Address Type" name="address_type"  reporter:datatype="text"/>
8924                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
8925                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
8926                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
8927                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
8928                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
8929                         <field reporter:label="Post Code" name="post_code"  reporter:datatype="text"/>
8930                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
8931                         <field reporter:label="Street 1" name="street1"  reporter:datatype="text"/>
8932                         <field reporter:label="Street 2" name="street2"  reporter:datatype="text"/>
8933                         <field reporter:label="Is Valid?" name="valid" reporter:datatype="bool"/>
8934                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text"/>
8935                 </fields>
8936                 <links>
8937                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8938                 </links>
8939         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8940             <actions>
8941                 <create permission="ADMIN_PROVIDER">
8942                     <context link="provider" field="owner"/>
8943                 </create>
8944                 <retrieve permission="ADMIN_PROVIDER">
8945                     <context link="provider" field="owner"/>
8946                 </retrieve>
8947                 <update permission="ADMIN_PROVIDER">
8948                     <context link="provider" field="owner"/>
8949                 </update>
8950                 <delete permission="ADMIN_PROVIDER">
8951                     <context link="provider" field="owner"/>
8952                 </delete>
8953             </actions>
8954         </permacrud>
8955         </class>
8956
8957         <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">
8958                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_id_seq">
8959                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
8960                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
8961                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
8962                         <field reporter:label="Role" name="role" reporter:datatype="text"/>
8963                         <field reporter:label="Email" name="email" reporter:datatype="text"/>
8964                         <field reporter:label="Phone" name="phone" reporter:datatype="text"/>
8965         </fields>
8966                 <links>
8967                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8968                 </links>
8969         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8970             <actions>
8971                 <create permission="ADMIN_PROVIDER">
8972                     <context link="provider" field="owner"/>
8973                 </create>
8974                 <retrieve permission="ADMIN_PROVIDER">
8975                     <context link="provider" field="owner"/>
8976                 </retrieve>
8977                 <update permission="ADMIN_PROVIDER">
8978                     <context link="provider" field="owner"/>
8979                 </update>
8980                 <delete permission="ADMIN_PROVIDER">
8981                     <context link="provider" field="owner"/>
8982                 </delete>
8983             </actions>
8984         </permacrud>
8985     </class>
8986         <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">
8987                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_address_id_seq">
8988                         <field reporter:label="Type" name="address_type"  reporter:datatype="text"/>
8989                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
8990                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
8991                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
8992                         <field reporter:label="Address ID" name="id" reporter:datatype="id" />
8993                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
8994                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
8995                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
8996                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
8997                         <field reporter:label="Contact" name="contact" reporter:datatype="link"/>
8998                         <field reporter:label="Valid Address?" name="valid" reporter:datatype="bool"/>
8999                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text"/>
9000                 </fields>
9001                 <links>
9002                         <link field="contact" reltype="has_a" key="id" map="" class="acqpc"/>
9003                 </links>
9004         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9005             <actions>
9006                 <create permission="ADMIN_PROVIDER">
9007                     <context link="contact" jump='provider' field="owner"/>
9008                 </create>
9009                 <retrieve permission="ADMIN_PROVIDER">
9010                     <context link="contact" jump='provider' field="owner"/>
9011                 </retrieve>
9012                 <update permission="ADMIN_PROVIDER">
9013                     <context link="contact" jump='provider' field="owner"/>
9014                 </update>
9015                 <delete permission="ADMIN_PROVIDER">
9016                     <context link="contact" jump='provider' field="owner"/>
9017                 </delete>
9018             </actions>
9019         </permacrud>
9020         </class>
9021
9022         <class id="acqftr" controller="open-ils.cstore" oils_obj:fieldmapper="acq::fund_transfer" oils_persist:tablename="acq.fund_transfer" reporter:label="Fund Transfer">
9023                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_transfer_id_seq">
9024                         <field reporter:label="Fund Transfer ID" name="id" reporter:datatype="id"/>
9025                         <field reporter:label="Source Fund" name="src_fund" reporter:datatype="link"/>
9026                         <field reporter:label="Source Amount" name="src_amount" reporter:datatype="money"/>
9027                         <field reporter:label="Destination Fund" name="dest_fund" reporter:datatype="link"/>
9028                         <field reporter:label="Destination Amount" name="dest_amount" reporter:datatype="money"/>
9029                         <field reporter:label="Transfer Time" name="transfer_time" reporter:datatype="timestamp"/>
9030                         <field reporter:label="Transfer User" name="transfer_user" reporter:datatype="link"/>
9031                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
9032                         <field reporter:label="Funding Source Credit ID" name="funding_source_credit" reporter:datatype="link"/>
9033                 </fields>
9034                 <links>
9035                         <link field="src_fund" reltype="has_a" key="id" map="" class="acqf"/>
9036                         <link field="dest_fund" reltype="has_a" key="id" map="" class="acqf"/>
9037                         <link field="transfer_user" reltype="has_a" key="id" map="" class="au"/>
9038                         <link field="funding_source_credit" reltype="has_a" key="id" map="" class="acqfscred"/>
9039                 </links>
9040         </class>
9041
9042         <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">
9043                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fiscal_calendar_id_seq">
9044                         <field reporter:label="Fiscal Calendar ID" name="id" reporter:datatype="id" reporter:selector='name'/>
9045                         <field reporter:label="Fiscal Calendar Name" name="name" reporter:datatype="text"/>
9046                         <field reporter:label="Years" name="years" oils_persist:virtual="true" reporter:datatype="link"/>
9047                 </fields>
9048                 <links>
9049             <link field="years" reltype="has_many" map="" key="calendar" class="acqfy"/>
9050                 </links>
9051                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9052                         <actions>
9053                                 <create permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
9054                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
9055                                 <update permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
9056                                 <delete permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
9057                         </actions>
9058                 </permacrud>
9059         </class>
9060
9061         <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">
9062                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fiscal_year_id_seq">
9063                         <field reporter:label="Fiscal Year ID" name="id" reporter:datatype="id" reporter:selector='year'/>
9064                         <field reporter:label="Calendar" name="calendar" reporter:datatype="link"/>
9065                         <field reporter:label="Fiscal Year" name="year" reporter:datatype="int"/>
9066                         <field reporter:label="Year Begin" name="year_begin" reporter:datatype="timestamp"/>
9067                         <field reporter:label="Year End" name="year_end" reporter:datatype="timestamp"/>
9068                 </fields>
9069                 <links>
9070                         <link field="calendar" reltype="has_a" key="id" map="" class="acqfc"/>
9071                 </links>
9072                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9073                         <actions>
9074                                 <create permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
9075                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
9076                                 <update permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
9077                                 <delete permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
9078                         </actions>
9079                 </permacrud>
9080         </class>
9081
9082         <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">
9083                 <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_id_seq">
9084                         <field reporter:label="Funding Source ID" name="id" reporter:datatype="id" reporter:selector='code'/>
9085                         <field reporter:label="Funding Source Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
9086                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" />
9087                         <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" />
9088                         <field reporter:label="Code" name="code" reporter:datatype="text" />
9089                         <field reporter:label="Summary" name="summary" oils_persist:virtual="true"/>
9090                         <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>
9091                         <field reporter:label="Credits" name="credits" oils_persist:virtual="true" reporter:datatype="link"/>
9092                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
9093                 </fields>
9094                 <links>
9095                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
9096                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
9097             <link field="allocations" reltype="has_many" map="" key="funding_source" class="acqfa"/>
9098             <link field="credits" reltype="has_many" key="funding_source" map="" class="acqfscred"/>
9099                         <link field="fund_alloc_pcts" reltype="has_many" key="funding_source" map="" class="acqfap"/>
9100                 </links>
9101         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9102             <actions>
9103                 <create   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
9104                 <retrieve permission="ADMIN_FUNDING_SOURCE MANAGE_FUNDING_SOURCE VIEW_FUNDING_SOURCE" context_field="owner"/>
9105                 <update   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
9106                 <delete   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
9107             </actions>
9108         </permacrud>
9109         </class>
9110
9111         <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">
9112                 <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_credit_id_seq">
9113                         <field reporter:label="Credit ID" name="id" reporter:datatype="id" />
9114                         <field reporter:label="Funding Source ID" name="funding_source" reporter:datatype="link" />
9115                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
9116                         <field reporter:label="Note" name="note" reporter:datatype="text" />
9117                         <field reporter:label="Deadline Date" name="deadline_date" reporter:datatype="timestamp" />
9118                         <field reporter:label="Effective Date" name="effective_date" reporter:datatype="timestamp" />
9119                 </fields>
9120                 <links>
9121                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
9122                 </links>
9123                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9124                         <actions>
9125                                 <create permission="ADMIN_FUNDING_SOURCE">
9126                     <context link="funding_source" field="owner"/>
9127                 </create>
9128                                 <retrieve permission="ADMIN_FUNDING_SOURCE">
9129                     <context link="funding_source" field="owner"/>
9130                 </retrieve>
9131                                 <update permission="ADMIN_FUNDING_SOURCE">
9132                     <context link="funding_source" field="owner"/>
9133                 </update>
9134                                 <delete permission="ADMIN_FUNDING_SOURCE">
9135                     <context link="funding_source" field="owner"/>
9136                 </delete>
9137                         </actions>
9138                 </permacrud>
9139         </class>
9140
9141         <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">
9142                 <fields oils_persist:primary="id">
9143                         <field reporter:label="Ordered Fund Src ID" name="id" reporter:datatype="id"/>
9144                         <field reporter:label="Sort Priority" name="sort_priority" reporter:datatype="int"/>
9145                         <field reporter:label="Sort Date" name="sort_date" reporter:datatype="timestamp"/>
9146                         <field reporter:label="Funding Source ID" name="funding_source" reporter:datatype="link"/>
9147                         <field reporter:label="Amount" name="amount" reporter:datatype="money"/>
9148                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
9149                 </fields>
9150                 <links>
9151                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
9152                 </links>
9153         </class>
9154
9155         <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">
9156                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_debit_id_seq">
9157                         <field reporter:label="Debit ID" name="id" reporter:datatype="id" />
9158                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
9159                         <field reporter:label="Origin Amount" name="origin_amount" reporter:datatype="money" />
9160                         <field reporter:label="Origin Currency" name="origin_currency_type" reporter:datatype="link" />
9161                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
9162                         <field reporter:label="Encumbrance" name="encumbrance" reporter:datatype="bool" />
9163                         <field reporter:label="Debit Type" name="debit_type" reporter:datatype="text" />
9164                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
9165                         <field reporter:label="Invoice Entry" name="invoice_entry" reporter:datatype="link" />
9166                 </fields>
9167                 <links>
9168                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9169                         <link field="origin_currency_type" reltype="has_a" key="code" map="" class="acqct"/>
9170                         <link field="invoice_entry" reltype="has_a" key="id" map="" class="acqie"/>
9171                 </links>
9172                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9173                         <actions>
9174                                 <create permission="ADMIN_ACQ_FUND">
9175                     <context link="fund" field="org"/>
9176                 </create>
9177                                 <retrieve permission="ADMIN_ACQ_FUND">
9178                     <context link="fund" field="org"/>
9179                 </retrieve>
9180                                 <update permission="ADMIN_ACQ_FUND">
9181                     <context link="fund" field="org"/>
9182                 </update>
9183                                 <delete permission="ADMIN_ACQ_FUND">
9184                     <context link="fund" field="org"/>
9185                 </delete>
9186                         </actions>
9187                 </permacrud>
9188         </class>
9189
9190         <class id="acqf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::fund" oils_persist:tablename="acq.fund" reporter:label="Fund">
9191                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_id_seq">
9192                         <field reporter:label="Fund ID" name="id" reporter:datatype="id" reporter:selector='code'/>
9193                         <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
9194                         <field reporter:label="Name" name="name" reporter:datatype="text" />
9195                         <field reporter:label="Year" name="year" reporter:datatype="int" />
9196                         <field reporter:label="Currency Type" name="currency_type" reporter:datatype="link" />
9197                         <field reporter:label="Code" name="code" reporter:datatype="text" />
9198                         <field reporter:label="Rollover" name="rollover" reporter:datatype="bool" />
9199                         <field reporter:label="Propagate" name="propagate" reporter:datatype="bool" />
9200                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
9201                         <field reporter:label="Balance Warning Percent" name="balance_warning_percent" reporter:datatype="int" />
9202                         <field reporter:label="Balance Stop Percent" name="balance_stop_percent" reporter:datatype="int" />
9203                         <field reporter:label="Summary" name="summary" oils_persist:virtual="true"/>
9204                         <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>
9205                         <field reporter:label="Debits" name="debits" oils_persist:virtual="true" reporter:datatype="link"/>
9206                         <field reporter:label="Tags" name="tags" oils_persist:virtual="true" reporter:datatype="link"/>
9207                         <field reporter:label="Allocation Total" name="allocation_total" oils_persist:virtual="true" reporter:datatype="link"/>
9208                         <field reporter:label="Debit Total" name="debit_total" oils_persist:virtual="true" reporter:datatype="link"/>
9209                         <field reporter:label="Encumbrance Total" name="encumbrance_total" oils_persist:virtual="true" reporter:datatype="link"/>
9210                         <field reporter:label="Spent Total" name="spent_total" oils_persist:virtual="true" reporter:datatype="link"/>
9211                         <field reporter:label="Combined Balance" name="combined_balance" oils_persist:virtual="true" reporter:datatype="link"/>
9212                         <field reporter:label="Spent Balance" name="spent_balance" oils_persist:virtual="true" reporter:datatype="link"/>
9213                 </fields>
9214                 <links>
9215                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
9216                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
9217             <link field="allocations" reltype="has_many" key="fund" map="" class="acqfa"/>
9218             <link field="debits" reltype="has_many" key="fund" map="" class="acqfdeb"/>
9219             <link field="tags" reltype="has_many" key="fund" map="" class="acqftm"/>
9220             <link field="allocation_total" reltype="might_have" key="fund" map="" class="acqfat"/>
9221             <link field="debit_total" reltype="might_have" key="fund" map="" class="acqfdt"/>
9222             <link field="encumbrance_total" reltype="might_have" key="fund" map="" class="acqfet"/>
9223             <link field="spent_total" reltype="might_have" key="fund" map="" class="acqfst"/>
9224             <link field="combined_balance" reltype="might_have" key="fund" map="" class="acqfcb"/>
9225             <link field="spent_balance" reltype="might_have" key="fund" map="" class="acqfsb"/>
9226                 </links>
9227         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1" ignore_object_perms="true">
9228             <actions>
9229                 <create permission="ADMIN_ACQ_FUND" context_field="org"/>
9230                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="org"/>
9231                 <update permission="ADMIN_ACQ_FUND" context_field="org"/>
9232                 <delete permission="ADMIN_ACQ_FUND" context_field="org"/>
9233             </actions>
9234         </permacrud>
9235         </class>
9236
9237         <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">
9238                 <fields oils_persist:primary="fund">
9239                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
9240                         <field reporter:label="Total Allocation Amount" name="amount" reporter:datatype="money" />
9241                 </fields>
9242                 <links>
9243                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9244                 </links>
9245         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9246             <actions>
9247                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
9248                                         <context link="fund" field="org" />
9249                 </retrieve>
9250             </actions>
9251         </permacrud>
9252         </class>
9253
9254         <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">
9255                 <fields oils_persist:primary="fund">
9256                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
9257                         <field reporter:label="Total Debit Amount" name="amount" reporter:datatype="money" />
9258                 </fields>
9259                 <links>
9260                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9261                 </links>
9262         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9263             <actions>
9264                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
9265                                         <context link="fund" field="org" />
9266                 </retrieve>
9267             </actions>
9268         </permacrud>
9269         </class>
9270
9271         <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">
9272                 <fields oils_persist:primary="fund">
9273                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
9274                         <field reporter:label="Total Encumbrance Amount" name="amount" reporter:datatype="money" />
9275                 </fields>
9276                 <links>
9277                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9278                 </links>
9279         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9280             <actions>
9281                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
9282                                         <context link="fund" field="org" />
9283                 </retrieve>
9284             </actions>
9285         </permacrud>
9286         </class>
9287
9288         <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">
9289                 <fields oils_persist:primary="fund">
9290                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
9291                         <field reporter:label="Total Spent Amount" name="amount" reporter:datatype="money" />
9292                 </fields>
9293                 <links>
9294                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9295                 </links>
9296         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9297             <actions>
9298                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
9299                                         <context link="fund" field="org" />
9300                 </retrieve>
9301             </actions>
9302         </permacrud>
9303         </class>
9304
9305         <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">
9306                 <fields oils_persist:primary="fund">
9307                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
9308                         <field reporter:label="Balance after Spent and Encumbered" name="amount" reporter:datatype="money" />
9309                 </fields>
9310                 <links>
9311                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9312                 </links>
9313         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9314             <actions>
9315                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
9316                                         <context link="fund" field="org" />
9317                 </retrieve>
9318             </actions>
9319         </permacrud>
9320         </class>
9321
9322    <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">
9323         <fields oils_persist:primary="fund">
9324             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
9325             <field reporter:label="Total Allocation Amount" name="amount" reporter:datatype="money" />
9326         </fields>
9327         <links>
9328             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9329         </links>
9330     </class>
9331
9332    <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">
9333         <fields oils_persist:primary="fund">
9334             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
9335             <field reporter:label="Total Encumbered Amount" name="amount" reporter:datatype="money" />
9336         </fields>
9337         <links>
9338             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9339         </links>
9340     </class>
9341
9342    <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">
9343         <fields oils_persist:primary="fund">
9344             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
9345             <field reporter:label="Total Spent Amount" name="amount" reporter:datatype="money" />
9346         </fields>
9347         <links>
9348             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9349         </links>
9350     </class>
9351
9352    <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">
9353         <fields oils_persist:primary="fund">
9354             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
9355             <field reporter:label="Total Spent Balance" name="amount" reporter:datatype="money" />
9356         </fields>
9357         <links>
9358             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9359         </links>
9360     </class>
9361
9362    <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">
9363         <fields oils_persist:primary="fund">
9364             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
9365             <field reporter:label="Total Combined Balance" name="amount" reporter:datatype="money" />
9366         </fields>
9367         <links>
9368             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9369         </links>
9370     </class>
9371
9372         <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">
9373                 <fields oils_persist:primary="funding_source">
9374                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
9375                         <field reporter:label="Total Credits to Funding Source" name="amount" reporter:datatype="money" />
9376                 </fields>
9377                 <links>
9378                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
9379                 </links>
9380         </class>
9381
9382         <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">
9383                 <fields oils_persist:primary="funding_source">
9384                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
9385                         <field reporter:label="Total Allocated from Funding Source" name="amount" reporter:datatype="money" />
9386                 </fields>
9387                 <links>
9388                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
9389                 </links>
9390         </class>
9391
9392         <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">
9393                 <fields oils_persist:primary="funding_source">
9394                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
9395                         <field reporter:label="Balance Remaining" name="amount" reporter:datatype="money" />
9396                 </fields>
9397                 <links>
9398                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
9399                 </links>
9400         </class>
9401
9402         <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">
9403                 <fields oils_persist:primary="fund">
9404                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
9405                         <field reporter:label="Balance after Spent" name="amount" reporter:datatype="money" />
9406                 </fields>
9407                 <links>
9408                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9409                 </links>
9410         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9411             <actions>
9412                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
9413                                         <context link="fund" field="org" />
9414                 </retrieve>
9415             </actions>
9416         </permacrud>
9417     </class>
9418     <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">
9419         <oils_persist:source_definition><![CDATA[
9420             SELECT
9421                 acqf.*,
9422                 COALESCE(acqfat.amount, 0.00) AS allocated_total,
9423                 COALESCE(acqfst.amount, 0.00) AS spent_total,
9424                 COALESCE(acqfet.amount, 0.00) AS encumbrance_total,
9425                 COALESCE(acqfcb.amount, 0.00) AS combined_balance
9426             FROM
9427                 acq.fund acqf
9428                 LEFT JOIN acq.fund_allocation_total acqfat ON (acqfat.fund = acqf.id)
9429                 LEFT JOIN acq.fund_spent_total acqfst ON (acqfst.fund = acqf.id)
9430                 LEFT JOIN acq.fund_encumbrance_total acqfet ON (acqfet.fund = acqf.id)
9431                 LEFT JOIN acq.fund_combined_balance acqfcb ON (acqfcb.fund = acqf.id)
9432         ]]></oils_persist:source_definition>
9433         <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_id_seq">
9434             <field reporter:label="Fund ID" name="id" reporter:datatype="id" reporter:selector='code'/>
9435             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
9436             <field reporter:label="Name" name="name" reporter:datatype="text" />
9437             <field reporter:label="Year" name="year" reporter:datatype="int" />
9438             <field reporter:label="Currency Type" name="currency_type" reporter:datatype="link" />
9439             <field reporter:label="Code" name="code" reporter:datatype="text" />
9440             <field reporter:label="Rollover" name="rollover" reporter:datatype="bool" />
9441             <field reporter:label="Propagate" name="propagate" reporter:datatype="bool" />
9442             <field reporter:label="Active" name="active" reporter:datatype="bool" />
9443             <field reporter:label="Balance Warning Percent" name="balance_warning_percent" reporter:datatype="int" />
9444             <field reporter:label="Balance Stop Percent" name="balance_stop_percent" reporter:datatype="int" />
9445
9446             <!-- non fund-native fields -->
9447             <field reporter:label="Total Allocated" name="allocated_total" reporter:datatype="money"/>
9448             <field reporter:label="Total Spent" name="spent_total" reporter:datatype="money"/>
9449             <field reporter:label="Total Encumbered" name="encumbrance_total" reporter:datatype="money"/>
9450             <field reporter:label="Remaining Balance" name="combined_balance" reporter:datatype="money"/>
9451         </fields>
9452         <links>
9453             <link field="id" reltype="has_a" key="id" map="" class="acqf"/>
9454             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
9455             <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
9456         </links>
9457         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9458             <actions>
9459                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="org"/>
9460             </actions>
9461         </permacrud>
9462         </class>
9463         <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">
9464                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_allocation_id_seq">
9465                         <field reporter:label="Allocation ID" name="id" reporter:datatype="id" />
9466                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
9467                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
9468                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
9469                         <field reporter:label="Allocating User" name="allocator" reporter:datatype="link" />
9470                         <field reporter:label="Note" name="note" reporter:datatype="text" />
9471                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
9472                 </fields>
9473                 <links>
9474                         <link field="allocator" reltype="has_a" key="id" map="" class="au"/>
9475                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9476                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
9477                 </links>
9478                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9479                         <actions>
9480                                 <create permission="ADMIN_ACQ_FUND">
9481                     <context link="fund" field="org"/>
9482                 </create>
9483                                 <retrieve permission="ADMIN_ACQ_FUND">
9484                     <context link="fund" field="org"/>
9485                 </retrieve>
9486                                 <update permission="ADMIN_ACQ_FUND">
9487                     <context link="fund" field="org"/>
9488                 </update>
9489                                 <delete permission="ADMIN_ACQ_FUND">
9490                     <context link="fund" field="org"/>
9491                 </delete>
9492                         </actions>
9493                 </permacrud>
9494         </class>
9495
9496     <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">
9497         <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_allocation_percent_id_seq">
9498             <field reporter:label="Allocation ID" name="id" reporter:datatype="id" />
9499             <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
9500             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
9501             <field reporter:label="Fund Code" name="fund_code" reporter:datatype="text" />
9502             <field reporter:label="Percent" name="percent" reporter:datatype="float" />
9503             <field reporter:label="Allocating User" name="allocator" reporter:datatype="link" />
9504             <field reporter:label="Note" name="note" reporter:datatype="text" />
9505             <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
9506         </fields>
9507         <links>
9508             <link field="allocator" reltype="has_a" key="id" map="" class="au"/>
9509             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
9510             <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
9511         </links>
9512                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9513                         <actions>
9514                                 <create permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
9515                                 <retrieve permission="VIEW_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
9516                                 <update permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
9517                                 <delete permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
9518                         </actions>
9519                 </permacrud>
9520     </class>
9521
9522         <class id="acqpl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::picklist" oils_persist:tablename="acq.picklist" reporter:label="Selection List">
9523                 <fields oils_persist:primary="id" oils_persist:sequence="acq.picklist_id_seq">
9524                         <field reporter:label="Selection List ID" name="id" reporter:datatype="id" reporter:selector='name' />
9525                         <field reporter:label="Owner" name="owner" reporter:datatype="link" />
9526                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit" />
9527                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
9528                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
9529                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
9530                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link" />
9531                         <field reporter:label="Entry Count" name="entry_count" oils_persist:virtual="true"/>
9532                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
9533                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
9534                 </fields>
9535                 <links>
9536                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
9537                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9538                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
9539                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
9540                         <link field="entries" reltype="has_many" key="picklist" map="" class="jub"/>
9541                 </links>
9542                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9543                         <actions>
9544                                 <retrieve permission="CREATE_PICKLIST VIEW_PICKLIST" context_field="org_unit"/>
9545                         </actions>
9546                 </permacrud>
9547         </class>
9548
9549         <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">
9550                 <fields oils_persist:primary="id" oils_persist:sequence="acq.cancel_reason_id_seq">
9551                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
9552                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
9553                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
9554                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
9555                         <field reporter:label="Keep Debits?" name="keep_debits" reporter:datatype="bool"/>
9556                 </fields>
9557                 <links>
9558                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
9559                 </links>
9560                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9561                         <actions>
9562                                 <create permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
9563                                 <retrieve permission="STAFF_LOGIN" context_field="org_unit"/>
9564                                 <update permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
9565                                 <delete permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
9566                         </actions>
9567                 </permacrud>
9568         </class>
9569
9570         <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">
9571                 <fields oils_persist:primary="id" oils_persist:sequence="acq.purchase_order_id_seq">
9572                         <field reporter:label="Purchase Order ID" name="id" reporter:datatype="id" reporter:selector='name'/>
9573                         <field reporter:label="Owner" name="owner" reporter:datatype="link" />
9574                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
9575                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
9576                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
9577                         <field reporter:label="State" name="state" reporter:datatype="text" />
9578                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="org_unit" />
9579                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
9580                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
9581                         <field reporter:label="Order Date" name="order_date" reporter:datatype="timestamp" />
9582                         <field reporter:label="Name" name="name" reporter:datatype="text" />
9583                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
9584                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
9585                         <field reporter:label="Line Items" name="lineitems" oils_persist:virtual="true" reporter:datatype="link" />
9586                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link" />
9587                         <field reporter:label="Line Item Count" name="lineitem_count" oils_persist:virtual="true" reporter:datatype="int" />
9588                         <field reporter:label="Amount Encumbered" name="amount_encumbered" oils_persist:virtual="true" reporter:datatype="float" />
9589                         <field reporter:label="Amount Spent" name="amount_spent" oils_persist:virtual="true" reporter:datatype="float" />
9590                         <field reporter:label="Amount Estimated" name="amount_estimated" oils_persist:virtual="true" reporter:datatype="float" />
9591                         <field reporter:label="PO Items" name="po_items" oils_persist:virtual="true" reporter:datatype="link" />
9592                 </fields>
9593                 <links>
9594                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
9595                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9596                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
9597                         <link field="default_fund" reltype="has_a" key="id" map="" class="acqf"/>
9598                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
9599                         <link field="lineitems" reltype="has_many" key="purchase_order" map="" class="jub"/>
9600                         <link field="po_items" reltype="has_many" key="purchase_order" map="" class="acqpoi"/>
9601                         <link field="notes" reltype="has_many" key="purchase_order" map="" class="acqpon"/>
9602                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
9603                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
9604                 </links>
9605                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9606                         <actions>
9607                                 <create permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
9608                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER" context_field="ordering_agency"/>
9609                                 <update permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
9610                                 <delete permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
9611                         </actions>
9612                 </permacrud>
9613         </class>
9614
9615         <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">
9616                 <fields oils_persist:primary="audit_id" oils_persist:sequence="acq.acq_purchase_order_pkey_seq">
9617                         <field reporter:label="Audit ID" name="audit_id" reporter:datatype="id"/>
9618                         <field reporter:label="Audit Time" name="audit_time" reporter:datatype="timestamp"/>
9619                         <field reporter:label="Audit Action" name="audit_action" reporter:datatype="text"/>
9620                         <field reporter:label="Purchase Order ID" name="id" reporter:datatype="link"/>
9621                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
9622                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
9623                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
9624                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="link"/>
9625                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
9626                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
9627                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
9628                         <field reporter:label="State" name="state" reporter:datatype="text"/>
9629                         <field reporter:label="Order Date" name="order_date" reporter:datatype="timestamp"/>
9630                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
9631                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link"/>
9632                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
9633                 </fields>
9634                 <links>
9635                         <link field="id" reltype="has_a" key="id" map="" class="acqpo"/>
9636                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
9637                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9638                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
9639                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
9640                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
9641                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
9642                 </links>
9643                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9644             <actions>
9645                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER" context_field="ordering_agency"/>
9646             </actions>
9647                 </permacrud>
9648         </class>
9649
9650         <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">
9651                 <fields oils_persist:primary="id" oils_persist:sequence="acq.po_note_id_seq">
9652                         <field reporter:label="PO Note ID" name="id" reporter:datatype="id" />
9653                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />
9654                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
9655                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
9656                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
9657                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
9658                         <field reporter:label="Vote Value" name="value" reporter:datatype="text" />
9659                         <field reporter:label="Vendor Public" name="vendor_public" reporter:datatype="bool" />
9660                 </fields>
9661                 <links>
9662                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9663                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
9664                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
9665                 </links>
9666                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9667             <actions>
9668                 <create permission="CREATE_PURCHASE_ORDER">
9669                     <context link="purchase_order" field="ordering_agency"/>
9670                 </create>
9671                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
9672                     <context link="purchase_order" field="ordering_agency"/>
9673                 </retrieve>
9674                 <update permission="CREATE_PURCHASE_ORDER">
9675                     <context link="purchase_order" field="ordering_agency"/>
9676                 </update>
9677                 <delete permission="CREATE_PURCHASE_ORDER">
9678                     <context link="purchase_order" field="ordering_agency"/>
9679                 </delete>
9680             </actions>
9681                 </permacrud>
9682         </class>
9683
9684         <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">
9685                 <fields oils_persist:primary="id" oils_persist:sequence="acq.po_item_id_seq">
9686                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
9687                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
9688                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
9689                         <field reporter:label="Invoice Item Type" name="inv_item_type" reporter:datatype="link"/>
9690                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
9691                         <field reporter:label="Author" name="author" reporter:datatype="text"/>
9692                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
9693                         <field reporter:label="Estimated Cost" name="estimated_cost" reporter:datatype="money"/>
9694                         <field reporter:label="Fund" name="fund" reporter:datatype="link"/>
9695                         <field reporter:label="Target" name="target" reporter:datatype="int" />
9696                 </fields>
9697                 <links>
9698                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
9699                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
9700                         <link field="inv_item_type" reltype="has_a" key="code" map="" class="aiit"/>
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                 <create permission="CREATE_PURCHASE_ORDER">
9706                     <context link="purchase_order" field="ordering_agency"/>
9707                 </create>
9708                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
9709                     <context link="purchase_order" field="ordering_agency"/>
9710                 </retrieve>
9711                 <update permission="CREATE_PURCHASE_ORDER">
9712                     <context link="purchase_order" field="ordering_agency"/>
9713                 </update>
9714                 <delete permission="CREATE_PURCHASE_ORDER">
9715                     <context link="purchase_order" field="ordering_agency"/>
9716                 </delete>
9717             </actions>
9718                 </permacrud>
9719         </class>
9720
9721         <class id="jub" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::lineitem" oils_persist:tablename="acq.lineitem" reporter:label="Line Item">
9722                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_id_seq">
9723                         <field reporter:label="Lineitem ID" name="id" reporter:datatype="id" />
9724                         <field reporter:label="Selecting User" name="selector" reporter:datatype="link" />
9725                         <field reporter:label="Selection List" name="picklist" reporter:datatype="link" />
9726                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />
9727                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
9728                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
9729                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
9730                         <field reporter:label="MARC" name="marc" reporter:datatype="text" />
9731                         <field reporter:label="Evergreen Bib ID" name="eg_bib_id" reporter:datatype="link" />
9732                         <field reporter:label="Source Label" name="source_label" reporter:datatype="text" />
9733                         <field reporter:label="Expected Receive Date" name="expected_recv_time" reporter:datatype="timestamp" />
9734                         <field reporter:label="State" name="state" reporter:datatype="text" />
9735                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
9736                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
9737                         <field reporter:label="Claim Policy" name="claim_policy" reporter:datatype="link" />
9738                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
9739                         <field reporter:label="Estimated Unit Price" name="estimated_unit_price" reporter:datatype="money" />
9740                         <field reporter:label="Queued Vandelay Record" name="queued_record" reporter:datatype="link" />
9741                         <field reporter:label="Item Count" name="item_count" oils_persist:virtual="true" reporter:datatype="int" />
9742                         <field reporter:label="Descriptive Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link" />
9743                         <field reporter:label="Line Item Details" name="lineitem_details" oils_persist:virtual="true" reporter:datatype="link" />
9744                         <field reporter:label="Line Item Notes" name="lineitem_notes" oils_persist:virtual="true" reporter:datatype="link" />
9745                         <field reporter:label="Distribution Formulas" name="distribution_formulas" oils_persist:virtual="true" reporter:datatype="link" />
9746                         <field reporter:label="Invoice Entries" name="invoice_entries" oils_persist:virtual="true" reporter:datatype="link" />
9747                         <field reporter:label="Order Summary" name="order_summary" oils_persist:virtual="true" reporter:datatype="link" />
9748                 </fields>
9749                 <links>
9750                         <link field="selector" reltype="has_a" key="id" map="" class="au"/>
9751                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
9752                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9753                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
9754                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
9755                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl"/>
9756                         <link field="eg_bib_id" reltype="has_a" key="id" map="" class="bre"/>
9757                         <link field="attributes" reltype="has_many" key="lineitem" map="" class="acqlia"/>
9758                         <link field="lineitem_details" reltype="has_many" key="lineitem" map="" class="acqlid"/>
9759                         <link field="lineitem_notes" reltype="has_many" key="lineitem" map="" class="acqlin"/>
9760                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
9761                         <link field="distribution_formulas" reltype="has_many" key="lineitem" map="" class="acqdfa"/>
9762                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
9763                         <link field="invoice_entries" reltype="has_many" key="lineitem" map="" class="acqie"/>
9764                         <link field="order_summary" reltype="might_have" key="lineitem" map="" class="acqlisum"/>
9765                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
9766                 </links>
9767                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9768                         <actions>
9769                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER CREATE_PICKLIST VIEW_PICKLIST">
9770                                         <context link="purchase_order" field="ordering_agency"/>
9771                                         <context link="picklist" field="org_unit"/>
9772                                 </retrieve>
9773                         </actions>
9774                 </permacrud>
9775         </class>
9776
9777         <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">
9778                 <fields oils_persist:primary="audit_id" oils_persist:sequence="acq.acq_lineitem_pkey_seq">
9779                         <field reporter:label="Audit ID" name="audit_id" reporter:datatype="id"/>
9780                         <field reporter:label="Audit Time" name="audit_time" reporter:datatype="timestamp"/>
9781                         <field reporter:label="Audit Action" name="audit_action" reporter:datatype="text"/>
9782                         <field reporter:label="Lineitem ID" name="id" reporter:datatype="link"/>
9783                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
9784                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
9785                         <field reporter:label="Selector" name="selector" reporter:datatype="link"/>
9786                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
9787                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
9788                         <field reporter:label="Selection List" name="picklist" reporter:datatype="link"/>
9789                         <field reporter:label="Expected Receive Time" name="expected_recv_time" reporter:datatype="timestamp"/>
9790                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
9791                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
9792                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
9793                         <field reporter:label="Evergreen Bib ID" name="eg_bib_id" reporter:datatype="link"/>
9794                         <field reporter:label="Source Label" name="source_label" reporter:datatype="text"/>
9795                         <field reporter:label="State" name="state" reporter:datatype="text"/>
9796                         <field reporter:label="Claim Policy" name="claim_policy" reporter:datatype="link"/>
9797                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link"/>
9798                         <field reporter:label="Estimated Unit Price" name="estimated_unit_price" reporter:datatype="money" />
9799                         <field reporter:label="Queued Vandelay Record" name="queued_record" reporter:datatype="link" />
9800                 </fields>
9801                 <links>
9802                         <link field="id" reltype="has_a" key="id" map="" class="jub"/>
9803                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9804                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
9805                         <link field="selector" reltype="has_a" key="id" map="" class="au"/>
9806                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
9807                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
9808                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl"/>
9809                         <link field="eg_bib_id" reltype="has_a" key="id" map="" class="bre"/>
9810                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
9811                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
9812                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
9813                 </links>
9814                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9815                         <actions>
9816                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
9817                                         <context link="purchase_order" field="ordering_agency"/>
9818                                         <context link="picklist" field="org_unit"/>
9819                                 </retrieve>
9820                         </actions>
9821                 </permacrud>
9822         </class>
9823
9824         <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">
9825                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_alert_text_id_seq">
9826                         <field reporter:label="Alert Text ID" name="id" reporter:datatype="id"/>
9827                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
9828                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
9829                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link"/>
9830                 </fields>
9831                 <links>
9832                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9833                 </links>
9834                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9835                         <actions>
9836                                 <create permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
9837                                 <retrieve permission="STAFF_LOGIN" context_field="owning_lib"/>
9838                                 <update permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
9839                                 <delete permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
9840                         </actions>
9841                 </permacrud>
9842         </class>
9843
9844         <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">
9845                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_note_id_seq">
9846                         <field reporter:label="PO Line Item Note ID" name="id" reporter:datatype="id" />
9847                         <field reporter:label="Line Item" name="lineitem" reporter:datatype="link" />
9848                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
9849                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
9850                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
9851                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
9852                         <field reporter:label="Note Value" name="value" reporter:datatype="text" />
9853                         <field reporter:label="Alert Text" name="alert_text" reporter:datatype="link" />
9854                         <field reporter:label="Vendor Public" name="vendor_public" reporter:datatype="bool" />
9855                 </fields>
9856                 <links>
9857                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9858                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
9859                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
9860                         <link field="alert_text" reltype="has_a" key="id" map="" class="acqliat"/>
9861                 </links>
9862         </class>
9863
9864         <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">
9865                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_id_seq">
9866                         <field reporter:label="Attribute Value ID" name="id" reporter:datatype="id" />
9867                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link" />
9868                         <field reporter:label="Type" name="attr_type" reporter:datatype="text" />
9869                         <field reporter:label="Name" name="attr_name" reporter:datatype="text" />
9870                         <field reporter:label="Value" name="attr_value" reporter:datatype="text" />
9871                         <field reporter:label="Definition" name="definition" reporter:datatype="text" />
9872                         <field reporter:label="Order Identifier" name="order_ident" reporter:datatype="bool" />
9873                 </fields>
9874                 <links>
9875                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
9876                         <link field="definition" reltype="has_a" key="id" map="" class="acqliad"/>
9877                 </links>
9878         </class>
9879
9880         <class id="acqlid" controller="open-ils.cstore open-ils.reporter-store" oils_obj:fieldmapper="acq::lineitem_detail" oils_persist:tablename="acq.lineitem_detail" reporter:label="Line Item Detail">
9881                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_detail_id_seq">
9882                         <field reporter:label="Item Detail ID" name="id" reporter:datatype="id" />
9883                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
9884                         <field reporter:label="Evergreen Copy ID" name="eg_copy_id" reporter:datatype="link" />
9885                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text" />
9886                         <field reporter:label="Call Number Label" name="cn_label" reporter:datatype="text" />
9887                         <field reporter:label="Actual Receive Date" name="recv_time" reporter:datatype="timestamp" />
9888                         <field reporter:label="Receiving User" name="receiver" reporter:datatype="link" />
9889                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
9890                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link" />
9891                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" />
9892                         <field reporter:label="Copy Location" name="location" reporter:datatype="link" />
9893                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="link" />
9894                         <field reporter:label="Note" name="note" reporter:datatype="text" />
9895                         <field reporter:label="Collection Code" name="collection_code" reporter:datatype="text" />
9896                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
9897                         <field reporter:label="Claims" name="claims" reporter:datatype="link" oils_persist:virtual="true" />
9898                 </fields>
9899                 <links>
9900                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
9901                         <link field="eg_copy_id" reltype="has_a" key="id" map="" class="acp"/>
9902                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9903                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
9904                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9905                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
9906                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
9907                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
9908                         <link field="claims" reltype="has_many" key="lineitem_detail" map="" class="acqcl"/>
9909                         <link field="receiver" reltype="has_a" key="id" map="" class="au"/>
9910                 </links>
9911         </class>
9912
9913         <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">
9914                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
9915                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
9916                         <field reporter:label="Code" name="code" reporter:datatype="text" />
9917                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
9918                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
9919                 </fields>
9920                 <links/>
9921                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9922                         <actions>
9923                                 <retrieve />
9924                         </actions>
9925                 </permacrud>
9926         </class>
9927
9928         <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">
9929                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
9930                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
9931                         <field reporter:label="Code" name="code" reporter:datatype="text" />
9932                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
9933                         <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
9934                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
9935             <field reporter:label="Remove" name="remove" reporter:datatype="text" />
9936                 </fields>
9937                 <links/>
9938         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9939             <actions>
9940                 <create permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
9941                 <retrieve />
9942                 <update permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
9943                 <delete permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
9944             </actions>
9945         </permacrud>
9946         </class>
9947
9948         <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">
9949                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
9950                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
9951                         <field reporter:label="Code" name="code" reporter:datatype="text" />
9952                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
9953                         <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
9954                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
9955                 </fields>
9956                 <links/>
9957         </class>
9958         <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">
9959                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
9960                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
9961                         <field reporter:label="Code" name="code" reporter:datatype="text" />
9962                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
9963                         <field reporter:label="User" name="usr" reporter:datatype="link" />
9964                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
9965                 </fields>
9966                 <links>
9967                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
9968                 </links>
9969         </class>
9970
9971         <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">
9972             <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
9973                 <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
9974                 <field reporter:label="Code" name="code" reporter:datatype="text" />
9975                 <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
9976                 <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
9977                 <field reporter:label="Provider" name="provider" reporter:datatype="link" />
9978                 <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
9979         <field reporter:label="Remove" name="remove" reporter:datatype="text" />
9980
9981             </fields>
9982             <links>
9983                 <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
9984             </links>
9985             <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9986                 <actions>
9987                     <create permission="ADMIN_PROVIDER">
9988                         <context link="provider" field="owner"/>
9989                     </create>
9990                     <retrieve permission="ADMIN_PROVIDER">
9991                         <context link="provider" field="owner"/>
9992                     </retrieve>
9993                     <update permission="ADMIN_PROVIDER">
9994                         <context link="provider" field="owner"/>
9995                     </update>
9996                     <delete permission="ADMIN_PROVIDER">
9997                         <context link="provider" field="owner"/>
9998                     </delete>
9999                 </actions>
10000             </permacrud>
10001         </class>
10002         
10003         <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">
10004             <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_holding_subfield_map_id_seq">
10005                 <field reporter:label="ID" name="id" reporter:datatype="id" />
10006                 <field reporter:label="Provider" name="provider" reporter:datatype="link" />
10007                 <field reporter:label="Name" name="name" reporter:datatype="text" />
10008                 <field reporter:label="Subfield" name="subfield" reporter:datatype="text" />
10009             </fields>
10010             <links>
10011                 <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
10012             </links>
10013             <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10014                 <actions>
10015                     <create permission="ADMIN_PROVIDER">
10016                         <context link="provider" field="owner"/>
10017                     </create>
10018                     <retrieve permission="ADMIN_PROVIDER">
10019                         <context link="provider" field="owner"/>
10020                     </retrieve>
10021                     <update permission="ADMIN_PROVIDER">
10022                         <context link="provider" field="owner"/>
10023                     </update>
10024                     <delete permission="ADMIN_PROVIDER">
10025                         <context link="provider" field="owner"/>
10026                     </delete>
10027                 </actions>
10028             </permacrud>
10029         </class>
10030         
10031         <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">
10032             <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
10033                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
10034                         <field reporter:label="Code" name="code" reporter:datatype="text" />
10035                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
10036                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
10037                 </fields>
10038                 <links/>
10039         </class>
10040
10041         <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">
10042                 <fields oils_persist:primary="id" oils_persist:sequence="config.remote_account_id_seq"><!-- edi_account inherits from config.remote_account, hence the seq -->
10043                         <field name="id"            reporter:datatype="id"        reporter:label="EDI Account ID" reporter:selector="label"/>
10044                         <field name="label"         reporter:datatype="text"      reporter:label="Label"/>
10045                         <field name="host"          reporter:datatype="text"      reporter:label="Host"/>
10046                         <field name="username"      reporter:datatype="text"      reporter:label="Username"/>
10047                         <field name="password"      reporter:datatype="text"      reporter:label="Password"/>
10048                         <field name="account"       reporter:datatype="text"      reporter:label="Account"/>
10049                         <field name="path"          reporter:datatype="text"      reporter:label="Path"/>
10050                         <field name="owner"         reporter:datatype="link"      reporter:label="Owner"/>
10051                         <field name="last_activity" reporter:datatype="timestamp" reporter:label="Last Activity"/>
10052                         <field name="provider"      reporter:datatype="link"      reporter:label="Provider"/>
10053                         <field name="in_dir"        reporter:datatype="text"      reporter:label="Incoming Directory"/>
10054                         <field name="vendacct"      reporter:datatype="text"      reporter:label="Vendor Account Number"/>
10055                         <field name="vendcode"      reporter:datatype="text"      reporter:label="Vendor Assigned Code"/>
10056                         <field name="attr_set"      reporter:datatype="link"      reporter:label="EDI Attribute Set"/>
10057                         <field name="use_attrs"     reporter:datatype="bool"      reporter:label="Use EDI Attributes"/>
10058                 </fields>
10059                 <links>
10060                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
10061                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
10062                         <link field="attr_set" reltype="has_a" key="id" map="" class="aeas"/>
10063                 </links>
10064         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10065             <actions>
10066                 <create permission="ADMIN_PROVIDER">
10067                     <context link="provider" field="owner"/>
10068                 </create>
10069                 <retrieve permission="ADMIN_PROVIDER">
10070                     <context link="provider" field="owner"/>
10071                 </retrieve>
10072                 <update permission="ADMIN_PROVIDER">
10073                     <context link="provider" field="owner"/>
10074                 </update>
10075                 <delete permission="ADMIN_PROVIDER">
10076                     <context link="provider" field="owner"/>
10077                 </delete>
10078             </actions>
10079         </permacrud>
10080         </class>
10081
10082         <class id="aea" controller="open-ils.cstore open-ils.pcrud" 
10083                 oils_obj:fieldmapper="acq::edi_attr" 
10084                 oils_persist:tablename="acq.edi_attr" reporter:label="EDI Attribute">
10085                 <fields oils_persist:primary="key">
10086                         <field name="key"   reporter:datatype="text" reporter:label="Key" reporter:selector="label"/>
10087                         <field name="label" reporter:datatype="text" reporter:label="Label"/>
10088                 </fields>
10089         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10090             <actions>
10091                 <create permission="ADMIN_PROVIDER" global_required="true"/>
10092                 <retrieve/>
10093                 <update permission="ADMIN_PROVIDER" global_required="true"/>
10094                 <delete permission="ADMIN_PROVIDER" global_required="true"/>
10095             </actions>
10096         </permacrud>
10097         </class>
10098         <class id="aeas" controller="open-ils.cstore open-ils.pcrud" 
10099                 oils_obj:fieldmapper="acq::edi_attr_set" 
10100                 oils_persist:tablename="acq.edi_attr_set" reporter:label="EDI Attribute Set">
10101                 <fields oils_persist:primary="id" oils_persist:sequence="acq.edi_attr_set_id_seq">
10102                         <field name="id"    reporter:datatype="id"   reporter:label="ID" reporter:selector="label"/>
10103                         <field name="label" reporter:datatype="text" reporter:label="Label"/>
10104                         <field name="attr_maps" reporter:datatype="link" oils_persist:virtual="true" reporter:label="Mapped EDI Attributes"/>
10105                 </fields>
10106                 <links>
10107                         <link field="attr_maps" reltype="has_many" key="attr_set" map="" class="aeasm"/>
10108                 </links>
10109         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10110             <actions>
10111                 <create permission="ADMIN_PROVIDER" global_required="true"/>
10112                 <retrieve/>
10113                 <update permission="ADMIN_PROVIDER" global_required="true"/>
10114                 <delete permission="ADMIN_PROVIDER" global_required="true"/>
10115             </actions>
10116         </permacrud>
10117         </class>
10118         <class id="aeasm" controller="open-ils.cstore open-ils.pcrud" 
10119                 oils_obj:fieldmapper="acq::edi_attr_set_map" 
10120                 oils_persist:tablename="acq.edi_attr_set_map" reporter:label="EDI Attribute Set Map">
10121                 <fields oils_persist:primary="id" oils_persist:sequence="acq.edi_attr_set_map_id_seq">
10122                         <field name="id"       reporter:datatype="id"   reporter:label="ID" reporter:selector="label"/>
10123                         <field name="attr_set" reporter:datatype="link" reporter:label="Attribute Set"/>
10124                         <field name="attr"     reporter:datatype="link" reporter:label="Attribute"/>
10125                 </fields>
10126                 <links>
10127                         <link field="attr_set" reltype="has_a" key="id" map="" class="aeas"/>
10128                         <link field="attr" reltype="has_a" key="id" map="" class="aea"/>
10129                 </links>
10130         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10131             <actions>
10132                 <create permission="ADMIN_PROVIDER" global_required="true"/>
10133                 <retrieve/>
10134                 <update permission="ADMIN_PROVIDER" global_required="true"/>
10135                 <delete permission="ADMIN_PROVIDER" global_required="true"/>
10136             </actions>
10137         </permacrud>
10138         </class>
10139
10140
10141         <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">
10142                 <fields oils_persist:primary="id" oils_persist:sequence="acq.edi_message_id_seq">
10143                         <field name="id"               reporter:datatype="id"        reporter:label="EDI Message ID"/>
10144                         <field name="account"          reporter:datatype="link"      reporter:label="EDI Account"/>
10145                         <field name="remote_file"      reporter:datatype="text"      reporter:label="Filename"/>
10146                         <field name="create_time"      reporter:datatype="timestamp" reporter:label="Time Created"/>
10147                         <field name="translate_time"   reporter:datatype="timestamp" reporter:label="Time Translated"/>
10148                         <field name="process_time"     reporter:datatype="timestamp" reporter:label="Time Processed"/>
10149                         <field name="error_time"       reporter:datatype="timestamp" reporter:label="Time of Error"/>
10150                         <field name="status"           reporter:datatype="text"      reporter:label="Status"/>
10151                         <field name="edi"              reporter:datatype="text"      reporter:label="EDI Message Body"/>
10152                         <field name="jedi"             reporter:datatype="text"      reporter:label="JEDI Message Body"/>
10153                         <field name="error"            reporter:datatype="text"      reporter:label="Error"/>
10154                         <field name="purchase_order"   reporter:datatype="link"      reporter:label="Purchase Order"/>
10155                         <field name="message_type"     reporter:datatype="text"      reporter:label="Message Type"/>
10156                 </fields>
10157                 <links>
10158                         <link field="account" reltype="has_a" key="id" map="" class="acqedi"/>
10159                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
10160                 </links>
10161         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10162             <actions>
10163                 <retrieve permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
10164                     <context link="account" jump="provider" field="owner"/>
10165                 </retrieve>
10166                 <update   permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
10167                     <context link="account" jump="provider" field="owner"/>
10168                 </update>
10169                 <delete   permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
10170                     <context link="account" jump="provider" field="owner"/>
10171                 </delete>
10172             </actions>
10173         </permacrud>
10174         </class>
10175
10176
10177         <class id="rof" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::output_folder" oils_persist:tablename="reporter.output_folder" reporter:label="Output Folder">
10178                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.output_folder_id_seq">
10179                         <field name="id" reporter:datatype="id" />
10180                         <field name="parent" reporter:datatype="link"/>
10181                         <field name="owner" reporter:datatype="link"/>
10182                         <field name="create_time" reporter:datatype="timestamp"/>
10183                         <field name="name" reporter:datatype="text"/>
10184                         <field name="shared" reporter:datatype="bool"/>
10185                         <field name="share_with" reporter:datatype="link"/>
10186                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
10187                         <field name="outputs" oils_persist:virtual="true" reporter:datatype="link"/>
10188                 </fields>
10189                 <links>
10190                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
10191                         <link field="parent" reltype="has_a" key="id" map="" class="rof"/>
10192                         <link field="children" reltype="has_many" key="parent" map="" class="rof"/>
10193                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
10194                         <link field="outputs" reltype="has_many" key="folder" map="" class="rs"/>
10195                 </links>
10196         </class>
10197         <class id="rtf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::template_folder" oils_persist:tablename="reporter.template_folder" reporter:label="Template Folder">
10198                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_folder_id_seq">
10199                         <field name="id" reporter:datatype="id" />
10200                         <field name="parent" reporter:datatype="link"/>
10201                         <field name="owner" reporter:datatype="link"/>
10202                         <field name="create_time" reporter:datatype="timestamp"/>
10203                         <field name="name" reporter:datatype="text"/>
10204                         <field name="shared" reporter:datatype="bool"/>
10205                         <field name="share_with" reporter:datatype="link"/>
10206                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
10207                         <field name="templates" oils_persist:virtual="true" reporter:datatype="link"/>
10208                 </fields>
10209                 <links>
10210                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
10211                         <link field="parent" reltype="has_a" key="id" map="" class="rtf"/>
10212                         <link field="children" reltype="has_many" key="parent" map="" class="rtf"/>
10213                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
10214                         <link field="templates" reltype="has_many" key="folder" map="" class="rt"/>
10215                 </links>
10216         </class>
10217         <class id="rrf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report_folder" oils_persist:tablename="reporter.report_folder" reporter:label="Report Folder">
10218                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_folder_id_seq">
10219                         <field name="id" reporter:datatype="id" />
10220                         <field name="parent" reporter:datatype="link"/>
10221                         <field name="owner" reporter:datatype="link"/>
10222                         <field name="create_time" reporter:datatype="timestamp"/>
10223                         <field name="name" reporter:datatype="text"/>
10224                         <field name="shared" reporter:datatype="bool"/>
10225                         <field name="share_with" reporter:datatype="link"/>
10226                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
10227                         <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>
10228                 </fields>
10229                 <links>
10230                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
10231                         <link field="parent" reltype="has_a" key="id" map="" class="rrf"/>
10232                         <link field="children" reltype="has_many" key="parent" map="" class="rrf"/>
10233                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
10234                         <link field="reports" reltype="has_many" key="folder" map="" class="rr"/>
10235                 </links>
10236         </class>
10237         <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">
10238                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_id_seq">
10239                         <field name="id" reporter:datatype="id" />
10240                         <field name="owner" reporter:datatype="link"/>
10241                         <field name="create_time" reporter:datatype="timestamp"/>
10242                         <field name="name" reporter:datatype="text"/>
10243                         <field name="data" reporter:datatype="text"/>
10244                         <field name="folder" reporter:datatype="link"/>
10245                         <field name="description" reporter:datatype="text"/>
10246                         <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>
10247                 </fields>
10248                 <links>
10249                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
10250                         <link field="folder" reltype="has_a" key="id" map="" class="rtf"/>
10251                         <link field="reports" reltype="has_many" key="template" map="" class="rr"/>
10252                 </links>
10253         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10254             <actions>
10255                 <create   permission="RUN_REPORTS" owning_user="owner" global_required="true"/>
10256                 <retrieve permission="RUN_REPORTS" owning_user="owner" global_required="true"/>
10257                 <update   permission="RUN_REPORTS" owning_user="owner" global_required="true"/>
10258                 <delete   permission="RUN_REPORTS" owning_user="owner" global_required="true"/>
10259             </actions>
10260         </permacrud>
10261         </class>
10262         <class id="rr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report" oils_persist:tablename="reporter.report" reporter:label="Report">
10263                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_id_seq">
10264                         <field name="id" reporter:datatype="id" />
10265                         <field name="owner" reporter:datatype="link"/>
10266                         <field name="create_time" reporter:datatype="timestamp"/>
10267                         <field name="template" reporter:datatype="link"/>
10268                         <field name="data" reporter:datatype="text"/>
10269                         <field name="folder" reporter:datatype="link"/>
10270                         <field name="recur" reporter:datatype="bool"/>
10271                         <field name="recurrence" reporter:datatype="interval"/>
10272                         <field name="name" reporter:datatype="text"/>
10273                         <field name="description" reporter:datatype="text"/>
10274                         <field name="runs" oils_persist:virtual="true" reporter:datatype="link"/>
10275                 </fields>
10276                 <links>
10277                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
10278                         <link field="template" reltype="has_a" key="id" map="" class="rt"/>
10279                         <link field="folder" reltype="has_a" key="id" map="" class="rrf"/>
10280                         <link field="runs" reltype="has_many" key="report" map="" class="rs"/>
10281                 </links>
10282         </class>
10283         <class id="rs" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::schedule" oils_persist:tablename="reporter.schedule" reporter:label="Schedule">
10284                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.schedule_id_seq">
10285                         <field name="id" reporter:datatype="id" />
10286                         <field name="runner" reporter:datatype="link"/>
10287                         <field name="start_time" reporter:datatype="timestamp"/>
10288                         <field name="complete_time" reporter:datatype="timestamp"/>
10289                         <field name="run_time" reporter:datatype="timestamp"/>
10290                         <field name="email" reporter:datatype="text"/>
10291                         <field name="excel_format" reporter:datatype="bool"/>
10292                         <field name="csv_format" reporter:datatype="bool"/>
10293                         <field name="html_format" reporter:datatype="bool"/>
10294                         <field name="error_code" reporter:datatype="int"/>
10295                         <field name="error_text" reporter:datatype="text"/>
10296                         <field name="report" reporter:datatype="link"/>
10297                         <field name="folder" reporter:datatype="link"/>
10298                         <field name="chart_pie" reporter:datatype="bool"/>
10299                         <field name="chart_bar" reporter:datatype="bool"/>
10300                         <field name="chart_line" reporter:datatype="bool"/>
10301                 </fields>
10302                 <links>
10303                         <link field="runner" reltype="has_a" key="id" map="" class="au"/>
10304                         <link field="report" reltype="has_a" key="id" map="" class="rr"/>
10305                         <link field="folder" reltype="has_a" key="id" map="" class="rof"/>
10306                 </links>
10307         </class>
10308         <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">
10309                 <fields oils_persist:primary="id">
10310                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
10311                         <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>
10312                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
10313                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
10314                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
10315                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
10316                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
10317                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
10318                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
10319                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
10320                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
10321                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
10322                 </fields>
10323                 <links>
10324                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
10325                 </links>
10326                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10327                         <actions>
10328                                 <retrieve />
10329                         </actions>
10330                 </permacrud>
10331         </class>
10332         <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">
10333                 <fields oils_persist:primary="id">
10334                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
10335                         <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>
10336                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
10337                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
10338                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
10339                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
10340                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
10341                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
10342                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
10343                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
10344                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
10345                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
10346                 </fields>
10347                 <links>
10348                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
10349                 </links>
10350         </class>
10351         <class id="rsr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::simple_record" oils_persist:tablename="reporter.simple_record" reporter:label="Simple Record">
10352                 <fields oils_persist:primary="id">
10353                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
10354                         <field reporter:label="Metarecord" name="metarecord" reporter:datatype="link"/>
10355                         <field reporter:label="Fingerprint" name="fingerprint" />
10356                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
10357                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
10358                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
10359                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
10360                         <field reporter:label="Uniform Title (normalized)" name="uniform_title" reporter:datatype="text"/>
10361                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
10362                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
10363                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
10364                         <field reporter:label="Series Title (normalized)" name="series_title" reporter:datatype="text"/>
10365                         <field reporter:label="Series Statement (normalized)" name="series_statement" reporter:datatype="text"/>
10366                         <field reporter:label="Summary (normalized)" name="summary" reporter:datatype="text"/>
10367                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
10368                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
10369                         <field reporter:label="Topic Subjects (normalized)" name="topic_subject" reporter:datatype="text"/>
10370                         <field reporter:label="Geographic Subjects (normalized)" name="geographic_subject" reporter:datatype="text"/>
10371                         <field reporter:label="Genres (normalized)" name="genre" reporter:datatype="text"/>
10372                         <field reporter:label="Personal Name Subjects (normalized)" name="name_subject" reporter:datatype="text"/>
10373                         <field reporter:label="Corporate Name Subjects (normalized)" name="corporate_subject" reporter:datatype="text"/>
10374                         <field reporter:label="External URI List (normalized)" name="external_uri" reporter:datatype="text"/>
10375                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
10376                 </fields>
10377                 <links>
10378                         <link field="metarecord" reltype="has_a" key="id" map="" class="mmr"/>
10379                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
10380                 </links>
10381         </class>
10382         <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">
10383                 <fields oils_persist:primary="id">
10384                         <field reporter:label="User ID" name="id" reporter:datatype="id" />
10385                         <field reporter:label="Date of Birth" name="dob" reporter:datatype="timestamp"/>
10386                         <field reporter:label="General Demographic Division" name="general_division" reporter:datatype="text"/>
10387                 </fields>
10388                 <links>
10389                         <link field="id" reltype="might_have" key="id" map="" class="au"/>
10390                 </links>
10391         </class>
10392         <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">
10393                 <fields oils_persist:primary="id">
10394                         <field reporter:label="Circulation ID" name="id" reporter:datatype="id" />
10395                         <field reporter:label="Circulation Type" name="type" reporter:datatype="text"/>
10396                 </fields>
10397                 <links>
10398                         <link field="id" reltype="might_have" key="id" map="" class="circ"/>
10399                 </links>
10400         </class>
10401         <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">
10402                 <fields oils_persist:primary="id">
10403                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
10404                         <field reporter:label="Hold Target" name="target" reporter:datatype="int" />
10405                         <field reporter:label="Hold Request Type" name="hold_type" reporter:datatype="text"/>
10406                         <field reporter:label="Target Bib Record" name="bib_record" reporter:datatype="link"/>
10407                 </fields>
10408                 <links>
10409                         <link field="id" reltype="might_have" key="id" map="" class="ahr"/>
10410                         <link field="bib_record" reltype="has_a" key="id" map="" class="bre"/>
10411                 </links>
10412         </class>
10413         <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">
10414                 <fields oils_persist:primary="xact">
10415                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />
10416                         <field reporter:label="Unvoided Billing Amount" name="unvoided" reporter:datatype="money" />
10417                         <field reporter:label="Voided Billing Amount" name="voided" reporter:datatype="money"/>
10418                         <field reporter:label="Total Billing Amount" name="total" reporter:datatype="money"/>
10419                 </fields>
10420                 <links>
10421                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
10422                 </links>
10423         </class>
10424         <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">
10425                 <fields oils_persist:primary="xact">
10426                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />
10427                         <field reporter:label="Unvoided Paid Amount" name="unvoided" reporter:datatype="money" />
10428                         <field reporter:label="Voided (Returned) Paid Amount" name="voided" reporter:datatype="money"/>
10429                         <field reporter:label="Total Paid Amount" name="total" reporter:datatype="money"/>
10430                 </fields>
10431                 <links>
10432                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
10433                 </links>
10434         </class>
10435         <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)">
10436                 <fields oils_persist:primary="id">
10437                         <field reporter:label="Bib ID" name="id" reporter:datatype="id" />
10438                         <field reporter:label="Update Time" name="holding_update" reporter:datatype="timestamp" />
10439                         <field reporter:label="Update Type" name="update_type" reporter:datatype="text" />
10440                 </fields>
10441                 <links>
10442                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
10443                 </links>
10444         </class>
10445         <class id="erfcc" controller="open-ils.reporter-store" oils_obj:fieldmapper="extend_reporter::full_circ_count" oils_persist:tablename="extend_reporter.full_circ_count" reporter:label="Total Circulation Count, Including Legacy">
10446                 <fields oils_persist:primary="id">
10447                         <field reporter:label="Copy ID" name="id" reporter:datatype="int" />
10448                         <field reporter:label="Total Circulation Count" name="circ_count" reporter:datatype="int" />
10449                 </fields>
10450                 <links>
10451                         <link field="id" reltype="has_a" key="id" map="" class="acp"/>
10452                 </links>
10453         </class>
10454         <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">
10455                 <fields oils_persist:primary="bibid">
10456                         <field reporter:label="Bib Record" name="bibid" reporter:datatype="id" />
10457                         <field reporter:label="Circulation Library" name="circ_lib" reporter:datatype="link" />
10458                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link" />
10459                         <field reporter:label="Last Edit Date" name="last_edit_time" reporter:datatype="timestamp" />
10460                         <field reporter:label="Has Only Deleted Copies 0/1" name="has_only_deleted_copies" reporter:datatype="int" />
10461                         <field reporter:label="Total deleted copies" name="deleted_count" reporter:datatype="int" />
10462                         <field reporter:label="Total visible copies" name="visible_count" reporter:datatype="int" />
10463                         <field reporter:label="Total copies attached" name="total_count" reporter:datatype="int" />
10464                 </fields>
10465                 <links>
10466                         <link field="bibid" reltype="has_a" key="id" map="" class="bre"/>
10467                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
10468                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10469                 </links>
10470         </class>
10471         <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">
10472                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_id_seq">
10473                         <field reporter:label="Formula ID" name="id" reporter:datatype="id" reporter:selector="name" />
10474                         <field reporter:label="Formula Owner" name="owner" reporter:datatype="org_unit"/>
10475                         <field reporter:label="Formula Name" name="name" reporter:datatype="text"/>
10476                         <field reporter:label="Skip Count" name="skip_count" reporter:datatype="int"/>
10477                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
10478                         <field reporter:label="Use Count" name="use_count" oils_persist:virtual="true" reporter:datatype="int"/>
10479                 </fields>
10480                 <links>
10481                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
10482                         <link field="entries" reltype="has_many" key="formula" map="" class="acqdfe"/>
10483                 </links>
10484                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10485                         <actions>
10486                                 <create permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
10487                                 <retrieve permission="CREATE_PURCHASE_ORDER ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
10488                                 <update permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
10489                                 <delete permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
10490                         </actions>
10491                 </permacrud>
10492         </class>
10493         <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">
10494                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_entry_id_seq">
10495                         <field reporter:label="Entry ID" name="id" reporter:datatype="id"/>
10496                         <field reporter:label="Formula ID" name="formula" reporter:datatype="link"/>
10497                         <field reporter:label="Position" name="position" reporter:datatype="int"/>
10498                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
10499                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
10500                         <field reporter:label="Location" name="location" reporter:datatype="link"/>
10501                         <field reporter:label="Fund" name="fund" reporter:datatype="link"/>
10502                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
10503                         <field reporter:label="Collection Code" name="collection_code" reporter:datatype="text"/>
10504                 </fields>
10505                 <links>
10506                         <link field="formula" reltype="has_a" key="id" map="" class="acqdf"/>
10507                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10508                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
10509                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
10510                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
10511                 </links>
10512                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10513                         <actions>
10514                                 <create permission="ADMIN_ACQ_DISTRIB_FORMULA">
10515                                         <context link="formula" field="owner"/>
10516                                 </create>
10517                                 <retrieve permission="ADMIN_ACQ_DISTRIB_FORMULA">
10518                                         <context link="formula" field="owner"/>
10519                                 </retrieve>
10520                                 <update permission="ADMIN_ACQ_DISTRIB_FORMULA">
10521                                         <context link="formula" field="owner"/>
10522                                 </update>
10523                                 <delete permission="ADMIN_ACQ_DISTRIB_FORMULA">
10524                                         <context link="formula" field="owner"/>
10525                                 </delete>
10526                         </actions>
10527                 </permacrud>
10528         </class>
10529
10530         <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">
10531                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_application_id_seq">
10532                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
10533                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
10534                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
10535                         <field reporter:label="Distribution Formula" name="formula" reporter:datatype="link"/>
10536                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
10537                 </fields>
10538                 <links>
10539                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
10540                         <link field="formula" reltype="has_a" key="id" map="" class="acqdf"/>
10541                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
10542                 </links>
10543                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10544                         <actions>
10545                                 <create permission="CREATE_PURCHASE_ORDER">
10546                                         <context link="formula" field="owner"/>
10547                 </create>
10548                                 <retrieve permission="CREATE_PURCHASE_ORDER">
10549                                         <context link="formula" field="owner"/>
10550                 </retrieve>
10551                                 <update permission="CREATE_PURCHASE_ORDER">
10552                                         <context link="formula" field="owner"/>
10553                 </update>
10554                                 <delete permission="CREATE_PURCHASE_ORDER">
10555                                         <context link="formula" field="owner"/>
10556                 </delete>
10557                         </actions>
10558                 </permacrud>
10559         </class>
10560
10561         <class id="acqda" controller="open-ils.cstore" oils_obj:fieldmapper="acq::debit_attribution" oils_persist:tablename="acq.debit_attribution" reporter:label="Debit Attribution">
10562                 <fields oils_persist:primary="id">
10563                         <field reporter:label="Debit Attribution ID" name="id" reporter:datatype="id"/>
10564                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
10565                         <field reporter:label="Debit Amount" name="debit_amount" reporter:datatype="money"/>
10566                         <field reporter:label="Funding Source Credit" name="funding_source_credit" reporter:datatype="link"/>
10567                         <field reporter:label="Credit Amount" name="credit_amount" reporter:datatype="money"/>
10568                 </fields>
10569                 <links>
10570                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
10571                         <link field="funding_source_credit" reltype="has_a" key="id" map="" class="acqfscred"/>
10572                 </links>
10573         </class>
10574
10575         <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">
10576                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_type_id_seq">
10577                         <field reporter:label="Claim Type ID" name="id" reporter:datatype="id" reporter:selector="code" />
10578                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
10579                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
10580                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
10581                 </fields>
10582                 <links>
10583                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
10584                 </links>
10585                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10586                         <actions>
10587                                 <create permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
10588                                 <retrieve permission="ADMIN_ACQ_CLAIM_TYPE ADMIN_ACQ_CLAIM VIEW_CLAIM MANAGE_CLAIM" context_field="org_unit"/>
10589                                 <update permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
10590                                 <delete permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
10591                         </actions>
10592                 </permacrud>
10593         </class>
10594
10595         <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">
10596                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_event_type_id_seq">
10597                         <field reporter:label="Claim Event Type ID" name="id" reporter:datatype="id" reporter:selector="code" />
10598                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
10599                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
10600                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
10601                         <field reporter:label="Library Initiated" name="library_initiated" reporter:datatype="bool"/>
10602                 </fields>
10603                 <links>
10604                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
10605                 </links>
10606                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10607                         <actions>
10608                                 <create permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
10609                                 <retrieve permission="ADMIN_ACQ_CLAIM_EVENT_TYPE ADMIN_ACQ_CLAIM VIEW_CLAIM MANAGE_CLAIM" context_field="org_unit"/>
10610                                 <update permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
10611                                 <delete permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
10612                         </actions>
10613                 </permacrud>
10614         </class>
10615
10616         <class id="acqcl" controller="open-ils.cstore" oils_obj:fieldmapper="acq::claim" oils_persist:tablename="acq.claim" reporter:label="Claim">
10617                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_id_seq">
10618                         <field reporter:label="Claim ID" name="id" reporter:datatype="id"/>
10619                         <field reporter:label="Claim Type" name="type" reporter:datatype="link"/>
10620                         <field reporter:label="Lineitem Detail" name="lineitem_detail" reporter:datatype="link"/>
10621                 </fields>
10622                 <links>
10623                         <link field="type" reltype="has_a" key="id" map="" class="acqclt"/>
10624                         <link field="lineitem_detail" reltype="has_a" key="id" map="" class="acqlid"/>
10625                 </links>
10626         </class>
10627
10628         <class id="acqcle" controller="open-ils.cstore" oils_obj:fieldmapper="acq::claim_event" oils_persist:tablename="acq.claim_event" reporter:label="Claim Event">
10629                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_event_id_seq">
10630                         <field reporter:label="Claim Event ID" name="id" reporter:datatype="id"/>
10631                         <field reporter:label="Claim Event Type" name="type" reporter:datatype="link"/>
10632                         <field reporter:label="Claim ID" name="claim" reporter:datatype="link"/>
10633                         <field reporter:label="Event Date" name="event_date" reporter:datatype="timestamp"/>
10634                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
10635                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
10636                 </fields>
10637                 <links>
10638                         <link field="type" reltype="has_a" key="id" map="" class="acqclet"/>
10639                         <link field="claim" reltype="has_a" key="id" map="" class="acqcl"/>
10640                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
10641                 </links>
10642         </class>
10643
10644         <class id="acqscl" controller="open-ils.cstore" oils_obj:fieldmapper="acq::serial_claim" oils_persist:tablename="acq.serial_claim" reporter:label="Serial Claim">
10645                 <fields oils_persist:primary="id" oils_persist:sequence="acq.serial_claim_id_seq">
10646                         <field reporter:label="Claim ID" name="id" reporter:datatype="id"/>
10647                         <field reporter:label="Claim Type" name="type" reporter:datatype="link"/>
10648                         <field reporter:label="Serial Item" name="item" reporter:datatype="link"/>
10649                 </fields>
10650                 <links>
10651                         <link field="type" reltype="has_a" key="id" map="" class="acqclt"/>
10652                         <link field="item" reltype="has_a" key="id" map="" class="sitem"/>
10653                 </links>
10654         </class>
10655
10656         <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">
10657                 <fields oils_persist:primary="id" oils_persist:sequence="acq.serial_claim_event_id_seq">
10658                         <field reporter:label="Claim Event ID" name="id" reporter:datatype="id"/>
10659                         <field reporter:label="Claim Event Type" name="type" reporter:datatype="link"/>
10660                         <field reporter:label="Claim ID" name="claim" reporter:datatype="link"/>
10661                         <field reporter:label="Event Date" name="event_date" reporter:datatype="timestamp"/>
10662                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
10663                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
10664                 </fields>
10665                 <links>
10666                         <link field="type" reltype="has_a" key="id" map="" class="acqclet"/>
10667                         <link field="claim" reltype="has_a" key="id" map="" class="acqscl"/>
10668                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
10669                 </links>
10670         </class>
10671
10672         <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">
10673                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_policy_id_seq">
10674                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
10675                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
10676                         <field reporter:label="Claim Policy Name" name="name" reporter:datatype="text"/>
10677                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
10678                 </fields>
10679                 <links>
10680                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
10681                 </links>
10682                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10683             <actions>
10684                 <create   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
10685                 <retrieve permission="ADMIN_CLAIM_POLICY VIEW_PROVIDER" context_field="org_unit"/>
10686                 <update   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
10687                 <delete   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
10688             </actions>
10689                 </permacrud>
10690         </class>
10691
10692         <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">
10693                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_policy_action_id_seq">
10694                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="action"/>
10695                         <field reporter:label="Claim Policy ID" name="claim_policy" reporter:datatype="link"/>
10696                         <field reporter:label="Action Interval" name="action_interval" reporter:datatype="interval"/>
10697                         <field reporter:label="Action (Event Type)" name="action" reporter:datatype="link"/>
10698                 </fields>
10699                 <links>
10700                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
10701                         <link field="action" reltype="has_a" key="id" map="" class="acqclet"/>
10702                 </links>
10703                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10704                         <actions>
10705                                 <create permission="ADMIN_CLAIM_POLICY">
10706                                         <context link="claim_policy" field="org_unit"/>
10707                 </create>
10708                                 <retrieve permission="ADMIN_CLAIM_POLICY VIEW_PROVIDER">
10709                                         <context link="claim_policy" field="org_unit"/>
10710                 </retrieve>
10711                                 <update permission="ADMIN_CLAIM_POLICY">
10712                                         <context link="claim_policy" field="org_unit"/>
10713                 </update>
10714                                 <delete permission="ADMIN_CLAIM_POLICY">
10715                                         <context link="claim_policy" field="org_unit"/>
10716                 </delete>
10717                         </actions>
10718                 </permacrud>
10719         </class>
10720
10721     <class id="stgu" controller="open-ils.cstore" oils_obj:fieldmapper="staging::user_stage" oils_persist:tablename="staging.user_stage" reporter:label="User Stage">
10722         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.user_stage_row_id_seq">
10723             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
10724             <field reporter:label="Create Date" name="row_date" reporter:datatype="timestamp"/>
10725             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
10726             <field reporter:label="Main (Profile) Permission Group" name="profile" reporter:datatype="text"/>
10727             <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
10728             <field reporter:label="Password" name="passwd" reporter:datatype="text"/>
10729             <field reporter:label="Primary Identification Type" name="ident_type" reporter:datatype="int"/>
10730             <field reporter:label="First Name" name="first_given_name" reporter:datatype="text"/>
10731             <field reporter:label="Middle Name" name="second_given_name" reporter:datatype="text"/>
10732             <field reporter:label="Last Name" name="family_name" reporter:datatype="text"/>
10733             <field reporter:label="Daytime Phone" name="day_phone" reporter:datatype="text"/>
10734             <field reporter:label="Evening Phone" name="evening_phone" reporter:datatype="text"/>
10735             <field reporter:label="Home Library" name="home_ou" reporter:datatype="int"/>
10736             <field reporter:label="Date of Birth" name="dob" reporter:datatype="text"/>
10737             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
10738             <field reporter:label="Requesting User" name="requesting_usr" reporter:datatype="link"/>
10739                                                 <field reporter:label="Preferred First Name" name="pref_first_given_name" reporter:datatype="text"/>
10740                                                 <field reporter:label="Preferred Middle Name" name="pref_second_given_name" reporter:datatype="text"/>
10741                                                 <field reporter:label="Preferred Last Name" name="pref_family_name"  reporter:datatype="text"/>
10742         </fields>
10743         <links>
10744             <link field="requesting_usr" reltype="has_a" key="id" map="" class="au"/>
10745         </links>
10746     </class>
10747
10748     <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">
10749         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.card_stage_row_id_seq">
10750             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
10751             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
10752             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
10753             <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
10754             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
10755         </fields>
10756     </class>
10757
10758     <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">
10759         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.mailing_address_stage_row_id_seq">
10760             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
10761             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
10762             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
10763             <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
10764             <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
10765             <field reporter:label="City" name="city" reporter:datatype="text"/>
10766             <field reporter:label="County" name="county"  reporter:datatype="text"/>
10767             <field reporter:label="State" name="state" reporter:datatype="text"/>
10768             <field reporter:label="Country" name="country" reporter:datatype="text"/>
10769             <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
10770             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
10771         </fields>
10772     </class>
10773
10774     <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">
10775         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.mailing_address_stage_row_id_seq">
10776             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
10777             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
10778             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
10779             <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
10780             <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
10781             <field reporter:label="City" name="city" reporter:datatype="text"/>
10782             <field reporter:label="County" name="county"  reporter:datatype="text"/>
10783             <field reporter:label="State" name="state" reporter:datatype="text"/>
10784             <field reporter:label="Country" name="country" reporter:datatype="text"/>
10785             <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
10786             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
10787         </fields>
10788     </class>
10789
10790     <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">
10791         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.statcat_stage_row_id_seq">
10792             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
10793             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
10794             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
10795             <field reporter:label="Stat Cat ID" name="statcat" reporter:datatype="text"/>
10796             <field reporter:label="Stat Cat Value" name="value" reporter:datatype="text"/>
10797             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
10798         </fields>
10799     </class>
10800
10801     <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">
10802         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.setting_stage_row_id_seq">
10803             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
10804             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
10805             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
10806             <field reporter:label="User Setting Code" name="setting" reporter:datatype="text"/>
10807             <field reporter:label="User Setting Value" name="value" reporter:datatype="text"/>
10808             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
10809         </fields>
10810     </class>
10811
10812         <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">
10813                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_group_id_seq">
10814                         <field reporter:label="Fieldset Group ID" name="id" reporter:datatype="id"/>
10815                         <field reporter:label="Fieldset Group Name" name="name" reporter:datatype="text" oils_obj:required="true"/>
10816                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp"/>
10817                         <field reporter:label="Complete Time" name="complete_time" reporter:datatype="timestamp"/>
10818                         <field reporter:label="Container ID" name="container" reporter:datatype="int" oils_obj:required="true"/> <!-- not an fkey because could be on multiple tables -->
10819                         <field reporter:label="Container Type" name="container_type" reporter:datatype="text" oils_obj:required="true"/>
10820                         <field reporter:label="Rollback Group" name="rollback_group" reporter:datatype="link"/>
10821                         <field reporter:label="Rollback Time" name="rollback_time" reporter:datatype="timestamp"/>
10822                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
10823                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
10824                 </fields>
10825                 <links>
10826                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
10827                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10828                         <link field="rollback_group" reltype="has_a" key="id" map="" class="afsg"/>
10829                 </links>
10830                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10831                         <actions>
10832                                 <create permission="CREATE_FIELDSET_GROUP ADMIN_FIELDSET_GROUP" context_field="owning_lib" owning_user="creator"/>
10833                                 <retrieve permission="RETRIEVE_FIELDSET_GROUP ADMIN_FIELDSET_GROUP" context_field="owning_lib" owning_user="creator"/>
10834                                 <update permission="UPDATE_FIELDSET_GROUP ADMIN_FIELDSET_GROUP" context_field="owning_lib" owning_user="creator"/>
10835                                 <delete permission="DELETE_FIELDSET_GROUP ADMIN_FIELDSET_GROUP" context_field="owning_lib" owning_user="creator"/>
10836                         </actions>
10837                 </permacrud>
10838         </class>
10839
10840         <class id="afs" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::fieldset" oils_persist:tablename="action.fieldset" reporter:label="Fieldset">
10841                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_id_seq">
10842                         <field reporter:label="Fieldset ID" name="id" reporter:datatype="id"/>
10843                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
10844                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link"/>
10845                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
10846                         <field reporter:label="Creation Time" name="creation_time" reporter:datatype="timestamp"/>
10847                         <field reporter:label="Scheduled Time" name="scheduled_time" reporter:datatype="timestamp"/>
10848                         <field reporter:label="Applied Time" name="applied_time" reporter:datatype="timestamp"/>
10849                         <field reporter:label="Class Name" name="classname" reporter:datatype="text"/>
10850                         <field reporter:label="Fieldset Name" name="name" reporter:datatype="text"/>
10851                         <field reporter:label="Stored Query" name="stored_query" reporter:datatype="link"/>
10852                         <field reporter:label="Primary Key Value" name="pkey_value" reporter:datatype="text"/>
10853                         <field reporter:label="Fieldset Group" name="fieldset_group" reporter:datatype="link"/>
10854                         <field reporter:label="Error Message" name="error_msg" reporter:datatype="text"/>
10855                 </fields>
10856                 <links>
10857                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
10858                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10859                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
10860                         <link field="fieldset_group" reltype="has_a" key="id" map="" class="afsg"/>
10861                 </links>
10862                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10863                         <actions>
10864                                 <create permission="CREATE_FIELDSET ADMIN_FIELDSET" context_field="owning_lib" owning_user="owner"/>
10865                                 <retrieve permission="RETRIEVE_FIELDSET ADMIN_FIELDSET" context_field="owning_lib" owning_user="owner"/>
10866                                 <update permission="UPDATE_FIELDSET ADMIN_FIELDSET" context_field="owning_lib" owning_user="owner"/>
10867                                 <delete permission="DELETE_FIELDSET ADMIN_FIELDSET" context_field="owning_lib" owning_user="owner"/>
10868                         </actions>
10869                 </permacrud>
10870         </class>
10871
10872         <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">
10873                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_col_val_id_seq">
10874                         <field reporter:label="Column Value ID" name="id" reporter:datatype="id"/>
10875                         <field reporter:label="Fieldset ID" name="fieldset" reporter:datatype="link"/>
10876                         <field reporter:label="Column Name" name="col" reporter:datatype="text"/>
10877                         <field reporter:label="Column Value" name="val" reporter:datatype="text"/>
10878                 </fields>
10879                 <links>
10880                         <link field="fieldset" reltype="has_a" key="id" map="" class="afs"/>
10881                 </links>
10882                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1"> <!-- NOTE: foreign context does not support owning_user today -->
10883                         <actions>
10884                                 <create permission="CREATE_FIELDSET_ENTRY ADMIN_FIELDSET_ENTRY">
10885                     <context link="fieldset" field="owning_lib"/>
10886                 </create>
10887                                 <retrieve permission="RETRIEVE_FIELDSET_ENTRY ADMIN_FIELDSET_ENTRY">
10888                     <context link="fieldset" field="owning_lib"/>
10889                 </retrieve>
10890                                 <update permission="UPDATE_FIELDSET_ENTRY ADMIN_FIELDSET_ENTRY">
10891                     <context link="fieldset" field="owning_lib"/>
10892                 </update>
10893                                 <delete permission="DELETE_FIELDSET_ENTRY ADMIN_FIELDSET_ENTRY">
10894                     <context link="fieldset" field="owning_lib"/>
10895                 </delete>
10896                         </actions>
10897                 </permacrud>
10898         </class>
10899
10900     <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">
10901         <fields>
10902             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
10903             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
10904             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
10905         </fields>
10906                 <links>
10907                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
10908                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
10909                 </links>
10910     </class>
10911
10912     <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">
10913         <fields>
10914             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
10915             <field reporter:label="Min Loop" name="min" reporter:datatype="int"/>
10916         </fields>
10917                 <links>
10918                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
10919                 </links>
10920     </class>
10921
10922     <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">
10923         <fields>
10924             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
10925             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
10926             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
10927         </fields>
10928                 <links>
10929                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
10930                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
10931                 </links>
10932     </class>
10933
10934     <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">
10935         <fields>
10936             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
10937             <field reporter:label="Max Loop" name="max" reporter:datatype="int"/>
10938         </fields>
10939                 <links>
10940                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
10941                 </links>
10942     </class>
10943
10944     <class id="aufhol" controller="open-ils.cstore" oils_obj:fieldmapper="action::unfulfilled_hold_outermost_loop" oils_persist:readonly="true">
10945                 <oils_persist:source_definition><![CDATA[
10946
10947             SELECT  DISTINCT l.*
10948               FROM  action.unfulfilled_hold_loops l
10949                     JOIN action.unfulfilled_hold_max_loop m USING (hold)
10950               WHERE l.count = m.max
10951
10952                 ]]></oils_persist:source_definition>
10953         <fields>
10954             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
10955             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
10956             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
10957         </fields>
10958                 <links>
10959                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
10960                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
10961                 </links>
10962     </class>
10963
10964         <class id="qsq" controller="open-ils.cstore" oils_obj:fieldmapper="query::stored_query" oils_persist:tablename="query.stored_query" reporter:label="Stored Query">
10965                 <fields oils_persist:primary="id" oils_persist:sequence="query.stored_query_id_seq">
10966                         <field reporter:label="Query ID" name="id" reporter:datatype="id"/>
10967                         <field reporter:label="Query type" name="type" reporter:datatype="text"/>
10968                         <field reporter:label="Use ALL" name="use_all" reporter:datatype="bool"/>
10969                         <field reporter:label="Use DISTINCT" name="use_distinct" reporter:datatype="bool"/>
10970                         <field reporter:label="FROM Clause" name="from_clause" reporter:datatype="link"/>
10971                         <field reporter:label="WHERE Clause" name="where_clause" reporter:datatype="link"/>
10972                         <field reporter:label="HAVING Clause" name="having_clause" reporter:datatype="link"/>
10973                         <field reporter:label="LIMIT count" name="limit_count" reporter:datatype="link"/>
10974                         <field reporter:label="OFFSET count" name="offset_count" reporter:datatype="link"/>
10975                 </fields>
10976                 <links>
10977                         <link field="from_clause" reltype="has_a" key="id" map="" class="qfr"/>
10978                         <link field="having_clause" reltype="has_a" key="id" map="" class="qxp"/>
10979                         <link field="where_clause" reltype="has_a" key="id" map="" class="qxp"/>
10980                         <link field="limit_count" reltype="has_a" key="id" map="" class="qxp"/>
10981                         <link field="offset_count" reltype="has_a" key="id" map="" class="qxp"/>
10982                 </links>
10983         </class>
10984
10985         <class id="qseq" controller="open-ils.cstore" oils_obj:fieldmapper="query::query_sequence" oils_persist:tablename="query.query_sequence" reporter:label="Query Sequence">
10986                 <fields oils_persist:primary="id" oils_persist:sequence="query.query_sequence_id_seq">
10987                         <field reporter:label="Query Seq ID" name="id" reporter:datatype="id"/>
10988                         <field reporter:label="Parent Query" name="parent_query" reporter:datatype="link"/>
10989                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10990                         <field reporter:label="Child Query" name="child_query" reporter:datatype="link"/>
10991                 </fields>
10992                 <links>
10993                         <link field="parent_query" reltype="has_a" key="id" map="" class="qsq"/>
10994                         <link field="child_query" reltype="has_a" key="id" map="" class="qsq"/>
10995                 </links>
10996         </class>
10997
10998         <class id="qdt" controller="open-ils.cstore" oils_obj:fieldmapper="query::datatype" oils_persist:tablename="query.datatype" reporter:label="Datatype">
10999                 <fields oils_persist:primary="id" oils_persist:sequence="query.datatype_id_seq">
11000                         <field reporter:label="Datatype ID" name="id" reporter:datatype="id"/>
11001                         <field reporter:label="Datatype Name" name="datatype_name" reporter:datatype="text"/>
11002                         <field reporter:label="Is Numeric" name="is_numeric" reporter:datatype="bool"/>
11003                         <field reporter:label="Is Composite" name="is_composite" reporter:datatype="bool"/>
11004                 </fields>
11005                 <links>
11006                 </links>
11007         </class>
11008
11009         <class id="qsf" controller="open-ils.cstore" oils_obj:fieldmapper="query::subfield" oils_persist:tablename="query.subfield" reporter:label="Subfield">
11010                 <fields oils_persist:primary="id" oils_persist:sequence="query.subfield_id_seq">
11011                         <field reporter:label="Subfield ID" name="id" reporter:datatype="id"/>
11012                         <field reporter:label="Composite Type" name="composite_type" reporter:datatype="link"/>
11013                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11014                         <field reporter:label="Subfield Type" name="subfield_type" reporter:datatype="link"/>
11015                 </fields>
11016                 <links>
11017                         <link field="composite_type" reltype="has_a" key="id" map="" class="qdt"/>
11018                         <link field="subfield_type" reltype="has_a" key="id" map="" class="qdt"/>
11019                 </links>
11020         </class>
11021         
11022         <class id="qfs" controller="open-ils.cstore" oils_obj:fieldmapper="query::function_sig" oils_persist:tablename="query.function_sig" reporter:label="Function Signature">
11023                 <fields oils_persist:primary="id" oils_persist:sequence="query.function_sig_id_seq">
11024                         <field reporter:label="Function Signature ID" name="id" reporter:datatype="id"/>
11025                         <field reporter:label="Function Name" name="function_name" reporter:datatype="text"/>
11026                         <field reporter:label="Return Type" name="return_type" reporter:datatype="link"/>
11027                         <field reporter:label="Is Aggregate" name="is_aggregate" reporter:datatype="bool"/>
11028                 </fields>
11029                 <links>
11030                         <link field="return_type" reltype="has_a" key="id" map="" class="qdt"/>
11031                 </links>
11032         </class>
11033         
11034         <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">
11035                 <fields oils_persist:primary="id" oils_persist:sequence="query.function_param_def_id_seq">
11036                         <field reporter:label="Function Param Def ID" name="id" reporter:datatype="id"/>
11037                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
11038                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11039                         <field reporter:label="Datatype" name="datatype" reporter:datatype="link"/>
11040                 </fields>
11041                 <links>
11042                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
11043                         <link field="datatype" reltype="has_a" key="id" map="" class="qdt"/>
11044                 </links>
11045         </class>
11046
11047         <class id="qbv" controller="open-ils.cstore" oils_obj:fieldmapper="query::bind_variable" oils_persist:tablename="query.bind_variable" reporter:label="Bind Variable">
11048                 <fields oils_persist:primary="name">
11049                         <field reporter:label="Name" name="name" reporter:datatype="id"/>
11050                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
11051                         <field reporter:label="Type" name="type" reporter:datatype="text"/>
11052                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
11053                         <field reporter:label="Default Value" name="default_value" reporter:datatype="text"/>
11054                         <field reporter:label="Actual Value" name="actual_value" oils_persist:virtual="true" reporter:datatype="text"/>
11055                 </fields>
11056                 <links>
11057                 </links>
11058         </class>
11059
11060         <class id="qxp" controller="open-ils.cstore" oils_obj:fieldmapper="query::expression" oils_persist:tablename="query.expression" reporter:label="Expression">
11061                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11062                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11063                         <field reporter:label="Expression Type" name="type" reporter:datatype="text"/>
11064                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11065                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11066                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11067                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
11068                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
11069                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
11070                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
11071                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
11072                         <field reporter:label="Right Operand" name="right_operand" reporter:datatype="link"/>
11073                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
11074                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
11075                         <field reporter:label="Cast Type" name="cast_type" reporter:datatype="link"/>
11076                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
11077                         <field reporter:label="Bind Variable" name="bind_variable" reporter:datatype="link"/>
11078                 </fields>
11079                 <links>
11080                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11081                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
11082                         <link field="right_operand" reltype="has_a" key="id" map="" class="qxp"/>
11083                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
11084                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
11085                         <link field="cast_type" reltype="has_a" key="id" map="" class="qdt"/>
11086                         <link field="bind_variable" reltype="has_a" key="name" map="" class="qbv"/>
11087                 </links>
11088         </class>
11089
11090         <class id="qcb" controller="open-ils.cstore" oils_obj:fieldmapper="query::case_branch" oils_persist:tablename="query.case_branch" reporter:label="Case Branch">
11091                 <fields oils_persist:primary="id" oils_persist:sequence="query.case_branch_id_seq">
11092                         <field reporter:label="Case Branch ID" name="id" reporter:datatype="id"/>
11093                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11094                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11095                         <field reporter:label="Condition" name="condition" reporter:datatype="link"/>
11096                         <field reporter:label="Result" name="result" reporter:datatype="link"/>
11097                 </fields>
11098                 <links>
11099                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11100                         <link field="condition" reltype="has_a" key="id" map="" class="qxp"/>
11101                         <link field="result" reltype="has_a" key="id" map="" class="qxp"/>
11102                 </links>
11103         </class>
11104
11105         <class id="qfr" controller="open-ils.cstore" oils_obj:fieldmapper="query::from_relation" oils_persist:tablename="query.from_relation" reporter:label="From Relation">
11106                 <fields oils_persist:primary="id" oils_persist:sequence="query.from_relation_id_seq">
11107                         <field reporter:label="From Relation ID" name="id" reporter:datatype="id"/>
11108                         <field reporter:label="From Relation Type" name="type" reporter:datatype="text"/>
11109                         <field reporter:label="Table Name" name="table_name" reporter:datatype="text"/>
11110                         <field reporter:label="Class Name" name="class_name" reporter:datatype="text"/>
11111                         <field reporter:label="Subquery ID" name="subquery" reporter:datatype="link"/>
11112                         <field reporter:label="Function Call ID" name="function_call" reporter:datatype="link"/>
11113                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
11114                         <field reporter:label="Parent Relation ID" name="parent_relation" reporter:datatype="link"/>
11115                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11116                         <field reporter:label="Join Type" name="join_type" reporter:datatype="text"/>
11117                         <field reporter:label="On Clause ID" name="on_clause" reporter:datatype="link"/>
11118                 </fields>
11119                 <links>
11120                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
11121                         <link field="function_call" reltype="has_a" key="id" map="" class="qxp"/>
11122                         <link field="parent_relation" reltype="has_a" key="id" map="" class="qfr"/>
11123                         <link field="on_clause" reltype="has_a" key="id" map="" class="qxp"/>
11124                 </links>
11125         </class>
11126
11127         <class id="qrc" controller="open-ils.cstore" oils_obj:fieldmapper="query::record_column" oils_persist:tablename="query.record_column" reporter:label="Record Column">
11128                 <fields oils_persist:primary="id" oils_persist:sequence="query.record_column_id_seq">
11129                         <field reporter:label="Record Column ID" name="id" reporter:datatype="id"/>
11130                         <field reporter:label="From Relation ID" name="from_relation" reporter:datatype="link"/>
11131                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11132                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
11133                         <field reporter:label="Column Type" name="column_type" reporter:datatype="link"/>
11134                 </fields>
11135                 <links>
11136                         <link field="from_relation" reltype="has_a" key="id" map="" class="qfr"/>
11137                         <link field="column_type" reltype="has_a" key="id" map="" class="qdt"/>
11138                 </links>
11139         </class>
11140
11141         <class id="qsi" controller="open-ils.cstore" oils_obj:fieldmapper="query::select_item" oils_persist:tablename="query.select_item" reporter:label="Select Item">
11142                 <fields oils_persist:primary="id" oils_persist:sequence="query.select_item_id_seq">
11143                         <field reporter:label="Select Item ID" name="id" reporter:datatype="id"/>
11144                         <field reporter:label="Stored Query ID" name="stored_query" reporter:datatype="link"/>
11145                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11146                         <field reporter:label="Expression" name="expression" reporter:datatype="link"/>
11147                         <field reporter:label="Column Alias" name="column_alias" reporter:datatype="text"/>
11148                         <field reporter:label="Is Grouped By" name="grouped_by" reporter:datatype="bool"/>
11149                 </fields>
11150                 <links>
11151                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
11152                         <link field="expression" reltype="has_a" key="id" map="" class="qxp"/>
11153                 </links>
11154         </class>
11155
11156         <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">
11157                 <fields oils_persist:primary="id" oils_persist:sequence="query.order_by_item_id_seq">
11158                         <field reporter:label="Order By Item ID" name="id" reporter:datatype="id"/>
11159                         <field reporter:label="Stored Query ID" name="stored_query" reporter:datatype="link"/>
11160                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11161                         <field reporter:label="Expression" name="expression" reporter:datatype="link"/>
11162                 </fields>
11163                 <links>
11164                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
11165                         <link field="expression" reltype="has_a" key="id" map="" class="qxp"/>
11166                 </links>
11167         </class>
11168
11169         <class id="xbet" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbet" oils_persist:tablename="query.expr_xbet" reporter:label="Between Expression">
11170                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11171                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11172                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11173                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11174                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11175                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
11176                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
11177                 </fields>
11178                 <links>
11179                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11180                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
11181                 </links>
11182         </class>
11183
11184         <class id="xbind" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbind" oils_persist:tablename="query.expr_xbind" reporter:label="Bind Variable Expression">
11185                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11186                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11187                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11188                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11189                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11190                         <field reporter:label="Bind Variable" name="bind_variable" reporter:datatype="link"/>
11191                 </fields>
11192                 <links>
11193                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11194                         <link field="bind_variable" reltype="has_a" key="name" map="" class="qbv"/>
11195                 </links>
11196         </class>
11197
11198         <class id="xbool" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbool" oils_persist:tablename="query.expr_xbool" reporter:label="Boolean Expression">
11199                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11200                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11201                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11202                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11203                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11204                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
11205                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
11206                 </fields>
11207                 <links>
11208                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11209                 </links>
11210         </class>
11211
11212         <class id="xcase" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcase" oils_persist:tablename="query.expr_xcase" reporter:label="Case Expression">
11213                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11214                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11215                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11216                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11217                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11218                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
11219                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
11220                 </fields>
11221                 <links>
11222                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11223                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
11224                 </links>
11225         </class>
11226
11227         <class id="xcast" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcast" oils_persist:tablename="query.expr_xcast" reporter:label="Cast Expression">
11228                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11229                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11230                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11231                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11232                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11233                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
11234                         <field reporter:label="Cast Type" name="cast_type" reporter:datatype="link"/>
11235                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
11236                 </fields>
11237                 <links>
11238                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11239                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
11240                         <link field="cast_type" reltype="has_a" key="id" map="" class="qdt"/>
11241                 </links>
11242         </class>
11243
11244         <class id="xcol" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcol" oils_persist:tablename="query.expr_xcol" reporter:label="Column Expression">
11245                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11246                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11247                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11248                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11249                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11250                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
11251                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
11252                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
11253                 </fields>
11254                 <links>
11255                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11256                 </links>
11257         </class>
11258
11259         <class id="xex" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xex" oils_persist:tablename="query.expr_xex" reporter:label="Exists Expression">
11260                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11261                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11262                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11263                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11264                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11265                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
11266                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
11267                 </fields>
11268                 <links>
11269                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11270                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
11271                 </links>
11272         </class>
11273
11274         <class id="xfunc" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xfunc" oils_persist:tablename="query.expr_xfunc" reporter:label="Function Expression">
11275                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11276                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11277                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11278                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11279                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11280                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
11281                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
11282                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
11283                 </fields>
11284                 <links>
11285                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11286                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
11287                 </links>
11288         </class>
11289
11290         <class id="xin" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xin" oils_persist:tablename="query.expr_xin" reporter:label="In Expression">
11291                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11292                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11293                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11294                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11295                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11296                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
11297                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
11298                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
11299                 </fields>
11300                 <links>
11301                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11302                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
11303                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
11304                 </links>
11305         </class>
11306
11307         <class id="xisnull" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xisnull" oils_persist:tablename="query.expr_xisnull" reporter:label="IS NULL Expression">
11308                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11309                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11310                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11311                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11312                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11313                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
11314                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
11315                 </fields>
11316                 <links>
11317                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11318                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
11319                 </links>
11320         </class>
11321
11322         <class id="xnull" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xnull" oils_persist:tablename="query.expr_xnull" reporter:label="Null Expression">
11323                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11324                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11325                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11326                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11327                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11328                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
11329                 </fields>
11330                 <links>
11331                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11332                 </links>
11333         </class>
11334
11335         <class id="xnum" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xnum" oils_persist:tablename="query.expr_xnum" reporter:label="Number Expression">
11336                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11337                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11338                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11339                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11340                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11341                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
11342                 </fields>
11343                 <links>
11344                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11345                 </links>
11346         </class>
11347
11348         <class id="xop" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xop" oils_persist:tablename="query.expr_xop" reporter:label="Operator Expression">
11349                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11350                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11351                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11352                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11353                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11354                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
11355                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
11356                         <field reporter:label="Right Operand" name="right_operand" reporter:datatype="link"/>
11357                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
11358                 </fields>
11359                 <links>
11360                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11361                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
11362                         <link field="right_operand" reltype="has_a" key="id" map="" class="qxp"/>
11363                 </links>
11364         </class>
11365
11366         <class id="xser" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xser" oils_persist:tablename="query.expr_xser" reporter:label="Operator Expression">
11367                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11368                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11369                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11370                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11371                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11372                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
11373                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
11374                 </fields>
11375                 <links>
11376                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11377                 </links>
11378         </class>
11379
11380         <class id="xstr" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xstr" oils_persist:tablename="query.expr_xstr" reporter:label="String Expression">
11381                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11382                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11383                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11384                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11385                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11386                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
11387                 </fields>
11388                 <links>
11389                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11390                 </links>
11391         </class>
11392
11393         <class id="xsubq" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xsubq" oils_persist:tablename="query.expr_xsubq" reporter:label="Subquery Expression">
11394                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11395                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11396                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11397                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11398                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11399                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
11400                 </fields>
11401                 <links>
11402                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11403                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
11404                 </links>
11405         </class>
11406
11407         <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">
11408                 <fields oils_persist:primary="id">
11409                         <field reporter:label="Temp ID" name="id" reporter:datatype="id"/>
11410                         <field reporter:label="Type" name="ptype" reporter:datatype="link"/>
11411                         <field reporter:label="Subfield" name="subfield" reporter:datatype="link"/>
11412                         <field reporter:label="Value" name="value" reporter:datatype="link"/>
11413                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
11414                 </fields>
11415                 <links>
11416                         <link field="ptype" reltype="has_a" key="id" map="" class="cmpctm"/>
11417                         <link field="subfield" reltype="has_a" key="id" map="" class="cmpcsm"/>
11418                         <link field="value" reltype="has_a" key="id" map="" class="cmpcvm"/>
11419                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
11420                 </links>
11421         </class>
11422
11423         <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">
11424                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_ff_pos_map_id_seq">
11425                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
11426                         <field reporter:label="Fixed Field" name="fixed_field" reporter:datatype="text"/>
11427                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
11428                         <field reporter:label="Record Type" name="rec_type" reporter:datatype="text"/>
11429                         <field reporter:label="Start Postion" name="start_pos" reporter:datatype="int"/>
11430                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
11431                         <field reporter:label="Default Value" name="default_val" reporter:datatype="text"/>
11432                 </fields>
11433                 <links/>
11434                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11435                         <actions>
11436                                 <retrieve/>
11437                         </actions>
11438                 </permacrud>
11439         </class>
11440
11441         <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">
11442                 <fields oils_persist:primary="ptype_key">
11443                         <field reporter:label="Type Key" name="ptype_key" reporter:datatype="id"/>
11444                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
11445                 </fields>
11446                 <links/>
11447                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11448                         <actions>
11449                                 <retrieve/>
11450                         </actions>
11451                 </permacrud>
11452         </class>
11453
11454         <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">
11455                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_physical_characteristic_subfield_map_id_seq">
11456                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
11457                         <field reporter:label="Type Key" name="ptype_key" reporter:datatype="link"/>
11458                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
11459                         <field reporter:label="Start Postion" name="start_pos" reporter:datatype="int"/>
11460                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
11461                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
11462                 </fields>
11463                 <links>
11464                         <link field="ptype_key" reltype="has_a" key="id" map="" class="cmpctm"/>
11465                 </links>
11466                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11467                         <actions>
11468                                 <retrieve/>
11469                         </actions>
11470                 </permacrud>
11471         </class>
11472
11473         <class 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">
11474                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_physical_characteristic_value_map_id_seq">
11475                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
11476                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
11477                         <field reporter:label="Subfield" name="ptype_subfield" reporter:datatype="link"/>
11478                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
11479                 </fields>
11480                 <links>
11481                         <link field="ptype_subfield" reltype="has_a" key="id" map="" class="cmpcsm"/>
11482                 </links>
11483                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11484                         <actions>
11485                                 <retrieve/>
11486                         </actions>
11487                 </permacrud>
11488         </class>
11489
11490     <class
11491         id="uvs"
11492         controller="open-ils.cstore open-ils.pcrud"
11493         oils_obj:fieldmapper="url_verify::session"
11494         oils_persist:tablename="url_verify.session"
11495         reporter:label="URL Verification Session"
11496     >
11497         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.session_id_seq">
11498             <field reporter:label="Session ID" name="id" reporter:datatype="id"/>
11499             <field reporter:label="Name" name="name" reporter:datatype="text" oils_obj:required="true"/>
11500                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" oils_obj:required="true"/>
11501             <field reporter:label="Creator" name="creator" reporter:datatype="link" oils_obj:required="true"/>
11502             <field reporter:label="Record Container" name="container" reporter:datatype="link" oils_obj:required="true"/>
11503             <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
11504             <field reporter:label="Search Constraints" name="search" reporter:datatype="text" oils_obj:required="true"/>
11505             <field reporter:label="URL Selectors" name="selectors" reporter:datatype="link" oils_persist:virtual="true"/>
11506             <field reporter:label="Verification Attempts" name="attempts" reporter:datatype="link" oils_persist:virtual="true"/>
11507         </fields>
11508
11509         <links>
11510             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
11511             <link field="creator" reltype="has_a" key="id" map="" class="au"/>
11512             <link field="container" reltype="has_a" key="id" map="" class="cbreb"/>
11513             <link field="selectors" reltype="has_many" key="session" map="" class="uvus"/>
11514             <link field="attempts" reltype="has_many" key="session" map="" class="uvva"/>
11515         </links>
11516
11517         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11518             <actions>
11519                 <retrieve permission="URL_VERIFY" context_field="owning_lib"/>
11520             </actions>
11521         </permacrud>
11522
11523     </class>
11524
11525     <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">
11526         <oils_persist:source_definition><![CDATA[
11527             SELECT
11528                 cbrebi.id AS id,  -- so we can have a pkey in our view
11529                 uvs.id AS session,
11530                 uvs.owning_lib,
11531                 cbrebi.target_biblio_record_entry
11532             FROM url_verify.session uvs
11533             JOIN container.biblio_record_entry_bucket cbreb
11534                 ON (uvs.container = cbreb.id)
11535             JOIN container.biblio_record_entry_bucket_item cbrebi
11536                 ON (cbrebi.bucket = cbreb.id)
11537         ]]></oils_persist:source_definition>
11538         <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_id_seq">
11539             <field reporter:label="Bucket Item ID" name="id" reporter:datatype="id" />
11540             <field reporter:label="Session" name="session" reporter:datatype="link" />
11541             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" />
11542             <field reporter:label="Target Biblio Record Entry" name="target_biblio_record_entry" reporter:datatype="link" />
11543         </fields>
11544         <links>
11545             <link field="target_biblio_record_entry" reltype="has_a" key="id" map="" class="bre" />
11546             <link field="session" reltype="has_a" key="id" map="" class="uvs" />
11547             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou" />
11548         </links>
11549         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11550             <actions>
11551                 <retrieve permission="URL_VERIFY" context_field="owning_lib" />
11552             </actions>
11553         </permacrud>
11554     </class>
11555
11556     <class
11557         id="uvus"
11558         controller="open-ils.cstore open-ils.pcrud"
11559         oils_obj:fieldmapper="url_verify::url_selector"
11560         oils_persist:tablename="url_verify.url_selector"
11561         reporter:label="URL Verification URL Selector"
11562     >
11563         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.url_selector_id_seq">
11564             <field reporter:label="URL Selector ID" name="id" reporter:datatype="id"/>
11565             <field reporter:label="XPath" name="xpath" reporter:datatype="text" oils_obj:required="true"/>
11566                         <field reporter:label="Session" name="session" reporter:datatype="link" oils_obj:required="true"/>
11567             <field reporter:label="URLs" name="urls" reporter:datatype="link" oils_persist:virtual="true"/>
11568         </fields>
11569
11570         <links>
11571             <link field="session" reltype="has_a" key="id" map="" class="uvs"/>
11572             <link field="urls" reltype="has_many" key="id" map="" class="uvu"/>
11573         </links>
11574
11575         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11576             <actions>
11577                 <create permission="URL_VERIFY">
11578                     <context link="session" field="owning_lib"/>
11579                 </create>
11580                 <retrieve permission="URL_VERIFY">
11581                     <context link="session" field="owning_lib"/>
11582                 </retrieve>
11583                 <update permission="URL_VERIFY">
11584                     <context link="session" field="owning_lib"/>
11585                 </update>
11586                 <delete permission="URL_VERIFY">
11587                     <context link="session" field="owning_lib"/>
11588                 </delete>
11589             </actions>
11590         </permacrud>
11591
11592     </class>
11593
11594     <class
11595         id="uvu"
11596         controller="open-ils.cstore open-ils.pcrud"
11597         oils_obj:fieldmapper="url_verify::url"
11598         oils_persist:tablename="url_verify.url"
11599         reporter:label="URL Verification URL"
11600     >
11601         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.url_id_seq">
11602             <field reporter:label="URL ID" name="id" reporter:datatype="id"/>
11603                         <field reporter:label="Redirected From" name="redirect_from" reporter:datatype="link"/>
11604                         <field reporter:label="Container Item" name="item" reporter:datatype="link" oils_obj:required="true"/>
11605                         <field reporter:label="Session" name="session" reporter:datatype="link" oils_obj:required="true"/>
11606                         <field reporter:label="URL Selector" name="url_selector" reporter:datatype="link"/>
11607             <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
11608             <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
11609             <field reporter:label="Ordinal Position" name="ord" reporter:datatype="int"/>
11610             <field reporter:label="URL" name="full_url" reporter:datatype="text"/>
11611             <field reporter:label="Scheme" name="scheme" reporter:datatype="text"/>
11612             <field reporter:label="Host" name="host" reporter:datatype="text"/>
11613             <field reporter:label="Domain" name="domain" reporter:datatype="text"/>
11614             <field reporter:label="TLD" name="tld" reporter:datatype="text"/>
11615             <field reporter:label="Path" name="path" reporter:datatype="text"/>
11616             <field reporter:label="Page" name="page" reporter:datatype="text"/>
11617             <field reporter:label="Query" name="query" reporter:datatype="text"/>
11618             <field reporter:label="Fragment" name="fragment" reporter:datatype="text"/>
11619             <field reporter:label="Verifications" name="verifications" reporter:datatype="link" oils_persist:virtual="true" />
11620         </fields>
11621
11622         <links>
11623             <link field="redirect_from" reltype="has_a" key="id" map="" class="uvu"/>
11624             <link field="item" reltype="has_a" key="id" map="" class="uvsbrem" />
11625             <link field="session" reltype="has_a" key="id" map="" class="uvs"/>
11626             <link field="url_selector" reltype="has_a" key="id" map="" class="uvus"/>
11627             <link field="verifications" reltype="has_many" key="url" map="" class="uvuv"/>
11628         </links>
11629
11630         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11631             <actions>
11632                 <create permission="URL_VERIFY">
11633                     <context link="session" field="owning_lib"/>
11634                 </create>
11635                 <retrieve permission="URL_VERIFY">
11636                     <context link="session" field="owning_lib"/>
11637                 </retrieve>
11638                 <update permission="URL_VERIFY">
11639                     <context link="session" field="owning_lib"/>
11640                 </update>
11641                 <delete permission="URL_VERIFY">
11642                     <context link="session" field="owning_lib"/>
11643                 </delete>
11644             </actions>
11645         </permacrud>
11646
11647     </class>
11648
11649     <class
11650         id="uvva"
11651         controller="open-ils.cstore open-ils.pcrud"
11652         oils_obj:fieldmapper="url_verify::verification_attempt"
11653         oils_persist:tablename="url_verify.verification_attempt"
11654         reporter:label="URL Verification Attempt"
11655     >
11656         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.verification_attempt_id_seq">
11657             <field reporter:label="Attempt ID" name="id" reporter:datatype="id"/>
11658                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
11659                         <field reporter:label="Session" name="session" reporter:datatype="link"/>
11660             <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
11661             <field reporter:label="Finish Time" name="finish_time" reporter:datatype="timestamp"/>
11662         </fields>
11663
11664         <links>
11665             <link field="session" reltype="has_a" key="id" map="" class="uvs"/>
11666             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
11667         </links>
11668
11669         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11670             <actions>
11671                 <create permission="URL_VERIFY">
11672                     <context link="session" field="owning_lib"/>
11673                 </create>
11674                 <retrieve permission="URL_VERIFY">
11675                     <context link="session" field="owning_lib"/>
11676                 </retrieve>
11677                 <update permission="URL_VERIFY">
11678                     <context link="session" field="owning_lib"/>
11679                 </update>
11680                 <delete permission="URL_VERIFY">
11681                     <context link="session" field="owning_lib"/>
11682                 </delete>
11683             </actions>
11684         </permacrud>
11685
11686     </class>
11687
11688     <class
11689         id="uvuv"
11690         controller="open-ils.cstore open-ils.pcrud"
11691         oils_obj:fieldmapper="url_verify::url_verification"
11692         oils_persist:tablename="url_verify.url_verification"
11693         reporter:label="URL Verification"
11694     >
11695         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.url_verification_id_seq">
11696             <field reporter:label="Verification ID" name="id" reporter:datatype="id"/>
11697                         <field reporter:label="URL" name="url" reporter:datatype="link"/>
11698                         <field reporter:label="Attempt" name="attempt" reporter:datatype="link"/>
11699             <field reporter:label="Request Time" name="req_time" reporter:datatype="timestamp"/>
11700             <field reporter:label="Result Time" name="res_time" reporter:datatype="timestamp"/>
11701             <field reporter:label="Result Code" name="res_code" reporter:datatype="int"/>
11702             <field reporter:label="Result Text" name="res_text" reporter:datatype="text"/>
11703                         <field reporter:label="Redirected To" name="redirect_to" reporter:datatype="link"/>
11704         </fields>
11705
11706         <links>
11707             <link field="url" reltype="has_a" key="id" map="" class="uvu"/>
11708             <link field="attempt" reltype="has_a" key="id" map="" class="uvva"/>
11709             <link field="redirect_to" reltype="has_a" key="id" map="" class="uvu"/>
11710         </links>
11711
11712         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11713             <actions>
11714                 <create permission="URL_VERIFY">
11715                     <context link="attempt" jump="session" field="owning_lib"/>
11716                 </create>
11717                 <retrieve permission="URL_VERIFY">
11718                     <context link="attempt" jump="session" field="owning_lib"/>
11719                 </retrieve>
11720                 <update permission="URL_VERIFY">
11721                     <context link="attempt" jump="session" field="owning_lib"/>
11722                 </update>
11723                 <delete permission="URL_VERIFY">
11724                     <context link="attempt" jump="session" field="owning_lib"/>
11725                 </delete>
11726             </actions>
11727         </permacrud>
11728
11729     </class>
11730
11731         <class
11732                 id="cfdi"
11733                 controller="open-ils.cstore open-ils.pcrud"
11734                 oils_obj:fieldmapper="config::filter_dialog_interface"
11735                 oils_persist:tablename="config.filter_dialog_interface"
11736                 reporter:label="FilterDialog Interface">
11737                 <fields oils_persist:primary="key" oils_persist:sequence="config.filter_dialog_interface_pkey">
11738                         <field reporter:label="Interface Key" name="key" reporter:datatype="text" />
11739                         <field reporter:label="Description" name="description" reporter:datatype="text" />
11740                 </fields>
11741                 <links>
11742                         <link field="filter_sets" reltype="has_many" key="interface" map="" class="cfdfs"/>
11743                 </links>
11744                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11745                         <actions>
11746                                 <retrieve />
11747                         </actions>
11748                 </permacrud>
11749         </class>
11750
11751         <class
11752                 id="cfdfs"
11753                 controller="open-ils.cstore open-ils.pcrud"
11754                 oils_obj:fieldmapper="config::filter_dialog_filter_set"
11755                 oils_persist:tablename="config.filter_dialog_filter_set"
11756                 reporter:label="FilterDialog Filter Set">
11757                 <fields oils_persist:primary="id" oils_persist:sequence="config.filter_dialog_filter_set_id_seq">
11758                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
11759                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
11760                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
11761                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
11762                         <field reporter:label="Interface" name="interface" reporter:datatype="link"/>
11763                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
11764                         <field reporter:label="Filters" name="filters" reporter:datatype="text"/>
11765                 </fields>
11766                 <links>
11767                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
11768                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
11769                         <link field="interface" reltype="has_a" key="key" map="" class="cfdi"/>
11770                 </links>
11771                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11772                         <actions>
11773                                 <create permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
11774                                 <retrieve permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
11775                                 <update permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
11776                                 <delete permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
11777                         </actions>
11778                 </permacrud>
11779
11780         </class>
11781
11782         <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">
11783                 <fields oils_persist:primary="code">
11784                         <field reporter:label="Code" name="code" reporter:datatype="id"/>
11785                         <field reporter:label="Type Value" name="type_val" reporter:datatype="text"/>
11786                         <field reporter:label="BLvl Value" name="blvl_val" reporter:datatype="text"/>
11787                 </fields>
11788                 <links/>
11789                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11790                         <actions>
11791                                 <retrieve/>
11792                         </actions>
11793                 </permacrud>
11794         </class>
11795
11796         <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">
11797                 <oils_persist:source_definition><![CDATA[
11798
11799             SELECT  b.id,
11800                     MAX(dcp.edit_date) AS last_delete_date
11801              FROM   biblio.record_entry b
11802                     JOIN asset.call_number cn ON (cn.record = b.id)
11803                     JOIN asset.copy dcp ON (cn.id = dcp.call_number)
11804              WHERE  NOT b.deleted
11805              GROUP BY b.id
11806              HAVING SUM( CASE WHEN NOT dcp.deleted THEN 1 ELSE 0 END) = 0 
11807
11808                 ]]></oils_persist:source_definition>
11809                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
11810                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
11811                         <field reporter:label="Delete Date/Time" name="last_delete_date" reporter:datatype="timestamp"/>
11812                 </fields>
11813                 <links>
11814                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
11815                 </links>
11816                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11817                         <actions>
11818                                 <retrieve/>
11819                         </actions>
11820                 </permacrud>
11821         </class>
11822
11823         <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">
11824                 <oils_persist:source_definition><![CDATA[
11825
11826             -- -- 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.
11827             -- -- 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
11828             -- -- may not.
11829             -- SELECT
11830             --     bre.id AS bib_id,
11831             --     COALESCE( z.copy_count, 0 ) AS copy_count,
11832             --     COALESCE( z.hold_count, 0 ) AS hold_count,
11833             --     COALESCE( z.copy_hold_ratio, 0 ) AS hold_copy_ratio
11834             -- FROM (
11835                 SELECT
11836                     y.bre AS id,
11837                     COALESCE( x.copy_count, 0 ) AS copy_count,
11838                     y.hold_count AS hold_count,
11839                     (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
11840                 FROM (
11841                         SELECT
11842                             (SELECT bib_record FROM reporter.hold_request_record r WHERE r.id = h.id LIMIT 1) AS bre,
11843                             COUNT(*) AS hold_count
11844                         FROM action.hold_request h
11845                         WHERE
11846                             cancel_time IS NULL
11847                             AND fulfillment_time IS NULL
11848                             -- AND NOT frozen  -- a frozen hold is still a desired hold, eh?
11849                         GROUP BY 1
11850                     )y LEFT JOIN (
11851                         SELECT 
11852                             (SELECT id
11853                                 FROM biblio.record_entry 
11854                                 WHERE id = (SELECT record FROM asset.call_number WHERE id = call_number and deleted is false)
11855                             ) AS bre, 
11856                             COUNT(*) AS copy_count
11857                         FROM asset.copy
11858                             JOIN asset.copy_location loc ON (copy.location = loc.id AND loc.holdable)
11859                         WHERE copy.holdable 
11860                             AND NOT copy.deleted 
11861                             AND copy.status IN ( SELECT id FROM config.copy_status WHERE holdable ) 
11862                         GROUP BY 1
11863                     )x ON x.bre = y.bre
11864                 -- )z RIGHT JOIN (
11865                 --     SELECT id
11866                 --     FROM biblio.record_entry
11867                 --     WHERE NOT deleted
11868                 -- )bre ON (z.bib_id = bre.id)
11869                 
11870
11871                 ]]></oils_persist:source_definition>
11872                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
11873                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
11874                         <field reporter:label="Holdable Copy Count" name="copy_count" reporter:datatype="int"/>
11875                         <field reporter:label="Active Holds" name="hold_count" reporter:datatype="int"/>
11876                         <field reporter:label="Hold/Copy Ratio" name="hold_copy_ratio" reporter:datatype="float"/>
11877                 </fields>
11878                 <links>
11879                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
11880                 </links>
11881                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11882                         <actions>
11883                                 <retrieve/>
11884                         </actions>
11885                 </permacrud>
11886         </class>
11887
11888         <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">
11889                 <oils_persist:source_definition><![CDATA[
11890             SELECT *,
11891                 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,
11892                 CASE WHEN copy_count_everywhere = 0 THEN 'Infinity'::FLOAT ELSE holds_everywhere::FLOAT/copy_count_everywhere END AS everywhere_ratio
11893             FROM
11894                 (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
11895                     FROM
11896                         action.hold_request ahr
11897                         JOIN reporter.hold_request_record rhrr USING (id)
11898                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
11899                         LEFT JOIN asset.copy ac ON (ahcm.target_copy = ac.id AND ahr.pickup_lib = ac.circ_lib)
11900                     WHERE
11901                         ahr.cancel_time IS NULL
11902                         AND ahr.fulfillment_time IS NULL
11903                     GROUP BY bib_record, pickup_lib
11904                 )x
11905                 JOIN
11906                 (SELECT bib_record as id, count(DISTINCT ahr.id) AS holds_everywhere, COALESCE(count(DISTINCT target_copy),0) as copy_count_everywhere
11907                     FROM
11908                         action.hold_request ahr
11909                         JOIN reporter.hold_request_record rhrr USING (id)
11910                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
11911                     WHERE
11912                         ahr.cancel_time IS NULL
11913                         AND ahr.fulfillment_time IS NULL
11914                     GROUP BY bib_record
11915                 )y
11916                 USING (id)
11917                 ]]></oils_persist:source_definition>
11918                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
11919                         <field reporter:label="Record ID" name="id" reporter:datatype="link"/>
11920                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
11921                         <field reporter:label="Active Holds at Pickup Library" name="holds_at_pickup_library" reporter:datatype="int"/>
11922                         <field reporter:label="Holdable Copy Count at Pickup Library" name="copy_count_at_pickup_library" reporter:datatype="int"/>
11923                         <field reporter:label="Active Holds Everywhere" name="holds_everywhere" reporter:datatype="int"/>
11924                         <field reporter:label="Holdable Copy Count Everywhere" name="copy_count_everywhere" reporter:datatype="int"/>
11925                         <field reporter:label="Hold/Copy Ratio at Pickup Library" name="pickup_library_ratio" reporter:datatype="float"/>
11926                         <field reporter:label="Hold/Copy Ratio Everywhere" name="everywhere_ratio" reporter:datatype="float"/>
11927                 </fields>
11928                 <links>
11929                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
11930                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
11931                 </links>
11932                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11933                         <actions>
11934                                 <retrieve/>
11935                         </actions>
11936                 </permacrud>
11937         </class>
11938
11939         <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) ">
11940                 <oils_persist:source_definition><![CDATA[
11941             WITH counts_at_ou AS (
11942                 SELECT  rhrr.bib_record AS id,
11943                         aou.id AS pickup_lib_or_desc,
11944                         COUNT(DISTINCT ahr.id) AS holds_at_or_below,
11945                         COALESCE(COUNT(DISTINCT ac.id),0) AS copy_count_at_or_below
11946                   FROM  actor.org_unit aou
11947                         JOIN actor.org_unit_type aout ON (aou.ou_type = aout.id),
11948                         action.hold_request ahr
11949                         JOIN reporter.hold_request_record rhrr USING (id)
11950                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
11951                         LEFT JOIN asset.copy ac ON (ahcm.target_copy = ac.id)
11952                   WHERE ahr.cancel_time IS NULL AND ahr.fulfillment_time IS NULL
11953                         AND ac.circ_lib IN (SELECT id FROM actor.org_unit_descendants(aou.id))
11954                         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
11955                   GROUP BY 1, 2
11956             )
11957             SELECT x.id, x.pickup_lib_or_desc, x.holds_at_or_below, x.copy_count_at_or_below,
11958                    y.holds_everywhere, y.copy_count_everywhere,
11959                 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,
11960                 CASE WHEN copy_count_everywhere = 0 THEN 'Infinity'::FLOAT ELSE y.holds_everywhere::FLOAT/y.copy_count_everywhere END AS everywhere_ratio
11961             FROM counts_at_ou x
11962                 JOIN (SELECT bib_record AS id, count(DISTINCT ahr.id) AS holds_everywhere, COALESCE(count(DISTINCT target_copy),0) as copy_count_everywhere
11963                     FROM
11964                         action.hold_request ahr
11965                         JOIN reporter.hold_request_record rhrr USING (id)
11966                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
11967                     WHERE
11968                         ahr.cancel_time IS NULL
11969                         AND ahr.fulfillment_time IS NULL
11970                     GROUP BY bib_record
11971                 )y
11972                 USING (id)
11973                 ]]></oils_persist:source_definition>
11974                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
11975                         <field reporter:label="Record ID" name="id" reporter:datatype="link"/>
11976                         <field reporter:label="Pickup Library" name="pickup_lib_or_desc" reporter:datatype="org_unit"/>
11977                         <field reporter:label="Active Holds at Pickup Library and its Descendants" name="holds_at_or_below" reporter:datatype="int"/>
11978                         <field reporter:label="Holdable Copy Count at Pickup Library and its Descendants" name="copy_count_at_or_below" reporter:datatype="int"/>
11979                         <field reporter:label="Active Holds Everywhere" name="holds_everywhere" reporter:datatype="int"/>
11980                         <field reporter:label="Holdable Copy Count Everywhere" name="copy_count_everywhere" reporter:datatype="int"/>
11981                         <field reporter:label="Hold/Copy Ratio at Pickup Library and its Descendants" name="hold_copy_ratio_at_or_below_ou" reporter:datatype="float"/>
11982                         <field reporter:label="Hold/Copy Ratio Everywhere" name="everywhere_ratio" reporter:datatype="float"/>
11983                 </fields>
11984                 <links>
11985                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
11986                         <link field="pickup_lib_or_desc" reltype="has_a" key="id" map="" class="aou"/>
11987                 </links>
11988                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11989                         <actions>
11990                                 <retrieve/>
11991                         </actions>
11992                 </permacrud>
11993         </class>
11994
11995         <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">
11996                 <oils_persist:source_definition><![CDATA[
11997             SELECT
11998                 ac.id,
11999                 COALESCE(MAX(actac.xact_start), ac.create_date) AS last_circ_or_create,
12000                 MAX(actac.xact_start) AS last_circ
12001             FROM asset.copy ac
12002                  LEFT JOIN action.all_circulation actac ON ac.id = actac.target_copy
12003             GROUP BY ac.id
12004
12005             -- Alternate version, say if you have migrated last checkout information in extend_reporter.legacy_circ_timestamp:
12006             --SELECT
12007             --    ac.id,
12008             --    GREATEST(MAX(actac.xact_start), erlct.last_cko_ts, ac.create_date) AS last_circ_or_create,
12009             --    GREATEST(MAX(actac.xact_start), erlct.last_cko_ts) AS last_circ
12010             --FROM asset.copy ac
12011             --     LEFT JOIN action.all_circulation actac ON ac.id = actac.target_copy
12012             --     LEFT JOIN extend_reporter.legacy_circ_timestamp erlct ON ac.id = erlct.id
12013             --GROUP BY ac.id, ac.create_date, erlct.last_cko_ts
12014                 ]]></oils_persist:source_definition>
12015                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
12016                         <field reporter:label="Copy ID" name="id" reporter:datatype="link"/>
12017                         <field reporter:label="Last Circulation or Creation Date" name="last_circ_or_create" reporter:datatype="timestamp"/>
12018                         <field reporter:label="Last Circulation Date" name="last_circ" reporter:datatype="timestamp"/>
12019                 </fields>
12020                 <links>
12021                         <link field="id" reltype="has_a" key="id" map="" class="acp"/>
12022                 </links>
12023                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12024                         <actions>
12025                                 <retrieve/>
12026                         </actions>
12027                 </permacrud>
12028         </class>
12029
12030         <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">
12031                 <fields oils_persist:primary="id">
12032                         <field reporter:label="Text Search Config" reporter:selector="name" reporter:datatype="text" name="id"/>
12033                         <field reporter:label="Text Search Config Name" reporter:datatype="text" name="name"/>
12034                 </fields>
12035                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12036                         <actions>
12037                                 <retrieve/>
12038                         </actions>
12039                 </permacrud>
12040         </class>
12041
12042         <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">
12043                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_class_ts_map_id_seq">
12044                         <field reporter:label="Map ID" reporter:datatype="id" name="id"/>
12045                         <field reporter:label="Metabib Class" reporter:datatype="text" name="field_class"/>
12046                         <field reporter:label="Text Search Config" reporter:datatype="text" name="ts_config"/>
12047                         <field reporter:label="Active?" reporter:datatype="bool" name="active"/>
12048                         <field reporter:label="Index Weight" reporter:datatype="text" name="index_weight"/>
12049                         <field reporter:label="Index Language" reporter:datatype="text" name="index_lang"/>
12050                         <field reporter:label="Search Language" reporter:datatype="text" name="search_lang"/>
12051                         <field reporter:label="Always Apply?" reporter:datatype="bool" name="always"/>
12052                 </fields>
12053                 <links>
12054                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
12055                         <link field="ts_config" reltype="has_a" key="id" map="" class="ctcl"/>
12056                 </links>
12057                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12058                         <actions>
12059                                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
12060                                 <retrieve/>
12061                                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
12062                                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
12063                         </actions>
12064                 </permacrud>
12065         </class>
12066
12067         <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">
12068                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_ts_map_id_seq">
12069                         <field reporter:label="Map ID" reporter:datatype="id" name="id"/>
12070                         <field reporter:label="Metabib Field" reporter:datatype="text" name="metabib_field"/>
12071                         <field reporter:label="Text Search Config" reporter:datatype="text" name="ts_config"/>
12072                         <field reporter:label="Active?" reporter:datatype="bool" name="active"/>
12073                         <field reporter:label="Index Weight" reporter:datatype="text" name="index_weight"/>
12074                         <field reporter:label="Index Language" reporter:datatype="text" name="index_lang"/>
12075                         <field reporter:label="Search Language" reporter:datatype="text" name="search_lang"/>
12076                 </fields>
12077                 <links>
12078                         <link field="metabib_field" reltype="has_a" key="id" map="" class="cmf"/>
12079                         <link field="ts_config" reltype="has_a" key="id" map="" class="ctcl"/>
12080                 </links>
12081                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12082                         <actions>
12083                                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
12084                                 <retrieve/>
12085                                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
12086                                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
12087                         </actions>
12088                 </permacrud>
12089         </class>
12090
12091
12092         <!-- ********************************************************************************************************************* -->
12093         <!-- What follows is a set of example extensions that are useful for PINES.  Comment out or remove if you don't want them. -->
12094         <!-- ********************************************************************************************************************* -->
12095         <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">
12096                 <fields oils_persist:primary="id">
12097                         <field reporter:label="Circulation" name="id" reporter:datatype="id" />
12098                         <field reporter:label="Library Circulation Location Short (Policy) Name" name="circ_lib" reporter:datatype="text"/>
12099                         <field reporter:label="Library Circulation Location Link" name="circ_lib_id" reporter:datatype="org_unit"/>
12100                         <field reporter:label="Circulation Date/Time" name="xact_start" reporter:datatype="timestamp"/>
12101                         <field reporter:label="Circulation Type" name="circ_type" reporter:datatype="text"/>
12102                         <field reporter:label="Copy Link" name="copy_id" reporter:datatype="link"/>
12103                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
12104                         <field reporter:label="Owning Library Short (Policy) Name" name="owning_lib_name" reporter:datatype="text"/>
12105                         <field reporter:label="Item Language" name="language" reporter:datatype="text"/>
12106                         <field reporter:label="Literary Form" name="lit_form" reporter:datatype="text"/>
12107                         <field reporter:label="MARC Form" name="item_form" reporter:datatype="text"/>
12108                         <field reporter:label="MARC Type" name="item_type" reporter:datatype="text"/>
12109                         <field reporter:label="Shelving Location" name="shelving_location" reporter:datatype="text"/>
12110                         <field reporter:label="Patron Profile Group" name="profile_group" reporter:datatype="text"/>
12111                         <field reporter:label="Patron Age Demographic" name="demographic_general_division" reporter:datatype="text"/>
12112                         <field reporter:label="Call Number Link" name="call_number" reporter:datatype="link"/>
12113                         <field reporter:label="Call Number Label" name="call_number_label" reporter:datatype="text"/>
12114                         <field reporter:label="Call Number Dewey/Prefix" name="dewey" reporter:datatype="text"/>
12115                         <field reporter:label="Patron Link" name="patron_id" reporter:datatype="link"/>
12116                         <field reporter:label="Patron Home Library Link" name="patron_home_lib" reporter:datatype="link"/>
12117                         <field reporter:label="Patron Home Library Short (Policy) Name" name="patron_home_lib_shortname" reporter:datatype="text"/>
12118                         <field reporter:label="Patron County" name="patron_county" reporter:datatype="text"/>
12119                         <field reporter:label="Patron City" name="patron_city" reporter:datatype="text"/>
12120                         <field reporter:label="Patron ZIP Code" name="patron_zip" reporter:datatype="text"/>
12121                         <field reporter:label="Legacy CAT1 Link" name="stat_cat_1" reporter:datatype="link"/>
12122                         <field reporter:label="Legacy CAT2 Link" name="stat_cat_2" reporter:datatype="link"/>
12123                         <field reporter:label="Dewey Range - Tens" name="dewey_range_tens" reporter:datatype="text"/>
12124                         <field reporter:label="Dewey Range - Hundreds" name="dewey_range_hundreds" reporter:datatype="text"/>
12125                         <field reporter:label="Dewey Block - Tens" name="dewey_block_tens" reporter:datatype="text"/>
12126                         <field reporter:label="Dewey Block - Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
12127                         <field reporter:label="Legacy CAT1 Value" name="stat_cat_1_value" reporter:datatype="text"/>
12128                         <field reporter:label="Legacy CAT2 Value" name="stat_cat_2_value" reporter:datatype="text"/>
12129                 </fields>
12130                 <links>
12131                         <link field="id" reltype="has_a" key="id" map="" class="circ"/>
12132                         <link field="copy_id" reltype="has_a" key="id" map="" class="acp"/>
12133                         <link field="patron_id" reltype="has_a" key="id" map="" class="au"/>
12134                         <link field="circ_lib_id" reltype="has_a" key="id" map="" class="aou"/>
12135                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
12136                         <link field="patron_home_lib" reltype="has_a" key="id" map="" class="aou"/>
12137                         <link field="stat_cat_1" reltype="has_a" key="id" map="" class="rsce1"/>
12138                         <link field="stat_cat_2" reltype="has_a" key="id" map="" class="rsce2"/>
12139                 </links>
12140         </class>
12141
12142         <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">
12143                 <fields oils_persist:primary="id">
12144                         <field reporter:label="Entry ID" name="id" reporter:selector="value" reporter:datatype="id" />
12145                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
12146                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
12147                 </fields>
12148                 <links>
12149                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
12150                 </links>
12151         </class>
12152
12153         <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">
12154                 <fields oils_persist:primary="id">
12155                         <field reporter:label="Entry ID" name="id" reporter:selector="value" reporter:datatype="id" />
12156                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
12157                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
12158                 </fields>
12159                 <links>
12160                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
12161                 </links>
12162         </class>
12163
12164         <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">
12165                 <fields oils_persist:primary="id">
12166                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
12167
12168                         <field reporter:label="Billing Location Short (Policy) Name" name="billing_location_shortname" reporter:datatype="text"/>
12169                         <field reporter:label="Billing Location Name" name="billing_location_name" reporter:datatype="text"/>
12170                         <field reporter:label="Billing Location Link" name="billing_location" reporter:datatype="org_unit"/>
12171
12172                         <field reporter:label="User Home Library Short (Policy) Name" name="usr_home_ou_shortname" reporter:datatype="text"/>
12173                         <field reporter:label="User Home Library Name" name="usr_home_ou_name" reporter:datatype="text"/>
12174                         <field reporter:label="User Home Library Link" name="usr_home_ou" reporter:datatype="org_unit"/>
12175
12176                         <field reporter:label="User Barcode" name="barcode" reporter:datatype="text"/>
12177                         <field reporter:label="User Link" name="usr" reporter:datatype="link"/>
12178
12179                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
12180                         <field reporter:label="Transaction End Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
12181                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
12182
12183                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
12184                         <field reporter:label="Total Billed" name="total_owed" reporter:datatype="money"/>
12185
12186                         <field reporter:label="Last Payment Date/Time" name="last_payment_ts" reporter:datatype="timestamp"/>
12187                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
12188                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
12189
12190                         <field reporter:label="Last Billing Date/Time" name="last_billing_ts" reporter:datatype="timestamp"/>
12191                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
12192                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
12193
12194                         <field reporter:label="User Age Demographic" name="demographic_general_division" reporter:datatype="text"/>
12195                         <field reporter:label="User County" name="patron_county" reporter:datatype="text"/>
12196                         <field reporter:label="User City" name="patron_city" reporter:datatype="text"/>
12197                         <field reporter:label="User ZIP Code" name="patron_zip" reporter:datatype="text"/>
12198
12199                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
12200                         <field reporter:label="User Profile Group" name="profile_group" reporter:datatype="text"/>
12201
12202                 </fields>
12203                 <links>
12204                         <link field="id" reltype="has_a" key="id" map="" class="mbt"/>
12205                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
12206                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
12207                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
12208                 </links>
12209         </class>
12210
12211         <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">
12212                 <oils_persist:source_definition><![CDATA[
12213
12214             SELECT
12215                 po.ordering_agency AS ordering_agency,
12216                 po.id AS purchase_order,
12217                 li.id AS lineitem,
12218                 lid.id AS lineitem_detail,
12219                 cpa.id AS claim_policy_action
12220             FROM
12221                 acq.lineitem_detail lid
12222                 JOIN acq.lineitem li ON (li.id = lid.lineitem)
12223                 JOIN acq.purchase_order po ON (po.id = li.purchase_order)
12224                 JOIN acq.claim_policy cp ON (li.claim_policy = cp.id)
12225                 JOIN acq.claim_policy_action cpa ON (
12226                     cpa.claim_policy = cp.id
12227
12228                     -- we only care about claim policy actions whose claim
12229                     -- interval we'd reached or exceeded
12230                     AND (NOW() - cpa.action_interval) > po.order_date
12231
12232                     -- filter out all claim policy actions where claim events
12233                     -- have occurred on or after the action's action_interval
12234                     AND NOT EXISTS (
12235                         SELECT 1
12236                         FROM
12237                             acq.claim_event evt
12238                             JOIN acq.claim claim ON (
12239                                 claim.id = evt.claim
12240                                 AND claim.lineitem_detail = lid.id
12241                             )
12242                         WHERE
12243                             evt.event_date >= (po.order_date + cpa.action_interval)
12244                     )
12245                 )
12246             WHERE
12247                 lid.cancel_reason IS NULL
12248                 AND li.cancel_reason IS NULL -- belt/suspenders
12249                 AND po.cancel_reason IS NULL -- belt/suspenders
12250                 AND lid.recv_time IS NULL
12251                 AND po.state = 'on-order'
12252             ORDER BY 1, 2, 3, 4, 5
12253
12254                 ]]></oils_persist:source_definition>
12255                 <fields>
12256                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="link"/>
12257                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
12258                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
12259                         <field reporter:label="Lineitem Detail" name="lineitem_detail" reporter:datatype="link"/>
12260                         <field reporter:label="Claim Policy Action" name="claim_policy_action" reporter:datatype="link"/>
12261                 </fields>
12262                 <links>
12263                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
12264                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
12265                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
12266                         <link field="lineitem_detail" reltype="has_a" key="id" map="" class="acqlid"/>
12267                         <link field="claim_policy_action" reltype="has_a" key="id" map="" class="acqclpa"/>
12268                 </links>
12269         </class>
12270         <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">
12271                 <fields oils_persist:primary="lineitem" oils_persist:sequence="acq.lineitem_id_seq">
12272                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
12273                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
12274                         <field reporter:label="Receive Count" name="recv_count" reporter:datatype="int"/>
12275                         <field reporter:label="Cancel Count" name="cancel_count" reporter:datatype="int"/>
12276                         <field reporter:label="Delay Count" name="delay_count" reporter:datatype="int"/>
12277                         <field reporter:label="Invoice Count" name="invoice_count" reporter:datatype="int"/>
12278                         <field reporter:label="Claim Count" name="claim_count" reporter:datatype="int"/>
12279                         <field reporter:label="Estimated Amount" name="estimated_amount" reporter:datatype="money"/>
12280                         <field reporter:label="Encumbrance Amount" name="encumbrance_amount" reporter:datatype="money"/>
12281                         <field reporter:label="Paid Amount" name="paid_amount" reporter:datatype="money"/>
12282                 </fields>
12283                 <links>
12284                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
12285                 </links>
12286     </class>
12287         <class id="acqlisumi" controller="open-ils.cstore" oils_obj:fieldmapper="acq::lineitem_summary_invoiceable" oils_persist:readonly="true" reporter:label="Invoiceable Lineitem Summary">
12288                 <oils_persist:source_definition><![CDATA[
12289             SELECT * FROM acq.lineitem_summary 
12290                                 WHERE item_count > (invoice_count + cancel_count)
12291         ]]></oils_persist:source_definition>
12292                 <fields oils_persist:primary="lineitem" oils_persist:sequence="acq.lineitem_id_seq">
12293                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
12294                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
12295                         <field reporter:label="Receive Count" name="recv_count" reporter:datatype="int"/>
12296                         <field reporter:label="Cancel Count" name="cancel_count" reporter:datatype="int"/>
12297                         <field reporter:label="Delay Count" name="delay_count" reporter:datatype="int"/>
12298                         <field reporter:label="Invoice Count" name="invoice_count" reporter:datatype="int"/>
12299                         <field reporter:label="Claim Count" name="claim_count" reporter:datatype="int"/>
12300                         <field reporter:label="Estimated Amount" name="estimated_amount" reporter:datatype="money"/>
12301                         <field reporter:label="Encumbrance Amount" name="encumbrance_amount" reporter:datatype="money"/>
12302                         <field reporter:label="Paid Amount" name="paid_amount" reporter:datatype="money"/>
12303                 </fields>
12304                 <links>
12305                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
12306                 </links>
12307     </class>
12308         <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">
12309                 <oils_persist:source_definition><![CDATA[
12310
12311                         SELECT  t.*
12312                           FROM  action.transit_copy t
12313                                 JOIN actor.org_unit AS s ON (t.source = s.id)
12314                                 JOIN actor.org_unit AS d ON (t.dest = d.id)
12315                           WHERE s.parent_ou <> d.parent_ou
12316
12317                 ]]></oils_persist:source_definition>
12318                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
12319                         <field reporter:label="Pretransit Copy Status" name="copy_status" reporter:datatype="link"/>
12320                         <field reporter:label="Destination" name="dest" reporter:datatype="link"/>
12321                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
12322                         <field reporter:label="Transit ID" name="id" reporter:datatype="id"/>
12323                         <field reporter:label="Is Persistent? (unused)" name="persistant_transfer" reporter:datatype="bool"/>
12324                         <field reporter:label="Previous Hop (unused)" name="prev_hop" reporter:datatype="link"/>
12325                         <field reporter:label="Source" name="source" reporter:datatype="link"/>
12326                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
12327                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
12328                         <field reporter:label="Hold Transit" name="hold_transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
12329                         <field reporter:label="Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
12330                 </fields>
12331                 <links>
12332                         <link field="hold_transit_copy" reltype="might_have" key="id" map="" class="ahtc"/>
12333                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
12334                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
12335                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
12336                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
12337                         <link field="prev_hop" reltype="has_a" key="id" map="" class="atc"/>
12338                 </links>
12339         </class>
12340
12341     <class id="circbyyr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::circ_counts_by_year" oils_persist:readonly="true">
12342                 <oils_persist:source_definition><![CDATA[
12343
12344         SELECT copy, SUM(count) AS count, year, is_renewal FROM (
12345                 SELECT
12346                         cp.id as copy,
12347                         COUNT(circ.id),
12348                         EXTRACT(YEAR FROM circ.xact_start) AS year,
12349                         (phone_renewal OR desk_renewal OR opac_renewal OR auto_renewal) as is_renewal
12350                 FROM
12351                         asset.copy cp
12352                                 JOIN action.circulation circ ON (cp.id = circ.target_copy)
12353                 GROUP BY 1, 3, 4
12354                 UNION ALL
12355                 SELECT
12356                         cp.id as copy,
12357                         COUNT(circ.id),
12358                         EXTRACT(YEAR FROM circ.xact_start) AS year,
12359                         (phone_renewal OR desk_renewal OR opac_renewal OR auto_renewal) as is_renewal
12360                 FROM
12361                         asset.copy cp
12362                                 JOIN action.aged_circulation circ ON (cp.id = circ.target_copy)
12363                 GROUP BY 1, 3, 4
12364                 UNION ALL
12365                 SELECT
12366                         id as copy,
12367                         circ_count,
12368                         -1 AS year,
12369                         false as is_renewal
12370                 FROM
12371                         extend_reporter.legacy_circ_count
12372         )x GROUP BY 1, 3, 4
12373
12374                 ]]></oils_persist:source_definition>
12375         <fields>
12376             <field reporter:label="Copy ID" name="copy" reporter:datatype="link"/>
12377             <field reporter:label="Count" name="count" reporter:datatype="int"/>
12378             <field reporter:label="Year" name="year" reporter:datatype="int"/>
12379             <field reporter:label="Renewal" name="is_renewal" reporter:datatype="bool"/>
12380         </fields>
12381                 <links>
12382                         <link field="copy" reltype="has_a" key="id" map="" class="acp"/>
12383                 </links>
12384                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12385                         <actions>
12386                                 <retrieve/>
12387                         </actions>
12388                 </permacrud>
12389     </class>
12390
12391         <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">
12392                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
12393                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
12394                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
12395                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
12396                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
12397                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
12398                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
12399                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
12400                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
12401                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
12402                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
12403                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
12404                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
12405                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
12406                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
12407                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
12408                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
12409                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
12410                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
12411                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
12412                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
12413                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
12414                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
12415                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
12416                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
12417                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
12418                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
12419                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
12420                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="link"/>
12421                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="link"/>
12422                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="link"/>
12423                         <field reporter:label="Auto Renewal" name="auto_renewal" reporter:datatype="bool"/>
12424                         <field reporter:label="Remaining Auto Renewals" name="auto_renewal_remaining" reporter:datatype="int" />
12425                 </fields>
12426                 <links>
12427                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
12428                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
12429                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
12430                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
12431                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
12432                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
12433                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
12434                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
12435                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
12436                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
12437                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
12438                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
12439                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
12440                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
12441                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
12442                 </links>
12443         </class>
12444
12445     <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">
12446         <fields oils_persist:primary="id">
12447             <field reporter:label="Title" name="title" reporter:datatype="text"/>
12448             <field reporter:label="Author" name="author" reporter:datatype="text"/>
12449             <field reporter:label="Pubdate" name="pubdate" reporter:datatype="text"/>
12450             <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
12451             <field reporter:label="Price" name="price" reporter:datatype="money"/>
12452             <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
12453             <field reporter:label="Callnumber Label" name="call_number_label" reporter:datatype="text"/>
12454             <field reporter:label="Dewy Tens" name="dewey_block_tens" reporter:datatype="text"/>
12455             <field reporter:label="Dewy Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
12456             <field reporter:label="Use Count" name="use_count" reporter:datatype="int"/>
12457             <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
12458             <field reporter:label="Shelving Location Name" name="shelving_location" reporter:datatype="text"/>
12459             <field reporter:label="Legacy Stat Cat 1" name="stat_cat_1" reporter:datatype="link"/>
12460             <field reporter:label="Legacy Stat Cat 2" name="stat_cat_2" reporter:datatype="link"/>
12461             <field reporter:label="Legacy Stat Cat 1 Value" name="stat_cat_1_value" reporter:datatype="text"/>
12462             <field reporter:label="Legacy Stat Cat 2 Value" name="stat_cat_2_value" reporter:datatype="text"/>
12463             <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
12464             <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
12465             <field reporter:label="Owning Lib Name" name="owning_lib_name" reporter:datatype="text"/>
12466             <field reporter:label="Circ Lib Name" name="circ_lib_name" reporter:datatype="text"/>
12467             <field reporter:label="Owning Lib" name="owning_lib" reporter:datatype="link"/>
12468             <field reporter:label="Circ Lib" name="circ_lib" reporter:datatype="link"/>
12469             <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
12470             <field reporter:label="Age Protection" name="age_protect" reporter:datatype="link"/>
12471             <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
12472             <field reporter:label="Reference" name="ref" reporter:datatype="bool"/>
12473             <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="text"/>
12474             <field reporter:label="Deleted" name="deleted" reporter:datatype="bool"/>
12475             <field reporter:label="TCN" name="tcn_value" reporter:datatype="text"/>
12476             <field reporter:label="Status" name="status" reporter:datatype="link"/>
12477             <field reporter:label="Stop Fines Reason" name="stop_fines" reporter:datatype="text"/>
12478             <field reporter:label="Due Date" name="due_date" reporter:datatype="timestamp"/>
12479             <field reporter:label="Patron Barcode" name="patron_barcode" reporter:datatype="text"/>
12480             <field reporter:label="Patron Name" name="patron_name" reporter:datatype="text"/>
12481         </fields>
12482         <links>
12483             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
12484             <link field="id" reltype="has_a" key="id" map="" class="acp"/>
12485             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
12486             <link field="creator" reltype="has_a" key="id" map="" class="au"/>
12487             <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
12488             <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
12489             <link field="stat_cat_1" reltype="might_have" key="id" map="" class="rsce1"/>
12490             <link field="stat_cat_2" reltype="might_have" key="id" map="" class="rsce2"/>
12491         </links>
12492     </class>
12493
12494     <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">
12495         <fields oils_persist:primary="id">
12496             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
12497             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
12498             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
12499             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
12500         </fields>
12501         <links>
12502             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
12503             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
12504         </links>
12505     </class>
12506
12507     <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">
12508         <fields oils_persist:primary="owning_lib">
12509             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
12510             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
12511             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
12512         </fields>
12513         <links>
12514             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
12515         </links>
12516     </class>
12517
12518     <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">
12519         <fields oils_persist:primary="id">
12520             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
12521             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
12522             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
12523             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
12524             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
12525         </fields>
12526         <links>
12527             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
12528             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
12529             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
12530         </links>
12531     </class>
12532
12533     <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">
12534         <fields oils_persist:primary="circ_lib">
12535             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
12536             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
12537             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
12538             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
12539         </fields>
12540         <links>
12541             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
12542             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
12543         </links>
12544     </class>
12545
12546     <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">
12547         <fields oils_persist:primary="id">
12548             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
12549             <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
12550             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
12551             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
12552             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
12553         </fields>
12554         <links>
12555             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
12556             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
12557             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
12558         </links>
12559     </class>
12560
12561     <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">
12562         <fields oils_persist:primary="home_ou">
12563             <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
12564             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
12565             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
12566             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
12567         </fields>
12568         <links>
12569             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
12570             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
12571         </links>
12572     </class>
12573         <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">
12574                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_id_seq">
12575                         <field reporter:label="Fund Tag ID" name="id" reporter:datatype="id"/>
12576                         <field reporter:label="Fund Tag Owner" name="owner" reporter:datatype="org_unit"/>
12577                         <field reporter:label="Fund Tag Name" name="name" reporter:datatype="text"/>
12578                         <field reporter:label="Map Entries" name="map_entries" oils_persist:virtual="true" reporter:datatype="link"/>
12579                 </fields>
12580                 <links>
12581                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
12582                         <link field="map_entries" reltype="has_many" key="fund" map="" class="acqftm"/>
12583                 </links>
12584                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12585                         <actions>
12586                                 <create permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
12587                                 <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="owner"/>
12588                                 <update permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
12589                         <delete permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
12590                         </actions>
12591                 </permacrud>
12592         </class>
12593         <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">
12594                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_map_id_seq">
12595                         <field reporter:label="Map Entry ID" name="id" reporter:datatype="id"/>
12596                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link"/>
12597                         <field reporter:label="Tag ID" name="tag" reporter:datatype="link"/>
12598                 </fields>
12599                 <links>
12600                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
12601                         <link field="tag" reltype="has_a" key="id" map="" class="acqft"/>
12602                         </links>
12603                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12604                 <actions>
12605                                 <create permission="ADMIN_ACQ_FUND_TAG">
12606                                         <context link="tag" field="owner"/>
12607                                 </create>
12608                                 <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
12609                                         <context link="tag" field="owner"/>
12610                                 </retrieve>
12611                                 <update permission="ADMIN_ACQ_FUND_TAG">
12612                                         <context link="tag" field="owner"/>
12613                                 </update>
12614                                 <delete permission="ADMIN_ACQ_FUND_TAG">
12615                                         <context link="tag" field="owner"/>
12616                                 </delete>
12617                         </actions>
12618                 </permacrud>
12619         </class>
12620         <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">
12621                 <oils_persist:source_definition><![CDATA[
12622                 SELECT
12623                         poi.purchase_order AS purchase_order,
12624                         ii.invoice AS invoice,
12625                         NULL AS lineitem,
12626                         poi.id AS po_item,
12627                         NULL AS picklist
12628                 FROM
12629                         acq.po_item poi
12630                         JOIN acq.invoice_item ii ON (ii.po_item = poi.id)
12631                 UNION SELECT
12632                         jub.purchase_order AS purchase_order,
12633                         ie.invoice AS invoice,
12634                         jub.id AS lineitem,
12635                         NULL AS po_item,
12636                         jub.picklist AS picklist
12637                 FROM
12638                         acq.lineitem jub
12639                         JOIN acq.invoice_entry ie ON (ie.lineitem = jub.id)
12640                 UNION SELECT
12641                         ii.purchase_order AS purchase_order,
12642                         ii.invoice AS invoice,
12643                         NULL AS lineitem,
12644                         NULL AS po_item,
12645                         NULL AS picklist
12646                 FROM
12647                         acq.invoice_item ii
12648                 WHERE ii.po_item IS NULL
12649                 UNION SELECT
12650                         ie.purchase_order AS purchase_order,
12651                         ie.invoice AS invoice,
12652                         NULL AS lineitem,
12653                         NULL AS po_item,
12654                         NULL AS picklist
12655                 FROM
12656                         acq.invoice_entry ie
12657                 WHERE ie.lineitem IS NULL
12658                 UNION SELECT
12659                         NULL AS purchase_order,
12660                         NULL AS invoice,
12661                         jub.id AS lineitem,
12662                         NULL AS po_item,
12663                         jub.picklist AS picklist
12664                 FROM
12665                         acq.lineitem jub
12666                 WHERE jub.purchase_order IS NULL
12667                 ]]></oils_persist:source_definition>
12668                 <fields>
12669                         <field reporter:label="Purchase Order ID" name="purchase_order" reporter:datatype="link"/>
12670                         <field reporter:label="Lineitem ID" name="lineitem" reporter:datatype="link"/>
12671                         <field reporter:label="Invoice ID" name="invoice" reporter:datatype="link"/>
12672                         <field reporter:label="Purchase Order Item ID" name="po_item" reporter:datatype="link"/>
12673                         <field reporter:label="Picklist ID" name="picklist" reporter:datatype="link"/>
12674                 </fields>
12675                 <links>
12676                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo" />
12677                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub" />
12678                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv" />
12679                         <link field="po_item" reltype="has_a" key="id" map="" class="acqpoi" />
12680                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl" />
12681                 </links>
12682         </class>
12683         <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">
12684                 <fields oils_persist:primary="id" oils_persist:sequence="config.barcode_completion_id_seq">
12685                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
12686                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
12687                         <field reporter:label="Owner" name="org_unit" reporter:datatype="org_unit"/>
12688                         <field reporter:label="Prefix" name="prefix" reporter:datatype="text"/>
12689                         <field reporter:label="Suffix" name="suffix" reporter:datatype="text"/>
12690                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
12691                         <field reporter:label="Padding" name="padding" reporter:datatype="text"/>
12692                         <field reporter:label="Padding At End" name="padding_end" reporter:datatype="bool"/>
12693                         <field reporter:label="Applies to Items" name="asset" reporter:datatype="bool"/>
12694                         <field reporter:label="Applies to Users" name="actor" reporter:datatype="bool"/>
12695                 </fields>
12696                 <links>
12697                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
12698                 </links>
12699                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12700                         <actions>
12701                                 <create permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
12702                                 <retrieve/>
12703                                 <update permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
12704                                 <delete permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
12705                         </actions>
12706                 </permacrud>
12707         </class>
12708
12709         <class id="coustl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::org_unit_setting_type_log" oils_persist:tablename="config.org_unit_setting_type_log" reporter:label="Organizational Unit Setting Type Log">
12710                 <fields oils_persist:primary="id" oils_persist:sequence="config.org_unit_setting_type_log_id_seq">
12711                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
12712                         <field name="date_applied" reporter:datatype="timestamp"/>
12713                         <field name="org" reporter:datatype="org_unit"/>
12714                         <field name="original_value" reporter:datatype="text"/>
12715                         <field name="new_value" reporter:datatype="text"/>
12716                         <field name="field_name" reporter:datatype="link"/>
12717                 </fields>
12718                 <links>
12719                         <link field="field_name" reltype="has_a" key="name" map="" class="coust"/>
12720                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
12721                 </links>
12722                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12723                         <actions>
12724                                 <create permission="ADMIN_ORG_UNIT_SETTING_TYPE" context_field="org"/>
12725                                 <retrieve permission="STAFF_LOGIN" context_field="org"/>
12726                                 <update permission="ADMIN_ORG_UNIT_SETTING_TYPE_LOG" context_field="org"/>
12727                                 <delete permission="ADMIN_ORG_UNIT_SETTING_TYPE_LOG" context_field="org"/>
12728                         </actions>
12729                 </permacrud>
12730         </class>
12731         <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">
12732                 <fields oils_persist:primary="id" oils_persist:sequence="action.archive_actor_stat_cat_id_seq">
12733                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
12734                         <field reporter:label="Circ" name="xact" reporter:datatype="link"/>
12735                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
12736                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
12737                 </fields>
12738                 <links>
12739                         <link field="xact" reltype="has_a" key="id" map="" class="combcirc"/>
12740                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
12741                 </links>
12742         </class>
12743         <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">
12744                 <fields oils_persist:primary="id" oils_persist:sequence="action.archive_actor_stat_cat_id_seq">
12745                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
12746                         <field reporter:label="Circ" name="xact" reporter:datatype="link"/>
12747                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
12748                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
12749                 </fields>
12750                 <links>
12751                         <link field="xact" reltype="has_a" key="id" map="" class="combcirc"/>
12752                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
12753                 </links>
12754         </class>
12755         <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">
12756                 <fields oils_persist:primary="id" oils_persist:sequence="config.floating_group_id_seq">
12757                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
12758                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
12759                         <field reporter:label="Manual" name="manual" reporter:datatype="bool"/>
12760                         <field reporter:label="Group Members" name="members" oils_persist:virtual="true" reporter:datatype="link"/>
12761                 </fields>
12762                 <links>
12763                         <link field="members" reltype="has_many" key="floating_group" class="cfgm"/>
12764                 </links>
12765                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12766                         <actions>
12767                                 <create permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
12768                                 <retrieve/>
12769                                 <update permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
12770                                 <delete permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
12771                         </actions>
12772                 </permacrud>
12773         </class>
12774         <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">
12775                 <fields oils_persist:primary="id" oils_persist:sequence="config.floating_group_member_id_seq">
12776                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
12777                         <field reporter:label="Floating Group" name="floating_group" reporter:datatype="link"/>
12778                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="link"/>
12779                         <field reporter:label="Stop Depth" name="stop_depth" reporter:datatype="int"/>
12780                         <field reporter:label="Max Depth" name="max_depth" reporter:datatype="int"/>
12781                         <field reporter:label="Exclude" name="exclude" reporter:datatype="bool"/>
12782                 </fields>
12783                 <links>
12784                         <link field="floating_group" reltype="has_a" key="id" class="cfg"/>
12785                         <link field="org_unit" reltype="has_a" key="id" class="aou"/>
12786                 </links>
12787                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12788                         <actions>
12789                                 <create permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
12790                                 <retrieve/>
12791                                 <update permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
12792                                 <delete permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
12793                         </actions>
12794                 </permacrud>
12795         </class>
12796         <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">
12797                 <fields oils_persist:primary="code">
12798                         <field reporter:label="Code" name="code" reporter:selector="label" reporter:datatype="id" oils_obj:required="true"/>
12799                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_obj:required="true"/>
12800                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" oils_obj:required="true"/>
12801                 </fields>
12802                 <links>
12803                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
12804                 </links>
12805                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12806                         <actions>
12807                                 <create permission="ADMIN_COPY_TAG_TYPES" context_field="owner"/>
12808                                 <retrieve/>
12809                                 <update permission="ADMIN_COPY_TAG_TYPES" context_field="owner"/>
12810                                 <delete permission="ADMIN_COPY_TAG_TYPES" context_field="owner"/>
12811                         </actions>
12812                 </permacrud>
12813         </class>
12814         <class id="acpt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::copy_tag" oils_persist:tablename="asset.copy_tag" reporter:label="Copy Tags" oils_persist:field_safe="true">
12815                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_tag_id_seq">
12816                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
12817                         <field reporter:label="Copy Tag Type" name="tag_type" reporter:datatype="link"/>
12818                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
12819                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
12820                         <field reporter:label="Staff Note" name="staff_note" reporter:datatype="text"/>
12821                         <field reporter:label="Is OPAC Visible?" name="pub" reporter:datatype="bool"/>
12822                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" oils_obj:required="true"/>
12823                         <field reporter:label="URL" name="url" reporter:datatype="text"/>
12824                 </fields>
12825                 <links>
12826                         <link field="tag_type" reltype="has_a" key="code" map="" class="cctt"/>
12827                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
12828                 </links>
12829                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12830                         <actions>
12831                                 <create permission="ADMIN_COPY_TAG" context_field="owner"/>
12832                                 <retrieve/>
12833                                 <update permission="ADMIN_COPY_TAG" context_field="owner"/>
12834                                 <delete permission="ADMIN_COPY_TAG" context_field="owner"/>
12835                         </actions>
12836                 </permacrud>
12837         </class>
12838         <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">
12839                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_tag_copy_map_id_seq">
12840                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
12841                         <field reporter:label="Copy" name="copy" reporter:datatype="link"/>
12842                         <field reporter:label="Tag" name="tag" reporter:datatype="link"/>
12843                 </fields>
12844                 <links>
12845                         <link field="copy" reltype="has_a" key="id" map="" class="acp"/>
12846                         <link field="tag" reltype="has_a" key="id" map="" class="acpt"/>
12847                 </links>
12848                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12849                         <actions>
12850                                 <create permission="UPDATE_COPY">
12851                     <context link="copy" field="circ_lib"/>
12852                 </create>
12853                                 <retrieve/>
12854                                 <update permission="UPDATE_COPY">
12855                     <context link="copy" field="circ_lib"/>
12856                 </update>
12857                                 <delete permission="UPDATE_COPY">
12858                     <context link="copy" field="circ_lib"/>
12859                 </delete>
12860                         </actions>
12861                 </permacrud>
12862         </class>
12863         <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">
12864         <oils_persist:source_definition><![CDATA[
12865         SELECT ahcm.target_copy AS id,count(*) AS count
12866          FROM
12867          action.hold_request ahr,
12868          action.hold_copy_map ahcm
12869          WHERE
12870          ahr.cancel_time IS NULL AND
12871          ahr.fulfillment_time IS NULL AND
12872          ahr.capture_time IS NULL AND
12873          ahr.id = ahcm.hold
12874          GROUP BY ahcm.target_copy
12875         ]]></oils_persist:source_definition>
12876         <fields oils_persist:primary="id">
12877             <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
12878             <field reporter:label="Holds Count" name="count" reporter:datatype="text"/>
12879         </fields>
12880         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12881             <actions>
12882                <retrieve/>
12883             </actions>
12884         </permacrud>
12885         </class>
12886
12887         <class id="cwst" controller="open-ils.cstore open-ils.pcrud"
12888                 oils_obj:fieldmapper="config::workstation_setting_type" 
12889                 oils_persist:tablename="config.workstation_setting_type" 
12890                 reporter:label="Workstation Setting Type">
12891                 <fields oils_persist:primary="name">
12892                         <field name="name" reporter:datatype="text"/>
12893                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
12894                         <field name="description" reporter:datatype="text" oils_persist:i18n="true"/>
12895                         <field name="datatype" reporter:datatype="text"/>
12896                         <field name="fm_class" reporter:datatype="text"/>
12897                         <field name="grp" reporter:datatype="link"/>
12898                 </fields>
12899                 <links>
12900                         <link field="name" reltype="has_many" key="name" map="" class="aous"/>
12901                         <link field="grp" reltype="has_a" key="name" map="" class="csg"/>
12902                 </links>
12903                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12904                         <actions>
12905                                 <create permission="ADMIN_WORKSTATION_SETTING_TYPE" global_required="true"/>
12906                                 <retrieve/>
12907                                 <update permission="ADMIN_WORKSTATION_SETTING_TYPE" global_required="true"/>
12908                                 <delete permission="ADMIN_WORKSTATION_SETTING_TYPE" global_required="true"/>
12909                         </actions>
12910                 </permacrud>
12911         </class>
12912
12913         <!-- no pcrud access is granted for now, because it's assumed these
12914                          setting values will be applied and retrived via the API. -->
12915         <class id="awss" 
12916                 controller="open-ils.cstore"
12917                 oils_obj:fieldmapper="actor::workstation_setting" 
12918                 oils_persist:tablename="actor.workstation_setting" 
12919                 reporter:label="Workstation Setting">
12920                 <fields oils_persist:primary="id" oils_persist:sequence="actor.workstation_setting_id_seq">
12921                         <field reporter:label="Setting ID" name="id" reporter:datatype="id" />
12922                         <field reporter:label="Name" name="name" reporter:datatype="link"/>
12923                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
12924                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
12925                 </fields>
12926                 <links>
12927                         <link field="name" reltype="has_a" key="name" map="" class="cwst"/>
12928                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
12929                 </links>
12930         </class>
12931
12932         <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">
12933         <fields oils_persist:primary="id" oils_persist:sequence="config.hold_type_id_seq">
12934                 <field name="id" reporter:selector="name" reporter:datatype="id"/>
12935                 <field name="description"  reporter:datatype="text" oils_persist:i18n="true"/>
12936                 <field name="hold_type"  reporter:datatype="text" oils_persist:i18n="true"/>
12937         </fields>
12938         </class>
12939
12940         <class id="cpt" controller="open-ils.cstore open-ils.pcrud"
12941                 oils_obj:fieldmapper="config::print_template" 
12942                 oils_persist:tablename="config.print_template" 
12943                 reporter:label="Print Templates">
12944                 <fields oils_persist:primary="id" oils_persist:sequence="config.print_template_id_seq">
12945                         <field name="id" reporter:datatype="id"  reporter:selector="label"/>
12946                         <field name="name" reporter:datatype="text" oils_obj:required="true"/>
12947                         <field name="label" reporter:datatype="text" oils_obj:required="true" oils_persist:i18n="true"/>
12948                         <field reporter:label="Owner" name="owner" oils_obj:required="true" reporter:datatype="link"/>
12949                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
12950                         <field reporter:label="Locale" name="locale" reporter:datatype="link"/>
12951                         <field name="content_type" reporter:datatype="text"/>
12952                         <field name="template" reporter:datatype="text" oils_obj:required="true"/>
12953                 </fields>
12954                 <links>
12955                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
12956                         <link field="locale" reltype="has_a" key="id" map="" class="i18n_l"/>
12957                 </links>
12958                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12959                         <actions>
12960                                 <create permission="ADMIN_PRINT_TEMPLATE" context_field="owner"/>
12961                                 <retrieve permission="STAFF_LOGIN" context_field="owner"/>
12962                                 <update permission="ADMIN_PRINT_TEMPLATE" context_field="owner"/>
12963                                 <delete permission="ADMIN_PRINT_TEMPLATE" context_field="owner"/>
12964                         </actions>
12965                 </permacrud>
12966         </class>
12967
12968         <class id="cct" 
12969                 controller="open-ils.cstore open-ils.pcrud"
12970                 oils_obj:fieldmapper="config::carousel_type" 
12971                 oils_persist:tablename="config.carousel_type" 
12972                 reporter:label="Carousel Types">
12973                 <fields oils_persist:primary="id" oils_persist:sequence="config.carousel_type_id_seq">
12974                         <field reporter:label="Carousel Type ID" reporter:selector="name" name="id" reporter:datatype="id" />
12975                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_obj:required="true" oils_obj:i18n="true"/>
12976                         <field reporter:label="Automatically Managed?" name="automatic" reporter:datatype="bool"/>
12977                         <field reporter:label="Filter By Age?" name="filter_by_age" reporter:datatype="bool"/>
12978                         <field reporter:label="Filter By Item Owning Library?" name="filter_by_copy_owning_lib" reporter:datatype="bool"/>
12979                         <field reporter:label="Filter By Item Location?" name="filter_by_copy_location" reporter:datatype="bool"/>
12980                 </fields>
12981                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12982                         <actions>
12983                                 <create permission="ADMIN_CAROUSEL_TYPE" global_required="true"/>
12984                                 <retrieve/>
12985                                 <update permission="ADMIN_CAROUSEL_TYPE" global_required="true"/>
12986                                 <delete permission="ADMIN_CAROUSEL_TYPE" global_required="true"/>
12987                         </actions>
12988                 </permacrud>
12989         </class>
12990
12991         <class id="cc" 
12992                 controller="open-ils.cstore open-ils.pcrud"
12993                 oils_obj:fieldmapper="container::carousel" 
12994                 oils_persist:tablename="container.carousel" 
12995                 reporter:label="Carousels">
12996                 <fields oils_persist:primary="id" oils_persist:sequence="container.carousel_id_seq">
12997                         <field reporter:label="Carousel ID" name="id" reporter:datatype="id" reporter:selector="name"/>
12998                         <field reporter:label="Carousel Type" name="type" reporter:datatype="link" oils_obj:required="true"/>
12999                         <field reporter:label="Owner" name="owner" reporter:datatype="link" oils_obj:required="true"/>
13000                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_obj:required="true" oils_obj:i18n="true"/>
13001                         <field reporter:label="Bucket" name="bucket" reporter:datatype="link"/>
13002                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
13003                         <field reporter:label="Editing User" name="editor" reporter:datatype="link"/>
13004                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
13005                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
13006                         <field reporter:label="Age Limit" name="age_filter"  reporter:datatype="interval"/>
13007                         <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 -->
13008                         <field reporter:label="Shelving Locations" name="copy_location_filter" reporter:datatype="text" /> <!-- ditto -->
13009                         <field reporter:label="Last Refresh Time" name="last_refresh_time" reporter:datatype="timestamp"/>
13010                         <field reporter:label="Is Active" name="active" reporter:datatype="bool"/>
13011                         <field reporter:label="Maximum Items" name="max_items" reporter:datatype="int" oils_obj:required="true"/>
13012                 </fields>
13013                 <links>
13014                         <link field="type" reltype="has_a" key="id" map="" class="cct"/>
13015                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
13016                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
13017                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
13018                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
13019                 </links>
13020                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
13021                         <actions>
13022                                 <create permission="ADMIN_CAROUSEL" global_required="true"/>
13023                                 <retrieve/>
13024                                 <update permission="ADMIN_CAROUSEL" global_required="true"/>
13025                                 <delete permission="ADMIN_CAROUSEL" global_required="true"/>
13026                         </actions>
13027                 </permacrud>
13028         </class>
13029
13030         <class id="ccou" 
13031                 controller="open-ils.cstore open-ils.pcrud"
13032                 oils_obj:fieldmapper="container::carousel_org_unit" 
13033                 oils_persist:tablename="container.carousel_org_unit" 
13034                 reporter:label="Carousels Visible at Library">
13035                 <fields oils_persist:primary="id" oils_persist:sequence="container.carousel_org_unit_id_seq">
13036                         <field reporter:label="ID" name="id" reporter:datatype="id" />
13037                         <field reporter:label="Carousel" name="carousel" reporter:datatype="link"/>
13038                         <field reporter:label="Override Name" name="override_name" reporter:datatype="text"/>
13039                         <field reporter:label="Library" name="org_unit" reporter:datatype="link"/>
13040                         <field reporter:label="Sequence Number" name="seq" reporter:datatype="int"/>
13041                 </fields>
13042                 <links>
13043                         <link field="carousel" reltype="has_a" key="id" map="" class="cc"/>
13044                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
13045                 </links>
13046                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
13047                         <actions>
13048                                 <create permission="ADMIN_CAROUSEL" global_required="true"/>
13049                                 <retrieve/>
13050                                 <update permission="ADMIN_CAROUSEL" global_required="true"/>
13051                                 <delete permission="ADMIN_CAROUSEL" global_required="true"/>
13052                         </actions>
13053                 </permacrud>
13054         </class>
13055
13056         <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">
13057                 <fields oils_persist:primary="name">
13058                         <field name="name"              reporter:datatype="text"     reporter:label="Name" oils_obj:required="true"/>
13059                         <field name="description"       reporter:datatype="text"     reporter:label="Description"/>
13060                         <field name="context_org"       reporter:datatype="org_unit" reporter:label="Context Org" oils_obj:required="true"/>
13061                         <field name="enabled"           reporter:datatype="bool"     reporter:label="Enabled"/>
13062                         <field name="perm"              reporter:datatype="link"     reporter:label="Permission Required by User" oils_obj:required="true"/>
13063                         <field name="restrict_to_org"   reporter:datatype="bool"     reporter:label="Restrict by Home Library"/>
13064                         <field name="allow_inactive"    reporter:datatype="bool"     reporter:label="Allow Inactive Users"/>
13065                         <field name="allow_expired"     reporter:datatype="bool"     reporter:label="Allow Expired Users"/>
13066                         <field name="block_list"        reporter:datatype="text"     reporter:label="Block List"/>
13067                         <field name="usr_activity_type" reporter:datatype="link"     reporter:label="User Activity Type"/>
13068                 </fields>
13069                 <links>
13070                         <link field="context_org" reltype="has_a" key="id" map="" class="aou"/>
13071                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
13072                         <link field="usr_activity_type" reltype="has_a" key="id" map="" class="cuat"/>
13073                 </links>
13074                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
13075                         <actions>
13076                                 <create permission="ADMIN_REMOTEAUTH" context_field="context_org"/>
13077                                 <retrieve permission="STAFF_LOGIN" context_field="context_org"/>
13078                                 <update permission="ADMIN_REMOTEAUTH" context_field="context_org"/>
13079                                 <delete permission="ADMIN_REMOTEAUTH" context_field="context_org"/>
13080                         </actions>
13081                 </permacrud>
13082         </class>
13083
13084         <!-- ********************************************************************************************************************* -->
13085 </IDL>
13086
13087 <!--
13088     vim:noet:ts=4:sw=4:
13089 -->