]> git.evergreen-ils.org Git - working/Evergreen.git/blob - Open-ILS/examples/fm_IDL.xml
Show format icons in results and record detail pages
[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
24 <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">
25
26         <!-- Virtual classes -->
27         <class id="mups" controller="open-ils.cstore" oils_obj:fieldmapper="money::user_payment_summary" oils_persist:virtual="true" reporter:label="User Payment Summary">
28                 <fields>
29                         <field name="usr" oils_persist:virtual="true" />
30                         <field name="forgive_payment" oils_persist:virtual="true" />
31                         <field name="work_payment" oils_persist:virtual="true" />
32                         <field name="credit_payment" oils_persist:virtual="true" />
33                         <field name="goods_payment" oils_persist:virtual="true" />
34                 </fields>
35                 <links>
36                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
37                 </links>
38         </class>
39
40         <class id="mwps" controller="open-ils.cstore" oils_obj:fieldmapper="money::workstation_payment_summary" oils_persist:virtual="true" reporter:label="Workstation Payment Summary">
41                 <fields>
42                         <field name="workstation" oils_persist:virtual="true" />
43                         <field name="cash_payment" oils_persist:virtual="true" />
44                         <field name="check_payment" oils_persist:virtual="true" />
45                         <field name="credit_card_payment" oils_persist:virtual="true" />
46                 </fields>
47                 <links>
48                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
49                 </links>
50         </class>
51
52         <class id="brn" controller="open-ils.cstore" oils_obj:fieldmapper="biblio::record_node" oils_persist:virtual="true" reporter:label="Record Node">
53                 <fields>
54                         <field name="id" oils_persist:virtual="true" />
55                         <field name="children" oils_persist:virtual="true" />
56                         <field name="owner_doc" oils_persist:virtual="true" />
57                         <field name="intra_doc_id" oils_persist:virtual="true" />
58                         <field name="parent_node" oils_persist:virtual="true" />
59                         <field name="node_type" oils_persist:virtual="true" />
60                         <field name="namespace_uri" oils_persist:virtual="true" />
61                         <field name="name" oils_persist:virtual="true" />
62                         <field name="value" oils_persist:virtual="true" />
63                 </fields>
64         </class>
65
66         <class id="mvr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::virtual_record" oils_persist:virtual="true" reporter:label="Virtual Record">
67                 <fields>
68                         <field name="title" oils_persist:virtual="true" />
69                         <field name="author" oils_persist:virtual="true" />
70                         <field name="doc_id" oils_persist:virtual="true" />
71                         <field name="doc_type" oils_persist:virtual="true" />
72                         <field name="pubdate" oils_persist:virtual="true" />
73                         <field name="isbn" oils_persist:virtual="true" />
74                         <field name="publisher" oils_persist:virtual="true" />
75                         <field name="tcn" oils_persist:virtual="true" />
76                         <field name="subject" oils_persist:virtual="true" />
77                         <field name="types_of_resource" oils_persist:virtual="true" />
78                         <field name="call_numbers" oils_persist:virtual="true" />
79                         <field name="edition" oils_persist:virtual="true" />
80                         <field name="online_loc" oils_persist:virtual="true" />
81                         <field name="synopsis" oils_persist:virtual="true" />
82                         <field name="physical_description" oils_persist:virtual="true" />
83                         <field name="toc" oils_persist:virtual="true" />
84                         <field name="copy_count" oils_persist:virtual="true" />
85                         <field name="series" oils_persist:virtual="true" />
86                         <field name="serials" oils_persist:virtual="true" />
87                 </fields>
88         </class>
89
90         <class id="ex" controller="open-ils.cstore" oils_obj:fieldmapper="ex" oils_persist:virtual="true">
91                 <fields>
92                         <field name="err_msg" oils_persist:virtual="true" />
93                         <field name="type" oils_persist:virtual="true" />
94                 </fields>
95         </class>
96
97         <class id="perm_ex" controller="open-ils.cstore" oils_obj:fieldmapper="perm_ex" oils_persist:virtual="true">
98                 <fields>
99                         <field name="err_msg" oils_persist:virtual="true" />
100                         <field name="type" oils_persist:virtual="true" />
101                 </fields>
102         </class>
103
104         <class id="amtr" controller="open-ils.cstore" oils_obj:fieldmapper="action::matrix_test_result" oils_persist:virtual="true" reporter:label="Matrix Test Result">
105                 <fields oils_persist:primary="matchpoint">
106                         <field reporter:label="Matchpoint ID" name="matchpoint" reporter:datatype="id"/>
107                         <field reporter:label="Success" name="success" reporter:datatype="bool"/>
108                         <field reporter:label="Failure Part" name="fail_part" reporter:datatype="text"/>
109                 </fields>
110                 <links>
111                         <link field="matchpoint" reltype="has_a" key="id" map="" class="ccmm"/>
112                 </links>
113         </class>
114
115         <class id="accs" controller="open-ils.cstore" oils_obj:fieldmapper="action::circ_chain_summary" oils_persist:virtual="true" reporter:label="Circulation Chain Summary">
116         <!-- when the time is right, turn me into a view.  -->
117                 <fields>
118             <field reporter:label="Total Circs" name="num_circs" datatype="int"/>
119             <field reporter:label="Start Time" name="start_time" datatype="timestamp"/>
120             <field reporter:label="Checkout Workstation" name="checkout_workstation" datatype="text"/>
121             <field reporter:label="Last Renewal Time" name="last_renewal_time" datatype="timestamp"/>
122             <field reporter:label="Last Stop Fines" name="last_stop_fines" datatype="text"/>
123             <field reporter:label="Last Stop Fines Time" name="last_stop_fines_time" datatype="timestamp"/>
124             <field reporter:label="Last Renewal Workstation" name="last_renewal_workstation" datatype="text"/>
125             <field reporter:label="Last Checkin Workstation" name="last_checkin_workstation" datatype="text"/>
126             <field reporter:label="Last Checkin Time" name="last_checkin_time" datatype="timestamp"/>
127             <field reporter:label="Last Checkin Scan Time" name="last_checkin_scan_time" datatype="timestamp"/>
128                 </fields>
129         </class>
130
131         <class id="rhr" oils_obj:fieldmapper="resolver::holdings_record" oils_persist:virtual="true">
132                 <fields>
133                         <field name="public_name" oils_persist:virtual="true" />
134                         <field name="target_url" oils_persist:virtual="true" />
135                         <field name="target_coverage" oils_persist:virtual="true" />
136                         <field name="target_embargo" oils_persist:virtual="true" />
137                 </fields>
138         </class>
139
140         <!-- Actually in the DB -->
141         <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">
142                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.merge_profile_id_seq">
143                         <field reporter:label="Field ID" name="id" reporter:selector="name" reporter:datatype="id"/>
144                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
145                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
146                         <field reporter:label="Add Specification" name="add_spec" reporter:datatype="text"/>
147                         <field reporter:label="Replace Specification" name="replace_spec" reporter:datatype="text"/>
148                         <field reporter:label="Remove Specification" name="strip_spec" reporter:datatype="text"/>
149                         <field reporter:label="Preserve Specification" name="preserve_spec" reporter:datatype="text"/>
150                 </fields>
151                 <links>
152                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
153                 </links>
154                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
155                         <actions>
156                                 <create permission="ADMIN_MERGE_PROFILE CREATE_MERGE_PROFILE" context_field="owner"/>
157                                 <retrieve permission="ADMIN_MERGE_PROFILE CREATE_MERGE_PROFILE UPDATE_MERGE_PROFILE DELETE_MERGE_PROFILE VIEW_MERGE_PROFILE" context_field="owner"/>
158                                 <update permission="ADMIN_MERGE_PROFILE UPDATE_MERGE_PROFILE" context_field="owner"/>
159                                 <delete permission="ADMIN_MERGE_PROFILE DELETE_MERGE_PROFILE" context_field="owner"/>
160                         </actions>
161                 </permacrud>
162         </class>
163
164         <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">
165                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.import_bib_trash_fields_id_seq">
166                         <field reporter:label="Field ID" name="id" reporter:datatype="id"/>
167                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
168                         <field reporter:label="Field" name="field" reporter:datatype="text"/>
169                 </fields>
170                 <links>
171                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
172                 </links>
173                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
174                         <actions>
175                                 <create permission="CREATE_IMPORT_TRASH_FIELD" context_field="owner"/>
176                                 <retrieve permission="CREATE_IMPORT_TRASH_FIELD UPDATE_IMPORT_TRASH_FIELD DELETE_IMPORT_TRASH_FIELD" context_field="owner"/>
177                                 <update permission="UPDATE_IMPORT_TRASH_FIELD" context_field="owner"/>
178                                 <delete permission="DELETE_IMPORT_TRASH_FIELD" context_field="owner"/>
179                         </actions>
180                 </permacrud>
181         </class>
182
183         <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">
184                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.import_item_id_seq">
185                         <field reporter:label="Import Item ID" name="id" reporter:datatype="id"/>
186                         <field reporter:label="Import Record" name="record" reporter:datatype="link"/>
187                         <field reporter:label="Attribute Definition" name="definition" reporter:datatype="link"/>
188                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="int"/>
189                         <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="int"/>
190                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
191                         <field reporter:label="Copy Number" name="copy_number" reporter:datatype="int"/>
192                         <field reporter:label="Status" name="status" reporter:datatype="int"/>
193                         <field reporter:label="Shelving Location" name="location" reporter:datatype="int"/>
194                         <field reporter:label="Circulate" name="circulate" reporter:datatype="bool"/>
195                         <field reporter:label="Deposit" name="deposit" reporter:datatype="bool"/>
196                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
197                         <field reporter:label="Reference" name="ref" reporter:datatype="bool"/>
198                         <field reporter:label="Holdable" name="holdable" reporter:datatype="bool"/>
199                         <field reporter:label="Price" name="price" reporter:datatype="money"/>
200                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
201                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="text"/>
202                         <field reporter:label="Circulate As MARC Type" name="circ_as_type" reporter:datatype="text"/>
203                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
204                         <field reporter:label="Public Note" name="pub_note" reporter:datatype="text"/>
205                         <field reporter:label="Private Note" name="priv_note" reporter:datatype="text"/>
206                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
207                 </fields>
208                 <links>
209                         <link field="record" reltype="has_a" key="id" map="" class="vqbr"/>
210                         <link field="definition" reltype="has_a" key="id" map="" class="viiad"/>
211                 </links>
212                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
213                         <actions>
214                                 <create permission="CREATE_IMPORT_ITEM">
215                     <context link="definition" field="owner"/>
216                                 </create>
217                                 <retrieve permission="CREATE_IMPORT_ITEM UPDATE_IMPORT_ITEM DELETE_IMPORT_ITEM">
218                     <context link="definition" field="owner"/>
219                                 </retrieve>
220                                 <update permission="UPDATE_IMPORT_ITEM">
221                     <context link="definition" field="owner"/>
222                                 </update>
223                                 <delete permission="DELETE_IMPORT_ITEM">
224                     <context link="definition" field="owner"/>
225                                 </delete>
226                         </actions>
227                 </permacrud>
228         </class>
229
230         <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">
231                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.import_item_attr_definition_id_seq">
232                         <field reporter:label="Definition ID" name="id" reporter:datatype="id"/>
233                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
234                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
235                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
236                         <field reporter:label="Keep" name="keep" reporter:datatype="bool"/>
237                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="text"/>
238                         <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="text"/>
239                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
240                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
241                         <field reporter:label="Shelving Location" name="location" reporter:datatype="text"/>
242                         <field reporter:label="Circulate" name="circulate" reporter:datatype="text"/>
243                         <field reporter:label="Deposit" name="deposit" reporter:datatype="text"/>
244                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="text"/>
245                         <field reporter:label="Reference" name="ref" reporter:datatype="text"/>
246                         <field reporter:label="Holdable" name="holdable" reporter:datatype="text"/>
247                         <field reporter:label="Price" name="price" reporter:datatype="text"/>
248                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
249                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="text"/>
250                         <field reporter:label="Circulate As MARC Type" name="circ_as_type" reporter:datatype="text"/>
251                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
252                         <field reporter:label="Public Note" name="pub_note" reporter:datatype="text"/>
253                         <field reporter:label="Private Note" name="priv_note" reporter:datatype="text"/>
254                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="text"/>
255                         <field reporter:label="Copy Number" name="copy_number" reporter:datatype="text"/>
256                 </fields>
257                 <links>
258                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
259                 </links>
260                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
261                         <actions>
262                                 <create permission="CREATE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
263                                 <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"/>
264                                 <update permission="UPDATE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
265                                 <delete permission="DELETE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
266                         </actions>
267                 </permacrud>
268         </class>
269
270         <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">
271                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queue_id_seq">
272                         <field reporter:label="Queue ID" name="id" reporter:selector="name" reporter:datatype="id"/>
273                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
274                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
275                         <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
276                         <field reporter:label="Type" name="queue_type" reporter:datatype="text"/>
277                         <field reporter:label="Item Import Attribute Definition" name="item_attr_def" reporter:datatype="link"/>
278                 </fields>
279                 <links>
280                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
281                         <link field="item_attr_def" reltype="has_a" key="id" map="" class="viiad"/>
282                 </links>
283                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
284                         <actions>
285                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
286                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
287                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
288                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
289                         </actions>
290                 </permacrud>
291         </class>
292
293         <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">
294                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_record_id_seq">
295                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
296                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
297                         <field reporter:label="Import Time" name="import_time" reporter:datatype="timestamp"/>
298                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
299                         <field reporter:label="Queue" name="queue" reporter:datatype="link"/>
300                         <field reporter:label="Bib Source" name="bib_source" reporter:datatype="link"/>
301                         <field reporter:label="Final Target Record" name="imported_as" reporter:datatype="link"/>
302                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
303                         <field reporter:label="Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link"/>
304                         <field reporter:label="Matches" name="matches" oils_persist:virtual="true" reporter:datatype="link"/>
305                 </fields>
306                 <links>
307                         <link field="queue" reltype="has_a" key="id" map="" class="vbq"/>
308                         <link field="bib_source" reltype="has_a" key="id" map="" class="cbs"/>
309                         <link field="imported_as" reltype="has_a" key="id" map="" class="bre"/>
310             <link field="attributes" reltype="has_many" key="record" map="" class="vqbra"/>
311             <link field="matches" reltype="has_many" key="queued_record" map="" class="vbm"/>
312                 </links>
313                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
314                         <actions>
315                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
316                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
317                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
318                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
319                         </actions>
320                 </permacrud>
321         </class>
322
323         <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">
324                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.bib_attr_definition_id_seq">
325                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
326                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
327                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
328                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
329                         <field reporter:label="Remove RegExp" name="remove" reporter:datatype="text"/>
330                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
331                 </fields>
332                 <links/>
333                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
334                         <actions>
335                                 <create permission="CREATE_BIB_IMPORT_FIELD_DEF" global_required="true"/>
336                 <retrieve/>
337                                 <update permission="UPDATE_BIB_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
338                                 <delete permission="DELETE_BIB_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
339                         </actions>
340                 </permacrud>
341         </class>
342
343         <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">
344                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_bib_record_attr_id_seq">
345                         <field reporter:label="Attribute ID" name="id" reporter:datatype="id"/>
346                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
347                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
348                         <field reporter:label="Value" name="attr_value" reporter:datatype="text"/>
349                 </fields>
350                 <links>
351                         <link field="record" reltype="has_a" key="id" map="" class="vqbr"/>
352                         <link field="field" reltype="has_a" key="id" map="" class="vqbrad"/>
353                 </links>
354                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
355                         <actions>
356                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
357                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
358                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
359                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
360                         </actions>
361                 </permacrud>
362         </class>
363
364         <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">
365                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.bib_match_id_seq">
366                         <field reporter:label="Match ID" name="id" reporter:datatype="id"/>
367                         <field reporter:label="Queued Record" name="queued_record" reporter:datatype="link"/>
368                         <field reporter:label="Matched Attribute" name="matched_attr" reporter:datatype="link"/>
369                         <field reporter:label="Evergreen Record" name="eg_record" reporter:datatype="link"/>
370                         <field reporter:label="Field Type" name="field_type" reporter:datatype="text"/>
371                 </fields>
372                 <links>
373                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
374                         <link field="eg_record" reltype="has_a" key="id" map="" class="bre"/>
375                         <link field="matched_attr" reltype="has_a" key="id" map="" class="vqbra"/>
376                 </links>
377                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
378                         <actions>
379                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
380                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
381                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
382                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
383                         </actions>
384                 </permacrud>
385         </class>
386
387         <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">
388                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queue_id_seq">
389                         <field reporter:label="Queue ID" name="id" reporter:selector="name" reporter:datatype="id"/>
390                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
391                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
392                         <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
393                         <field reporter:label="Type" name="queue_type" reporter:datatype="text"/>
394                 </fields>
395                 <links>
396                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
397                 </links>
398                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
399                         <actions>
400                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
401                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
402                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
403                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
404                         </actions>
405                 </permacrud>
406         </class>
407
408         <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">
409                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_record_id_seq">
410                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
411                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
412                         <field reporter:label="Import Time" name="import_time" reporter:datatype="timestamp"/>
413                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
414                         <field reporter:label="Queue" name="queue" reporter:datatype="link"/>
415                         <field reporter:label="Final Target Record" name="imported_as" reporter:datatype="link"/>
416                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
417                         <field reporter:label="Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link"/>
418                         <field reporter:label="Matches" name="matches" oils_persist:virtual="true" reporter:datatype="link"/>
419                 </fields>
420                 <links>
421                         <link field="queue" reltype="has_a" key="id" map="" class="vaq"/>
422                         <link field="imported_as" reltype="has_a" key="id" map="" class="are"/>
423             <link field="attributes" reltype="has_many" key="record" map="" class="vqara"/>
424             <link field="matches" reltype="has_many" key="queued_record" map="" class="vam"/>
425                 </links>
426                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
427                         <actions>
428                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
429                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
430                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
431                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
432                         </actions>
433                 </permacrud>
434         </class>
435
436         <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">
437                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.authority_attr_definition_id_seq">
438                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
439                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
440                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
441                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
442                         <field reporter:label="Remove RegExp" name="remove" reporter:datatype="text"/>
443                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
444                 </fields>
445                 <links/>
446                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
447                         <actions>
448                                 <create permission="CREATE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
449                 <retrieve/>
450                                 <update permission="UPDATE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
451                                 <delete permission="DELETE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
452                         </actions>
453                 </permacrud>
454         </class>
455
456         <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">
457                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_authority_record_attr_id_seq">
458                         <field reporter:label="Attribute ID" name="id" reporter:datatype="id"/>
459                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
460                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
461                         <field reporter:label="Value" name="attr_value" reporter:datatype="text"/>
462                 </fields>
463                 <links>
464                         <link field="record" reltype="has_a" key="id" map="" class="vqar"/>
465                         <link field="field" reltype="has_a" key="id" map="" class="vqarad"/>
466                 </links>
467                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
468                         <actions>
469                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
470                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
471                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
472                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
473                         </actions>
474                 </permacrud>
475         </class>
476
477         <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">
478                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.authority_match_id_seq">
479                         <field reporter:label="Match ID" name="id" reporter:datatype="id"/>
480                         <field reporter:label="Queued Record" name="queued_record" reporter:datatype="link"/>
481                         <field reporter:label="Matched Attribute" name="matched_attr" reporter:datatype="link"/>
482                         <field reporter:label="Evergreen Record" name="eg_record" reporter:datatype="link"/>
483                 </fields>
484                 <links>
485                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
486                         <link field="eg_record" reltype="has_a" key="id" map="" class="bre"/>
487                         <link field="matched_attr" reltype="has_a" key="id" map="" class="vqbra"/>
488                 </links>
489                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
490                         <actions>
491                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
492                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
493                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
494                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
495                         </actions>
496                 </permacrud>
497         </class>
498
499
500         <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">
501                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_org_unit_opt_in_id_seq">
502                         <field reporter:label="Opt-in ID" name="id" reporter:datatype="id"/>
503                         <field reporter:label="Workstation" name="opt_in_ws" reporter:datatype="link"/>
504                         <field reporter:label="Staff Member" name="staff" reporter:datatype="link"/>
505                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
506                         <field reporter:label="Allowed Org Unit" name="org_unit" reporter:datatype="link"/>
507                         <field reporter:label="Opt-in Date/Time" name="opt_in_ts" reporter:datatype="timestamp"/>
508                 </fields>
509                 <links>
510                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
511                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
512                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
513                         <link field="opt_in_ws" reltype="has_a" key="id" map="" class="aws"/>
514                 </links>
515         </class>
516
517     <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">
518         <fields oils_persist:primary="name">
519             <field reporter:label="Name" name="name" reporter:datatype="text"/>
520             <field reporter:label="Label" name="label"  reporter:datatype="text" oils_persist:i18n="true"/>
521             <field reporter:label="Value" name="value"  reporter:datatype="text"/>
522             <field reporter:label="Enabled" name="enabled"  reporter:datatype="bool"/>
523         </fields>
524         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
525             <actions>
526                 <create   permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
527                 <retrieve permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
528                 <update   permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
529                 <delete   permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
530             </actions>
531         </permacrud>
532     </class>
533
534     <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">
535         <fields oils_persist:primary="id">
536             <field reporter:label="ID" name="id" reporter:datatype="id"/>
537             <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
538             <field reporter:label="Description" name="description"  reporter:datatype="text" oils_persist:i18n="true"/>
539             <field reporter:label="Function" name="func"  reporter:datatype="text"/>
540             <field reporter:label="Required Parameter Count" name="param_count"  reporter:datatype="int"/>
541         </fields>
542         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
543             <actions>
544                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
545                 <retrieve/>
546                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
547                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
548             </actions>
549         </permacrud>
550     </class>
551
552         <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">
553                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_index_norm_map_id_seq">
554                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
555                         <field reporter:label="Metabib Field" name="field" reporter:datatype="link"/>
556                         <field reporter:label="Normalizer" name="norm" reporter:datatype="link"/>
557                         <field reporter:label="Parameters (JSON Array)" name="params" reporter:datatype="text"/>
558                         <field reporter:label="Order of Application" name="pos" reporter:datatype="int"/>
559                 </fields>
560                 <links>
561                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
562                         <link field="norm" reltype="has_a" key="id" map="" class="cin"/>
563                 </links>
564         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
565             <actions>
566                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
567                 <retrieve/>
568                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
569                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
570             </actions>
571         </permacrud>
572         </class>
573
574         <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">
575                 <fields oils_persist:primary="name">
576                         <field reporter:label="Name" name="name" reporter:datatype="id" reporter:selector="label"  oils_obj:required="true"/>
577                         <field reporter:label="Label" name="label" reporter:datatype="text"  oils_obj:required="true"/>
578                         <field reporter:label="Description" name="description" reporter:datatype="text" />
579                         <field reporter:label="Filter?" name="filter" reporter:datatype="bool"/>
580                         <field reporter:label="Sorter?" name="sorter" reporter:datatype="bool"/>
581                         <field reporter:label="MARC Tag" name="tag" reporter:datatype="text"/>
582                         <field reporter:label="MARC Subfields" name="sf_list" reporter:datatype="text"/>
583                         <field reporter:label="Joiner" name="joiner" reporter:datatype="text"/>
584                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
585                         <field reporter:label="Format" name="format" reporter:datatype="link"/>
586                         <field reporter:label="Starting Position" name="start_pos" reporter:datatype="int"/>
587                         <field reporter:label="String Length" name="string_len" reporter:datatype="int"/>
588                         <field reporter:label="Fixed Field" name="fixed_field" reporter:datatype="text"/>
589                         <field reporter:label="Physical Characteristic" name="phys_char_sf" reporter:datatype="text"/>
590                         <field reporter:label="Normalizers" name="normalizers" reporter:datatype="link" oils_persist:virtual="true"/>
591                 </fields>
592                 <links>
593                         <link field="format" reltype="has_a" key="name" map="" class="cxt"/>
594                         <link field="normalizers" reltype="has_many" key="name" map="" class="crainm"/>
595                 </links>
596         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
597             <actions>
598                 <create permission="ADMIN_SVF" global_required="true"/>
599                 <retrieve/>
600                 <update permission="ADMIN_SVF" global_required="true"/>
601                 <delete permission="ADMIN_SVF" global_required="true"/>
602             </actions>
603         </permacrud>
604         </class>
605
606         <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">
607                 <fields oils_persist:primary="id">
608                         <field reporter:label="Record ID" name="id" reporter:datatype="id" oils_obj:required="true"/>
609                         <field reporter:label="Attributes" name="attrs" reporter:datatype="text"  oils_obj:required="true"/>
610                 </fields>
611                 <links>
612                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
613                 </links>
614         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
615             <actions>
616                 <retrieve/>
617             </actions>
618         </permacrud>
619         </class>
620
621         <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">
622                 <fields oils_persist:primary="id" oils_persist:sequence="config.record_attr_index_norm_map_id_seq">
623                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
624                         <field reporter:label="SVF Attribute" name="attr" reporter:datatype="link"/>
625                         <field reporter:label="Normalizer" name="norm" reporter:datatype="link"/>
626                         <field reporter:label="Parameters (JSON Array)" name="params" reporter:datatype="text"/>
627                         <field reporter:label="Order of Application" name="pos" reporter:datatype="int"/>
628                 </fields>
629                 <links>
630                         <link field="attr" reltype="has_a" key="name" map="" class="crad"/>
631                         <link field="norm" reltype="has_a" key="id" map="" class="cin"/>
632                 </links>
633         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
634             <actions>
635                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
636                 <retrieve/>
637                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
638                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
639             </actions>
640         </permacrud>
641         </class>
642
643         <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">
644                 <fields oils_persist:primary="id" oils_persist:sequence="config.coded_value_map_id_seq">
645                         <field reporter:label="ID" name="id" reporter:datatype="id"  oils_obj:required="true"/>
646                         <field reporter:label="SVF Attribute" name="ctype" reporter:datatype="link"  oils_obj:required="true"/>
647                         <field reporter:label="Code" name="code" reporter:datatype="text"  oils_obj:required="true"/>
648                         <field reporter:label="Value" name="value" reporter:datatype="text"  oils_obj:required="true"/>
649                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
650                 </fields>
651                 <links>
652                         <link field="ctype" reltype="has_a" key="name" map="" class="crad"/>
653                 </links>
654         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
655             <actions>
656                 <create permission="ADMIN_CODED_VALUE" global_required="true"/>
657                 <retrieve/>
658                 <update permission="ADMIN_CODED_VALUE" global_required="true"/>
659                 <delete permission="ADMIN_CODED_VALUE" global_required="true"/>
660             </actions>
661         </permacrud>
662         </class>
663
664         <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">
665                 <fields oils_persist:primary="id" oils_persist:sequence="config.remote_account_id_seq">
666                         <field name="id"            reporter:datatype="id"   reporter:label="ID"/>
667                         <field name="label"         reporter:datatype="text" reporter:label="Label"/>
668                         <field name="host"          reporter:datatype="text" reporter:label="Host"/>
669                         <field name="username"      reporter:datatype="text" reporter:label="Username"/>
670                         <field name="password"      reporter:datatype="text" reporter:label="Password"/>
671                         <field name="account"       reporter:datatype="text" reporter:label="Account"/>
672                         <field name="path"          reporter:datatype="text" reporter:label="Path"/>
673                         <field name="owner"         reporter:datatype="link" reporter:label="Owner"/>
674                         <field name="last_activity" reporter:datatype="timestamp" reporter:label="Last Activity"/>
675                 </fields>
676                 <links>
677                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
678                 </links>
679         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
680             <actions>
681                 <create   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
682                 <retrieve permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
683                 <update   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
684                 <delete   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
685             </actions>
686         </permacrud>
687         </class>
688
689     <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">
690         <fields oils_persist:primary="name">
691             <field reporter:label="Z39.50 Source" name="name" reporter:datatype="id"/>
692             <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
693             <field reporter:label="Host" name="host"  reporter:datatype="text"/>
694             <field reporter:label="Port" name="port"  reporter:datatype="int"/>
695             <field reporter:label="DB" name="db"  reporter:datatype="text"/>
696             <field reporter:label="Record Format" name="record_format"  reporter:datatype="text"/>
697             <field reporter:label="Transmission Format" name="transmission_format"  reporter:datatype="text"/>
698             <field reporter:label="Auth" name="auth"  reporter:datatype="bool"/>
699             <field reporter:label="Attrs" name="attrs" oils_persist:virtual="true"  reporter:datatype="link"/>
700         </fields>
701         <links>
702             <link field="attrs" reltype="has_many" key="source" map="" class="cza"/>
703         </links>
704         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
705             <actions>
706                 <create permission="ADMIN_Z3950_SOURCE" global_required="true"/>
707                 <retrieve/>
708                 <update permission="ADMIN_Z3950_SOURCE" global_required="true"/>
709                 <delete permission="ADMIN_Z3950_SOURCE" global_required="true"/>
710             </actions>
711         </permacrud>
712     </class>
713
714     <class id="cza" controller="open-ils.cstore" oils_obj:fieldmapper="config::z3950_attr" oils_persist:tablename="config.z3950_attr" reporter:label="Z39.50 Attribute">
715         <fields oils_persist:primary="id" oils_persist:sequence="config.z3950_attr_id_seq">
716             <field reporter:label="Z39.50 Attribute ID" name="id" reporter:datatype="id"/>
717             <field reporter:label="Z39.50 Source" name="source" reporter:datatype="link"/>
718             <field reporter:label="Name" name="name" reporter:datatype="text"/>
719             <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
720             <field reporter:label="Code" name="code"  reporter:datatype="int"/>
721             <field reporter:label="Format" name="format"  reporter:datatype="int"/>
722             <field reporter:label="Truncation" name="truncation"  reporter:datatype="int"/>
723         </fields>
724         <links>
725             <link field="source" reltype="has_a" key="name" map="" class="czs"/>
726         </links>
727     </class>
728
729         <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">
730                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_output_id_seq">
731                         <field reporter:label="Output ID" name="id" reporter:datatype="id"/>
732                         <field reporter:label="Create Date/Time" name="create_time" reporter:datatype="timestamp"/>
733                         <field reporter:label="Data" name="data" reporter:datatype="text"/>
734                         <field reporter:label="Is Error" name="is_error" reporter:datatype="bool"/>
735                         <field reporter:label="Events" name="events" oils_persist:virtual="true"  reporter:datatype="link"/>
736                         <field reporter:label="Error Events" name="error_events" oils_persist:virtual="true"  reporter:datatype="link"/>
737                 </fields>
738                 <links>
739             <link field="events" reltype="has_many" key="template_output" map="" class="atev"/>
740             <link field="error_events" reltype="has_many" key="error_output" map="" class="atev"/>
741                 </links>
742                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
743                         <actions>
744                                 <retrieve/>
745                                 <delete permission="ADMIN_TRIGGER_TEMPLATE_OUTPUT DELETE_TRIGGER_TEMPLATE_OUTPUT" global_required="true"/>
746                         </actions>
747                 </permacrud>
748         </class>
749
750         <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">
751                 <fields oils_persist:primary="key">
752                         <field reporter:label="Hook Key" name="key" reporter:datatype="text"/>
753                         <field reporter:label="Core Type" name="core_type" reporter:datatype="text"/>
754                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
755                         <field reporter:label="Passive" name="passive"  reporter:datatype="bool"/>
756                 </fields>
757                 <links/>
758                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
759                         <actions>
760                                 <create permission="ADMIN_TRIGGER_HOOK CREATE_TRIGGER_HOOK" global_required="true"/>
761                                 <retrieve/>
762                                 <update permission="ADMIN_TRIGGER_HOOK UPDATE_TRIGGER_HOOK" global_required="true"/>
763                                 <delete permission="ADMIN_TRIGGER_HOOK DELETE_TRIGGER_HOOK" global_required="true"/>
764                         </actions>
765                 </permacrud>
766         </class>
767
768         <class id="atcol" controller="open-ils.cstore" oils_obj:fieldmapper="action_trigger::collector" oils_persist:tablename="action_trigger.collector" reporter:label="Trigger Environment Collector">
769                 <fields oils_persist:primary="module">
770                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
771                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
772                 </fields>
773                 <links/>
774         </class>
775
776         <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">
777                 <fields oils_persist:primary="module">
778                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
779                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
780                 </fields>
781                 <links/>
782                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
783                         <actions>
784                                 <create permission="ADMIN_TRIGGER_VALIDATOR CREATE_TRIGGER_VALIDATOR" global_required="true"/>
785                                 <retrieve/>
786                                 <update permission="ADMIN_TRIGGER_VALIDATOR UPDATE_TRIGGER_VALIDATOR" global_required="true"/>
787                                 <delete permission="ADMIN_TRIGGER_VALIDATOR DELETE_TRIGGER_VALIDATOR" global_required="true"/>
788                         </actions>
789                 </permacrud>
790         </class>
791
792         <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">
793                 <fields oils_persist:primary="module">
794                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
795                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
796                 </fields>
797                 <links/>
798                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
799                         <actions>
800                                 <create permission="ADMIN_TRIGGER_REACTOR CREATE_TRIGGER_REACTOR" global_required="true"/>
801                                 <retrieve/>
802                                 <update permission="ADMIN_TRIGGER_REACTOR UPDATE_TRIGGER_REACTOR" global_required="true"/>
803                                 <delete permission="ADMIN_TRIGGER_REACTOR DELETE_TRIGGER_REACTOR" global_required="true"/>
804                         </actions>
805                 </permacrud>
806         </class>
807
808         <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">
809                 <fields oils_persist:primary="module">
810                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
811                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
812                 </fields>
813                 <links/>
814                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
815                         <actions>
816                                 <create permission="ADMIN_TRIGGER_CLEANUP CREATE_TRIGGER_CLEANUP" global_required="true"/>
817                                 <retrieve/>
818                                 <update permission="ADMIN_TRIGGER_CLEANUP UPDATE_TRIGGER_CLEANUP" global_required="true"/>
819                                 <delete permission="ADMIN_TRIGGER_CLEANUP DELETE_TRIGGER_CLEANUP" global_required="true"/>
820                         </actions>
821                 </permacrud>
822         </class>
823
824         <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">
825                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.environment_id_seq">
826                         <field reporter:label="Definition ID" name="id" reporter:datatype="id"/>
827                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
828                         <field reporter:label="Field Path" name="path" reporter:datatype="text"/>
829                         <field reporter:label="Collector" name="collector" reporter:datatype="link"/>
830                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
831                 </fields>
832                 <links>
833                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
834                         <link field="collector" reltype="has_a" key="id" map="" class="atcol"/>
835                 </links>
836                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
837                         <actions>
838                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF">
839                     <context link="event_def" field="owner"/>
840                 </create>
841                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF">
842                     <context link="event_def" field="owner"/>
843                 </retrieve>
844                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF">
845                     <context link="event_def" field="owner"/>
846                 </update>
847                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF">
848                     <context link="event_def" field="owner"/>
849                 </delete>
850                         </actions>
851                 </permacrud>
852         </class>
853
854         <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">
855                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_definition_id_seq">
856                         <field reporter:label="Definition ID" name="id" reporter:datatype="id"/>
857                         <field reporter:label="Enabled" name="active" reporter:datatype="bool"/>
858                         <field reporter:label="Owning Library" name="owner"  reporter:datatype="org_unit"/>
859                         <field reporter:label="Hook" name="hook"  reporter:datatype="link"/>
860                         <field reporter:label="Validator" name="validator"  reporter:datatype="link"/>
861                         <field reporter:label="Reactor" name="reactor"  reporter:datatype="link"/>
862                         <field reporter:label="Success Cleanup" name="cleanup_success"  reporter:datatype="link"/>
863                         <field reporter:label="Failure Cleanup" name="cleanup_failure"  reporter:datatype="link"/>
864                         <field reporter:label="Processing Delay" name="delay"  reporter:datatype="interval"/>
865                         <field reporter:label="Max Event Validity Delay" name="max_delay"  reporter:datatype="interval"/>
866                         <field reporter:label="Processing Delay Context Field" name="delay_field"  reporter:datatype="text"/>
867                         <field reporter:label="Processing Group Context Field" name="group_field"  reporter:datatype="text"/>
868                         <field reporter:label="Template" name="template"  reporter:datatype="text"/>
869                         <field reporter:label="Name" name="name"  reporter:datatype="text"/>
870                         <field reporter:label="Granularity" name="granularity"  reporter:datatype="text"/>
871                         <field reporter:label="Opt-In User Field" name="usr_field"  reporter:datatype="text"/>
872                         <field reporter:label="Opt-In Setting Type" name="opt_in_setting"  reporter:datatype="link"/>
873                         <field reporter:label="Environment Entries" name="env" oils_persist:virtual="true"  reporter:datatype="link"/>
874                         <field reporter:label="Parameters" name="params" oils_persist:virtual="true"  reporter:datatype="link"/>
875                 </fields>
876                 <links>
877                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
878                         <link field="hook" reltype="has_a" key="key" map="" class="ath"/>
879                         <link field="validator" reltype="has_a" key="module" map="" class="atval"/>
880                         <link field="reactor" reltype="has_a" key="module" map="" class="atreact"/>
881                         <link field="cleanup_success" reltype="has_a" key="module" map="" class="atclean"/>
882                         <link field="cleanup_failure" reltype="has_a" key="module" map="" class="atclean"/>
883                         <link field="env" reltype="has_many" key="event_def" map="" class="atenv"/>
884                         <link field="params" reltype="has_many" key="event_def" map="" class="atevparam"/>
885                         <link field="opt_in_setting" reltype="has_a" key="name" map="" class="cust"/>
886                 </links>
887                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
888                         <actions>
889                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF" context_field="owner"/>
890                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF" context_field="owner"/>
891                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF" context_field="owner"/>
892                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF" context_field="owner"/>
893                         </actions>
894                 </permacrud>
895         </class>
896
897         <class id="atev" controller="open-ils.cstore" oils_obj:fieldmapper="action_trigger::event" oils_persist:tablename="action_trigger.event" reporter:label="Trigger Event Entry">
898                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_id_seq">
899                         <field reporter:label="Event ID" name="id" reporter:datatype="id"/>
900                         <field reporter:label="Target ID" name="target" reporter:datatype="int"/>
901                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
902                         <field reporter:label="Add Time" name="add_time" reporter:datatype="timestamp"/>
903                         <field reporter:label="Run Time" name="run_time" reporter:datatype="timestamp"/>
904                         <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
905                         <field reporter:label="Update Time" name="update_time" reporter:datatype="timestamp"/>
906                         <field reporter:label="Complete Time" name="complete_time" reporter:datatype="timestamp"/>
907                         <field reporter:label="State" name="state" reporter:datatype="text"/>
908                         <field reporter:label="User Data" name="user_data" reporter:datatype="text"/>
909                         <field reporter:label="Template Output" name="template_output" reporter:datatype="link"/>
910                         <field reporter:label="Error Output" name="error_output" reporter:datatype="text"/>
911                         <field reporter:label="Asynchronous Output" name="async_output" reporter:datatype="link"/>
912                         <field reporter:label="Update Process" name="update_process" reporter:datatype="int"/>
913                 </fields>
914                 <links>
915                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
916                         <link field="template_output" reltype="has_a" key="id" map="" class="ateo"/>
917                         <link field="error_output" reltype="has_a" key="id" map="" class="ateo"/>
918                         <link field="async_output" reltype="has_a" key="id" map="" class="ateo"/>
919                 </links>
920         </class>
921
922         <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">
923                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_params_id_seq">
924                         <field reporter:label="Event ID" name="id" reporter:datatype="id"/>
925                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
926                         <field reporter:label="Parameter Name" name="param" reporter:datatype="text"/>
927                         <field reporter:label="Parameter Value" name="value" reporter:datatype="text"/>
928                 </fields>
929                 <links>
930                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
931                 </links>
932                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
933                         <actions>
934                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF">
935                     <context link="event_def" field="owner"/>
936                 </create>
937                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF">
938                     <context link="event_def" field="owner"/>
939                 </retrieve>
940                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF">
941                     <context link="event_def" field="owner"/>
942                 </update>
943                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF">
944                     <context link="event_def" field="owner"/>
945                 </delete>
946                         </actions>
947                 </permacrud>
948         </class>
949
950         <class id="aws" controller="open-ils.cstore" oils_obj:fieldmapper="actor::workstation" oils_persist:tablename="actor.workstation" reporter:label="Workstation">
951                 <fields oils_persist:primary="id" oils_persist:sequence="actor.workstation_id_seq">
952                         <field reporter:label="Workstation ID" name="id" reporter:datatype="id"/>
953                         <field reporter:label="Workstation Name" name="name" reporter:datatype="text"/>
954                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
955                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
956                 </fields>
957                 <links>
958                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
959                         <link field="circulations" reltype="has_many" key="workstation" map="" class="circ"/>
960                 </links>
961         </class>
962
963         <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">
964                 <fields oils_persist:primary="code">
965                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
966                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
967                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
968                         <field reporter:label="SIP2 Media Type" name="sip2_media_type" reporter:datatype="text" oils_persist:i18n="true"/>
969                         <field reporter:label="Magnetic Media" name="magnetic_media" reporter:datatype="bool"/>
970                         <field reporter:label="Average Wait Time" name="avg_wait_time" reporter:datatype="interval"/>
971                 </fields>
972                 <links/>
973         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
974             <actions>
975                 <create permission="ADMIN_CIRC_MOD" global_required="true"/>
976                 <retrieve/>
977                 <update permission="ADMIN_CIRC_MOD" global_required="true"/>
978                 <delete permission="ADMIN_CIRC_MOD" global_required="true"/>
979             </actions>
980         </permacrud>
981         </class>
982
983         <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">
984                 <fields oils_persist:primary="code">
985                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
986                         <field reporter:label="Label" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
987                         <field reporter:label="Prorate?" name="prorate" reporter:datatype="bool"/>
988                 </fields>
989                 <links/>
990         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
991             <actions>
992                 <create permission="CREATE_INVOICE_ITEM_TYPE" global_required="true"/>
993                 <retrieve/>
994                 <update permission="UPDATE_INVOICE_ITEM_TYPE" global_required="true"/>
995                 <delete permission="DELETE_INVOICE_ITEM_TYPE" global_required="true"/>
996             </actions>
997         </permacrud>
998         </class>
999
1000         <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">
1001                 <fields oils_persist:primary="code">
1002                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1003                         <field reporter:label="Label" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1004                 </fields>
1005                 <links/>
1006         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1007             <actions>
1008                 <create permission="ADMIN_INVOICE_METHOD CREATE_INVOICE_METHOD" global_required="true"/>
1009                 <retrieve/>
1010                 <update permission="ADMIN_INVOICE_METHOD UPDATE_INVOICE_METHOD" global_required="true"/>
1011                 <delete permission="ADMIN_INVOICE_METHOD DELETE_INVOICE_METHOD" global_required="true"/>
1012             </actions>
1013         </permacrud>
1014         </class>
1015
1016         <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">
1017                 <fields oils_persist:primary="code">
1018                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1019                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1020                 </fields>
1021                 <links/>
1022         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1023             <actions>
1024                 <create permission="CREATE_COPY_BTYPE" global_required="true"/>
1025                 <retrieve/>
1026                 <update permission="UPDATE_COPY_BTYPE" global_required="true"/>
1027                 <delete permission="DELETE_COPY_BTYPE" global_required="true"/>
1028             </actions>
1029         </permacrud>
1030         </class>
1031
1032         <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">
1033                 <fields oils_persist:primary="code">
1034                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1035                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1036                 </fields>
1037                 <links/>
1038         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1039             <actions>
1040                 <create permission="CREATE_CN_BTYPE" global_required="true"/>
1041                 <retrieve/>
1042                 <update permission="UPDATE_CN_BTYPE" global_required="true"/>
1043                 <delete permission="DELETE_CN_BTYPE" global_required="true"/>
1044             </actions>
1045         </permacrud>
1046         </class>
1047
1048         <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">
1049                 <fields oils_persist:primary="code">
1050                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1051                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1052                 </fields>
1053                 <links/>
1054         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1055             <actions>
1056                 <create permission="CREATE_BIB_BTYPE" global_required="true"/>
1057                 <retrieve/>
1058                 <update permission="UPDATE_BIB_BTYPE" global_required="true"/>
1059                 <delete permission="DELETE_BIB_BTYPE" global_required="true"/>
1060             </actions>
1061         </permacrud>
1062         </class>
1063
1064         <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">
1065                 <fields oils_persist:primary="code">
1066                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1067                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1068                 </fields>
1069                 <links/>
1070         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1071             <actions>
1072                 <create permission="CREATE_USER_BTYPE" global_required="true"/>
1073                 <retrieve/>
1074                 <update permission="UPDATE_USER_BTYPE" global_required="true"/>
1075                 <delete permission="DELETE_USER_BTYPE" global_required="true"/>
1076             </actions>
1077         </permacrud>
1078         </class>
1079
1080         <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">
1081                 <fields oils_persist:primary="code">
1082                         <field reporter:label="Code" name="code" reporter:selector="value" reporter:datatype="id"/>
1083                         <field reporter:label="Format" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
1084                 </fields>
1085                 <links/>
1086         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1087             <actions>
1088                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
1089                 <retrieve/>
1090                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
1091                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
1092             </actions>
1093         </permacrud>
1094         </class>
1095
1096     <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">
1097         <fields oils_persist:primary="id" oils_persist:sequence="config.hold_matrix_weights_id_seq">
1098             <field reporter:label="Hold Weights ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1099             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1100             <field reporter:label="User Home Library" name="user_home_ou" reporter:datatype="float"/>
1101             <field reporter:label="Request Library" name="request_ou" reporter:datatype="float"/>
1102             <field reporter:label="Pickup Library" name="pickup_ou" reporter:datatype="float"/>
1103             <field reporter:label="Owning Library" name="item_owning_ou" reporter:datatype="float"/>
1104             <field reporter:label="Item Circ Library" name="item_circ_ou" reporter:datatype="float"/>
1105             <field reporter:label="User Permission Group" name="usr_grp" reporter:datatype="float"/>
1106             <field reporter:label="Requestor Permission Group" name="requestor_grp" reporter:datatype="float"/>
1107             <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="float"/>
1108             <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="float"/>
1109             <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="float"/>
1110             <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="float"/>
1111             <field reporter:label="Reference?" name="ref_flag" reporter:datatype="float"/>
1112         </fields>
1113         <links/>
1114         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1115             <actions>
1116                 <create permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1117                 <retrieve/>
1118                 <update permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1119                 <delete permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1120             </actions>
1121         </permacrud>
1122     </class>
1123
1124     <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">
1125         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_weights_id_seq">
1126             <field reporter:label="Circ Weights ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1127             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1128             <field reporter:label="Org Unit" name="org_unit" reporter:datatype="float"/>
1129             <field reporter:label="Copy Circ Lib" name="copy_circ_lib" reporter:datatype="float"/>
1130             <field reporter:label="Copy Owning Lib" name="copy_owning_lib" reporter:datatype="float"/>
1131             <field reporter:label="User Home Lib" name="user_home_ou" reporter:datatype="float"/>
1132             <field reporter:label="Permission Group" name="grp" reporter:datatype="float"/>
1133             <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="float"/>
1134             <field reporter:label="MARC Type" name="marc_type" reporter:datatype="float"/>
1135             <field reporter:label="MARC Form" name="marc_form" reporter:datatype="float"/>
1136             <field reporter:label="Videorecording Format" name="marc_vr_format" reporter:datatype="float"/>
1137             <field reporter:label="Reference?" name="ref_flag" reporter:datatype="float"/>
1138             <field reporter:label="User Age: Lower Bound" name="usr_age_lower_bound" reporter:datatype="float"/>
1139             <field reporter:label="User Age: Upper Bound" name="usr_age_upper_bound" reporter:datatype="float"/>
1140         </fields>
1141         <links/>
1142         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1143             <actions>
1144                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1145                 <retrieve/>
1146                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1147                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1148             </actions>
1149         </permacrud>
1150     </class>
1151
1152     <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">
1153         <fields oils_persist:primary="id" oils_persist:sequence="config.weight_assoc_id_seq">
1154             <field reporter:label="Assoc ID" name="id" reporter:datatype="id"/>
1155             <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
1156             <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
1157             <field reporter:label="Circ Weights" name="circ_weights" reporter:datatype="link"/>
1158             <field reporter:label="Hold Weights" name="hold_weights" reporter:datatype="link"/>
1159         </fields>
1160         <links>
1161             <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1162             <link field="circ_weights" reltype="has_a" key="id" map="" class="ccmw"/>
1163             <link field="hold_weights" reltype="has_a" key="id" map="" class="chmw"/>
1164         </links>
1165         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1166             <actions>
1167                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1168                 <retrieve permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT VIEW_CIRC_MATRIX_MATCHPOINT VIEW_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1169                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1170                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1171             </actions>
1172         </permacrud>
1173     </class>
1174
1175         <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">
1176                 <fields oils_persist:primary="id" oils_persist:sequence="config.hold_matrix_matchpoint_id_seq">
1177                         <field reporter:label="Matchpoint ID" name="id" reporter:datatype="id"/>
1178                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
1179                         <field reporter:label="Strict OU matches?" name="strict_ou_match" reporter:datatype="bool"/>
1180                         <field reporter:label="User Home Library" name="user_home_ou" reporter:datatype="org_unit"/>
1181                         <field reporter:label="Request Library" name="request_ou" reporter:datatype="org_unit"/>
1182                         <field reporter:label="Pickup Library" name="pickup_ou" reporter:datatype="org_unit"/>
1183                         <field reporter:label="Owning Library" name="item_owning_ou" reporter:datatype="org_unit"/>
1184                         <field reporter:label="Item Circ Library" name="item_circ_ou" reporter:datatype="org_unit"/>
1185                         <field reporter:label="User Permission Group" name="usr_grp" reporter:datatype="link"/>
1186                         <field reporter:label="Requestor Permission Group" name="requestor_grp" reporter:datatype="link"/>
1187                         <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="link"/>
1188                         <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="link"/>
1189                         <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="link"/>
1190                         <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="link"/>
1191                         <field reporter:label="Reference?" name="ref_flag" reporter:datatype="bool"/>
1192                         <field reporter:label="Holdable?" name="holdable" reporter:datatype="bool"/>
1193                         <field reporter:label="Range is from Owning Lib?" name="distance_is_from_owner" reporter:datatype="bool"/>
1194                         <field reporter:label="Transit Range" name="transit_range" reporter:datatype="link"/>
1195                         <field reporter:label="Max Holds" name="max_holds" reporter:datatype="int"/>
1196                         <field reporter:label="Max includes Frozen" name="include_frozen_holds" reporter:datatype="bool"/>
1197                         <field reporter:label="Copy Age Hold Protection Rule" name="age_hold_protect_rule" reporter:datatype="link"/>
1198                 </fields>
1199                 <links>
1200                         <link field="user_home_ou" reltype="has_a" key="id" map="" class="aou"/>
1201                         <link field="request_ou" reltype="has_a" key="id" map="" class="aou"/>
1202                         <link field="pickup_ou" reltype="has_a" key="id" map="" class="aou"/>
1203                         <link field="item_owning_ou" reltype="has_a" key="id" map="" class="aou"/>
1204                         <link field="item_circ_ou" reltype="has_a" key="id" map="" class="aou"/>
1205                         <link field="usr_grp" reltype="has_a" key="id" map="" class="pgt"/>
1206                         <link field="requestor_grp" reltype="has_a" key="id" map="" class="pgt"/>
1207                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
1208                         <link field="marc_type" reltype="has_a" key="code" map="" class="citm"/>
1209                         <link field="marc_form" reltype="has_a" key="code" map="" class="cifm"/>
1210                         <link field="marc_vr_format" reltype="has_a" key="code" map="" class="cvrfm"/>
1211                         <link field="age_hold_protect_rule" reltype="has_a" key="id" map="" class="crahp"/>
1212             <link field="transit_range" reltype="has_a" key="id" map="" class="aout"/>
1213                 </links>
1214         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1215             <actions>
1216                 <create permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1217                 <retrieve permission="ADMIN_HOLD_MATRIX_MATCHPOINT VIEW_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1218                 <update permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1219                 <delete permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1220             </actions>
1221         </permacrud>
1222         </class>
1223
1224         <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">
1225                 <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_matchpoint_id_seq">
1226                         <field reporter:label="Matchpoint ID" name="id" reporter:datatype="id"/>
1227                         <field reporter:label="Renewal?" name="is_renewal" reporter:datatype="bool"/>
1228                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
1229                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit" oils_obj:required="true"/>
1230                         <field reporter:label="Copy Circ Lib" name="copy_circ_lib" reporter:datatype="org_unit"/>
1231                         <field reporter:label="Copy Owning Lib" name="copy_owning_lib" reporter:datatype="org_unit"/>
1232                         <field reporter:label="User Home Lib" name="user_home_ou" reporter:datatype="org_unit"/>
1233                         <field reporter:label="Permission Group" name="grp" reporter:datatype="link" oils_obj:required="true"/>
1234                         <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="link"/>
1235                         <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="link"/>
1236                         <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="link"/>
1237                         <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="link"/>
1238                         <field reporter:label="Reference?" name="ref_flag" reporter:datatype="bool"/>
1239             <field reporter:label="Juvenile?" name="juvenile_flag" reporter:datatype="bool"/>
1240                         <field reporter:label="User Age: Lower Bound" name="usr_age_lower_bound" reporter:datatype="text"/>
1241                         <field reporter:label="User Age: Upper Bound" name="usr_age_upper_bound" reporter:datatype="text"/>
1242                         <field reporter:label="Circulate?" name="circulate" reporter:datatype="bool"/>
1243                         <field reporter:label="Duration Rule" name="duration_rule" reporter:datatype="link"/>
1244                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
1245                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
1246             <field reporter:label="Hard Due Date" name="hard_due_date" reporter:datatype="link"/>
1247             <field reporter:label="Renewals Override" name="renewals" reporter:datatype="int"/>
1248                         <field reporter:label="Script Test" name="script_test" reporter:datatype="text"/>
1249                         <field name="total_copy_hold_ratio" reporter:datatype="float" reporter:label="Minimum Total Copy/Hold Ratio"/>
1250                         <field name="available_copy_hold_ratio" reporter:datatype="float" reporter:label="Minimum Available Copy/Hold Ratio"/>
1251                 </fields>
1252                 <links>
1253                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1254                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
1255                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
1256                         <link field="user_home_ou" reltype="has_a" key="id" map="" class="aou"/>
1257                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
1258                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
1259                         <link field="marc_type" reltype="has_a" key="code" map="" class="citm"/>
1260                         <link field="marc_form" reltype="has_a" key="code" map="" class="cifm"/>
1261                         <link field="marc_vr_format" reltype="has_a" key="code" map="" class="cvrfm"/>
1262                         <link field="duration_rule" reltype="has_a" key="id" map="" class="crcd"/>
1263                         <link field="max_fine_rule" reltype="has_a" key="id" map="" class="crmf"/>
1264                         <link field="recurring_fine_rule" reltype="has_a" key="id" map="" class="crrf"/>
1265             <link field="hard_due_date" reltype="has_a" key="id" map="" class="chdd"/>
1266                 </links>
1267         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1268             <actions>
1269                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1270                 <retrieve permission="ADMIN_CIRC_MATRIX_MATCHPOINT VIEW_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1271                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1272                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1273             </actions>
1274         </permacrud>
1275         </class>
1276
1277         <class id="ccmcmt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::circ_matrix_circ_mod_test" oils_persist:tablename="config.circ_matrix_circ_mod_test" reporter:label="Circulation Matrix Circulation Modifier Subtest">
1278                 <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_circ_mod_test_id_seq">
1279                         <field reporter:label="Test ID" name="id" reporter:datatype="id"/>
1280                         <field reporter:label="Matchpoint ID" name="matchpoint" reporter:datatype="link"/>
1281                         <field reporter:label="Items Out" name="items_out" reporter:datatype="int"/>
1282                 </fields>
1283                 <links>
1284                         <link field="matchpoint" reltype="has_a" key="id" map="" class="ccmm"/>
1285                 </links>
1286         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1287             <actions>
1288                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1289                     <context link="matchpoint" field="org_unit"/>
1290                 </create>
1291                 <retrieve/>
1292                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1293                     <context link="matchpoint" field="org_unit"/>
1294                 </update>
1295                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1296                     <context link="matchpoint" field="org_unit"/>
1297                 </delete>
1298             </actions>
1299         </permacrud>
1300         </class>
1301
1302         <class id="ccmcmtm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::circ_matrix_circ_mod_test_map" oils_persist:tablename="config.circ_matrix_circ_mod_test_map" reporter:label="Circulation Matrix Circulation Modifier Subtest Circulation Modifier Set">
1303                 <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_circ_mod_test_map_id_seq">
1304                         <field reporter:label="Entry ID" name="id" reporter:datatype="id"/>
1305                         <field reporter:label="Circulation Modifier Subtest ID" name="circ_mod_test" reporter:datatype="link"/>
1306                         <field reporter:label="Circulation Modifier" name="circ_mod" reporter:datatype="link"/>
1307                 </fields>
1308                 <links>
1309                         <link field="circ_mod_test" reltype="has_a" key="id" map="" class="ccmcmt"/>
1310                         <link field="circ_mod" reltype="has_a" key="code" map="" class="ccm"/>
1311                 </links>
1312         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1313             <actions>
1314                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1315                     <context link="circ_mod_test" jump="matchpoint" field="org_unit"/>
1316                 </create>
1317                 <retrieve/>
1318                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1319                     <context link="circ_mod_test" jump="matchpoint" field="org_unit"/>
1320                 </update>
1321                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1322                     <context link="circ_mod_test" jump="matchpoint" field="org_unit"/>
1323                 </delete>
1324             </actions>
1325         </permacrud>
1326         </class>
1327
1328         <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">
1329                 <fields oils_persist:primary="id" oils_persist:sequence="config.identification_type_id_seq">
1330                         <field reporter:label="Identification ID" name="id" reporter:selector="name" reporter:datatype="id"/>
1331                         <field reporter:label="Identification Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1332                 </fields>
1333                 <links/>
1334         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1335             <actions>
1336                 <create permission="ADMIN_IDENT_TYPE" global_required="true"/>
1337                 <retrieve/>
1338                 <update permission="ADMIN_IDENT_TYPE" global_required="true"/>
1339                 <delete permission="ADMIN_IDENT_TYPE" global_required="true"/>
1340             </actions>
1341         </permacrud>
1342         </class>
1343
1344         <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">
1345                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_question_id_seq">
1346                         <field reporter:label="Answers" name="answers" oils_persist:virtual="true" reporter:datatype="link"/>
1347                         <field reporter:label="Responses" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
1348                         <field reporter:label="Question ID" name="id" reporter:datatype="id" />
1349                         <field reporter:label="Question" name="question" reporter:datatype="text"/>
1350                         <field reporter:label="Survey" name="survey" reporter:datatype="link"/>
1351                 </fields>
1352                 <links>
1353                         <link field="survey" reltype="has_a" key="id" map="" class="asv"/>
1354                         <link field="responses" reltype="has_many" key="question" map="" class="asvr"/>
1355                         <link field="answers" reltype="has_many" key="question" map="" class="asva"/>
1356                 </links>
1357         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1358             <actions>
1359                 <create permission="ADMIN_SURVEY">
1360                     <context link="survey" field="owner"/>
1361                 </create>
1362                 <retrieve/>
1363                 <update permission="ADMIN_SURVEY">
1364                     <context link="survey" field="owner"/>
1365                 </update>
1366                 <delete permission="ADMIN_SURVEY">
1367                     <context link="survey" field="owner"/>
1368                 </delete>
1369             </actions>
1370         </permacrud>
1371         </class>
1372         <class id="mbts" controller="open-ils.cstore" oils_obj:fieldmapper="money::billable_transaction_summary" oils_persist:tablename="money.materialized_billable_xact_summary" reporter:label="Billable Transaction Summary" oils_persist:readonly="true">
1373                 <fields oils_persist:primary="id" oils_persist:sequence="">
1374                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
1375                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id"/>
1376                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
1377                         <field reporter:label="Last Billing Timestamp" name="last_billing_ts" reporter:datatype="timestamp"/>
1378                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
1379                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
1380                         <field reporter:label="Last Payment Timestamp" name="last_payment_ts" reporter:datatype="timestamp"/>
1381                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
1382                         <field reporter:label="Total Owed" name="total_owed" reporter:datatype="money"/>
1383                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
1384                         <field reporter:label="Billed User" name="usr" reporter:datatype="link"/>
1385                         <field reporter:label="Transaction Finish Time" name="xact_finish" reporter:datatype="timestamp" />
1386                         <field reporter:label="Transaction Start Time" name="xact_start" reporter:datatype="timestamp" />
1387                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
1388                 </fields>
1389                 <links>
1390                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1391                 </links>
1392         </class>
1393         <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">
1394                 <fields oils_persist:primary="id" oils_persist:sequence="">
1395                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
1396                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id"/>
1397                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
1398                         <field reporter:label="Last Billing Timestamp" name="last_billing_ts" reporter:datatype="timestamp"/>
1399                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
1400                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
1401                         <field reporter:label="Last Payment Timestamp" name="last_payment_ts" reporter:datatype="timestamp"/>
1402                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
1403                         <field reporter:label="Total Owed" name="total_owed" reporter:datatype="money"/>
1404                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
1405                         <field reporter:label="Billed User" name="usr" reporter:datatype="link"/>
1406                         <field reporter:label="Transaction Finish Time" name="xact_finish" reporter:datatype="timestamp" />
1407                         <field reporter:label="Transaction Start Time" name="xact_start" reporter:datatype="timestamp" />
1408                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
1409                         <field reporter:label="Billing Location" name="billing_location" reporter:datatype="link"/>
1410                 </fields>
1411                 <links>
1412                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1413                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
1414                 </links>
1415         </class>
1416         <class id="aun" controller="open-ils.cstore" oils_obj:fieldmapper="actor::usr_note" oils_persist:tablename="actor.usr_note" reporter:label="User Note">
1417                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_note_id_seq">
1418                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
1419                         <field reporter:label="Creating Staff" name="creator" reporter:datatype="link"/>
1420                         <field reporter:label="Note ID" name="id" reporter:datatype="id" />
1421                         <field reporter:label="Is OPAC Visible?" name="pub" reporter:datatype="bool"/>
1422                         <field reporter:label="Note Title" name="title" reporter:datatype="text"/>
1423                         <field reporter:label="User" name="usr" reporter:datatype="link" />
1424                         <field reporter:label="Note Content" name="value" reporter:datatype="text"/>
1425                 </fields>
1426                 <links>
1427                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1428                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
1429                 </links>
1430         </class>
1431         <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">
1432                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_password_reset_id_seq">
1433                         <field reporter:label="Request ID" name="id" reporter:datatype="id"/>
1434                         <field reporter:label="UUID" name="uuid" reporter:datatype="text"/>
1435                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
1436                         <field reporter:label="Request Time" name="request_time" reporter:datatype="timestamp"/>
1437                         <field reporter:label="Was Reset?" name="has_been_reset" reporter:datatype="bool"/>
1438                 </fields>
1439                 <links>
1440                         <link field="usr" reltype="has_a" key="id" class="au"/>
1441                 </links>
1442         </class>
1443         <class id="aus" controller="open-ils.cstore" oils_obj:fieldmapper="actor::user_setting" oils_persist:tablename="actor.usr_setting" reporter:label="User Setting">
1444                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_setting_id_seq">
1445                         <field reporter:label="Setting ID" name="id" reporter:datatype="id" />
1446                         <field reporter:label="Name" name="name" reporter:datatype="link"/>
1447                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
1448                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
1449                 </fields>
1450                 <links>
1451                         <link field="name" reltype="has_a" key="name" map="" class="cust"/>
1452                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1453                 </links>
1454         </class>
1455         <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">
1456                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.author_field_entry_id_seq">
1457                         <field name="field" reporter:datatype="link"/>
1458                         <field name="id" reporter:datatype="id" />
1459                         <field name="source" reporter:datatype="link"/>
1460                         <field name="value" reporter:datatype="text"/>
1461                 </fields>
1462                 <links>
1463                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
1464                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
1465                 </links>
1466         </class>
1467         <class id="aihu" controller="open-ils.cstore" oils_obj:fieldmapper="action::in_house_use" oils_persist:tablename="action.in_house_use" reporter:core="true" reporter:label="In House Use">
1468                 <fields oils_persist:primary="id" oils_persist:sequence="action.in_house_use_id_seq">
1469                         <field reporter:label="Use ID" name="id" reporter:datatype="id" />
1470                         <field reporter:label="Item" name="item" reporter:datatype="int" />
1471                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
1472                         <field reporter:label="Recording Staff" name="staff" reporter:datatype="link"/>
1473                         <field reporter:label="Use Date/Time" name="use_time" reporter:datatype="timestamp"/>
1474                 </fields>
1475                 <links>
1476                         <link field="item" reltype="has_a" key="id" map="" class="acp"/>
1477                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
1478                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1479                 </links>
1480         </class>
1481         <class id="ancihu" controller="open-ils.cstore" 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">
1482                 <fields oils_persist:primary="id" oils_persist:sequence="action.non_cat_in_house_use_id_seq">
1483                         <field reporter:label="Use ID" name="id" reporter:datatype="id" />
1484                         <field reporter:label="Item Type" name="item_type" reporter:datatype="link"/>
1485                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
1486                         <field reporter:label="Recording Staff" name="staff" reporter:datatype="link"/>
1487                         <field reporter:label="Use Date/Time" name="use_time" reporter:datatype="timestamp"/>
1488                 </fields>
1489                 <links>
1490                         <link field="item_type" reltype="has_a" key="id" map="" class="cnct"/>
1491                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
1492                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1493                 </links>
1494         </class>
1495         <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">
1496                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
1497                         <field reporter:label="Pretransit Copy Status" name="copy_status" reporter:datatype="bool"/>
1498                         <field reporter:label="Destination" name="dest" reporter:datatype="link"/>
1499                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
1500                         <field reporter:label="Transit ID" name="id" reporter:datatype="id"/>
1501                         <field reporter:label="Is Persistent? (unused)" name="persistant_transfer" reporter:datatype="bool"/>
1502                         <field reporter:label="Previous Hop (unused)" name="prev_hop" reporter:datatype="link"/>
1503                         <field reporter:label="Source" name="source" reporter:datatype="link"/>
1504                         <field reporter:label="Prev Destination" name="prev_dest" reporter:datatype="org_unit"/>
1505                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
1506                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
1507                         <field reporter:label="Hold Transit" name="hold_transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
1508                 </fields>
1509                 <links>
1510                         <link field="hold_transit_copy" reltype="might_have" key="id" map="" class="ahtc"/>
1511                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
1512                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
1513                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
1514                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
1515                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
1516                 </links>
1517         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1518             <actions>
1519                 <create permission="TRANSIT_COPY" context_field="owner">
1520                     <context link="target_copy" field="circ_lib"/>
1521                 </create>
1522                 <retrieve/>
1523                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
1524                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
1525             </actions>
1526         </permacrud>
1527         </class>
1528         <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">
1529                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_response_id_seq">
1530                         <field reporter:label="Answer" name="answer" reporter:datatype="link"/>
1531                         <field reporter:label="Answer Date/Time" name="answer_date" reporter:datatype="timestamp"/>
1532                         <field reporter:label="Effective Answer Date/Time" name="effective_date" reporter:datatype="timestamp"/>
1533                         <field reporter:label="Answer ID" name="id" reporter:datatype="id" />
1534                         <field reporter:label="Question" name="question" reporter:datatype="link"/>
1535                         <field reporter:label="Response Group ID" name="response_group_id" reporter:datatype="int" />
1536                         <field reporter:label="Survey" name="survey" reporter:datatype="link"/>
1537                         <field reporter:label="Responding User" name="usr" reporter:datatype="link"/>
1538                 </fields>
1539                 <links>
1540                         <link field="question" reltype="has_a" key="id" map="" class="asvq"/>
1541                         <link field="survey" reltype="has_a" key="id" map="" class="asv"/>
1542                         <link field="answer" reltype="has_a" key="id" map="" class="asva"/>
1543                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1544                 </links>
1545         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1546             <actions>
1547                 <create permission="ADMIN_SURVEY">
1548                     <context link="survey" field="owner"/>
1549                 </create>
1550                 <retrieve/>
1551                 <update permission="ADMIN_SURVEY">
1552                     <context link="survey" field="owner"/>
1553                 </update>
1554                 <delete permission="ADMIN_SURVEY">
1555                     <context link="survey" field="owner"/>
1556                 </delete>
1557             </actions>
1558         </permacrud>
1559         </class>
1560         <class id="ccbi" controller="open-ils.cstore" oils_obj:fieldmapper="container::copy_bucket_item" oils_persist:tablename="container.copy_bucket_item" reporter:label="Copy Bucket Item">
1561                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_item_id_seq">
1562                         <field name="bucket" />
1563                         <field name="id" reporter:datatype="id" />
1564                         <field name="target_copy" reporter:datatype="link"/>
1565                         <field name="create_time" reporter:datatype="timestamp" />
1566                         <field name="pos" reporter:datatype="int" />
1567                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
1568                 </fields>
1569                 <links>
1570                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
1571                         <link field="bucket" reltype="has_a" key="id" map="" class="ccb"/>
1572             <link field="notes" reltype="has_many" map="" key="item" class="ccbin"/>
1573                 </links>
1574         </class>
1575         <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">
1576                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_item_note_id_seq">
1577                         <field name="id" reporter:datatype="id" />
1578                         <field name="item" reporter:datatype="link"/>
1579                         <field name="note" reporter:datatype="text" />
1580                 </fields>
1581                 <links>
1582                         <link field="item" reltype="has_a" key="id" map="" class="ccbi"/>
1583                 </links>
1584         </class>
1585         <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">
1586                 <fields oils_persist:primary="id" oils_persist:sequence="authority.record_entry_id_seq">
1587                         <field name="active" reporter:datatype="bool"/>
1588                         <field name="create_date" reporter:datatype="timestamp"/>
1589                         <field name="creator" />
1590                         <field name="deleted" reporter:datatype="bool"/>
1591                         <field name="edit_date" reporter:datatype="timestamp"/>
1592                         <field name="editor" />
1593                         <field name="id" reporter:datatype="id" />
1594                         <field name="last_xact_id" />
1595                         <field name="marc" />
1596                         <field name="source" />
1597                         <field reporter:label="Owner" name="owner"  reporter:datatype="org_unit"/>
1598                         <field name="fixed_fields" oils_persist:virtual="true" reporter:datatype="link"/>
1599                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
1600                         <field name="bib_links" oils_persist:virtual="true" reporter:datatype="link"/>
1601                 </fields>
1602                 <links>
1603                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
1604                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
1605                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
1606                         <link field="notes" reltype="has_many" key="record" map="" class="arn"/>
1607                         <link field="bib_links" reltype="has_many" key="authority" map="" class="abl"/>
1608                         <link field="fixed_fields" reltype="might_have" key="record" map="" class="ard"/>
1609                 </links>
1610                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1611                         <actions>
1612                                 <create permission="CREATE_MARC IMPORT_MARC" global_required="true"/>
1613                                 <retrieve/>
1614                                 <update permission="UPDATE_MARC" global_required="true"/>
1615                                 <delete permission="UPDATE_MARC" global_required="true"/>
1616                         </actions>
1617                 </permacrud>
1618         </class>
1619         <class id="ard" controller="open-ils.cstore" oils_obj:fieldmapper="authority::record_descriptor" oils_persist:tablename="authority.rec_descriptor" reporter:label="Authority Record Descriptor">
1620                 <fields oils_persist:primary="id" oils_persist:sequence="authority.rec_descriptor_id_seq">
1621                         <field name="char_encoding" />
1622                         <field name="id" />
1623                         <field name="record" />
1624                         <field name="record_status" />
1625                 </fields>
1626                 <links>
1627                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
1628                 </links>
1629         </class>
1630         <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">
1631                 <fields oils_persist:primary="id" oils_persist:sequence="authority.bib_linking_id_seq">
1632                         <field name="id" reporter:datatype="id" />
1633                         <field name="bib" reporter:datatype="link" />
1634                         <field name="authority" reporter:datatype="link" />
1635                 </fields>
1636                 <links>
1637                         <link field="bib" reltype="has_a" key="id" map="" class="bre"/>
1638                         <link field="authority" reltype="has_a" key="id" map="" class="are"/>
1639                 </links>
1640         </class>
1641         <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">
1642                 <fields oils_persist:primary="code" oils_persist:sequence="">
1643                         <field reporter:label="Language Code" name="code" reporter:selector="value" reporter:datatype="text"/>
1644                         <field reporter:label="Language" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
1645                 </fields>
1646                 <links/>
1647         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1648             <actions>
1649                 <create permission="CREATE_MARC_CODE" global_required="true"/>
1650                 <retrieve/>
1651                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
1652                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
1653             </actions>
1654         </permacrud>
1655         </class>
1656         <class id="mccp" controller="open-ils.cstore" oils_obj:fieldmapper="money::credit_card_payment" oils_persist:tablename="money.credit_card_payment" reporter:label="Credit Card Payment">
1657                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
1658                         <field name="accepting_usr" />
1659                         <field name="amount" reporter:datatype="money" />
1660                         <field name="amount_collected" reporter:datatype="money" />
1661                         <field name="approval_code" reporter:datatype="text"/>
1662                         <field name="cash_drawer" reporter:datatype="link"/>
1663                         <field name="cc_first_name" reporter:datatype="text"/>
1664                         <field name="cc_last_name" reporter:datatype="text"/>
1665                         <field name="cc_number" reporter:datatype="text"/>
1666                         <field name="cc_order_number" reporter:datatype="text"/>
1667                         <field name="cc_type" reporter:datatype="text"/>
1668                         <field name="cc_processor" reporter:datatype="text"/>
1669                         <field name="expire_month" reporter:datatype="int" />
1670                         <field name="expire_year" reporter:datatype="int" />
1671                         <field name="id" reporter:datatype="id" />
1672                         <field name="note" reporter:datatype="text"/>
1673                         <field name="payment_ts" reporter:datatype="timestamp"/>
1674                         <field name="xact" reporter:datatype="link"/>
1675                         <field name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
1676                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
1677                 </fields>
1678                 <links>
1679                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
1680                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
1681                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
1682                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
1683                 </links>
1684         </class>
1685         <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">
1686                 <fields oils_persist:primary="name">
1687                         <field reporter:label="Name" name="name" reporter:datatype="text" />
1688                         <field reporter:label="Namespace URI" name="namespace_uri" reporter:datatype="text"/>
1689                         <field reporter:label="Namespace Prefix" name="prefix" reporter:datatype="text"/>
1690                         <field reporter:label="XSLT" name="xslt" reporter:datatype="text" />
1691                 </fields>
1692                 <links/>
1693         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1694             <actions>
1695                 <create permission="CREATE_XML_TRANSFORM" global_required="true"/>
1696                 <retrieve/>
1697                 <update permission="UPDATE_XML_TRANSFORM" global_required="true"/>
1698                 <delete permission="DELETE_XML_TRANSFORM" global_required="true"/>
1699             </actions>
1700         </permacrud>
1701         </class>
1702
1703         <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">
1704                 <fields oils_persist:primary="alias">
1705                         <field reporter:label="Alias (RegExp)" name="alias" reporter:datatype="text"/>
1706                         <field reporter:label="Class" name="field_class" reporter:datatype="link"/>
1707                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
1708                 </fields>
1709                 <links>
1710                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
1711                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
1712                 </links>
1713         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1714             <actions>
1715                 <create permission="CREATE_METABIB_SEARCH_ALIAS" global_required="true"/>
1716                 <retrieve/>
1717                 <update permission="UPDATE_METABIB_SEARCH_ALIAS" global_required="true"/>
1718                 <delete permission="DELETE_METABIB_SEARCH_ALIAS" global_required="true"/>
1719             </actions>
1720         </permacrud>
1721         </class>
1722
1723         <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">
1724                 <fields oils_persist:primary="name">
1725                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
1726                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
1727                         <field reporter:label="Fields" name="fields" reporter:datatype="link" oils_persist:virtual="true"/>
1728                 </fields>
1729                 <links>
1730                         <link field="fields" reltype="has_many" key="name" map="" class="cmf"/>
1731                 </links>
1732         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1733             <actions>
1734                 <create permission="CREATE_METABIB_CLASS" global_required="true"/>
1735                 <retrieve/>
1736                 <update permission="UPDATE_METABIB_CLASS" global_required="true"/>
1737                 <delete permission="DELETE_METABIB_CLASS" global_required="true"/>
1738             </actions>
1739         </permacrud>
1740         </class>
1741
1742         <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">
1743                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_id_seq">
1744                         <field reporter:label="Class" name="field_class" reporter:datatype="link"/>
1745                         <field reporter:label="ID" name="id" reporter:datatype="id" />
1746                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
1747                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
1748                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
1749                         <field reporter:label="Weight" name="weight" reporter:datatype="int" />
1750                         <field reporter:label="Format" name="format" reporter:datatype="link"/>
1751                         <field reporter:label="Search Field" name="search_field" reporter:datatype="bool" />
1752                         <field reporter:label="Facet Field" name="facet_field" reporter:datatype="bool" />
1753                         <field reporter:label="Facet XPath" name="facet_xpath" reporter:datatype="text" />
1754                 </fields>
1755                 <links>
1756                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
1757                 </links>
1758         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1759             <actions>
1760                 <create permission="CREATE_METABIB_FIELD" global_required="true"/>
1761                 <retrieve/>
1762                 <update permission="UPDATE_METABIB_FIELD" global_required="true"/>
1763                 <delete permission="DELETE_METABIB_FIELD" global_required="true"/>
1764             </actions>
1765         </permacrud>
1766         </class>
1767         <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">
1768                 <fields oils_persist:primary="id" oils_persist:sequence="config.biblio_fingerprint_id_seq">
1769                         <field name="id" reporter:datatype="id" />
1770                         <field name="name" reporter:datatype="text"/>
1771                         <field name="xpath" reporter:datatype="text"/>
1772                         <field name="format" reporter:datatype="link"/>
1773                         <field name="first_word" reporter:datatype="bool" />
1774                 </fields>
1775                 <links/>
1776         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1777             <actions>
1778                 <create permission="CREATE_BIBLIO_FINGERPRINT" global_required="true"/>
1779                 <retrieve/>
1780                 <update permission="UPDATE_BIBLIO_FINGERPRINT" global_required="true"/>
1781                 <delete permission="DELETE_BIBLIO_FINGERPRINT" global_required="true"/>
1782             </actions>
1783         </permacrud>
1784         </class>
1785         <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">
1786                 <fields oils_persist:primary="code" oils_persist:sequence="">
1787                         <field reporter:label="Audience Code" name="code" reporter:selector="value" reporter:datatype="text"/>
1788                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
1789                         <field reporter:label="Audience" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
1790                 </fields>
1791                 <links/>
1792         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1793             <actions>
1794                 <create permission="CREATE_MARC_CODE" global_required="true"/>
1795                 <retrieve/>
1796                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
1797                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
1798             </actions>
1799         </permacrud>
1800         </class>
1801         <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">
1802                 <fields oils_persist:primary="code" oils_persist:sequence="">
1803                         <field reporter:label="Item Form Code" name="code" reporter:selector="value" reporter:datatype="text"/>
1804                         <field reporter:label="Item Form" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
1805                 </fields>
1806                 <links/>
1807         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1808             <actions>
1809                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
1810                 <retrieve/>
1811                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
1812                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
1813             </actions>
1814         </permacrud>
1815         </class>
1816     <class id="acnc" controller="open-ils.cstore" oils_obj:fieldmapper="asset::call_number_class" oils_persist:tablename="asset.call_number_class" reporter:label="Call number classification scheme">
1817         <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_class_id_seq">
1818             <field reporter:label="Call number class ID" name="id" reporter_datatype="id"/>
1819             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1820             <field reporter:label="Normalizer function" name="normalizer" reporter:datatype="text"/>
1821             <field reporter:label="Call number fields" name="field" reporter:datatype="text"/>
1822         </fields>
1823     </class>
1824         <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">
1825                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_id_seq">
1826                         <field reporter:label="Copies" name="copies" oils_persist:virtual="true" reporter:datatype="link"/>
1827                         <field reporter:label="Create Date/Time" name="create_date" reporter:datatype="timestamp"/>
1828                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
1829                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
1830                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
1831                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
1832                         <field reporter:label="Call Number/Volume ID" name="id" reporter:datatype="id" />
1833                         <field reporter:label="Call Number Label" name="label" reporter:datatype="text"/>
1834                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
1835                         <field reporter:label="Bib Record" name="record" reporter:datatype="link"/>
1836                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
1837                         <field reporter:label="URI Maps" name="uri_maps" oils_persist:virtual="true" reporter:datatype="link"/>
1838                         <field reporter:label="URIs" name="uris" oils_persist:virtual="true" reporter:datatype="link"/>
1839                         <field reporter:label="Sort Key" name="label_sortkey" reporter:datatype="text"/>
1840                         <field reporter:label="Classification Scheme" name="label_class" reporter:datatype="link"/>
1841                 </fields>
1842                 <links>
1843                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
1844                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
1845                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
1846                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
1847                         <link field="notes" reltype="has_many" key="call_number" map="" class="acnn"/>
1848                         <link field="copies" reltype="has_many" key="call_number" map="" class="acp"/>
1849                         <link field="uris" reltype="has_many" key="call_number" map="uri" class="auricnm"/>
1850                         <link field="uri_maps" reltype="has_many" key="call_number" map="" class="auricnm"/>
1851                         <link field="label_class" reltype="has_a" key="id" map="" class="acnc"/>
1852                 </links>
1853         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1854             <actions>
1855                 <create permission="CREATE_VOLUME" context_field="owning_lib"/>
1856                 <retrieve/>
1857                 <update permission="UPDATE_VOLUME" context_field="owning_lib"/>
1858                 <delete permission="DELETE_VOLUME" context_field="owning_lib"/>
1859             </actions>
1860         </permacrud>
1861         </class>
1862         <class id="auri" controller="open-ils.cstore" oils_obj:fieldmapper="asset::uri" oils_persist:tablename="asset.uri" reporter:label="Electronic Access URI">
1863                 <fields oils_persist:primary="id" oils_persist:sequence="asset.uri_id_seq">
1864                         <field reporter:label="URI ID" name="id" reporter:datatype="id"/>
1865                         <field reporter:label="URI" name="href" reporter:datatype="text"/>
1866                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
1867                         <field reporter:label="Use Information" name="use_restriction" reporter:datatype="text"/>
1868                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
1869                         <field reporter:label="Call Number Maps" name="call_number_maps" oils_persist:virtual="true" reporter:datatype="link"/>
1870                         <field reporter:label="Call Numbers" name="call_numbers" oils_persist:virtual="true" reporter:datatype="link"/>
1871                 </fields>
1872                 <links>
1873                         <link field="call_numbers" reltype="has_many" key="uri" map="call_number" class="auricnm"/>
1874                         <link field="call_number_maps" reltype="has_many" key="uri" map="" class="auricnm"/>
1875         </links>
1876         </class>
1877         <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">
1878                 <fields oils_persist:primary="id" oils_persist:sequence="asset.uri_call_number_map_id_seq">
1879                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
1880                         <field reporter:label="URI" name="uri" reporter:datatype="int"/>
1881                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
1882                 </fields>
1883                 <links>
1884                         <link field="uri" reltype="has_a" key="id" map="" class="auri"/>
1885                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
1886                 </links>
1887         </class>
1888         <class id="cst" controller="open-ils.cstore" oils_obj:fieldmapper="config::standing" oils_persist:tablename="config.standing" reporter:label="Standing Penalty">
1889                 <fields oils_persist:primary="id" oils_persist:sequence="config.standing_id_seq">
1890                         <field name="id" reporter:datatype="id" />
1891                         <field name="value" oils_persist:i18n="true" />
1892                 </fields>
1893                 <links/>
1894         </class>
1895         <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">
1896                 <fields oils_persist:primary="usr" oils_persist:sequence="">
1897                         <field name="balance_owed" reporter:datatype="money" />
1898                         <field name="total_owed" reporter:datatype="money" />
1899                         <field name="total_paid" reporter:datatype="money" />
1900                         <field name="usr" reporter:datatype="link"/>
1901                 </fields>
1902                 <links>
1903                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1904         </links>
1905         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1906             <actions>
1907                 <retrieve permission="VIEW_USER">
1908                     <context link="usr" field="home_ou"/>
1909                 </retrieve>
1910             </actions>
1911         </permacrud>
1912         </class>
1913         <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">
1914                 <fields oils_persist:primary="id" oils_persist:sequence="money.collections_tracker_id_seq">
1915                         <field name="collector" />
1916                         <field name="enter_time" reporter:datatype="timestamp"/>
1917                         <field name="id" reporter:datatype="id" />
1918                         <field name="location" reporter:datatype="link"/>
1919                         <field name="usr" reporter:datatype="link"/>
1920                 </fields>
1921                 <links>
1922                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1923                         <link field="collector" reltype="has_a" key="id" map="" class="au"/>
1924                         <link field="location" reltype="has_a" key="id" map="" class="aou"/>
1925                 </links>
1926         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1927             <actions>
1928                 <create permission="money.collections_tracker.create" context_field="location"/>
1929                 <retrieve permission="money.collections_tracker.create" context_field="location"/> 
1930                 <delete permission="money.collections_tracker.create" context_field="location"/>
1931             </actions>
1932         </permacrud>
1933         </class>
1934         <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">
1935                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry_id_seq">
1936                         <field reporter:label="Call Numbers" name="call_numbers" oils_persist:virtual="true" reporter:datatype="link"/>
1937                         <field reporter:label="Fixed Field Entry" name="fixed_fields" oils_persist:virtual="true" reporter:datatype="link"/>
1938                         <field reporter:label="Is Active?" name="active" reporter:datatype="bool"/>
1939                         <field reporter:label="Record Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
1940                         <field reporter:label="Record Creator" name="creator" reporter:datatype="link"/>
1941                         <field reporter:label="Is Deleted?" name="deleted" reporter:datatype="bool"/>
1942                         <field reporter:label="Last Edit Data/Time" name="edit_date" reporter:datatype="timestamp"/>
1943                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
1944                         <field reporter:label="Fingerprint" name="fingerprint"  reporter:datatype="text"/>
1945                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
1946                         <field reporter:label="Last Transaction ID" name="last_xact_id"  reporter:datatype="text"/>
1947                         <field reporter:label="MARC21Slim" name="marc"  reporter:datatype="text"/>
1948                         <field reporter:label="Overall Quality" name="quality" reporter:datatype="int" />
1949                         <field reporter:label="Record Source" name="source" reporter:datatype="link"/>
1950                         <field reporter:label="TCN Source" name="tcn_source"  reporter:datatype="text"/>
1951                         <field reporter:label="TCN Value" name="tcn_value"  reporter:datatype="text"/>
1952                         <field reporter:label="Owner" name="owner"  reporter:datatype="org_unit"/>
1953                         <field reporter:label="Share Depth" name="share_depth"  reporter:datatype="int"/>
1954                         <field reporter:label="Metarecord" name="metarecord" oils_persist:virtual="true" reporter:datatype="link"/>
1955                         <field reporter:label="Language Code" name="language" oils_persist:virtual="true" reporter:datatype="link"/>
1956                         <field reporter:label="Non-MARC Record Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
1957                         <field reporter:label="Indexed Keyword Field Entries" name="keyword_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
1958                         <field reporter:label="Indexed Subject Field Entries" name="subject_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
1959                         <field reporter:label="Indexed Title Field Entries" name="title_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
1960                         <field reporter:label="Indexed Identifier Field Entries" name="identifier_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
1961                         <field reporter:label="Indexed Author Field Entries" name="author_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
1962                         <field reporter:label="Indexed Series Field Entries" name="series_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
1963                         <field reporter:label="Flattened MARC Fields " name="full_record_entries" oils_persist:virtual="true" reporter:datatype="link"/>
1964                         <field reporter:label="Simple Record Extracts " name="simple_record" oils_persist:virtual="true" reporter:datatype="link"/>
1965                         <field reporter:label="Authority Links" name="authority_links" oils_persist:virtual="true" reporter:datatype="link"/>
1966                         <field reporter:label="Subscriptions" name="subscriptions" oils_persist:virtual="true" reporter:datatype="link"/>
1967                         <field reporter:label="SVF Attributes" name="attrs" oils_persist:virtual="true" reporter:datatype="link"/>
1968                 </fields>
1969                 <links>
1970                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
1971                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
1972                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
1973                         <link field="simple_record" reltype="might_have" key="id" map="" class="rmsr"/>
1974                         <link field="metarecord" reltype="might_have" key="source" map="metarecord" class="mmrsm"/>
1975                         <link field="call_numbers" reltype="has_many" key="record" map="" class="acn"/>
1976                         <link field="keyword_field_entries" reltype="has_many" key="source" map="" class="mkfe"/>
1977                         <link field="fixed_fields" reltype="might_have" key="record" map="" class="mrd"/>
1978                         <link field="language" reltype="might_have" key="record" map="item_lang" class="mrd"/>
1979                         <link field="subject_field_entries" reltype="has_many" key="source" map="" class="msfe"/>
1980                         <link field="title_field_entries" reltype="has_many" key="source" map="" class="mtfe"/>
1981                         <link field="identifier_field_entries" reltype="has_many" key="source" map="" class="mife"/>
1982                         <link field="notes" reltype="has_many" key="record" map="" class="bren"/>
1983                         <link field="author_field_entries" reltype="has_many" key="source" map="" class="mafe"/>
1984                         <link field="series_field_entries" reltype="has_many" key="source" map="" class="msefe"/>
1985                         <link field="full_record_entries" reltype="has_many" key="record" map="" class="mfr"/>
1986                         <link field="authority_links" reltype="has_many" key="bib" map="" class="abl"/>
1987                         <link field="subscriptions" reltype="has_many" key="record_entry" map="" class="ssub"/>
1988                         <link field="attrs" reltype="might_have" key="id" map="" class="mra"/>
1989                 </links>
1990         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1991             <actions>
1992                 <create permission="CREATE_MARC IMPORT_MARC" global_required="true"/>
1993                 <retrieve/>
1994                 <update permission="UPDATE_MARC" global_required="true"/>
1995             </actions>
1996         </permacrud>
1997         </class>
1998         <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">
1999                 <fields oils_persist:primary="id">
2000                         <field name="dow_0_close" />
2001                         <field name="dow_0_open" />
2002                         <field name="dow_1_close" />
2003                         <field name="dow_1_open" />
2004                         <field name="dow_2_close" />
2005                         <field name="dow_2_open" />
2006                         <field name="dow_3_close" />
2007                         <field name="dow_3_open" />
2008                         <field name="dow_4_close" />
2009                         <field name="dow_4_open" />
2010                         <field name="dow_5_close" />
2011                         <field name="dow_5_open" />
2012                         <field name="dow_6_close" />
2013                         <field name="dow_6_open" />
2014                         <field name="id" reporter:datatype="id" />
2015                         <field name="org_unit" oils_persist:virtual="true" reporter:datatype="org_unit"/>
2016                 </fields>
2017                 <links>
2018                         <link field="id" reltype="might_have" key="id" map="" class="aou"/>
2019                 </links>
2020         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2021             <actions>
2022                 <create permission="CREATE_HOURS_OF_OPERATION" context_field="id"/>
2023                 <retrieve/>
2024                 <update permission="UPDATE_HOURS_OF_OPERATION" context_field="id"/>
2025                 <delete permission="DELETE_HOURS_OF_OPERATION" context_field="id"/>
2026             </actions>
2027         </permacrud>
2028         </class>
2029         <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">
2030                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_closed_id_seq">
2031                         <field name="close_end" reporter:datatype="timestamp" />
2032                         <field name="close_start" reporter:datatype="timestamp" />
2033                         <field name="id" reporter:datatype="id" />
2034                         <field name="org_unit" reporter:datatype="org_unit"/>
2035                         <field name="reason" reporter:datatype="text"/>
2036                 </fields>
2037                 <links>
2038                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
2039                 </links>
2040         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2041             <actions>
2042                 <create permission="CREATE_ORG_UNIT_CLOSING" context_field="org_unit"/>
2043                 <retrieve/>
2044                 <update permission="UPDATE_ORG_UNIT_CLOSING" context_field="org_unit"/>
2045                 <delete permission="DELETE_ORG_UNIT_CLOSING" context_field="org_unit"/>
2046             </actions>
2047         </permacrud>
2048         </class>
2049         <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">
2050                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_circ_duration_id_seq">
2051                         <field name="extended" reporter:datatype="interval"/>
2052                         <field name="id" reporter:datatype="id" reporter:selector="name"/>
2053                         <field name="max_renewals" reporter:datatype="int" />
2054                         <field name="name" reporter:datatype="text"/>
2055                         <field name="normal" reporter:datatype="interval"/>
2056                         <field name="shrt" reporter:datatype="interval"/>
2057                 </fields>
2058                 <links>
2059                 </links>
2060         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2061             <actions>
2062                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
2063                 <retrieve/>
2064                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
2065                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
2066             </actions>
2067         </permacrud>
2068         </class>
2069
2070         <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">
2071                 <fields oils_persist:primary="id" oils_persist:sequence="config.hard_due_date_id_seq">
2072                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2073                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2074             <field reporter:label="Always Use?" name="forceto" reporter:datatype="bool"/>
2075                         <field reporter:label="Current Ceiling Date" name="ceiling_date" reporter:datatype="timestamp"/>
2076             <field reporter:label="Owner" name="owner" reporter:datatype="org_unit"/>
2077                 </fields>
2078                 <links>
2079             <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
2080                 </links>
2081                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2082             <actions>
2083                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
2084                 <retrieve/>
2085                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
2086                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
2087             </actions>
2088                 </permacrud>
2089         </class>
2090
2091         <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">
2092                 <fields oils_persist:primary="id" oils_persist:sequence="config.hard_due_date_values_id_seq">
2093                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
2094                         <field reporter:label="Hard Due Date" name="hard_due_date" reporter:datatype="link"/>
2095                         <field reporter:label="Ceiling Date" name="ceiling_date" reporter:datatype="timestamp"/>
2096             <field reporter:label="Active Date" name="active_date" reporter:datatype="timestamp"/>
2097                 </fields>
2098                 <links>
2099                         <link field="hard_due_date" reltype="has_a" key="id" map="" class="chdd"/>
2100                 </links>
2101                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2102             <actions>
2103                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
2104                 <retrieve/>
2105                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
2106                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
2107             </actions>
2108                 </permacrud>
2109         </class>
2110
2111         <class id="mobts" controller="open-ils.cstore" oils_obj:fieldmapper="money::open_billable_transaction_summary" oils_persist:tablename="money.open_billable_xact_summary" reporter:label="Open Billable Transaction Summary">
2112                 <fields oils_persist:primary="id" oils_persist:sequence="">
2113                         <field name="balance_owed" reporter:datatype="money"/>
2114                         <field name="id" reporter:datatype="id" />
2115                         <field name="last_billing_note" reporter:datatype="text"/>
2116                         <field name="last_billing_ts" reporter:datatype="timestamp"/>
2117                         <field name="last_billing_type" reporter:datatype="text"/>
2118                         <field name="last_payment_note" reporter:datatype="text"/>
2119                         <field name="last_payment_ts" reporter:datatype="timestamp"/>
2120                         <field name="last_payment_type" reporter:datatype="text"/>
2121                         <field name="total_owed" reporter:datatype="money"/>
2122                         <field name="total_paid" reporter:datatype="money"/>
2123                         <field name="usr" reporter:datatype="link"/>
2124                         <field name="xact_finish" reporter:datatype="timestamp" />
2125                         <field name="xact_start" reporter:datatype="timestamp" />
2126                         <field name="xact_type" reporter:datatype="text"/>
2127                         <field name="xact" oils_persist:virtual="true" reporter:datatype="link"/>
2128                         <field name="grocery" oils_persist:virtual="true" reporter:datatype="link"/>
2129                         <field name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
2130                         <field name="billing_location" reporter:datatype="link"/>
2131                 </fields>
2132                 <links>
2133                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2134                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
2135                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
2136                         <link field="grocery" reltype="might_have" key="id" map="" class="mg"/>
2137                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
2138                 </links>
2139         </class>
2140         <class id="au" controller="open-ils.cstore" oils_obj:fieldmapper="actor::user" oils_persist:tablename="actor.usr" reporter:core="true" reporter:label="ILS User">
2141                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_id_seq">
2142                         <field reporter:label="All Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>
2143                         <field reporter:label="All Library Cards" name="cards" oils_persist:virtual="true" reporter:datatype="link"/>
2144                         <field reporter:label="All Circulations" name="checkouts" oils_persist:virtual="true" reporter:datatype="link"/>
2145                         <field reporter:label="All Hold Requests" name="hold_requests" oils_persist:virtual="true" reporter:datatype="link"/>
2146                         <field reporter:label="All Permissions" name="permissions" oils_persist:virtual="true" reporter:datatype="link"/>
2147                         <field reporter:label="All User Settings" name="settings" oils_persist:virtual="true" reporter:datatype="link"/>
2148                         <field reporter:label="Standing Penalties" name="standing_penalties" oils_persist:virtual="true" reporter:datatype="link"/>
2149                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2150                         <field reporter:label="Survey Responses" name="survey_responses" oils_persist:virtual="true" reporter:datatype="link"/>
2151                         <field reporter:label="Workstation Org Unit" name="ws_ou" oils_persist:virtual="true" reporter:datatype="link"/>
2152                         <field reporter:label="Workstation ID" name="wsid" oils_persist:virtual="true" reporter:datatype="link"/>
2153                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
2154                         <field reporter:label="Alert Message" name="alert_message"  reporter:datatype="text"/>
2155                         <field reporter:label="Barred" name="barred" reporter:datatype="bool"/>
2156                         <field reporter:label="Physical Address" name="billing_address" reporter:datatype="link"/>
2157                         <field reporter:label="Current Library Card" name="card" reporter:datatype="link"/>
2158                         <field reporter:label="Claims-returned Count" name="claims_returned_count" reporter:datatype="int" />
2159                         <field reporter:label="Claims Never Checked Out Count" name="claims_never_checked_out_count" reporter:datatype="int" />
2160                         <field reporter:label="Record Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2161                         <field reporter:label="User Credit Balance" name="credit_forward_balance" reporter:datatype="money" />
2162                         <field reporter:label="Daytime Phone" name="day_phone"  reporter:datatype="text"/>
2163                         <field reporter:label="Date of Birth" name="dob" reporter:datatype="timestamp"/>
2164                         <field reporter:label="Email Address" name="email"  reporter:datatype="text"/>
2165                         <field reporter:label="Evening Phone" name="evening_phone"  reporter:datatype="text"/>
2166                         <field reporter:label="Privilege Expiration Date" name="expire_date" reporter:datatype="timestamp"/>
2167                         <field reporter:label="Last Name" name="family_name"  reporter:datatype="text"/>
2168                         <field reporter:label="First Name" name="first_given_name"  reporter:datatype="text"/>
2169                         <field reporter:label="Home Library" name="home_ou" reporter:datatype="org_unit"/>
2170                         <field reporter:label="User ID" name="id" reporter:datatype="id" />
2171                         <field reporter:label="Primary Identification Type" name="ident_type" reporter:datatype="link"/>
2172                         <field reporter:label="Secondary Identification Type" name="ident_type2" reporter:datatype="link"/>
2173                         <field reporter:label="Primary Identification" name="ident_value"  reporter:datatype="text"/>
2174                         <field reporter:label="Secondary Identification" name="ident_value2"  reporter:datatype="text"/>
2175                         <field reporter:label="Last Transaction ID" name="last_xact_id" reporter:datatype="text"/>
2176                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="link"/>
2177                         <field reporter:label="Is Group Lead Account" name="master_account" reporter:datatype="bool"/>
2178                         <field reporter:label="Internet Access Level" name="net_access_level" reporter:datatype="link"/>
2179                         <field reporter:label="Other Phone" name="other_phone"  reporter:datatype="text"/>
2180                         <field reporter:label="Password" name="passwd"  reporter:datatype="text"/>
2181                         <field reporter:label="Photo URL" name="photo_url"  reporter:datatype="text"/>
2182                         <field reporter:label="Prefix" name="prefix"  reporter:datatype="text"/>
2183                         <field reporter:label="Main (Profile) Permission Group" name="profile" reporter:datatype="link"/>
2184                         <field reporter:label="Middle Name" name="second_given_name"  reporter:datatype="text"/>
2185                         <field reporter:label="Standing (unused)" name="standing" reporter:datatype="link"/>
2186                         <field reporter:label="Suffix/Title" name="suffix"  reporter:datatype="text"/>
2187                         <field reporter:label="Is Super User" name="super_user" reporter:datatype="bool"/>
2188                         <field reporter:label="Family Linkage or other Group" name="usrgroup" reporter:datatype="int"/>
2189                         <field reporter:label="OPAC/Staff Client User Name" name="usrname"  reporter:datatype="text"/>
2190                         <field reporter:label="OPAC/Staff Client Holds Alias" name="alias"  reporter:datatype="text"/>
2191                         <field reporter:label="Juvenile" name="juvenile"  reporter:datatype="bool"/>
2192                         <field reporter:label="Additional Permission Groups" name="groups" oils_persist:virtual="true" reporter:datatype="link"/>
2193                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
2194                         <field reporter:label="User Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
2195                         <field reporter:label="Demographic Info" name="demographic" oils_persist:virtual="true" reporter:datatype="link"/>
2196                         <field reporter:label="Billable Transactions" name="billable_transactions" oils_persist:virtual="true" reporter:datatype="link"/>
2197                         <field reporter:label="Money Summary" name="money_summary" oils_persist:virtual="true" reporter:datatype="link"/>
2198                         <field reporter:label="Open Billable Transactions" name="open_billable_transactions_summary" oils_persist:virtual="true" reporter:datatype="link"/>
2199                         <field reporter:label="Checkins" name="checkins" oils_persist:virtual="true" reporter:datatype="link"/>
2200                         <field reporter:label="Circulations Performed as Staff" name="performed_circulations" oils_persist:virtual="true" reporter:datatype="link"/>
2201                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
2202                         <field reporter:label="Reservations" name="reservations" oils_persist:virtual="true" reporter:datatype="link"/>
2203                 </fields>
2204                 <links>
2205                         <link field="demographic" reltype="might_have" key="id" map="" class="rud"/>
2206                         <link field="net_access_level" reltype="has_a" key="id" map="" class="cnal"/>
2207                         <link field="profile" reltype="has_a" key="id" map="" class="pgt"/>
2208                         <link field="ident_type" reltype="has_a" key="id" map="" class="cit"/>
2209                         <link field="billing_address" reltype="has_a" key="id" map="" class="aua"/>
2210                         <link field="mailing_address" reltype="has_a" key="id" map="" class="aua"/>
2211                         <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
2212                         <link field="standing" reltype="has_a" key="id" map="" class="cst"/>
2213                         <link field="card" reltype="has_a" key="id" map="" class="ac"/>
2214                         <link field="ident_type2" reltype="has_a" key="id" map="" class="cit"/>
2215                         <link field="stat_cat_entries" reltype="has_many" key="target_usr" map="" class="actscecm"/>
2216                         <link field="groups" reltype="has_many" key="usr" map="grp" class="pugm"/>
2217                         <link field="usrgroup" reltype="has_many" key="usrgroup" map="" class="au"/>
2218                         <link field="checkouts" reltype="has_many" key="usr" map="" class="circ"/>
2219                         <link field="hold_requests" reltype="has_many" key="usr" map="" class="circ"/>
2220                         <link field="permissions" reltype="has_many" key="usr" map="perm" class="pupm"/>
2221                         <link field="settings" reltype="has_many" key="usr" map="" class="aus"/>
2222                         <link field="billable_transactions" reltype="has_many" key="usr" map="" class="mbt"/>
2223                         <link field="open_billable_transactions_summary" reltype="has_many" key="usr" map="" class="mobts"/>
2224                         <link field="money_summary" reltype="might_have" key="usr" map="" class="mus"/>
2225                         <link field="standing_penalties" reltype="has_many" key="usr" map="" class="ausp"/>
2226                         <link field="addresses" reltype="has_many" key="usr" map="" class="aua"/>
2227                         <link field="survey_responses" reltype="has_many" key="usr" map="" class="asvr"/>
2228                         <link field="notes" reltype="has_many" key="usr" map="" class="aun"/>
2229                         <link field="checkins" reltype="has_many" key="checkin_staff" map="" class="circ"/>
2230                         <link field="cards" reltype="has_many" key="usr" map="" class="ac"/>
2231                         <link field="performed_circulations" reltype="has_many" key="circ_staff" map="" class="circ"/>
2232                         <link field="fund_alloc_pcts" reltype="has_many" key="allocator" map="" class="acqfap"/>
2233                         <link field="reservations" reltype="has_many" key="usr" map="" class="bresv"/>
2234                 </links>
2235         </class>
2236
2237         <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">
2238                 <fields oils_persist:primary="name">
2239                         <field name="name" reporter:datatype="text"/>
2240                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
2241                 </fields>
2242                 <links/>
2243                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2244                         <actions>
2245                                 <create permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
2246                                 <retrieve/>
2247                                 <update permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
2248                                 <delete permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
2249                         </actions>
2250                 </permacrud>
2251         </class>
2252         <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">
2253                 <fields oils_persist:primary="name">
2254                         <field name="name" reporter:label="Name" reporter:datatype="text"/>
2255                         <field name="label" reporter:label="Label" reporter:datatype="text"/>
2256                         <field name="description" reporter:label="Description" reporter:datatype="text"/>
2257                         <field name="datatype" reporter:label="Datatype" reporter:datatype="text"/>
2258                         <field name="fm_class" reporter:label="Fielmapper Class" reporter:datatype="text"/>
2259                         <field name="grp" reporter:label="Settings Group" reporter:datatype="link"/>
2260                         <field name="opac_visible" reporter:label="OPAC/Patron Visible" reporter:datatype="bool"/>
2261                 </fields>
2262                 <links>
2263                         <link field="name" reltype="has_many" key="name" map="" class="aus"/>
2264                         <link field="grp" reltype="has_a" key="name" map="" class="csg"/>
2265                 </links>
2266                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2267                         <actions>
2268                                 <create permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
2269                                 <retrieve/>
2270                                 <update permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
2271                                 <delete permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
2272                         </actions>
2273                 </permacrud>
2274         </class>
2275         <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">
2276                 <fields oils_persist:primary="name">
2277                         <field name="name" reporter:datatype="text"/>
2278                         <field name="label" reporter:datatype="text"/>
2279                         <field name="description" reporter:datatype="text"/>
2280                         <field name="datatype" reporter:datatype="text"/>
2281                         <field name="view_perm" reporter:datatype="link"/>
2282                         <field name="update_perm" reporter:datatype="link"/>
2283                         <field name="fm_class" reporter:datatype="text"/>
2284                         <field name="grp" reporter:datatype="link"/>
2285                 </fields>
2286                 <links>
2287                         <link field="name" reltype="has_many" key="name" map="" class="aous"/>
2288                         <link field="view_perm" reltype="has_a" key="id" map="" class="ppl"/>
2289                         <link field="update_perm" reltype="has_a" key="id" map="" class="ppl"/>
2290                         <link field="grp" reltype="has_a" key="name" map="" class="csg"/>
2291                 </links>
2292                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2293                         <actions>
2294                                 <create permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
2295                                 <retrieve/>
2296                                 <update permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
2297                                 <delete permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
2298                         </actions>
2299                 </permacrud>
2300         </class>
2301         <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">
2302                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_setting_id_seq">
2303                         <field name="id" />
2304                         <field name="name"  reporter:datatype="text"/>
2305                         <field name="org_unit" reporter:datatype="org_unit"/>
2306                         <field name="value"  reporter:datatype="text"/>
2307                 </fields>
2308                 <links>
2309                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
2310                         <link field="name" reltype="has_a" key="name" map="" class="coust"/>
2311                 </links>
2312         </class>
2313         <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">
2314                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_note_id_seq">
2315                         <field reporter:label="Note Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2316                         <field reporter:label="Note Creator" name="creator" reporter:datatype="link"/>
2317                         <field reporter:label="Note ID" name="id" reporter:datatype="id" />
2318                         <field reporter:label="Copy" name="owning_copy" reporter:datatype="link"/>
2319                         <field reporter:label="Is OPAC Visible?" name="pub" reporter:datatype="bool"/>
2320                         <field reporter:label="Note Title" name="title"  reporter:datatype="text"/>
2321                         <field reporter:label="Note Content" name="value"  reporter:datatype="text"/>
2322                 </fields>
2323                 <links>
2324                         <link field="owning_copy" reltype="has_a" key="id" map="" class="acp"/>
2325                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2326                 </links>
2327         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2328             <actions>
2329                 <create permission="CREATE_COPY_NOTE">
2330                     <context link="owning_copy" field="circ_lib"/>
2331                 </create>
2332                 <retrieve permission="VIEW_COPY_NOTES">
2333                     <context link="owning_copy" field="circ_lib"/>
2334                 </retrieve>
2335                 <update permission="UPDATE_COPY_NOTE">
2336                     <context link="owning_copy" field="circ_lib"/>
2337                 </update>
2338                 <delete permission="DELETE_COPY_NOTE">
2339                     <context link="owning_copy" field="circ_lib"/>
2340                 </delete>
2341             </actions>
2342         </permacrud>
2343         </class>
2344         <class id="mfr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::full_rec" oils_persist:tablename="metabib.full_rec" reporter:label="Flattened MARC Fields">
2345                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.full_rec_id_seq">
2346                         <field reporter:label="Field ID" name="id" reporter:datatype="id" />
2347                         <field reporter:label="Indicator 1" name="ind1" oils_persist:primitive="string"  reporter:datatype="text"/>
2348                         <field reporter:label="Indicator 2" name="ind2" oils_persist:primitive="string"  reporter:datatype="text"/>
2349                         <field reporter:label="Bib Record Entry" name="record" reporter:datatype="link"/>
2350                         <field reporter:label="Subfield" name="subfield" oils_persist:primitive="string"  reporter:datatype="text"/>
2351                         <field reporter:label="Tag" name="tag"  reporter:datatype="text"/>
2352                         <field reporter:label="Normalized Value" name="value"  reporter:datatype="text"/>
2353                 </fields>
2354                 <links>
2355                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
2356                 </links>
2357         </class>
2358         <class id="mmr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::metarecord" oils_persist:tablename="metabib.metarecord" reporter:label="Metarecord">
2359                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.metarecord_id_seq">
2360                         <field name="fingerprint"  reporter:datatype="text"/>
2361                         <field name="id" reporter:datatype="id" />
2362                         <field name="master_record" reporter:datatype="link"/>
2363                         <field name="mods"  reporter:datatype="text"/>
2364                         <field name="source_records" oils_persist:virtual="true" reporter:datatype="link"/>
2365                 </fields>
2366                 <links>
2367                         <link field="master_record" reltype="has_a" key="id" map="" class="bre"/>
2368                         <link field="source_records" reltype="has_many" key="metarecord" map="source" class="mmrsm"/>
2369                 </links>
2370         </class>
2371         <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">
2372                 <fields oils_persist:primary="id" oils_persist:sequence="config.net_access_level_id_seq">
2373                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
2374                         <field name="name"  reporter:datatype="text"/>
2375                 </fields>
2376                 <links/>
2377         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2378             <actions>
2379                 <create permission="CREATE_NET_ACCESS_LEVEL" global_required="true"/>
2380                 <retrieve/>
2381                 <update permission="UPDATE_NET_ACCESS_LEVEL" global_required="true"/>
2382                 <delete permission="DELETE_NET_ACCESS_LEVEL" global_required="true"/>
2383             </actions>
2384         </permacrud>
2385         </class>
2386         <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">
2387                 <fields oils_persist:primary="id" oils_persist:sequence="permission.perm_list_id_seq">
2388                         <field name="code"  reporter:datatype="text"/>
2389                         <field name="description"  reporter:datatype="text" oils_persist:i18n="true"/>
2390                         <field name="id" reporter:selector="code" reporter:datatype="id"/>
2391                 </fields>
2392                 <links/>
2393         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2394             <actions>
2395                 <create permission="CREATE_PERM" global_required="true"/>
2396                 <retrieve permission="CREATE_PERM UPDATE_PERM DELETE_PERM" global_required="true"/>
2397                 <update permission="UPDATE_PERM" global_required="true"/>
2398                 <delete permission="DELETE_PERM" global_required="true"/>
2399             </actions>
2400         </permacrud>
2401         </class>
2402         <class id="mmrsm" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::metarecord_source_map" oils_persist:tablename="metabib.metarecord_source_map" oils_persist:field_safe="true" reporter:label="Metarecord Source Map">
2403                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.metarecord_source_map_id_seq">
2404                         <field name="id" reporter:datatype="id" />
2405                         <field name="metarecord" reporter:datatype="link"/>
2406                         <field name="source" reporter:datatype="link"/>
2407                 </fields>
2408                 <links>
2409                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
2410                         <link field="metarecord" reltype="has_a" key="id" map="" class="mmr"/>
2411                 </links>
2412         </class>
2413         <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">
2414                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.facet_entry_id_seq">
2415                         <field name="id" reporter:datatype="id" />
2416                         <field name="field" reporter:datatype="link"/>
2417                         <field name="source" reporter:datatype="link"/>
2418                         <field name="value"  reporter:datatype="text"/>
2419                 </fields>
2420                 <links>
2421                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
2422                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
2423                 </links>
2424         </class>
2425         <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">
2426                 <oils_persist:source_definition>
2427                         SELECT * FROM metabib.author_field_entry
2428                                                 UNION ALL
2429                         SELECT * FROM metabib.keyword_field_entry
2430                                                 UNION ALL
2431                         SELECT * FROM metabib.identifier_field_entry
2432                                                 UNION ALL
2433                         SELECT * FROM metabib.title_field_entry
2434                                                 UNION ALL
2435                         SELECT * FROM metabib.subject_field_entry
2436                                                 UNION ALL
2437                         SELECT * FROM metabib.series_field_entry
2438                 </oils_persist:source_definition>
2439                 <fields>
2440                         <field name="field" reporter:datatype="link"/>
2441                         <field name="id" reporter:datatype="id" />
2442                         <field name="source" reporter:datatype="link"/>
2443                         <field name="value"  reporter:datatype="text"/>
2444                 </fields>
2445                 <links>
2446                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
2447                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
2448                 </links>
2449         </class>
2450         <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">
2451                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.keyword_field_entry_id_seq">
2452                         <field name="field" reporter:datatype="link"/>
2453                         <field name="id" reporter:datatype="id" />
2454                         <field name="source" reporter:datatype="link"/>
2455                         <field name="value"  reporter:datatype="text"/>
2456                 </fields>
2457                 <links>
2458                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
2459                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
2460                 </links>
2461         </class>
2462         <class id="mcp" controller="open-ils.cstore" oils_obj:fieldmapper="money::cash_payment" oils_persist:tablename="money.cash_payment" reporter:label="Cash Payment">
2463                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
2464                         <field name="accepting_usr" reporter:datatype="link"/>
2465                         <field name="amount" reporter:datatype="money" />
2466                         <field name="amount_collected" reporter:datatype="money" />
2467                         <field name="cash_drawer" reporter:datatype="link"/>
2468                         <field name="id" reporter:datatype="id" />
2469                         <field name="note"  reporter:datatype="text"/>
2470                         <field name="payment_ts" reporter:datatype="timestamp"/>
2471                         <field name="xact" reporter:datatype="link"/>
2472                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
2473                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
2474                 </fields>
2475                 <links>
2476                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
2477                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
2478                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
2479                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
2480                 </links>
2481         </class>
2482         <class id="mfp" controller="open-ils.cstore" oils_obj:fieldmapper="money::forgive_payment" oils_persist:tablename="money.forgive_payment" reporter:label="Forgive Payment">
2483                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
2484                         <field name="accepting_usr" reporter:datatype="link"/>
2485                         <field name="amount" reporter:datatype="money" />
2486                         <field name="amount_collected" reporter:datatype="money" />
2487                         <field name="id" reporter:datatype="id" />
2488                         <field name="note"  reporter:datatype="text"/>
2489                         <field name="payment_ts" reporter:datatype="timestamp"/>
2490                         <field name="xact" reporter:datatype="link"/>
2491                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
2492                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
2493                 </fields>
2494                 <links>
2495                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
2496                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
2497                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
2498                 </links>
2499         </class>
2500         <class id="mrd" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::record_descriptor" oils_persist:tablename="metabib.rec_descriptor" reporter:label="Basic Record Descriptor">
2501                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.rec_descriptor_id_seq">
2502                         <field reporter:label="Audn" name="audience" oils_persist:primitive="string"  reporter:datatype="text"/>
2503                         <field reporter:label="BLvl" name="bib_level" oils_persist:primitive="string"  reporter:datatype="text"/>
2504                         <field reporter:label="Cat Form" name="cat_form" oils_persist:primitive="string"  reporter:datatype="text"/>
2505                         <field reporter:label="Character Encoding" name="char_encoding" oils_persist:primitive="string"  reporter:datatype="text"/>
2506                         <field reporter:label="Ctrl" name="control_type" oils_persist:primitive="string"  reporter:datatype="text"/>
2507                         <field reporter:label="ELvl" name="enc_level" oils_persist:primitive="string"  reporter:datatype="text"/>
2508                         <field reporter:label="Descriptor ID" name="id" reporter:datatype="id" />
2509                         <field reporter:label="Form" name="item_form" oils_persist:primitive="string"  reporter:datatype="text"/>
2510                         <field reporter:label="Lang" name="item_lang" oils_persist:primitive="string"  reporter:datatype="text"/>
2511                         <field reporter:label="Type" name="item_type" oils_persist:primitive="string"  reporter:datatype="text"/>
2512                         <field reporter:label="LitF" name="lit_form" oils_persist:primitive="string"  reporter:datatype="text"/>
2513                         <field reporter:label="Pub Status" name="pub_status" oils_persist:primitive="string"  reporter:datatype="text"/>
2514                         <field reporter:label="Bib Record Entry" name="record" reporter:datatype="link"/>
2515                         <field reporter:label="TMat" name="type_mat" oils_persist:primitive="string"  reporter:datatype="text"/>
2516                         <field reporter:label="Video Recording Format" name="vr_format" oils_persist:primitive="string"  reporter:datatype="text"/>
2517                         <field reporter:label="Date1" name="date1" oils_persist:primitive="string"  reporter:datatype="text"/>
2518                         <field reporter:label="Date2" name="date2" oils_persist:primitive="string"  reporter:datatype="text"/>
2519                 </fields>
2520                 <links>
2521                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
2522                         <link field="item_lang" reltype="has_a" key="code" map="" class="clm"/>
2523                         <link field="item_type" reltype="has_a" key="code" map="" class="citm"/>
2524                         <link field="bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
2525                         <link field="item_form" reltype="has_a" key="code" map="" class="cifm"/>
2526                         <link field="audience" reltype="has_a" key="code" map="" class="cam"/>
2527                         <link field="lit_form" reltype="has_a" key="code" map="" class="clfm"/>
2528                 </links>
2529         </class>
2530
2531         <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">
2532                 <fields oils_persist:primary="id" oils_persist:sequence="config.standing_penalty_id_seq">
2533                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
2534                         <field name="name"  reporter:datatype="text"/>
2535                         <field name="label"  reporter:datatype="text" oils_persist:i18n="true"/>
2536                         <field name="block_list" reporter:datatype="text"/>
2537                         <field name="org_depth" reporter:datatype="int"/>
2538                 </fields>
2539                 <links/>
2540         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2541             <actions>
2542                 <create permission="ADMIN_STANDING_PENALTY" global_required="true"/>
2543                 <retrieve permission="ADMIN_STANDING_PENALTY VIEW_STANDING_PENALTY" global_required="true"/>
2544                 <update permission="ADMIN_STANDING_PENALTY" global_required="true"/>
2545                 <delete permission="ADMIN_STANDING_PENALTY" global_required="true"/>
2546             </actions>
2547         </permacrud>
2548         </class>
2549         <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">
2550                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_penalty_threshold_id_seq">
2551                         <field name="id" reporter:selector="name" reporter:datatype="id" reporter:label="ID"/>
2552                         <field name="grp"  reporter:datatype="link" reporter:label="Group"/>
2553                         <field name="penalty"  reporter:datatype="link" reporter:label="Penalty"/>
2554                         <field name="threshold" reporter:datatype="float" reporter:label="Threshold"/>
2555                         <field name="org_unit" reporter:datatype="org_unit" reporter:label="Org Unit"/>
2556                 </fields>
2557                 <links>
2558                         <link field="penalty" reltype="has_a" key="id" map="" class="csp"/>
2559                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
2560                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
2561         </links>
2562         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2563             <actions>
2564                 <create permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
2565                 <retrieve permission="VIEW_GROUP_PENALTY_THRESHOLD ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
2566                 <update permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
2567                 <delete permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
2568             </actions>
2569         </permacrud>
2570         </class>
2571         <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">
2572                 <fields oils_persist:primary="id" oils_persist:sequence="config.copy_status_id_seq">
2573                         <field name="holdable" reporter:datatype="bool"/>
2574                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
2575                         <field name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
2576                         <field name="opac_visible" reporter:datatype="bool"/>
2577                 </fields>
2578                 <links/>
2579         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2580             <actions>
2581                 <create permission="CREATE_COPY_STATUS" global_required="true"/>
2582                 <retrieve/>
2583                 <update permission="UPDATE_COPY_STATUS" global_required="true"/>
2584                 <delete permission="DELETE_COPY_STATUS" global_required="true"/>
2585             </actions>
2586         </permacrud>
2587         </class>
2588         <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">
2589                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_standing_penalty_id_seq">
2590                         <field name="id" reporter:datatype="id" reporter:label="ID" />
2591                         <field name="set_date" reporter:datatype="timestamp" reporter:label="Set Date"/>
2592                         <field name="usr" reporter:datatype="link" reporter:label="User"/>
2593                         <field name="staff" reporter:datatype="link" reporter:label="Staff"/>
2594                         <field name="standing_penalty" reporter:datatype="link" reporter:label="Standing Penalty"/>
2595                         <field name="org_unit" reporter:datatype="link" reporter:label="Org Unit"/>
2596                         <field name="stop_date" reporter:datatype="timestamp" reporter:label="Stop Date"/>
2597                         <field name="note" reporter:datatype="text" reporter:label="Note"/>
2598                 </fields>
2599                 <links>
2600                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2601                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
2602                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
2603                         <link field="standing_penalty" reltype="has_a" key="id" map="" class="csp"/>
2604                 </links>
2605                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2606                         <actions>
2607                                 <create permission="UPDATE_USER"><context link="usr" field="home_ou"/></create>
2608                                 <retrieve permission="VIEW_USER"><context link="usr" field="home_ou"/></retrieve>
2609                                 <update permission="UPDATE_USER"><context link="usr" field="home_ou"/></update>
2610                                 <delete permission="UPDATE_USER"><context link="usr" field="home_ou"/></delete>
2611                         </actions>
2612                 </permacrud>
2613         </class>
2614         <class id="aua" controller="open-ils.cstore" oils_obj:fieldmapper="actor::user_address" oils_persist:tablename="actor.usr_address" reporter:label="User Address">
2615                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_address_id_seq">
2616                         <field reporter:label="Type" name="address_type"  reporter:datatype="text"/>
2617                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
2618                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
2619                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
2620                         <field reporter:label="Address ID" name="id" reporter:datatype="id" />
2621                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
2622                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
2623                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
2624                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
2625                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
2626                         <field reporter:label="Valid Address?" name="valid" reporter:datatype="bool"/>
2627                         <field reporter:label="Within City Limits?" name="within_city_limits" reporter:datatype="bool"/>
2628                         <field reporter:label="Replaces" name="replaces" reporter:datatype="link"/>
2629                         <field reporter:label="Pending" name="pending" reporter:datatype="bool"/>
2630                 </fields>
2631                 <links>
2632                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2633                         <link field="replaces" reltype="has_a" key="id" map="" class="aua"/>
2634                 </links>
2635         </class>
2636
2637         <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">
2638                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_saved_search_id_seq">
2639                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
2640                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
2641                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2642                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
2643                         <field reporter:label="Query Text" name="query_text" reporter:datatype="text"/>
2644                         <field reporter:label="Query Type" name="query_type" reporter:datatype="text"/>
2645                         <field reporter:label="Target" name="target" reporter:datatype="text"/>
2646                 </fields>
2647                 <links>
2648                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
2649                 </links>
2650         </class>
2651
2652         <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">
2653                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_note_id_seq">
2654                         <field name="call_number" />
2655                         <field name="create_date" reporter:datatype="timestamp"/>
2656                         <field name="creator" reporter:datatype="link"/>
2657                         <field name="id" reporter:datatype="id" />
2658                         <field name="pub" reporter:datatype="bool"/>
2659                         <field name="title"  reporter:datatype="text"/>
2660                         <field name="value"  reporter:datatype="text"/>
2661                 </fields>
2662                 <links>
2663                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
2664                 </links>
2665         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2666             <actions>
2667                 <create permission="CREATE_VOLUME_NOTE">
2668                     <context link="call_number" field="owning_lib"/>
2669                 </create>
2670                 <retrieve permission="VIEW_VOLUME_NOTES">
2671                     <context link="call_number" field="owning_lib"/>
2672                 </retrieve>
2673                 <update permission="UPDATE_VOLUME_NOTE">
2674                     <context link="call_number" field="owning_lib"/>
2675                 </update>
2676                 <delete permission="DELETE_VOLUME_NOTE">
2677                     <context link="call_number" field="owning_lib"/>
2678                 </delete>
2679             </actions>
2680         </permacrud>
2681         </class>
2682         <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">
2683                 <fields oils_persist:primary="id" oils_persist:sequence="authority.record_note_id_seq">
2684                         <field name="create_date" reporter:datatype="timestamp"/>
2685                         <field name="creator" reporter:datatype="link"/>
2686                         <field name="edit_date" reporter:datatype="timestamp"/>
2687                         <field name="editor" reporter:datatype="link"/>
2688                         <field name="id" reporter:datatype="id" />
2689                         <field name="record" reporter:datatype="link"/>
2690                         <field name="value" reporter:datatype="text"/>
2691                 </fields>
2692                 <links>
2693                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
2694                 </links>
2695         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2696             <actions>
2697                 <create permission="CREATE_AUTHORITY_RECORD_NOTE" global_required='true'/>
2698                 <retrieve/>
2699                 <update permission="UPDATE_AUTHORITY_RECORD_NOTE" global_required='true'/>
2700                 <delete permission="DELETE_AUTHORITY_RECORD_NOTE" global_required='true'/>
2701             </actions>
2702         </permacrud>
2703         </class>
2704         <class id="ocirccount" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circ_count" reporter:label="Open Circulation Count" oils_persist:readonly="true">
2705         <oils_persist:source_definition>
2706 SELECT  usr,
2707         SUM(
2708             CASE
2709                 WHEN (
2710                     ((fine_interval >= '1 day' AND due_date >= 'today') OR (fine_interval &lt; '1 day'  AND due_date > 'now'))
2711                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
2712                 ) THEN 1
2713                 ELSE 0
2714             END
2715         ) AS out,
2716
2717         SUM(
2718             CASE
2719                 WHEN (
2720                     ((fine_interval >= '1 day' AND due_date &lt; 'today') OR (fine_interval &lt; '1 day'  AND due_date &lt; 'now'))
2721                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
2722                 ) THEN 1
2723                 ELSE 0
2724             END
2725         ) AS overdue,
2726
2727         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LOST') THEN 1 ELSE 0 END) AS lost,
2728         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'CLAIMSRETURNED') THEN 1 ELSE 0 END) AS claims_returned,
2729         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LONGOVERDUE') THEN 1 ELSE 0 END) AS long_overdue
2730   FROM  action.circulation
2731   WHERE checkin_time IS NULL
2732   GROUP BY 1
2733         </oils_persist:source_definition>
2734         <fields oils_persist:primary="usr">
2735             <field reporter:label="User ID" name="usr" reporter:datatype="link"/>
2736             <field reporter:label="Out" name="out" reporter:datatype="text"/>
2737             <field reporter:label="Overdue" name="overdue" reporter:datatype="text"/>
2738             <field reporter:label="Lost" name="lost" reporter:datatype="text"/>
2739             <field reporter:label="Claims Returned" name="claims_returned" reporter:datatype="text"/>
2740             <field reporter:label="Long Overdue" name="long_overdue" reporter:datatype="text"/>
2741         </fields>
2742         <links>
2743             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2744         </links>
2745         </class>
2746         <class id="ocirclist" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circ_list" reporter:label="Open Circulation List" oils_persist:readonly="true">
2747         <oils_persist:source_definition>
2748 SELECT  usr,
2749         ARRAY_TO_STRING(ARRAY_ACCUM(
2750             CASE
2751                 WHEN (
2752                     ((fine_interval >= '1 day' AND due_date >= 'today') OR (fine_interval &lt; '1 day'  AND due_date > 'now'))
2753                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
2754                 ) THEN id
2755                 ELSE 0
2756             END
2757         ),',') AS out,
2758
2759         ARRAY_TO_STRING(ARRAY_ACCUM(
2760             CASE
2761                 WHEN (
2762                     ((fine_interval >= '1 day' AND due_date &lt; 'today') OR (fine_interval &lt; '1 day'  AND due_date &lt; 'now'))
2763                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
2764                 ) THEN id
2765                 ELSE 0
2766             END
2767         ),',') AS overdue,
2768
2769         ARRAY_TO_STRING(ARRAY_ACCUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LOST') THEN id ELSE 0 END),',') AS lost,
2770         ARRAY_TO_STRING(ARRAY_ACCUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'CLAIMSRETURNED') THEN id ELSE 0 END),',') AS claims_returned,
2771         ARRAY_TO_STRING(ARRAY_ACCUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LONGOVERDUE') THEN id ELSE 0 END),',') AS long_overdue
2772   FROM  action.circulation
2773   WHERE checkin_time IS NULL
2774   GROUP BY 1
2775         </oils_persist:source_definition>
2776         <fields oils_persist:primary="usr">
2777             <field reporter:label="User ID" name="usr" reporter:datatype="link"/>
2778             <field reporter:label="Out" name="out" reporter:datatype="text"/>
2779             <field reporter:label="Overdue" name="overdue" reporter:datatype="text"/>
2780             <field reporter:label="Lost" name="lost" reporter:datatype="text"/>
2781             <field reporter:label="Claims Returned" name="claims_returned" reporter:datatype="text"/>
2782             <field reporter:label="Long Overdue" name="long_overdue" reporter:datatype="text"/>
2783         </fields>
2784         <links>
2785             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2786         </links>
2787         </class>
2788         <class id="circ" controller="open-ils.cstore" oils_obj:fieldmapper="action::circulation" oils_persist:tablename="action.circulation" reporter:core="true" reporter:label="Circulation">
2789                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
2790                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
2791                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
2792                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
2793                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
2794                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
2795                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
2796                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
2797                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
2798                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
2799                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
2800                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
2801                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
2802                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
2803                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
2804                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
2805                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
2806                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
2807                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
2808                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
2809                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
2810                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
2811                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
2812                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
2813                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
2814                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
2815                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
2816                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
2817                         <field reporter:label="Checkin Scan Date/Time" name="checkin_scan_time" reporter:datatype="timestamp" />
2818                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
2819                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
2820                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
2821                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
2822                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
2823                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
2824                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
2825                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
2826                 </fields>
2827                 <links>
2828                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
2829                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
2830                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
2831                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
2832                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
2833                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2834                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
2835                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
2836                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
2837                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
2838                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
2839                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
2840                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
2841                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
2842                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
2843                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
2844                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
2845                         <link field="parent_circ" reltype="has_a" key="id" map="" class="circ"/>
2846                         <link field="renewals" reltype="has_many" key="parent_circ" map="" class="circ"/>
2847                 </links>
2848         </class>
2849         <class id="combcirc" controller="open-ils.cstore" 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">
2850                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
2851                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
2852                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
2853                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
2854                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
2855                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
2856                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
2857                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
2858                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
2859                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
2860                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
2861                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
2862                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
2863                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
2864                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
2865                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
2866                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
2867                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
2868                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
2869                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
2870                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
2871                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
2872                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
2873                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
2874                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
2875                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
2876                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
2877                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
2878                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
2879                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
2880                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
2881                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
2882                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
2883                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
2884                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
2885                         <field reporter:label="Call Number" name="copy_call_number" reporter:datatype="link"/>
2886                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
2887                         <field reporter:label="Copy Owning Library" name="copy_owning_lib" reporter:datatype="link"/>
2888                         <field reporter:label="Copy Circulating Library" name="copy_circ_lib" reporter:datatype="link"/>
2889                         <field reporter:label="Bib Record" name="copy_bib_record" reporter:datatype="link"/>
2890                 </fields>
2891                 <links>
2892                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
2893                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
2894                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
2895                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
2896                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
2897                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
2898                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
2899                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
2900                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
2901                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
2902                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
2903                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
2904                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
2905                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
2906                         <link field="copy_call_number" reltype="has_a" key="id" map="" class="acn"/>
2907                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
2908                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2909                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
2910                         <link field="copy_bib_record" reltype="has_a" key="id" map="" class="bre"/>
2911                 </links>
2912         </class>
2913         <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">
2914                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
2915                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
2916                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
2917                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
2918                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
2919                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
2920                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
2921                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
2922                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
2923                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
2924                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
2925                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
2926                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
2927                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
2928                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
2929                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
2930                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
2931                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
2932                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
2933                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
2934                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
2935                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
2936                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
2937                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
2938                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
2939                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
2940                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
2941                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
2942                         <field reporter:label="Checkin Scan Date/Time" name="checkin_scan_time" reporter:datatype="timestamp" />
2943                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
2944                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
2945                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
2946                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
2947                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
2948                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
2949                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
2950                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
2951                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
2952                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
2953                         <field reporter:label="Call Number" name="copy_call_number" reporter:datatype="link"/>
2954                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
2955                         <field reporter:label="Copy Owning Library" name="copy_owning_lib" reporter:datatype="link"/>
2956                         <field reporter:label="Copy Circulating Library" name="copy_circ_lib" reporter:datatype="link"/>
2957                         <field reporter:label="Bib Record" name="copy_bib_record" reporter:datatype="link"/>
2958                 </fields>
2959                 <links>
2960                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
2961                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
2962                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
2963                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
2964                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
2965                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
2966                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
2967                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
2968                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
2969                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
2970                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
2971                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
2972                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
2973                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
2974                         <link field="copy_call_number" reltype="has_a" key="id" map="" class="acn"/>
2975                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
2976                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2977                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
2978                         <link field="copy_bib_record" reltype="has_a" key="id" map="" class="bre"/>
2979                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
2980                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
2981                         <link field="parent_circ" reltype="might_have" key="id" map="" class="circ"/>
2982                         <link field="renewals" reltype="has_many" key="parent_circ" map="" class="circ"/>
2983                 </links>
2984         </class>
2985
2986         <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">
2987                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_type_id_seq">
2988                         <field reporter:label="Resource Type ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2989                         <field reporter:label="Resource Type Name" name="name" reporter:datatype="text"/>
2990                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
2991                         <field reporter:label="Fine Amount" name="fine_amount" reporter:datatype="money"/>
2992                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money"/>
2993                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
2994                         <field reporter:label="Catalog Item" name="catalog_item" reporter:datatype="bool"/>
2995                         <field reporter:label="Bibliographic Record" name="record" reporter:datatype="link"/>
2996                         <field reporter:label="Transferable" name="transferable" reporter:datatype="bool"/>
2997                         <field reporter:label="Inter-booking and Inter-circulation Interval" name="elbow_room" reporter:datatype="interval"/>
2998                         <field reporter:label="Resources" name="resources" oils_persist:virtual="true" reporter:datatype="link"/>
2999                         <field reporter:label="Resource Attributes" name="resource_attrs" oils_persist:virtual="true" reporter:datatype="link"/>
3000                         <field reporter:label="Target Resource Types" name="tgt_rsrc_types" oils_persist:virtual="true" reporter:datatype="link"/>
3001                 </fields>
3002                 <links>
3003                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3004                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3005                         <link field="resources" reltype="has_many" key="type" map="" class="brsrc"/>
3006                         <link field="resource_attrs" reltype="has_many" key="type" map="" class="bra"/>
3007                         <link field="tgt_rsrc_types" reltype="has_many" key="type" map="" class="bresv"/>
3008                 </links>
3009                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3010                         <actions>
3011                                 <create permission="ADMIN_BOOKING_RESOURCE_TYPE" global_required='true'/>
3012                                 <retrieve />
3013                                 <update permission="ADMIN_BOOKING_RESOURCE_TYPE" global_required='true'/>
3014                                 <delete permission="ADMIN_BOOKING_RESOURCE_TYPE" global_required='true'/>
3015                         </actions>
3016                 </permacrud>
3017         </class>
3018
3019         <class id="brsrc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::resource" oils_persist:tablename="booking.resource" reporter:label="Resource">
3020                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_id_seq">
3021                         <field reporter:label="Resource ID" name="id" reporter:datatype="id" reporter:selector="barcode" />
3022                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
3023                         <field reporter:label="Resource Type" name="type" reporter:datatype="link"/>
3024                         <field reporter:label="Overbook" name="overbook" reporter:datatype="bool"/>
3025                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
3026                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
3027                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
3028                         <field reporter:label="User Fee" name="user_fee" reporter:datatype="money"/>
3029                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3030                         <field reporter:label="Reservation Target Resources" name="tgt_rsrcs" oils_persist:virtual="true" reporter:datatype="link"/>
3031                         <field reporter:label="Reservation Current Resources" name="curr_rsrcs" oils_persist:virtual="true" reporter:datatype="link"/>
3032                         <field reporter:label="Catalog Item" name="catalog_item" oils_persist:virtual="true" reporter:datatype="link"/>
3033                 </fields>
3034                 <links>
3035                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3036                         <link field="type" reltype="has_a" key="id" map="" class="brt"/>
3037                         <link field="attr_maps" reltype="has_many" key="resource" map="" class="bram"/>
3038                         <link field="tgt_rsrcs" reltype="has_many" key="targeted_resource" map="" class="bresv"/>
3039                         <link field="curr_rsrcs" reltype="has_many" key="current_resource" map="" class="bresv"/>
3040                 </links>
3041                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3042                         <actions>
3043                                 <create permission="ADMIN_BOOKING_RESOURCE" global_required='true'/>
3044                                 <retrieve />
3045                                 <update permission="ADMIN_BOOKING_RESOURCE" global_required='true'/>
3046                                 <delete permission="ADMIN_BOOKING_RESOURCE" global_required='true'/>
3047                         </actions>
3048                 </permacrud>
3049         </class>
3050         
3051         <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">
3052                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_id_seq">
3053                         <field reporter:label="Resource Attribute ID" name="id" reporter:datatype="id" reporter:selector="name" />
3054                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
3055                         <field reporter:label="Resource Attribute Name" name="name" reporter:datatype="text"/>
3056                         <field reporter:label="Resource Type" name="resource_type" reporter:datatype="link"/>
3057                         <field reporter:label="Is Required" name="required" reporter:datatype="bool"/>
3058                         <field reporter:label="Valid Values" name="valid_values" oils_persist:virtual="true" reporter:datatype="link"/>
3059                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3060                 </fields>
3061                 <links>
3062                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3063                         <link field="resource_type" reltype="has_a" key="id" map="" class="brt"/>
3064                         <link field="valid_values" reltype="has_many" key="attr" map="" class="brav"/>
3065                         <link field="attr_maps" reltype="has_many" key="attr" map="" class="bram"/>
3066                 </links>
3067                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3068                         <actions>
3069                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR" global_required='true'/>
3070                                 <retrieve />
3071                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR" global_required='true'/>
3072                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR" global_required='true'/>
3073                         </actions>
3074                 </permacrud>
3075         </class>
3076         
3077         <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">
3078                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_value_id_seq">
3079                         <field reporter:label="Resource Attribute Value ID" name="id" reporter:datatype="id" reporter:selector="valid_value" />
3080                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
3081                         <field reporter:label="Resource Attribute" name="attr" reporter:datatype="link"/>
3082                         <field reporter:label="Valid Value" name="valid_value" reporter:datatype="text"/>
3083                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3084                         <field reporter:label="Resource Attribute Value Maps" name="attr_val_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3085                 </fields>
3086                 <links>
3087                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3088                         <link field="attr" reltype="has_a" key="id" map="" class="bra"/>
3089                         <link field="attr_maps" reltype="has_many" key="id" map="" class="bram"/>
3090                         <link field="attr_val_maps" reltype="has_many" key="attr_value" map="" class="bravm"/>
3091                 </links>
3092                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3093                         <actions>
3094                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" global_required='true'/>
3095                                 <retrieve />
3096                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" global_required='true'/>
3097                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" global_required='true'/>
3098                         </actions>
3099                 </permacrud>
3100         </class>
3101         
3102         <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">
3103                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_map_id_seq">
3104                         <field reporter:label="Resource Attribute Map ID" name="id" reporter:datatype="id"/>
3105                         <field reporter:label="Resource" name="resource" reporter:datatype="link"/>
3106                         <field reporter:label="Resource Attribute" name="resource_attr" reporter:datatype="link"/>
3107                         <field reporter:label="Attribute Value" name="value" reporter:datatype="link"/>
3108                 </fields>
3109                 <links>
3110                         <link field="resource" reltype="has_a" key="id" map="" class="brsrc"/>
3111                         <link field="resource_attr" reltype="has_a" key="id" map="" class="bra"/>
3112                         <link field="value" reltype="has_a" key="id" map="" class="brav"/>
3113                 </links>
3114                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3115                         <actions>
3116                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP" global_required='true'/>
3117                                 <retrieve />
3118                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP" global_required='true'/>
3119                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP" global_required='true'/>
3120                         </actions>
3121                 </permacrud>
3122         </class>
3123         
3124         <class id="bresv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::reservation" oils_persist:tablename="booking.reservation" reporter:label="Reservation">
3125                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
3126                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
3127                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
3128                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
3129                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
3130                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
3131                         <field reporter:label="Billing Line Items" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
3132                         <field reporter:label="Payment Line Items" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
3133                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
3134                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
3135                         <field reporter:label="Payment Summary" name="summary" oils_persist:virtual="true" reporter:datatype="link"/>
3136                         <field reporter:label="Request Time" name="request_time" reporter:datatype="timestamp"/>
3137                         <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
3138                         <field reporter:label="End Time" name="end_time" reporter:datatype="timestamp"/>
3139                         <field reporter:label="Capture Time" name="capture_time" reporter:datatype="timestamp"/>
3140                         <field reporter:label="Cancel Time" name="cancel_time" reporter:datatype="timestamp"/>
3141                         <field reporter:label="Pickup Time" name="pickup_time" reporter:datatype="timestamp"/>
3142                         <field reporter:label="Return Time" name="return_time" reporter:datatype="timestamp"/>
3143                         <field reporter:label="Booking Interval" name="booking_interval" reporter:datatype="interval"/>
3144                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
3145                         <field reporter:label="Fine Amount" name="fine_amount" reporter:datatype="money"/>
3146                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money"/>
3147                         <field reporter:label="Target Resource Type" name="target_resource_type" reporter:datatype="link"/>
3148                         <field reporter:label="Target Resource" name="target_resource" reporter:datatype="link"/>
3149                         <field reporter:label="Current Resource" name="current_resource" reporter:datatype="link"/>
3150                         <field reporter:label="Request Library" name="request_lib" reporter:datatype="link"/>
3151                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link"/>
3152                         <field reporter:label="Capture Staff" name="capture_staff" reporter:datatype="link"/>
3153                         <field reporter:label="Attribute Value Maps" name="attr_val_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3154                 </fields>
3155                 <links>
3156                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3157                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
3158                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
3159                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
3160                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
3161                         <link field="summary" reltype="might_have" key="id" map="" class="mbts"/>
3162                         <link field="target_resource_type" reltype="has_a" key="id" map="" class="brt"/>
3163                         <link field="target_resource" reltype="has_a" key="id" map="" class="brsrc"/>
3164                         <link field="current_resource" reltype="has_a" key="id" map="" class="brsrc"/>
3165                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
3166                         <link field="pickup_lib" reltype="might_have" key="id" map="" class="aou"/>
3167                         <link field="capture_staff" reltype="might_have" key="id" map="" class="au"/>
3168                         <link field="attr_val_maps" reltype="has_many" key="reservation" map="" class="bravm"/>
3169                 </links>
3170                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3171                         <actions>
3172                                 <create permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
3173                                 <retrieve permission="STAFF_LOGIN" global_required='true'/>
3174                                 <update permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
3175                                 <delete permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
3176                         </actions>
3177                 </permacrud>
3178         </class>
3179         
3180         <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">
3181                 <fields oils_persist:primary="id" oils_persist:sequence="booking.reservation_attr_value_map_id_seq">
3182                         <field reporter:label="Reservation Attribute Value Map" name="id" reporter:datatype="id"/>
3183                         <field reporter:label="Reservation" name="reservation" reporter:datatype="link"/>
3184                         <field reporter:label="Attribute Map" name="attr_value" reporter:datatype="link"/>
3185                 </fields>
3186                 <links>
3187                         <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
3188                         <link field="attr_value" reltype="has_a" key="id" map="" class="brav"/>
3189                 </links>
3190                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3191                         <actions>
3192                                 <create permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
3193                                 <retrieve permission="STAFF_LOGIN" global_required='true'/>
3194                                 <update permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
3195                                 <delete permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
3196                         </actions>
3197                 </permacrud>
3198         </class>
3199
3200         <class id="ccnbi" controller="open-ils.cstore" oils_obj:fieldmapper="container::call_number_bucket_item" oils_persist:tablename="container.call_number_bucket_item" reporter:label="Call Number Bucket Item">
3201                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_item_id_seq">
3202                         <field name="bucket" reporter:datatype="link"/>
3203                         <field name="id" reporter:datatype="id" />
3204                         <field name="target_call_number" reporter:datatype="link" />
3205                         <field name="create_time" reporter:datatype="timestamp" />
3206                         <field name="pos" reporter:datatype="int" />
3207                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
3208                 </fields>
3209                 <links>
3210                         <link field="target_call_number" reltype="has_a" key="id" map="" class="acn"/>
3211                         <link field="bucket" reltype="has_a" key="id" map="" class="ccnb"/>
3212             <link field="notes" reltype="has_many" map="" key="item" class="ccnbin"/>
3213                 </links>
3214         </class>
3215         <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">
3216                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_item_note_id_seq">
3217                         <field name="id" reporter:datatype="id" />
3218                         <field name="item" reporter:datatype="link"/>
3219                         <field name="note" reporter:datatype="text" />
3220                 </fields>
3221                 <links>
3222                         <link field="item" reltype="has_a" key="id" map="" class="ccnbi"/>
3223                 </links>
3224         </class>
3225         <class id="cbreb" controller="open-ils.cstore" oils_obj:fieldmapper="container::biblio_record_entry_bucket" oils_persist:tablename="container.biblio_record_entry_bucket" reporter:label="Bibliographic Record Entry Bucket">
3226                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_id_seq">
3227                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
3228                         <field name="btype" reporter:datatype="text"/>
3229                         <field name="id" reporter:datatype="id" />
3230                         <field name="name" reporter:datatype="text"/>
3231                         <field name="owner" reporter:datatype="link"/>
3232                         <field name="pub" reporter:datatype="bool"/>
3233                         <field name="create_time" reporter:datatype="timestamp" />
3234                 </fields>
3235                 <links>
3236                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
3237                         <link field="items" reltype="has_many" key="bucket" map="" class="cbrebi"/>
3238                 </links>
3239         </class>
3240         <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">
3241                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_note_id_seq">
3242                         <field name="id" reporter:datatype="id" />
3243                         <field name="bucket" reporter:datatype="link"/>
3244                         <field name="note" reporter:datatype="text" />
3245                 </fields>
3246                 <links>
3247                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
3248                 </links>
3249         </class>
3250         <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">
3251                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_copy_map_id_seq">
3252                         <field name="hold" reporter:datatype="link"/>
3253                         <field name="id" reporter:datatype="id" />
3254                         <field name="target_copy" reporter:datatype="link"/>
3255                 </fields>
3256                 <links>
3257                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
3258                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
3259                 </links>
3260         </class>
3261         <class id="ahn" controller="open-ils.cstore" oils_obj:fieldmapper="action::hold_notification" oils_persist:tablename="action.hold_notification" reporter:label="Hold Notification">
3262                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_notification_id_seq">
3263                         <field reporter:label="Hold" name="hold" reporter:datatype="link"/>
3264                         <field reporter:label="Notification ID" name="id" reporter:datatype="id" />
3265                         <field reporter:label="Notification Method" name="method"  reporter:datatype="text"/>
3266                         <field reporter:label="Notification Note" name="note"  reporter:datatype="text"/>
3267                         <field reporter:label="Notifying Staff" name="notify_staff" reporter:datatype="link"/>
3268                         <field reporter:label="Notification Date/Time" name="notify_time" reporter:datatype="timestamp"/>
3269                 </fields>
3270                 <links>
3271                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
3272                         <link field="notify_staff" reltype="has_a" key="id" map="" class="au"/>
3273                 </links>
3274         </class>
3275         <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">
3276                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_id_seq">
3277                         <field reporter:label="Can Circulate?" name="circulate"  reporter:datatype="bool"/>
3278                         <field reporter:label="Is Holdable?" name="holdable" reporter:datatype="bool"/>
3279                         <field reporter:label="Hold Capture Requires Verification" name="hold_verify" reporter:datatype="bool"/>
3280                         <field reporter:label="Location ID" name="id" reporter:selector="name" reporter:datatype="id"/>
3281                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
3282                         <field reporter:label="Is OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
3283                         <field reporter:label="Owning Org Unit" name="owning_lib"  reporter:datatype="org_unit"/>
3284                         <field reporter:label="Copy Location Orders" name="orders" oils_persist:virtual="true" reporter:datatype="link"/>
3285                         <field reporter:label="Copies" name="copies" oils_persist:virtual="true" reporter:datatype="link"/>
3286                         <field reporter:label="Label Prefix" name="label_prefix"  reporter:datatype="text" oils_persist:i18n="true"/>
3287                         <field reporter:label="Label Suffix" name="label_suffix"  reporter:datatype="text" oils_persist:i18n="true"/>
3288                 </fields>
3289                 <links>
3290                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
3291                         <link field="distribution_formula_entries" reltype="has_many" key="location" map="" class="acqdfe"/>
3292                         <link field="orders" reltype="has_many" key="location" map="" class="acplo"/>
3293                         <link field="copies" reltype="has_many" key="location" map="" class="acp"/>
3294                 </links>
3295         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3296             <actions>
3297                 <create permission="CREATE_COPY_LOCATION" context_field="owning_lib"/>
3298                 <retrieve/>
3299                 <update permission="UPDATE_COPY_LOCATION" context_field="owning_lib"/>
3300                 <delete permission="DELETE_COPY_LOCATION" context_field="owning_lib"/>
3301             </actions>
3302         </permacrud>
3303         </class>
3304
3305     <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">
3306         <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_order_id_seq">
3307             <field reporter:label="Location Order ID" name="id" reporter:datatype="id"/>
3308             <field reporter:label="Location ID" name="location" reporter:datatype="link"/>
3309             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit"/>
3310             <field reporter:label="Position" name="position" reporter:datatype="int"/>
3311         </fields>
3312         <links>
3313             <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
3314             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
3315         </links>
3316         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3317             <actions>
3318                                 <create permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
3319                 <retrieve/>
3320                                 <update permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
3321                                 <delete permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
3322             </actions>
3323         </permacrud>
3324     </class>
3325
3326         <class id="svr" controller="open-ils.cstore" oils_obj:fieldmapper="serial::virtual_record" oils_persist:virtual="true" reporter:label="Serial Virtual Record">
3327                 <fields>
3328                         <field name="sre_id" oils_persist:virtual="true" />
3329                         <field name="location" oils_persist:virtual="true" />
3330                         <field name="owning_lib" oils_persist:virtual="true" />
3331                         <field name="basic_holdings" oils_persist:virtual="true" />
3332                         <field name="basic_holdings_add" oils_persist:virtual="true" />
3333                         <field name="supplement_holdings" oils_persist:virtual="true" />
3334                         <field name="supplement_holdings_add" oils_persist:virtual="true" />
3335                         <field name="index_holdings" oils_persist:virtual="true" />
3336                         <field name="index_holdings_add" oils_persist:virtual="true" />
3337                         <field name="online" oils_persist:virtual="true" />
3338                         <field name="missing" oils_persist:virtual="true" />
3339                         <field name="incomplete" oils_persist:virtual="true" />
3340                 </fields>
3341         </class>
3342
3343         <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">
3344                 <fields oils_persist:primary="id" oils_persist:sequence="serial.record_entry_id_seq">
3345                         <field reporter:label="Is Active" name="active" reporter:datatype="bool"/>
3346                         <field reporter:label="Bib Record" name="record" reporter:datatype="link"/>
3347                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
3348                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
3349                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
3350                         <field reporter:label="Edit date" name="edit_date" reporter:datatype="timestamp"/>
3351                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
3352                         <field reporter:label="ID" name="id" reporter:datatype="id" />
3353                         <field reporter:label="Last Transaction ID" name="last_xact_id" reporter:datatype="text"/>
3354                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
3355                         <field reporter:label="Source" name="source" reporter:datatype="int"/>
3356                         <field reporter:label="Owning Org Unit" name="owning_lib" reporter:datatype="org_unit"/>
3357                 </fields>
3358                 <links>
3359                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3360                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
3361                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3362                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
3363                 </links>
3364                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3365                         <actions>
3366                                 <create permission="CREATE_MFHD_RECORD" context_field="owning_lib"/>
3367                                 <retrieve/>
3368                                 <update permission="UPDATE_MFHD_RECORD" context_field="owning_lib"/>
3369                                 <delete permission="DELETE_MFHD_RECORD" context_field="owning_lib"/>
3370                         </actions>
3371                 </permacrud>
3372         </class>
3373
3374         <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">
3375                 <fields oils_persist:primary="id" oils_persist:sequence="serial.caption_and_pattern_id_seq">
3376                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3377                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
3378                         <field reporter:label="Type" name="type" reporter:datatype="text"/>
3379                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
3380                         <field reporter:label="Start Date" name="start_date" reporter:datatype="timestamp"/>
3381                         <field reporter:label="End Date" name="end_date" reporter:datatype="timestamp"/>
3382                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
3383                         <field reporter:label="Pattern Code" name="pattern_code" reporter:datatype="text"/>
3384                         <field reporter:label="Enum 1" name="enum_1" reporter:datatype="text"/>
3385                         <field reporter:label="Enum 2" name="enum_2" reporter:datatype="text"/>
3386                         <field reporter:label="Enum 3" name="enum_3" reporter:datatype="text"/>
3387                         <field reporter:label="Enum 4" name="enum_4" reporter:datatype="text"/>
3388                         <field reporter:label="Enum 5" name="enum_5" reporter:datatype="text"/>
3389                         <field reporter:label="Enum 6" name="enum_6" reporter:datatype="text"/>
3390                         <field reporter:label="Chron 1" name="chron_1" reporter:datatype="text"/>
3391                         <field reporter:label="Chron 2" name="chron_2" reporter:datatype="text"/>
3392                         <field reporter:label="Chron 3" name="chron_3" reporter:datatype="text"/>
3393                         <field reporter:label="Chron 4" name="chron_4" reporter:datatype="text"/>
3394                         <field reporter:label="Chron 5" name="chron_5" reporter:datatype="text"/>
3395                 </fields>
3396                 <links>
3397                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
3398                 </links>
3399                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3400                         <actions>
3401                                 <create permission="ADMIN_SERIAL_CAPTION_PATTERN">
3402                                         <context link="subscription" field="owning_lib" />
3403                                 </create>
3404                                 <retrieve />
3405                                 <update permission="ADMIN_SERIAL_CAPTION_PATTERN">
3406                                         <context link="subscription" field="owning_lib" />
3407                                 </update>
3408                                 <delete permission="ADMIN_SERIAL_CAPTION_PATTERN">
3409                                         <context link="subscription" field="owning_lib" />
3410                                 </delete>
3411                         </actions>
3412                 </permacrud>
3413         </class>
3414
3415         <class id="ssub" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::subscription" oils_persist:tablename="serial.subscription" reporter:label="Subscription">
3416                 <fields oils_persist:primary="id" oils_persist:sequence="serial.subscription_id_seq">
3417                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3418                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
3419                         <field reporter:label="Start Date" name="start_date" reporter:datatype="timestamp"/>
3420                         <field reporter:label="End Date" name="end_date" reporter:datatype="timestamp"/>
3421                         <field reporter:label="Bibliographic Record Entry" name="record_entry" reporter:datatype="link"/>
3422                         <field reporter:label="Expected Date Offset" name="expected_date_offset" reporter:datatype="interval"/>
3423                         <field reporter:label="Distributions" name="distributions" oils_persist:virtual="true" reporter:datatype="link"/>
3424                         <field reporter:label="Issuances" name="issuances" oils_persist:virtual="true" reporter:datatype="link"/>
3425                         <field reporter:label="Captions and Patterns" name="scaps" oils_persist:virtual="true" reporter:datatype="link"/>
3426                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
3427                 </fields>
3428                 <links>
3429                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
3430                         <link field="record_entry" reltype="has_a" key="id" map="" class="bre"/>
3431                         <link field="distributions" reltype="has_many" key="subscription" map="" class="sdist"/>
3432                         <link field="issuances" reltype="has_many" key="subscription" map="" class="siss"/>
3433                         <link field="scaps" reltype="has_many" key="subscription" map="" class="scap"/>
3434                         <link field="notes" reltype="has_many" key="subscription" map="" class="ssubn"/>
3435                 </links>
3436                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3437                         <actions>
3438                                 <create permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
3439                                 <retrieve />
3440                                 <update permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
3441                                 <delete permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
3442                         </actions>
3443                 </permacrud>
3444         </class>
3445
3446         <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">
3447                 <fields oils_persist:primary="id" oils_persist:sequence="serial.subscription_note_id_seq">
3448                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3449                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
3450                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
3451                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
3452                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
3453                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
3454                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
3455                 </fields>
3456                 <links>
3457                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
3458                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3459                 </links>
3460                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3461                 </permacrud>
3462         </class>
3463
3464         <class id="sdist" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::distribution" oils_persist:tablename="serial.distribution" reporter:label="Distribution">
3465                 <fields oils_persist:primary="id" oils_persist:sequence="serial.distribution_id_seq">
3466                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3467                         <field reporter:label="Legacy Record Entry" name="record_entry" reporter:datatype="link"/>
3468                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
3469                         <field reporter:label="Holding Lib" name="holding_lib" reporter:datatype="org_unit"/>
3470                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
3471                         <field reporter:label="Receive Call Number" name="receive_call_number" reporter:datatype="link"/>
3472                         <field reporter:label="Receive Unit Template" name="receive_unit_template" reporter:datatype="link"/>
3473                         <field reporter:label="Bind Call Number" name="bind_call_number" reporter:datatype="link"/>
3474                         <field reporter:label="Bind Unit Template" name="bind_unit_template" reporter:datatype="link"/>
3475                         <field reporter:label="Unit Label Prefix" name="unit_label_prefix" reporter:datatype="text"/>
3476                         <field reporter:label="Unit Label Suffix" name="unit_label_suffix" reporter:datatype="text"/>
3477                         <field reporter:label="Streams" name="streams" oils_persist:virtual="true" reporter:datatype="link"/>
3478                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
3479                         <field reporter:label="Basic Issue Summary" name="basic_summary" oils_persist:virtual="true" reporter:datatype="link"/>
3480                         <field reporter:label="Supplemental Issue Summary" name="supplement_summary" oils_persist:virtual="true" reporter:datatype="link"/>
3481                         <field reporter:label="Index Issue Summary" name="index_summary" oils_persist:virtual="true" reporter:datatype="link"/>
3482                 </fields>
3483                 <links>
3484                         <link field="record_entry" reltype="has_a" key="id" map="" class="sre"/>
3485                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
3486                         <link field="holding_lib" reltype="has_a" key="id" map="" class="aou"/>
3487                         <link field="receive_call_number" reltype="has_a" key="id" map="" class="acn"/>
3488                         <link field="receive_unit_template" reltype="has_a" key="id" map="" class="act"/>
3489                         <link field="bind_call_number" reltype="has_a" key="id" map="" class="acn"/>
3490                         <link field="bind_unit_template" reltype="has_a" key="id" map="" class="act"/>
3491                         <link field="streams" reltype="has_many" key="distribution" map="" class="sstr"/>
3492                         <link field="notes" reltype="has_many" key="distribution" map="" class="sdistn"/>
3493                         <link field="basic_summary" reltype="might_have" key="distribution" map="" class="sbsum"/>
3494                         <link field="supplement_summary" reltype="might_have" key="distribution" map="" class="sssum"/>
3495                         <link field="index_summary" reltype="might_have" key="distribution" map="" class="sisum"/>
3496                 </links>
3497                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3498                         <actions>
3499                                 <create permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
3500                                 <retrieve />
3501                                 <update permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
3502                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
3503                         </actions>
3504                 </permacrud>
3505         </class>
3506
3507         <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">
3508                 <fields oils_persist:primary="id" oils_persist:sequence="serial.distribution_note_id_seq">
3509                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3510                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
3511                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
3512                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
3513                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
3514                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
3515                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
3516                 </fields>
3517                 <links>
3518                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
3519                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3520                 </links>
3521                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3522                         <actions>
3523                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
3524                                         <context link="distribution" field="holding_lib" />
3525                                 </create>
3526                                 <retrieve permission="ADMIN_SERIAL_DISTRIBUTION">
3527                                         <context link="distribution" field="holding_lib" />
3528                                 </retrieve>
3529                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
3530                                         <context link="distribution" field="holding_lib" />
3531                                 </update>
3532                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
3533                                         <context link="distribution" field="holding_lib" />
3534                                 </delete>
3535                         </actions>
3536                 </permacrud>
3537         </class>
3538
3539         <class id="sstr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::stream" oils_persist:tablename="serial.stream" reporter:label="Stream">
3540                 <fields oils_persist:primary="id" oils_persist:sequence="serial.stream_id_seq">
3541                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3542                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
3543                         <field reporter:label="Routing Label" name="routing_label" reporter:datatype="text"/>
3544                         <field reporter:label="Items" name="items" oils_persist:virtual="true" reporter:datatype="link" />
3545                         <field reporter:label="Routing List Users" name="routing_list_users" oils_persist:virtual="true" reporter:datatype="link"/>
3546                 </fields>
3547                 <links>
3548                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
3549                         <link field="items" reltype="has_many" key="id" map="" class="sitem"/>
3550                         <link field="routing_list_users" reltype="has_many" key="stream" map="" class="srlu"/>
3551                 </links>
3552                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3553                         <actions>
3554                                 <create permission="ADMIN_SERIAL_STREAM">
3555                                         <context link="distribution" field="holding_lib" />
3556                                 </create>
3557                                 <retrieve />
3558                                 <update permission="ADMIN_SERIAL_STREAM">
3559                                         <context link="distribution" field="holding_lib" />
3560                                 </update>
3561                                 <delete permission="ADMIN_SERIAL_STREAM">
3562                                         <context link="distribution" field="holding_lib" />
3563                                 </delete>
3564                         </actions>
3565                 </permacrud>
3566         </class>
3567
3568         <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">
3569                 <fields oils_persist:primary="id" oils_persist:sequence="serial.routing_list_user_id_seq">
3570                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3571                         <field reporter:label="Stream" name="stream" reporter:datatype="link"/>
3572                         <field reporter:label="Position" name="pos" reporter:datatype="int"/>
3573                         <field reporter:label="Reader" name="reader" reporter:datatype="link"/>
3574                         <field reporter:label="Department" name="department" reporter:datatype="text"/>
3575                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
3576                 </fields>
3577                 <links>
3578                         <link field="stream" reltype="has_a" key="id" map="" class="sstr"/>
3579                         <link field="reader" reltype="has_a" key="id" map="" class="au"/>
3580                 </links>
3581                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3582                         <actions>
3583                                 <create permission="ADMIN_SERIAL_STREAM">
3584                                         <context link="stream" jump="distribution" field="holding_lib" />
3585                                 </create>
3586                                 <retrieve permission="RECEIVE_SERIAL">
3587                                         <context link="stream" jump="distribution" field="holding_lib" />
3588                                 </retrieve>
3589                                 <update permission="ADMIN_SERIAL_STREAM">
3590                                         <context link="stream" jump="distribution" field="holding_lib" />
3591                                 </update>
3592                                 <delete permission="ADMIN_SERIAL_STREAM">
3593                                         <context link="stream" jump="distribution" field="holding_lib" />
3594                                 </delete>
3595                         </actions>
3596                 </permacrud>
3597         </class>
3598
3599         <class id="siss" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::issuance" oils_persist:tablename="serial.issuance" reporter:label="Issuance">
3600                 <fields oils_persist:primary="id" oils_persist:sequence="serial.issuance_id_seq">
3601                         <field reporter:label="ID" name="id" reporter:datatype="id" />
3602                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
3603                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
3604                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
3605                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
3606                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
3607                         <field reporter:label="Caption/Pattern" name="caption_and_pattern" reporter:datatype="link"/>
3608                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
3609                         <field reporter:label="Date Published" name="date_published" reporter:datatype="timestamp"/>
3610                         <field reporter:label="Holding Code" name="holding_code" reporter:datatype="text"/>
3611                         <field reporter:label="Holding Type" name="holding_type" reporter:datatype="text"/>
3612                         <field reporter:label="Holding Link ID" name="holding_link_id" reporter:datatype="int"/>
3613                         <field reporter:label="Items" name="items" oils_persist:virtual="true" reporter:datatype="link" />
3614                 </fields>
3615                 <links>
3616                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3617                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
3618                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
3619                         <link field="caption_and_pattern" reltype="has_a" key="id" map="" class="scap"/>
3620                         <link field="items" reltype="has_many" key="issuance" map="" class="sitem"/>
3621                 </links>
3622                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3623                         <actions>
3624                                 <create permission="ADMIN_SERIAL_SUBSCRIPTION">
3625                                         <context link="subscription" field="owning_lib" />
3626                                 </create>
3627                                 <retrieve/>
3628                                 <update permission="ADMIN_SERIAL_SUBSCRIPTION">
3629                                         <context link="subscription" field="owning_lib" />
3630                                 </update>
3631                                 <delete permission="ADMIN_SERIAL_SUBSCRIPTION">
3632                                         <context link="subscription" field="owning_lib" />
3633                                 </delete>
3634                         </actions>
3635                 </permacrud>
3636         </class>
3637
3638         <class id="sunit" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::unit" oils_persist:tablename="serial.unit" reporter:label="Unit">
3639                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_id_seq">
3640                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3641                         <field reporter:label="Age Hold Protection" name="age_protect" reporter:datatype="link"/>
3642                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
3643                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
3644                         <field reporter:label="Call Number/Volume" name="call_number" reporter:datatype="link"/>
3645                         <field reporter:label="Circulation Type (MARC)" name="circ_as_type" reporter:datatype="text"/>
3646                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
3647                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
3648                         <field reporter:label="Can Circulate" name="circulate" reporter:datatype="bool"/>
3649                         <field reporter:label="Copy Number on Volume" name="copy_number" reporter:datatype="text"/>
3650                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
3651                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
3652                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
3653                         <field reporter:label="Dummy ISBN" name="dummy_isbn" reporter:datatype="text"/>
3654                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
3655                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money" />
3656                         <field reporter:label="Precat Dummy Author" name="dummy_author" reporter:datatype="text"/>
3657                         <field reporter:label="Precat Dummy Title" name="dummy_title" reporter:datatype="text"/>
3658                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
3659                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
3660                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
3661                         <field reporter:label="Is Holdable" name="holdable" reporter:datatype="bool" />
3662                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
3663                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link"/>
3664                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool" />
3665                         <field reporter:label="Price" name="price" reporter:datatype="money" />
3666                         <field reporter:label="Is Reference" name="ref" reporter:datatype="bool"/>
3667                         <field reporter:label="Copy Status" name="status" reporter:datatype="link"/>
3668                         <field reporter:label="Copy Status Changed Time" name="status_changed_time" reporter:datatype="timestamp"/>
3669                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool"/>
3670                         <field reporter:label="Is Floating" name="floating" reporter:datatype="bool"/>
3671                         <field reporter:label="Cost" name="cost" reporter:datatype="money"/>
3672                         <field reporter:label="Sort Key" name="sort_key" reporter:datatype="text"/>
3673                         <field reporter:label="Summary Contents" name="summary_contents" reporter:datatype="text"/>
3674                         <field reporter:label="Detailed Contents" name="detailed_contents" reporter:datatype="text"/>
3675                         <field reporter:label="Copy Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
3676                         <field reporter:label="Stat-Cat entry maps" name="stat_cat_entry_copy_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3677                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
3678                         <field reporter:label="Total Circulations" name="total_circ_count" oils_persist:virtual="true" reporter:datatype="link"/>
3679                         <field reporter:label="Holds" name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
3680                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3681                 </fields>
3682                 <links>
3683                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
3684                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
3685                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
3686                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
3687                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3688                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
3689                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3690                         <link field="holds" reltype="has_many" key="target_copy" map="hold" class="ahcm"/>
3691                         <link field="stat_cat_entry_copy_maps" reltype="has_many" key="owning_copy" map="" class="ascecm"/>
3692                         <link field="notes" reltype="has_many" key="owning_copy" map="" class="acpn"/>
3693                         <link field="stat_cat_entries" reltype="has_many" key="owning_copy" map="stat_cat_entry" class="ascecm"/>
3694                         <link field="circulations" reltype="has_many" key="target_copy" map="" class="circ"/>
3695                         <link field="total_circ_count" reltype="might_have" key="id" map="" class="erfcc"/>
3696                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
3697                 </links>
3698                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3699                         <actions>
3700                                 <create permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
3701                                 <retrieve/>
3702                                 <update permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
3703                                 <delete permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
3704                         </actions>
3705                 </permacrud>
3706         </class>
3707
3708         <class id="sitem" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::item" oils_persist:tablename="serial.item" reporter:label="Item">
3709                 <fields oils_persist:primary="id" oils_persist:sequence="serial.item_id_seq">
3710                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3711                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
3712                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
3713                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
3714                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
3715                         <field reporter:label="Issuance" name="issuance" reporter:datatype="link"/>
3716                         <field reporter:label="Stream" name="stream" reporter:datatype="link"/>
3717                         <field reporter:label="Unit" name="unit" reporter:datatype="link"/>
3718                         <field reporter:label="URI" name="uri" reporter:datatype="link"/>
3719                         <field reporter:label="Date Expected" name="date_expected" reporter:datatype="timestamp"/>
3720                         <field reporter:label="Date Received" name="date_received" reporter:datatype="timestamp"/>
3721                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
3722                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
3723                         <field reporter:label="Shadowed?" name="shadowed" reporter:datatype="bool"/>
3724                 </fields>
3725                 <links>
3726                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3727                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
3728                         <link field="issuance" reltype="has_a" key="id" map="" class="siss"/>
3729                         <link field="stream" reltype="has_a" key="id" map="" class="sstr"/>
3730                         <link field="unit" reltype="has_a" key="id" map="" class="sunit"/>
3731                         <link field="uri" reltype="has_a" key="id" map="" class="auri"/>
3732                         <link field="notes" reltype="has_many" key="item" map="" class="sin"/>
3733                 </links>
3734                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3735                         <actions>
3736                                 <create permission="ADMIN_SERIAL_ITEM">
3737                                         <context link="stream" jump="distribution" field="holding_lib" />
3738                                 </create>
3739                                 <retrieve permission="ADMIN_SERIAL_ITEM">
3740                                         <context link="stream" jump="distribution" field="holding_lib" />
3741                                 </retrieve>
3742                                 <update permission="ADMIN_SERIAL_ITEM">
3743                                         <context link="stream" jump="distribution" field="holding_lib" />
3744                                 </update>
3745                                 <delete permission="ADMIN_SERIAL_ITEM">
3746                                         <context link="stream" jump="distribution" field="holding_lib" />
3747                                 </delete>
3748                         </actions>
3749                 </permacrud>
3750         </class>
3751
3752         <class id="sin" controller="open-ils.cstore" oils_obj:fieldmapper="serial::item_note" oils_persist:tablename="serial.item_note" reporter:label="Item Note">
3753                 <fields oils_persist:primary="id" oils_persist:sequence="serial.item_note_id_seq">
3754                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3755                         <field reporter:label="Item" name="item" reporter:datatype="link"/>
3756                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
3757                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
3758                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
3759                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
3760                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
3761                 </fields>
3762                 <links>
3763                         <link field="item" reltype="has_a" key="id" map="" class="sitem"/>
3764                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3765                 </links>
3766                 <!-- Not available via PCRUD at this time -->
3767         </class>
3768
3769         <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">
3770                 <fields oils_persist:primary="id" oils_persist:sequence="serial.basic_summary_id_seq">
3771                         <field reporter:label="ID" name="id" reporter:datatype="id" />
3772                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
3773                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
3774                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
3775                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
3776                 </fields>
3777                 <links>
3778                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
3779                 </links>
3780                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3781                         <actions>
3782                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
3783                                         <context link="distribution" field="holding_lib" />
3784                                 </create>
3785                                 <retrieve/>
3786                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
3787                                         <context link="distribution" field="holding_lib" />
3788                                 </update>
3789                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
3790                                         <context link="distribution" field="holding_lib" />
3791                                 </create>
3792                         </actions>
3793                 </permacrud>
3794         </class>
3795
3796         <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">
3797                 <fields oils_persist:primary="id" oils_persist:sequence="serial.supplement_summary_id_seq">
3798                         <field reporter:label="ID" name="id" reporter:datatype="id" />
3799                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
3800                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
3801                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
3802                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
3803                 </fields>
3804                 <links>
3805                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
3806                 </links>
3807                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3808                         <actions>
3809                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
3810                                         <context link="distribution" field="holding_lib" />
3811                                 </create>
3812                                 <retrieve/>
3813                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
3814                                         <context link="distribution" field="holding_lib" />
3815                                 </update>
3816                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
3817                                         <context link="distribution" field="holding_lib" />
3818                                 </create>
3819                         </actions>
3820                 </permacrud>
3821         </class>
3822
3823         <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">
3824                 <fields oils_persist:primary="id" oils_persist:sequence="serial.index_summary_id_seq">
3825                         <field reporter:label="ID" name="id" reporter:datatype="id" />
3826                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
3827                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
3828                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
3829                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
3830                 </fields>
3831                 <links>
3832                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
3833                 </links>
3834                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3835                         <actions>
3836                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
3837                                         <context link="distribution" field="holding_lib" />
3838                                 </create>
3839                                 <retrieve/>
3840                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
3841                                         <context link="distribution" field="holding_lib" />
3842                                 </update>
3843                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
3844                                         <context link="distribution" field="holding_lib" />
3845                                 </create>
3846                         </actions>
3847                 </permacrud>
3848         </class>
3849
3850         <class id="ascecm" controller="open-ils.cstore" 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">
3851                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_entry_copy_map_id_seq">
3852                         <field name="id" reporter:datatype="id" />
3853                         <field name="owning_copy" reporter:datatype="link"/>
3854                         <field name="stat_cat" reporter:datatype="link"/>
3855                         <field name="stat_cat_entry" reporter:datatype="link"/>
3856                 </fields>
3857                 <links>
3858                         <link field="owning_copy" reltype="has_a" key="id" map="" class="acp"/>
3859                         <link field="stat_cat_entry" reltype="has_a" key="id" map="" class="asce"/>
3860                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
3861                 </links>
3862         </class>
3863         <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">
3864                 <fields oils_persist:primary="code">
3865                         <field reporter:label="Item Type Code" name="code" reporter:selector="value" reporter:datatype="text"/>
3866                         <field reporter:label="Item Type" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
3867                 </fields>
3868                 <links/>
3869         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3870             <actions>
3871                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
3872                 <retrieve/>
3873                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
3874                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
3875             </actions>
3876         </permacrud>
3877         </class>
3878         <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">
3879                 <fields oils_persist:primary="code">
3880                         <field reporter:label="Bib Level Code" name="code"  reporter:datatype="text"/>
3881                         <field reporter:label="Bib Level" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
3882                 </fields>
3883                 <links/>
3884         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3885             <actions>
3886                 <create permission="CREATE_MARC_CODE" global_required="true"/>
3887                 <retrieve/>
3888                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
3889                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
3890             </actions>
3891         </permacrud>
3892         </class>
3893         <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">
3894                 <fields oils_persist:primary="id" oils_persist:sequence="search.relevance_adjustment_id_seq">
3895                         <field reporter:label="ID" name="id"  reporter:datatype="id"/>
3896                         <field reporter:label="Active" name="active"  reporter:datatype="bool"/>
3897                         <field reporter:label="Index Field" name="field"  reporter:datatype="link"/>
3898                         <field reporter:label="Bump Type" name="bump_type"  reporter:datatype="text"/>
3899                         <field reporter:label="Multiplier" name="multiplier"  reporter:datatype="number"/>
3900                 </fields>
3901                 <links>
3902             <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3903         </links>
3904         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3905             <actions>
3906                 <create permission="CREATE_RELEVANCE_ADJUSTMENT" global_required="true"/>
3907                 <retrieve permission="CREATE_RELEVANCE_ADJUSTMENT UPDATE_RELEVANCE_ADJUSTMENT DELETE_RELEVANCE_ADJUSTMENT" global_required="true"/>
3908                 <update permission="UPDATE_RELEVANCE_ADJUSTMENT" global_required="true"/>
3909                 <delete permission="DELETE_RELEVANCE_ADJUSTMENT" global_required="true"/>
3910             </actions>
3911         </permacrud>
3912         </class>
3913         <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">
3914                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_lasso_id_seq">
3915                         <field name="id" reporter:datatype="id" />
3916                         <field name="name" reporter:datatype="text"/>
3917                 </fields>
3918                 <links/>
3919         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3920             <actions>
3921                 <create permission="CREATE_LASSO" global_required="true"/>
3922                 <retrieve permission="CREATE_LASSO UPDATE_LASSO DELETE_LASSO" global_required="true"/>
3923                 <update permission="UPDATE_LASSO" global_required="true"/>
3924                 <delete permission="DELETE_LASSO" global_required="true"/>
3925             </actions>
3926         </permacrud>
3927         </class>
3928         <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">
3929                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_lasso_map_id_seq">
3930                         <field name="id" reporter:datatype="id" />
3931                         <field name="lasso" reporter:datatype="link"/>
3932                         <field name="org_unit" reporter:datatype="org_unit"/>
3933                 </fields>
3934                 <links>
3935                         <link field="lasso" reltype="has_a" key="id" map="" class="lasso"/>
3936                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3937                 </links>
3938         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3939             <actions>
3940                 <create permission="CREATE_LASSO_MAP" global_required="true"/>
3941                 <retrieve permission="CREATE_LASSO_MAP UPDATE_LASSO_MAP DELETE_LASSO_MAP" global_required="true"/>
3942                 <update permission="UPDATE_LASSO_MAP" global_required="true"/>
3943                 <delete permission="DELETE_LASSO_MAP" global_required="true"/>
3944             </actions>
3945         </permacrud>
3946         </class>
3947         <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">
3948                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_id_seq">
3949                         <field name="id" reporter:datatype="id" />
3950                         <field name="from_org" reporter:datatype="org_unit"/>
3951                         <field name="to_org" reporter:datatype="org_unit"/>
3952                         <field name="prox" reporter:datatype="int" />
3953                 </fields>
3954                 <links>
3955                         <link field="from_org" reltype="has_a" key="id" map="" class="aou"/>
3956                         <link field="to_org" reltype="has_a" key="id" map="" class="aou"/>
3957                 </links>
3958         </class>
3959         <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">
3960                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_id_seq">
3961                         <field reporter:label="ID" name="id" reporter:datatype="id" />
3962                         <field reporter:label="Relevance" name="rel" reporter:datatype="float"/>
3963                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
3964                         <field reporter:label="Total Results" name="total" reporter:datatype="int" />
3965                         <field reporter:label="Checked" name="checked" reporter:datatype="int"/>
3966                         <field reporter:label="Visible" name="visible" reporter:datatype="int"/>
3967                         <field reporter:label="Deleted" name="deleted" reporter:datatype="int"/>
3968                         <field reporter:label="Excluded" name="excluded" reporter:datatype="int"/>
3969                 </fields>
3970                 <links/>
3971         </class>
3972         <class id="asv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::survey" oils_persist:tablename="action.survey" reporter:label="Survey">
3973                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_id_seq">
3974                         <field reporter:label="Questions" name="questions" oils_persist:virtual="true" reporter:datatype="link"/>
3975                         <field reporter:label="Responses" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
3976                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
3977                         <field reporter:label="Survey End Date/Time" name="end_date" reporter:datatype="timestamp"/>
3978                         <field reporter:label="Survey ID" name="id" reporter:datatype="id"/>
3979                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
3980                         <field reporter:label="OPAC Survey?" name="opac" reporter:datatype="bool"/>
3981                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
3982                         <field reporter:label="Poll Style?" name="poll" reporter:datatype="bool"/>
3983                         <field reporter:label="Is Required?" name="required" reporter:datatype="bool"/>
3984                         <field reporter:label="Survey Start Date/Time" name="start_date" reporter:datatype="timestamp"/>
3985                         <field reporter:label="Display in User Summary" name="usr_summary" reporter:datatype="bool"/>
3986                 </fields>
3987                 <links>
3988                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3989                         <link field="responses" reltype="has_many" key="survey" map="" class="asvr"/>
3990                         <link field="questions" reltype="has_many" key="survey" map="" class="asvq"/>
3991                 </links>
3992         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3993             <actions>
3994                 <create permission="ADMIN_SURVEY" context_field="owner"/>
3995                 <retrieve/>
3996                 <update permission="ADMIN_SURVEY" context_field="owner"/>
3997                 <delete permission="ADMIN_SURVEY" context_field="owner"/>
3998             </actions>
3999         </permacrud>
4000         </class>
4001         <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">
4002                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_address_id_seq">
4003                         <field name="address_type"  reporter:datatype="text"/>
4004                         <field name="city"  reporter:datatype="text"/>
4005                         <field name="country"  reporter:datatype="text"/>
4006                         <field name="county"  reporter:datatype="text"/>
4007                         <field name="id" reporter:datatype="id" />
4008                         <field name="org_unit" reporter:datatype="org_unit"/>
4009                         <field name="post_code"  reporter:datatype="text"/>
4010                         <field name="state"  reporter:datatype="text"/>
4011                         <field name="street1"  reporter:datatype="text"/>
4012                         <field name="street2"  reporter:datatype="text"/>
4013                         <field name="valid" reporter:datatype="bool"/>
4014                         <field name="san" reporter:datatype="text" reporter:label="SAN"/>
4015                 </fields>
4016                 <links>
4017                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
4018                 </links>
4019         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4020             <actions>
4021                 <create permission="CREATE_ORG_ADDRESS" context_field="org_unit"/>
4022                 <retrieve/>
4023                 <update permission="UPDATE_ORG_ADDRESS" context_field="org_unit"/>
4024                 <delete permission="DELETE_ORG_ADDRESS" context_field="org_unit"/>
4025             </actions>
4026         </permacrud>
4027         </class>
4028         <class id="ahr" controller="open-ils.cstore" oils_obj:fieldmapper="action::hold_request" oils_persist:tablename="action.hold_request" reporter:core="true" reporter:label="Hold Request">
4029                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
4030                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
4031                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
4032                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
4033                         <field reporter:label="Currently Targeted Copy" name="current_copy" />
4034                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
4035                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
4036                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
4037                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
4038                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
4039                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
4040                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
4041                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
4042                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
4043                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
4044                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
4045                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
4046                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
4047                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
4048                         <field reporter:label="Item Selection Depth" name="selection_depth" />
4049                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
4050                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
4051                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
4052                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
4053                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
4054                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
4055                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
4056                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
4057                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
4058                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
4059                         <field reporter:label="Thaw Date (if frozen)" name="thaw_date" reporter:datatype="timestamp"/>
4060                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
4061                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
4062                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
4063                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
4064                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
4065                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
4066                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
4067                 </fields>
4068                 <links>
4069                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
4070                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
4071                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
4072                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
4073                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
4074                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
4075                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4076                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
4077                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
4078                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
4079                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
4080                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
4081                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
4082                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
4083                 </links>
4084         </class>
4085         <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">
4086                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_note_id_seq">
4087                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4088                         <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
4089                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
4090                         <field reporter:label="Body" name="body" reporter:datatype="text"/>
4091                         <field reporter:label="Slip?" name="slip" reporter:datatype="bool"/>
4092                         <field reporter:label="Pub?" name="pub" reporter:datatype="bool"/>
4093                         <field reporter:label="Staff?" name="staff" reporter:datatype="bool"/>
4094                 </fields>
4095                 <links>
4096                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
4097                 </links>
4098                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4099                         <actions>
4100                                 <create permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></create>
4101                                 <retrieve permission="VIEW_USER"><context link="hold" field="request_lib"/></retrieve>
4102                                 <update permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></update>
4103                                 <delete permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></delete>
4104                         </actions>
4105                 </permacrud>
4106         </class>
4107         <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">
4108                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_id_seq">
4109                         <field reporter:label="Subordinate Organizational Units" name="children" oils_persist:virtual="true" reporter:datatype="org_unit"/>
4110                         <field reporter:label="Billing Address" name="billing_address" reporter:datatype="link"/>
4111                         <field reporter:label="Holds Receiving Address" name="holds_address" reporter:datatype="link"/>
4112                         <field reporter:label="Organizational Unit ID" name="id" reporter:datatype="org_unit" reporter:selector="shortname"/>
4113                         <field reporter:label="ILL Receiving Address" name="ill_address" reporter:datatype="link"/>
4114                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="link"/>
4115                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
4116                         <field reporter:label="Organizational Unit Type" name="ou_type" reporter:datatype="link"/>
4117                         <field reporter:label="Parent Organizational Unit" name="parent_ou" reporter:datatype="link"/>
4118                         <field reporter:label="Short (Policy) Name" name="shortname" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.+$"/>
4119                         <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
4120                         <field reporter:label="Phone Number" name="phone" reporter:datatype="text"/>
4121                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
4122                         <field reporter:label="Fiscal Calendar" name="fiscal_calendar" reporter:datatype="link"/>
4123                         <field reporter:label="Users" name="users" oils_persist:virtual="true" reporter:datatype="link"/>
4124                         <field reporter:label="Closed Dates" name="closed_dates" oils_persist:virtual="true" reporter:datatype="link"/>
4125                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
4126                         <field reporter:label="Settings" name="settings" oils_persist:virtual="true" reporter:datatype="link"/>
4127                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>
4128                         <field reporter:label="Checkins" name="checkins" oils_persist:virtual="true" reporter:datatype="link"/>
4129                         <field reporter:label="Workstations" name="workstations" oils_persist:virtual="true" reporter:datatype="link"/>
4130                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
4131                         <field reporter:label="Copy Location Orders" name="copy_location_orders" oils_persist:virtual="true" reporter:datatype="link"/>
4132                         <field reporter:label="Transit Copy Prev Destinations" name="atc_prev_dests" oils_persist:virtual="true" reporter:datatype="link"/>
4133                         <field reporter:label="Reservation Requests" name="resv_requests" oils_persist:virtual="true" reporter:datatype="link"/>
4134                         <field reporter:label="Reservation Pickups" name="resv_pickups" oils_persist:virtual="true" reporter:datatype="link"/>
4135                         <field reporter:label="Resource Types" name="rsrc_types" oils_persist:virtual="true" reporter:datatype="link"/>
4136                         <field reporter:label="Resources" name="resources" oils_persist:virtual="true" reporter:datatype="link"/>
4137                         <field reporter:label="Resource Attributes" name="rsrc_attrs" oils_persist:virtual="true" reporter:datatype="link"/>
4138                         <field reporter:label="Attribute Values" name="attr_vals" oils_persist:virtual="true" reporter:datatype="link"/>
4139                         <field reporter:label="Hours of Operation" name="hours_of_operation" oils_persist:virtual="true" reporter:datatype="link"/>
4140                 </fields>
4141                 <links>
4142                         <link field="billing_address" reltype="has_a" key="id" map="" class="aoa"/>
4143                         <link field="holds_address" reltype="has_a" key="id" map="" class="aoa"/>
4144                         <link field="ou_type" reltype="has_a" key="id" map="" class="aout"/>
4145                         <link field="mailing_address" reltype="has_a" key="id" map="" class="aoa"/>
4146                         <link field="parent_ou" reltype="has_a" key="id" map="" class="aou"/>
4147                         <link field="ill_address" reltype="has_a" key="id" map="" class="aoa"/>
4148                         <link field="fiscal_calendar" reltype="has_a" key="id" map="" class="acqfc"/>
4149                         <link field="users" reltype="has_many" key="home_ou" map="" class="au"/>
4150                         <link field="closed_dates" reltype="has_many" key="org_unit" map="" class="aoucd"/>
4151                         <link field="children" reltype="has_many" key="parent_ou" map="" class="aou"/>
4152                         <link field="circulations" reltype="has_many" key="circ_lib" map="" class="circ"/>
4153                         <link field="settings" reltype="has_many" key="org_unit" map="" class="aous"/>
4154                         <link field="addresses" reltype="has_many" key="org_unit" map="" class="aoa"/>
4155                         <link field="checkins" reltype="has_many" key="checkin_lib" map="" class="circ"/>
4156                         <link field="workstations" reltype="has_many" key="owning_lib" map="" class="aws"/>
4157                         <link field="fund_alloc_pcts" reltype="has_many" key="org" map="" class="acqfap"/>
4158                         <link field="copy_location_orders" reltype="has_many" key="org" map="" class="acplo"/>
4159                         <link field="atc_prev_dests" reltype="has_many" key="prev_dest" map="" class="atc"/>
4160                         <link field="resv_requests" reltype="has_many" key="request_lib" map="" class="bresv"/>
4161                         <link field="resv_pickups" reltype="has_many" key="pickup_lib" map="" class="bresv"/>
4162                         <link field="rsrc_types" reltype="has_many" key="owner" map="" class="brt"/>
4163                         <link field="resources" reltype="has_many" key="owner" map="" class="brsrc"/>
4164                         <link field="rsrc_attrs" reltype="has_many" key="owner" map="" class="bra"/>
4165                         <link field="attr_vals" reltype="has_many" key="owner" map="" class="brav"/>
4166                         <link field="hours_of_operation" reltype="might_have" key="id" map="" class="aouhoo"/>
4167                 </links>
4168         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4169             <actions>
4170                 <create permission="CREATE_ORG_UNIT" context_field="parent_ou"/>
4171                 <retrieve permission="CREATE_ORG_UNIT UPDATE_ORG_UNIT DELETE_ORG_UNIT">
4172                     <context field="id"/>
4173                     <context field="parent_ou"/>
4174                                 </retrieve>
4175                 <update permission="UPDATE_ORG_UNIT" context_field="id"/>
4176                 <delete permission="DELETE_ORG_UNIT" context_field="parent_ou"/>
4177             </actions>
4178         </permacrud>
4179         </class>
4180         <class id="ccnb" controller="open-ils.cstore" oils_obj:fieldmapper="container::call_number_bucket" oils_persist:tablename="container.call_number_bucket" reporter:label="Call Number Bucket">
4181                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_id_seq">
4182                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
4183                         <field name="btype" reporter:datatype="text"/>
4184                         <field name="id" reporter:datatype="id" />
4185                         <field name="name"  reporter:datatype="text"/>
4186                         <field name="owner" reporter:datatype="link"/>
4187                         <field name="pub" reporter:datatype="bool"/>
4188                         <field name="create_time" reporter:datatype="timestamp" />
4189                 </fields>
4190                 <links>
4191                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
4192                         <link field="items" reltype="has_many" key="bucket" map="" class="ccnbi"/>
4193                 </links>
4194         </class>
4195         <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">
4196                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_note_id_seq">
4197                         <field name="id" reporter:datatype="id" />
4198                         <field name="bucket" reporter:datatype="link"/>
4199                         <field name="note" reporter:datatype="text" />
4200                 </fields>
4201                 <links>
4202                         <link field="bucket" reltype="has_a" key="id" map="" class="ccnb"/>
4203                 </links>
4204         </class>
4205         <class id="asc" controller="open-ils.cstore" oils_obj:fieldmapper="asset::stat_cat" oils_persist:tablename="asset.stat_cat" reporter:label="Asset Statistical Category">
4206                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_id_seq">
4207                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
4208                         <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>
4209                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
4210                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
4211                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
4212                         <field reporter:label="Required" name="required" reporter:datatype="bool"/>
4213                 </fields>
4214                 <links>
4215                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4216                         <link field="entries" reltype="has_many" key="stat_cat" map="" class="asce"/>
4217                 </links>
4218         </class>
4219         <class id="ac" controller="open-ils.cstore" oils_obj:fieldmapper="actor::card" oils_persist:tablename="actor.card" reporter:label="Library Card">
4220                 <fields oils_persist:primary="id" oils_persist:sequence="actor.card_id_seq">
4221                         <field reporter:label="IsActive?" name="active" reporter:datatype="bool"/>
4222                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
4223                         <field reporter:label="Card ID" name="id" reporter:datatype="id" />
4224                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
4225                 </fields>
4226                 <links>
4227                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4228                 </links>
4229         </class>
4230         <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">
4231                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_id_seq">
4232                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
4233                         <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>
4234                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
4235                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
4236                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
4237                         <field reporter:label="User Summary" name="usr_summary" reporter:datatype="bool"/>
4238                 </fields>
4239                 <links>
4240                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4241                         <link field="entries" reltype="has_many" key="stat_cat" map="" class="actsce"/>
4242                 </links>
4243         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4244             <actions>
4245                 <create permission="CREATE_PATRON_STAT_CAT" context_field="owner"/>
4246                 <retrieve />
4247                 <update permission="UPDATE_PATRON_STAT_CAT" context_field="owner"/>
4248                 <delete permission="DELETE_PATRON_STAT_CAT" context_field="owner"/>
4249             </actions>
4250         </permacrud>
4251         </class>
4252         <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">
4253                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.series_field_entry_id_seq">
4254                         <field name="field" reporter:datatype="link"/>
4255                         <field name="id" reporter:datatype="id" />
4256                         <field name="source" reporter:datatype="link"/>
4257                         <field name="value"  reporter:datatype="text"/>
4258                 </fields>
4259                 <links>
4260                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
4261                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
4262                 </links>
4263         </class>
4264         <class id="cub" controller="open-ils.cstore" oils_obj:fieldmapper="container::user_bucket" oils_persist:tablename="container.user_bucket" reporter:label="User Bucket">
4265                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_id_seq">
4266                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
4267                         <field name="btype" reporter:datatype="text"/>
4268                         <field name="id" reporter:datatype="id" />
4269                         <field name="name"  reporter:datatype="text"/>
4270                         <field name="owner" reporter:datatype="link"/>
4271                         <field name="pub" reporter:datatype="bool"/>
4272                         <field name="create_time" reporter:datatype="timestamp" />
4273                 </fields>
4274                 <links>
4275                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
4276                         <link field="items" reltype="has_many" key="bucket" map="" class="cubi"/>
4277                 </links>
4278         </class>
4279         <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">
4280                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_note_id_seq">
4281                         <field name="id" reporter:datatype="id" />
4282                         <field name="bucket" reporter:datatype="link"/>
4283                         <field name="note" reporter:datatype="text" />
4284                 </fields>
4285                 <links>
4286                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
4287                 </links>
4288         </class>
4289         <class id="mcrp" controller="open-ils.cstore" oils_obj:fieldmapper="money::credit_payment" oils_persist:tablename="money.credit_payment" reporter:label="House Credit Payment">
4290                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
4291                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
4292                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
4293                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
4294                         <field reporter:label="Pyament ID" name="id" reporter:datatype="id" />
4295                         <field reporter:label="Payment Note" name="note"  reporter:datatype="text"/>
4296                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
4297                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
4298                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
4299                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
4300                 </fields>
4301                 <links>
4302                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
4303                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
4304                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
4305                 </links>
4306         </class>
4307         <class id="afr" controller="open-ils.cstore" oils_obj:fieldmapper="authority::full_rec" oils_persist:tablename="authority.full_rec" reporter:label="Full Authority Record">
4308                 <fields oils_persist:primary="id" oils_persist:sequence="authority.full_rec_id_seq">
4309                         <field name="id" reporter:datatype="id" />
4310                         <field name="ind1" />
4311                         <field name="ind2" />
4312                         <field name="record" />
4313                         <field name="subfield" />
4314                         <field name="tag" />
4315                         <field name="value" />
4316                 </fields>
4317                 <links>
4318                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
4319                 </links>
4320         </class>
4321         <class id="cnct" controller="open-ils.cstore" oils_obj:fieldmapper="config::non_cataloged_type" oils_persist:tablename="config.non_cataloged_type" reporter:label="Non-cataloged Type">
4322                 <fields oils_persist:primary="id" oils_persist:sequence="config.non_cataloged_type_id_seq">
4323                         <field reporter:label="Circulation Duration" name="circ_duration" reporter:datatype="interval"/>
4324                         <field reporter:label="Non-cat Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>
4325                         <field reporter:label="In House?" name="in_house" reporter:datatype="bool"/>
4326                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
4327                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
4328                 </fields>
4329                 <links>
4330                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4331                 </links>
4332         </class>
4333         <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">
4334                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_type_id_seq">
4335                         <field reporter:label="Subordinate Types" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
4336                         <field reporter:label="Can Have Users?" name="can_have_users" reporter:datatype="bool"/>
4337                         <field reporter:label="Can Have Volumes?" name="can_have_vols" reporter:datatype="bool"/>
4338                         <field reporter:label="Type Depth" name="depth" reporter:datatype="int" />
4339                         <field reporter:label="Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>
4340                         <field reporter:label="Type Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
4341                         <field reporter:label="OPAC Label" name="opac_label"  reporter:datatype="text" oils_persist:i18n="true"/>
4342                         <field reporter:label="Parent Type" name="parent" reporter:datatype="link"/>
4343                         <field reporter:label="Org Units" name="org_units" oils_persist:virtual="true"  reporter:datatype="org_unit"/>
4344                 </fields>
4345                 <links>
4346                         <link field="parent" reltype="has_a" key="id" map="" class="aout"/>
4347                         <link field="children" reltype="has_many" key="parent" map="" class="aout"/>
4348                         <link field="org_units" reltype="has_many" key="ou_type" map="" class="aou"/>
4349                 </links>
4350         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4351             <actions>
4352                 <create permission="CREATE_ORG_TYPE" global_required="true"/>
4353                 <retrieve/>
4354                 <update permission="UPDATE_ORG_TYPE" global_required="true"/>
4355                 <delete permission="DELETE_ORG_TYPE" global_required="true"/>
4356             </actions>
4357         </permacrud>
4358         </class>
4359         <class id="bren" controller="open-ils.cstore" oils_obj:fieldmapper="biblio::record_note" oils_persist:tablename="biblio.record_note" reporter:label="Bib Record Note">
4360                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_note_id_seq">
4361                         <field name="create_date" reporter:datatype="timestamp"/>
4362                         <field name="creator" reporter:datatype="link"/>
4363                         <field name="edit_date" reporter:datatype="timestamp"/>
4364                         <field name="editor" reporter:datatype="link"/>
4365                         <field name="id" reporter:datatype="id" />
4366                         <field name="pub" reporter:datatype="bool"/>
4367                         <field name="record" reporter:datatype="link"/>
4368                         <field name="value"  reporter:datatype="text"/>
4369                 </fields>
4370                 <links>
4371                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4372                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4373                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
4374                 </links>
4375         </class>
4376         <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">
4377                 <fields oils_persist:primary="usr" oils_persist:sequence="">
4378                         <field name="balance_owed" reporter:datatype="money" />
4379                         <field name="total_owed" reporter:datatype="money" />
4380                         <field name="total_paid" reporter:datatype="money" />
4381                         <field name="usr" reporter:datatype="link"/>
4382                 </fields>
4383                 <links>
4384                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4385                 </links>
4386         </class>
4387         <class id="mg" controller="open-ils.cstore" oils_obj:fieldmapper="money::grocery" oils_persist:tablename="money.grocery" reporter:label="Grocery Transaction">
4388                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
4389                         <field reporter:label="Billing Location" name="billing_location" reporter:datatype="link"/>
4390                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
4391                         <field reporter:label="Note" name="note"  reporter:datatype="text"/>
4392                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
4393                         <field reporter:label="Transaction Finish Timestamp" name="xact_finish" reporter:datatype="timestamp" />
4394                         <field reporter:label="Transaction Start Timestamp" name="xact_start" reporter:datatype="timestamp" />
4395                         <field reporter:label="Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4396                         <field reporter:label="Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4397                         <field reporter:label="Billable Transaction link" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
4398                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4399                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4400                 </fields>
4401                 <links>
4402                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4403                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
4404                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
4405                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
4406                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
4407                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4408                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4409                 </links>
4410         </class>
4411         <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">
4412                 <fields oils_persist:primary="id" oils_persist:sequence="config.bib_source_id_seq">
4413                         <field name="id" reporter:selector="source" reporter:datatype="id"/>
4414                         <field name="quality" reporter:datatype="int" />
4415                         <field name="source" reporter:datatype="text"/>
4416                         <field name="transcendant" reporter:datatype="bool"/>
4417                 </fields>
4418                 <links/>
4419         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4420             <actions>
4421                 <create permission="CREATE_BIB_SOURCE" global_required="true"/>
4422                 <retrieve/>
4423                 <update permission="UPDATE_BIB_SOURCE" global_required="true"/>
4424                 <delete permission="DELETE_BIB_SOURCE" global_required="true"/>
4425             </actions>
4426         </permacrud>
4427         </class>
4428         <class id="mbt" controller="open-ils.cstore" oils_obj:fieldmapper="money::billable_transaction" oils_persist:tablename="money.billable_xact" reporter:label="Billable Transaction">
4429                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
4430                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
4431                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
4432                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
4433                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
4434                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
4435                         <field reporter:label="Grocery Billing link" name="grocery" oils_persist:virtual="true" reporter:datatype="link"/>
4436                         <field reporter:label="Circulation Billing link" name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
4437                         <field reporter:label="Billing Line Items" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4438                         <field reporter:label="Payment Line Items" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4439                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4440                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4441                         <field reporter:label="Payment Summary" name="summary" oils_persist:virtual="true" reporter:datatype="link"/>
4442                 </fields>
4443                 <links>
4444                         <link field="grocery" reltype="might_have" key="id" map="" class="mg"/>
4445                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
4446                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4447                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
4448                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
4449                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4450                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4451                         <link field="summary" reltype="might_have" key="id" map="" class="mbts"/>
4452                 </links>
4453         </class>
4454         <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">
4455                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_id_seq">
4456                         <field reporter:label="Entry ID" name="id" reporter:datatype="id" />
4457                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
4458                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
4459                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
4460                 </fields>
4461                 <links>
4462                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
4463                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4464                 </links>
4465         </class>
4466         <class id="cubi" controller="open-ils.cstore" oils_obj:fieldmapper="container::user_bucket_item" oils_persist:tablename="container.user_bucket_item" reporter:label="User Bucket Item">
4467                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_id_seq">
4468                         <field name="bucket" reporter:datatype="link"/>
4469                         <field name="id" reporter:datatype="id" />
4470                         <field name="target_user" reporter:datatype="link"/>
4471                         <field name="create_time" reporter:datatype="timestamp" />
4472                         <field name="pos" reporter:datatype="int" />
4473                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
4474                 </fields>
4475                 <links>
4476                         <link field="target_user" reltype="has_a" key="id" map="" class="au"/>
4477                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
4478             <link field="notes" reltype="has_many" map="" key="item" class="cubin"/>
4479                 </links>
4480         </class>
4481         <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">
4482                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_note_id_seq">
4483                         <field name="id" reporter:datatype="id" />
4484                         <field name="item" reporter:datatype="link"/>
4485                         <field name="note" reporter:datatype="text" />
4486                 </fields>
4487                 <links>
4488                         <link field="item" reltype="has_a" key="id" map="" class="cubi"/>
4489                 </links>
4490         </class>
4491         <class id="mus" controller="open-ils.cstore" oils_obj:fieldmapper="money::user_summary" oils_persist:tablename="money.usr_summary" reporter:label="User Summary">
4492                 <fields oils_persist:primary="usr" oils_persist:sequence="">
4493                         <field name="balance_owed" reporter:datatype="money" />
4494                         <field name="total_owed" reporter:datatype="money" />
4495                         <field name="total_paid" reporter:datatype="money" />
4496                         <field name="usr" reporter:datatype="link"/>
4497                 </fields>
4498                 <links>
4499                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4500                 </links>
4501         </class>
4502         <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">
4503                 <fields oils_persist:primary="code" oils_persist:sequence="">
4504                         <field reporter:label="LitF Code" name="code" reporter:datatype="text"/>
4505                         <field reporter:label="LitF Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
4506                         <field reporter:label="LitF Name" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
4507                 </fields>
4508                 <links/>
4509         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4510             <actions>
4511                 <create permission="CREATE_MARC_CODE" global_required="true"/>
4512                 <retrieve/>
4513                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
4514                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
4515             </actions>
4516         </permacrud>
4517         </class>
4518         <class id="mwp" controller="open-ils.cstore" oils_obj:fieldmapper="money::work_payment" oils_persist:tablename="money.work_payment" reporter:label="Work Payment">
4519                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
4520                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
4521                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
4522                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
4523                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
4524                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
4525                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
4526                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>
4527                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
4528                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
4529                 </fields>
4530                 <links>
4531                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
4532                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
4533                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
4534                 </links>
4535         </class>
4536         <class id="mgp" controller="open-ils.cstore" oils_obj:fieldmapper="money::goods_payment" oils_persist:tablename="money.goods_payment" reporter:label="Goods Payment">
4537                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
4538                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
4539                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
4540                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
4541                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
4542                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
4543                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
4544                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>
4545                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
4546                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
4547                 </fields>
4548                 <links>
4549                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
4550                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
4551                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
4552                 </links>
4553         </class>
4554         <class id="aoc" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circulation" oils_persist:tablename="action.open_circulation" reporter:label="Open Circulation">
4555                 <fields oils_persist:primary="id" oils_persist:sequence="">
4556                         <field name="checkin_lib" reporter:datatype="link"/>
4557                         <field name="checkin_staff" reporter:datatype="link"/>
4558                         <field name="checkin_time" reporter:datatype="timestamp"/>
4559                         <field name="circ_lib"  reporter:datatype="org_unit"/>
4560                         <field name="circ_staff" reporter:datatype="link"/>
4561                         <field name="desk_renewal" reporter:datatype="bool"/>
4562                         <field name="due_date" reporter:datatype="timestamp"/>
4563                         <field name="duration" reporter:datatype="interval"/>
4564                         <field name="duration_rule" reporter:datatype="link"/>
4565                         <field name="fine_interval" reporter:datatype="interval"/>
4566                         <field name="id" reporter:datatype="id" />
4567                         <field name="max_fine" reporter:datatype="money" />
4568                         <field name="max_fine_rule" reporter:datatype="link"/>
4569                         <field name="opac_renewal" reporter:datatype="bool"/>
4570                         <field name="phone_renewal" reporter:datatype="bool"/>
4571                         <field name="recurring_fine" reporter:datatype="money" />
4572                         <field name="recurring_fine_rule" reporter:datatype="link"/>
4573                         <field name="renewal_remaining" reporter:datatype="int" />
4574                         <field name="stop_fines" reporter:datatype="text"/>
4575                         <field name="stop_fines_time" reporter:datatype="timestamp"/>
4576                         <field name="target_copy" reporter:datatype="link"/>
4577                         <field name="usr" reporter:datatype="link"/>
4578                         <field name="xact_finish" reporter:datatype="timestamp" />
4579                         <field name="xact_start" reporter:datatype="timestamp" />
4580                         <field name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
4581                 </fields>
4582                 <links>
4583                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
4584                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
4585                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
4586                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
4587                 </links>
4588         </class>
4589         <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">
4590                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.subject_field_entry_id_seq">
4591                         <field name="field" reporter:datatype="link"/>
4592                         <field name="id" reporter:datatype="id" />
4593                         <field name="source" reporter:datatype="link"/>
4594                         <field name="value" reporter:datatype="text"/>
4595                 </fields>
4596                 <links>
4597                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
4598                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
4599                 </links>
4600         </class>
4601         <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">
4602                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_recurring_fine_id_seq">
4603                         <field name="high" reporter:datatype="money" />
4604                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
4605                         <field name="low" reporter:datatype="money" />
4606                         <field name="name" reporter:datatype="text"/>
4607                         <field name="normal" reporter:datatype="money" />
4608                         <field name="recurrence_interval" reporter:datatype="interval"/>
4609                 </fields>
4610                 <links/>
4611         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4612             <actions>
4613                 <create permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
4614                 <retrieve/>
4615                 <update permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
4616                 <delete permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
4617             </actions>
4618         </permacrud>
4619         </class>
4620         <class id="mckp" controller="open-ils.cstore" oils_obj:fieldmapper="money::check_payment" oils_persist:tablename="money.check_payment" reporter:label="Check Payment">
4621                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
4622                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
4623                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
4624                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
4625                         <field reporter:label="Workstation link" name="cash_drawer" reporter:datatype="link"/>
4626                         <field reporter:label="Check Number" name="check_number" reporter:datatype="int" />
4627                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
4628                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
4629                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
4630                         <field reporter:label="Transaction link" name="xact" reporter:datatype="link"/>
4631                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
4632                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
4633                 </fields>
4634                 <links>
4635                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
4636                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
4637                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
4638                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
4639                 </links>
4640         </class>
4641         <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">
4642                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_id_seq">
4643                         <field reporter:label="Age Hold Protection" name="age_protect" reporter:datatype="link"/>
4644                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
4645                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
4646                         <field reporter:label="Call Number/Volume" name="call_number" reporter:datatype="link"/>
4647                         <field reporter:label="Circulation Type (MARC)" name="circ_as_type" reporter:datatype="text"/>
4648                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
4649                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
4650                         <field reporter:label="Can Circulate" name="circulate" reporter:datatype="bool"/>
4651                         <field reporter:label="Copy Number on Volume" name="copy_number" reporter:datatype="text"/>
4652                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
4653                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
4654                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
4655                         <field reporter:label="Dummy ISBN" name="dummy_isbn" reporter:datatype="text"/>
4656                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
4657                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money" />
4658                         <field reporter:label="Precat Dummy Author" name="dummy_author" reporter:datatype="text"/>
4659                         <field reporter:label="Precat Dummy Title" name="dummy_title" reporter:datatype="text"/>
4660                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
4661                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
4662                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
4663                         <field reporter:label="Is Holdable" name="holdable" reporter:datatype="bool" />
4664                         <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
4665                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
4666                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link"/>
4667                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool" />
4668                         <field reporter:label="Price" name="price" reporter:datatype="money" />
4669                         <field reporter:label="Is Reference" name="ref" reporter:datatype="bool"/>
4670                         <field reporter:label="Copy Status" name="status" reporter:datatype="link"/>
4671                         <field reporter:label="Copy Status Changed Time" name="status_changed_time" reporter:datatype="timestamp"/>
4672                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool"/>
4673                         <field reporter:label="Is Floating" name="floating" reporter:datatype="bool"/>
4674                         <field reporter:label="Cost" name="cost" reporter:datatype="money"/>
4675                         <field reporter:label="Copy Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
4676                         <field reporter:label="Stat-Cat entry maps" name="stat_cat_entry_copy_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4677                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
4678                         <field reporter:label="Total Circulations" name="total_circ_count" oils_persist:virtual="true" reporter:datatype="link"/>
4679                         <field reporter:label="Holds" name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
4680                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4681                 </fields>
4682                 <links>
4683                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
4684                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
4685                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
4686                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4687                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4688                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
4689                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4690                         <link field="holds" reltype="has_many" key="target_copy" map="hold" class="ahcm"/>
4691                         <link field="stat_cat_entry_copy_maps" reltype="has_many" key="owning_copy" map="" class="ascecm"/>
4692                         <link field="notes" reltype="has_many" key="owning_copy" map="" class="acpn"/>
4693                         <link field="stat_cat_entries" reltype="has_many" key="owning_copy" map="stat_cat_entry" class="ascecm"/>
4694                         <link field="circulations" reltype="has_many" key="target_copy" map="" class="circ"/>
4695                         <link field="total_circ_count" reltype="might_have" key="id" map="" class="erfcc"/>
4696                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
4697                 </links>
4698         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4699             <actions>
4700                 <create permission="CREATE_COPY">
4701                     <context link="call_number" field="owning_lib"/>
4702                 </create>
4703                 <retrieve/>
4704                 <update permission="UPDATE_COPY">
4705                     <context link="call_number" field="owning_lib"/>
4706                 </update>
4707                 <delete permission="DELETE_COPY">
4708                     <context link="call_number" field="owning_lib"/>
4709                 </delete>
4710             </actions>
4711         </permacrud>
4712         </class>
4713
4714         <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">
4715                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_template_id_seq">
4716                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name" />
4717                         <field reporter:label="Owning Lib" name="owning_lib" reporter:datatype="link"/>
4718                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4719                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
4720                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4721                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
4722                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
4723                         <field reporter:label="Circ Lib" name="circ_lib" reporter:datatype="link"/>
4724                         <field reporter:label="Status" name="status" reporter:datatype="int"/>
4725                         <field reporter:label="Location" name="location" reporter:datatype="link"/>
4726                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
4727                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
4728                         <field reporter:label="Age Protect" name="age_protect" reporter:datatype="int"/>
4729                         <field reporter:label="Circulate?" name="circulate" reporter:datatype="bool"/>
4730                         <field reporter:label="Deposit?" name="deposit" reporter:datatype="bool"/>
4731                         <field reporter:label="Reference?" name="ref" reporter:datatype="bool"/>
4732                         <field reporter:label="Holdable?" name="holdable" reporter:datatype="bool"/>
4733                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
4734                         <field reporter:label="Price" name="price" reporter:datatype="money"/>
4735                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="link"/>
4736                         <field reporter:label="Circ As Type" name="circ_as_type" reporter:datatype="text"/>
4737                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
4738                         <field reporter:label="OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
4739                         <field reporter:label="Floating?" name="floating" reporter:datatype="bool"/>
4740                         <field reporter:label="Mint Condition?" name="mint_condition" reporter:datatype="bool"/>
4741                 </fields>
4742                 <links>
4743                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4744                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4745                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4746                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4747                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
4748                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
4749                 </links>
4750                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4751                         <actions>
4752                                 <create permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
4753                                 <retrieve />
4754                                 <update permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
4755                                 <delete permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
4756                         </actions>
4757                 </permacrud>
4758         </class>
4759
4760         <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">
4761                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_age_hold_protect_id_seq">
4762                         <field reporter:label="Item Age" name="age" reporter:datatype="interval"/>
4763                         <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
4764                         <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>
4765                         <field reporter:label="Allowed Proximity" name="prox" reporter:datatype="int" />
4766                 </fields>
4767                 <links/>
4768         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4769             <actions>
4770                 <create permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
4771                 <retrieve/>
4772                 <update permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
4773                 <delete permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
4774             </actions>
4775         </permacrud>
4776         </class>
4777         <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">
4778                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_max_fine_id_seq">
4779                         <field reporter:label="Max Fine Amount" name="amount" reporter:datatype="money" />
4780                         <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
4781                         <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>
4782                         <field reporter:label="Is Percent" name="is_percent" reporter:datatype="bool"/>
4783                 </fields>
4784                 <links/>
4785         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4786             <actions>
4787                 <create permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
4788                 <retrieve/>
4789                 <update permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
4790                 <delete permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
4791             </actions>
4792         </permacrud>
4793         </class>
4794         <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">
4795                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_tree_id_seq">
4796                         <field reporter:label="Child Groups" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
4797                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
4798                         <field reporter:label="Group ID" name="id" reporter:selector="name" reporter:datatype="id"/>
4799                         <field reporter:label="Group Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
4800                         <field reporter:label="Parent Group" name="parent" reporter:datatype="link"/>
4801                         <field reporter:label="User Expiration Interval" name="perm_interval" reporter:datatype="interval"/>
4802                         <field reporter:label="Required Permission" name="application_perm" reporter:datatype="text"/>
4803                         <field reporter:label="Is User Group" name="usergroup" reporter:datatype="bool"/>
4804                         <field reporter:label="Hold Priority" name="hold_priority" reporter:datatype="int"/>
4805                 </fields>
4806                 <links>
4807                         <link field="parent" reltype="has_a" key="id" map="" class="pgt"/>
4808                         <link field="children" reltype="has_many" key="parent" map="" class="pgt"/>
4809                 </links>
4810         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4811             <actions>
4812                 <create permission="CREATE_PERM" global_required="true"/>
4813                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
4814                 <update permission="UPDATE_PERM" global_required="true"/>
4815                 <delete permission="DELETE_PERM" global_required="true"/>
4816             </actions>
4817         </permacrud>
4818         </class>
4819         <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">
4820                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_answer_id_seq">
4821                         <field reporter:label="Responses using this Answer" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
4822                         <field reporter:label="Answer Text" name="answer" reporter:datatype="text"/>
4823                         <field reporter:label="Answer ID" name="id" reporter:datatype="id" />
4824                         <field reporter:label="Question" name="question" reporter:datatype="link"/>
4825                 </fields>
4826                 <links>
4827                         <link field="question" reltype="has_a" key="id" map="" class="asvq"/>
4828                         <link field="responses" reltype="has_many" key="answer" map="" class="asvr"/>
4829                 </links>
4830         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4831             <actions>
4832                 <create permission="ADMIN_SURVEY">
4833                     <context link="question" jump="survey" field="owner"/>
4834                 </create>
4835                 <retrieve/>
4836                 <update permission="ADMIN_SURVEY">
4837                     <context link="question" jump="survey" field="owner"/>
4838                 </update>
4839                 <delete permission="ADMIN_SURVEY">
4840                     <context link="question" jump="survey" field="owner"/>
4841                 </delete>
4842             </actions>
4843         </permacrud>
4844         </class>
4845         <class id="ancc" controller="open-ils.cstore" oils_obj:fieldmapper="action::non_cataloged_circulation" oils_persist:tablename="action.non_cataloged_circulation" reporter:core="true" reporter:label="Non-cataloged Circulation">
4846                 <fields oils_persist:primary="id" oils_persist:sequence="action.non_cataloged_circulation_id_seq">
4847                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
4848                         <field reporter:label="Circulation Date/Time" name="circ_time" reporter:datatype="timestamp"/>
4849                         <field reporter:label="Non-cat Circulation ID" name="id" reporter:datatype="id" />
4850                         <field reporter:label="Non-cat Item Type" name="item_type" reporter:datatype="link"/>
4851                         <field reporter:label="Patron" name="patron" reporter:datatype="link"/>
4852                         <field reporter:label="Circulating Staff" name="staff" reporter:datatype="link"/>
4853                         <field reporter:label="Virtual Due Date/Time" name="duedate" reporter:datatype="timestamp" oils_persist:virtual="true"/>
4854                 </fields>
4855                 <links>
4856                         <link field="item_type" reltype="has_a" key="id" map="" class="cnct"/>
4857                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
4858                         <link field="patron" reltype="has_a" key="id" map="" class="au"/>
4859                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4860                 </links>
4861         </class>
4862         <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">
4863                 <fields oils_persist:primary="usr" oils_persist:sequence="">
4864                         <field name="balance_owed" reporter:datatype="money" />
4865                         <field name="total_owed" reporter:datatype="money" />
4866                         <field name="total_paid" reporter:datatype="money" />
4867                         <field name="usr" reporter:datatype="link"/>
4868                 </fields>
4869                 <links>
4870                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4871                 </links>
4872         </class>
4873         <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">
4874                 <fields oils_persist:primary="id" oils_persist:sequence="action.unfulfilled_hold_list_id_seq">
4875                         <field reporter:label="Non-fulfilling Library" name="circ_lib"  reporter:datatype="org_unit"/>
4876                         <field reporter:label="Non-fulfilling Copy" name="current_copy" reporter:datatype="link"/>
4877                         <field reporter:label="Retargeting Date/Time" name="fail_time" reporter:datatype="timestamp"/>
4878                         <field reporter:label="Hold" name="hold" reporter:datatype="link"/>
4879                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
4880                 </fields>
4881                 <links>
4882                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
4883                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
4884                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4885                 </links>
4886         </class>
4887         <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">
4888                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.identifier_field_entry_id_seq">
4889                         <field name="field" reporter:datatype="link"/>
4890                         <field name="id" reporter:datatype="id" />
4891                         <field name="source" reporter:datatype="link"/>
4892                         <field name="value" reporter:datatype="text"/>
4893                 </fields>
4894                 <links>
4895                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
4896                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
4897                 </links>
4898         </class>
4899         <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">
4900                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.title_field_entry_id_seq">
4901                         <field name="field" reporter:datatype="link"/>
4902                         <field name="id" reporter:datatype="id" />
4903                         <field name="source" reporter:datatype="link"/>
4904                         <field name="value" reporter:datatype="text"/>
4905                 </fields>
4906                 <links>
4907                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
4908                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
4909                 </links>
4910         </class>
4911         <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">
4912                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_usr_map_id_seq">
4913                         <field reporter:label="Entry ID" name="id" reporter:datatype="id" />
4914                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
4915                         <field reporter:label="Entry Text" name="stat_cat_entry" reporter:datatype="text"/>
4916                         <field reporter:label="User" name="target_usr" reporter:datatype="link"/>
4917                 </fields>
4918                 <links>
4919                         <link field="target_usr" reltype="has_a" key="id" map="" class="au"/>
4920                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
4921                 </links>
4922         </class>
4923         <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">
4924                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_perm_map_id_seq">
4925                         <field name="depth" reporter:datatype="int" />
4926                         <field name="grantable" reporter:datatype="bool"/>
4927                         <field name="grp" reporter:datatype="link"/>
4928                         <field name="id" reporter:datatype="id" />
4929                         <field name="perm" reporter:datatype="link"/>
4930                 </fields>
4931                 <links>
4932                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
4933                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
4934                 </links>
4935         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4936             <actions>
4937                 <create permission="ASSIGN_GROUP_PERM" global_required="true"/>
4938                 <retrieve permission="ASSIGN_GROUP_PERM UPDATE_GROUP_PERM REMOVE_GROUP_PERM" global_required="true"/>
4939                 <update permission="UPDATE_GROUP_PERM" global_required="true"/>
4940                 <delete permission="REMOVE_GROUP_PERM" global_required="true"/>
4941             </actions>
4942         </permacrud>
4943         </class>
4944         <class id="ccb" controller="open-ils.cstore" oils_obj:fieldmapper="container::copy_bucket" oils_persist:tablename="container.copy_bucket" reporter:label="Copy Bucket">
4945                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_id_seq">
4946                         <field name="items" oils_persist:virtual="true" />
4947                         <field name="btype" reporter:datatype="text"/>
4948                         <field name="id" reporter:datatype="id" />
4949                         <field name="name" reporter:datatype="text"/>
4950                         <field name="owner" reporter:datatype="link"/>
4951                         <field name="pub" reporter:datatype="bool"/>
4952                         <field name="create_time" reporter:datatype="timestamp" />
4953                 </fields>
4954                 <links>
4955                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
4956                         <link field="items" reltype="has_many" key="bucket" map="" class="ccbi"/>
4957                 </links>
4958         </class>
4959         <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">
4960                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_note_id_seq">
4961                         <field name="id" reporter:datatype="id" />
4962                         <field name="bucket" reporter:datatype="link"/>
4963                         <field name="note" reporter:datatype="text" />
4964                 </fields>
4965                 <links>
4966                         <link field="bucket" reltype="has_a" key="id" map="" class="ccb"/>
4967                 </links>
4968         </class>
4969         <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">
4970                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_work_ou_map_id_seq">
4971                         <field name="id" reporter:datatype="int" />
4972                         <field name="usr" reporter:datatype="link"/>
4973                         <field name="work_ou" reporter:datatype="link"/>
4974                 </fields>
4975                 <links>
4976                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4977                         <link field="work_ou" reltype="has_a" key="id" map="" class="aou"/>
4978                 </links>
4979         </class>
4980         <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">
4981                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_perm_map_id_seq">
4982                         <field name="depth" reporter:datatype="int"/>
4983                         <field name="grantable" reporter:datatype="bool"/>
4984                         <field name="id" reporter:datatype="id" />
4985                         <field name="perm" reporter:datatype="link"/>
4986                         <field name="usr" reporter:datatype="link"/>
4987                 </fields>
4988                 <links>
4989                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4990                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
4991                 </links>
4992         </class>
4993         <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">
4994                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_object_perm_map_id_seq">
4995                         <field name="object_id" reporter:datatype="text"/>
4996                         <field name="grantable" reporter:datatype="bool"/>
4997                         <field name="id" reporter:datatype="id" />
4998                         <field name="perm" reporter:datatype="link"/>
4999                         <field name="usr" reporter:datatype="link"/>
5000                         <field name="object_type" reporter:datatype="text"/>
5001                 </fields>
5002                 <links>
5003                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5004                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
5005                 </links>
5006         </class>
5007         <class id="mp" controller="open-ils.cstore" oils_obj:fieldmapper="money::payment" oils_persist:tablename="money.payment_view" reporter:core="true" reporter:label="Payments: All">
5008                 <fields oils_persist:primary="id" oils_persist:sequence="">
5009                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5010                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
5011                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5012                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
5013                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
5014                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
5015                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
5016                         <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5017                         <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5018                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5019                         <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5020                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5021                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5022                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5023                 </fields>
5024                 <links>
5025                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
5026                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
5027                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
5028                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
5029                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
5030                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
5031                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
5032                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
5033                 </links>
5034         </class>
5035         <class id="mbp" controller="open-ils.cstore" oils_obj:fieldmapper="money::bnm_payment" oils_persist:tablename="money.bnm_payment_view" reporter:core="true" reporter:label="Payments: Brick-and-mortar">
5036                 <fields oils_persist:primary="id" oils_persist:sequence="">
5037                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5038                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
5039                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5040                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
5041                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
5042                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
5043                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
5044                         <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5045                         <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5046                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5047                         <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5048                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5049                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5050                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5051                 </fields>
5052                 <links>
5053                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
5054                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
5055                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
5056                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
5057                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
5058                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
5059                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
5060                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
5061                 </links>
5062         </class>
5063         <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">
5064                 <fields oils_persist:primary="id" oils_persist:sequence="">
5065                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5066                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
5067                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5068                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
5069                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
5070                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
5071                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
5072                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5073                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5074                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5075                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5076                 </fields>
5077                 <links>
5078                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
5079                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
5080                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
5081                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
5082                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
5083                 </links>
5084         </class>
5085         <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">
5086                 <fields oils_persist:primary="id" oils_persist:sequence="">
5087                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5088                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
5089                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5090                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
5091                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
5092                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
5093                         <field reporter:label="Accepting User" name="accepting_usr" />
5094                         <field reporter:label="Cash Drawer" name="cash_drawer" reporter:datatype="link"/>
5095                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
5096                         <field reporter:label="Cash Payment" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5097                         <field reporter:label="Credit Card Payment" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5098                         <field reporter:label="Check Payment" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5099                 </fields>
5100                 <links>
5101                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
5102                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
5103                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
5104                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
5105                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
5106                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
5107                 </links>
5108         </class>
5109         <class id="cbrebi" controller="open-ils.cstore" oils_obj:fieldmapper="container::biblio_record_entry_bucket_item" oils_persist:tablename="container.biblio_record_entry_bucket_item" reporter:label="Biblio Record Entry Bucket Item">
5110                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_id_seq">
5111                         <field name="bucket" reporter:datatype="link"/>
5112                         <field name="id" reporter:datatype="id" />
5113                         <field name="target_biblio_record_entry" reporter:datatype="link"/>
5114                         <field name="create_time" reporter:datatype="timestamp" />
5115                         <field name="pos" reporter:datatype="int" />
5116                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
5117                 </fields>
5118                 <links>
5119                         <link field="target_biblio_record_entry" reltype="has_a" key="id" map="" class="bre"/>
5120                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
5121             <link field="notes" reltype="has_many" map="" key="item" class="cbrebin"/>
5122                 </links>
5123         </class>
5124         <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">
5125                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_note_id_seq">
5126                         <field name="id" reporter:datatype="id" />
5127                         <field name="item" reporter:datatype="link"/>
5128                         <field name="note" reporter:datatype="text" />
5129                 </fields>
5130                 <links>
5131                         <link field="item" reltype="has_a" key="id" map="" class="cbrebi"/>
5132                 </links>
5133         </class>
5134         <class id="asce" controller="open-ils.cstore" oils_obj:fieldmapper="asset::stat_cat_entry" oils_persist:tablename="asset.stat_cat_entry" reporter:label="Item Stat Cat Entry">
5135                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_entry_id_seq">
5136                         <field reporter:label="Entry ID" name="id" reporter:datatype="int" />
5137                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
5138                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
5139                         <field reporter:label="Value" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
5140                 </fields>
5141                 <links>
5142                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
5143                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5144                 </links>
5145         </class>
5146
5147         <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">
5148                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_cancel_cause_id_seq">
5149                         <field reporter:label="Cause ID" name="id" reporter:datatype="id" />
5150                         <field reporter:label="Cause Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
5151                 </fields>
5152                 <links/>
5153         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5154             <actions>
5155                 <create permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
5156                 <retrieve/>
5157                 <update permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
5158                 <delete permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
5159             </actions>
5160         </permacrud>
5161         </class>
5162
5163
5164         <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">
5165                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
5166                         <field reporter:label="Copy Status at Transit" name="copy_status" reporter:datatype="link"/>
5167                         <field reporter:label="Destination Library" name="dest" reporter:datatype="org_unit"/>
5168                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
5169                         <field reporter:label="Reservation requiring Transit" name="reservation" reporter:datatype="link"/>
5170                         <field reporter:label="Transit ID" name="id" reporter:datatype="id" />
5171                         <field reporter:label="Is Persistent?" name="persistant_transfer" reporter:datatype="bool"/>
5172                         <field reporter:label="Previous Stop" name="prev_hop" reporter:datatype="link"/>
5173                         <field reporter:label="Sending Library" name="source" reporter:datatype="org_unit"/>
5174                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
5175                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
5176                         <field reporter:label="Base Transit" name="transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
5177                         <field reporter:label="Prev Destination Library" name="prev_dest" reporter:datatype="org_unit"/>
5178                 </fields>
5179                 <links>
5180                         <link field="transit_copy" reltype="might_have" key="id" map="" class="atc"/>
5181                         <link field="target_copy" reltype="has_a" key="id" map="" class="brsrc"/>
5182                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
5183                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
5184                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
5185                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
5186                         <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
5187                 </links>
5188         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5189             <actions>
5190                 <create permission="TRANSIT_COPY">
5191                     <context link="target_copy" field="owner"/>
5192                 </create>
5193                 <retrieve/>
5194                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
5195                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
5196             </actions>
5197         </permacrud>
5198         </class>
5199         <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">
5200                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
5201                         <field reporter:label="Copy Status at Transit" name="copy_status" reporter:datatype="link"/>
5202                         <field reporter:label="Destination Library" name="dest" reporter:datatype="org_unit"/>
5203                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
5204                         <field reporter:label="Hold requiring Transit" name="hold" reporter:datatype="link"/>
5205                         <field reporter:label="Transit ID" name="id" reporter:datatype="id" />
5206                         <field reporter:label="Is Persistent?" name="persistant_transfer" reporter:datatype="bool"/>
5207                         <field reporter:label="Previous Stop" name="prev_hop" reporter:datatype="link"/>
5208                         <field reporter:label="Sending Library" name="source" reporter:datatype="org_unit"/>
5209                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
5210                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
5211                         <field reporter:label="Base Transit" name="transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
5212                         <field reporter:label="Prev Destination Library" name="prev_dest" reporter:datatype="org_unit"/>
5213                 </fields>
5214                 <links>
5215                         <link field="transit_copy" reltype="might_have" key="id" map="" class="atc"/>
5216                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
5217                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
5218                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
5219                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
5220                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
5221                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
5222                 </links>
5223         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5224             <actions>
5225                 <create permission="TRANSIT_COPY" context_field="owner">
5226                     <context link="target_copy" field="circ_lib"/>
5227                 </create>
5228                 <retrieve/>
5229                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
5230                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
5231             </actions>
5232         </permacrud>
5233         </class>
5234         <class id="mb" controller="open-ils.cstore" oils_obj:fieldmapper="money::billing" oils_persist:tablename="money.billing" reporter:label="Billing Line Item">
5235                 <fields oils_persist:primary="id" oils_persist:sequence="money.billing_id_seq">
5236                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5237                         <field reporter:label="Billing Timestamp" name="billing_ts" reporter:datatype="timestamp"/>
5238                         <field reporter:label="Legacy Billing Type" name="billing_type" reporter:datatype="text"/>
5239                         <field reporter:label="Billing ID" name="id" reporter:datatype="id" />
5240                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5241                         <field reporter:label="Void Timestamp" name="void_time" reporter:datatype="timestamp"/>
5242                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
5243                         <field reporter:label="Voiding Staff Member" name="voider" reporter:datatype="link"/>
5244                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
5245                         <field reporter:label="Type" name="btype" reporter:datatype="link"/>
5246                 </fields>
5247                 <links>
5248                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
5249                         <link field="voider" reltype="has_a" key="id" map="" class="au"/>
5250                         <link field="btype" reltype="has_a" key="id" map="" class="cbt"/>
5251                 </links>
5252         </class>
5253         <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">
5254                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_grp_map_id_seq">
5255                         <field name="grp" />
5256                         <field name="id" reporter:datatype="id" />
5257                         <field name="usr" />
5258                 </fields>
5259                 <links>
5260                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
5261                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5262                 </links>
5263         </class>
5264         <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">
5265                 <fields oils_persist:primary="id" oils_persist:sequence="config.i18n_core_id_seq">
5266                         <field name="id" reporter:datatype="id" />
5267                         <field name="fq_field" reporter:datatype="text"/>
5268                         <field name="identity_value" reporter:datatype="text"/>
5269                         <field name="translation" reporter:datatype="text"/>
5270                         <field name="string" reporter:datatype="text"/>
5271                 </fields>
5272                 <links>
5273                         <link field="translation" reltype="has_a" key="code" map="" class="i18n_l"/>
5274                 </links>
5275         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5276             <actions>
5277                 <create permission="CREATE_TRANSLATION" global_required="true"/>
5278                 <retrieve permission="CREATE_TRANSLATION UPDATE_TRANSLATION DELETE_TRANSLATION" global_required="true"/>
5279                 <update permission="UPDATE_TRANSLATION" global_required="true"/>
5280                 <delete permission="DELETE_TRANSLATION" global_required="true"/>
5281             </actions>
5282         </permacrud>
5283         </class>
5284         <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">
5285                 <fields oils_persist:primary="id" oils_persist:sequence="config.idl_field_doc_id_seq">
5286                         <field name="id" reporter:datatype="id" />
5287                         <field name="fm_class" reporter:datatype="text"/>
5288                         <field name="field" reporter:datatype="text"/>
5289                         <field name="owner" reporter:datatype="org_unit"/>
5290                         <field name="string" reporter:datatype="text" oils_persist:i18n="true"/>
5291                 </fields>
5292                 <links>
5293                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5294                 </links>
5295         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5296             <actions>
5297                 <create   permission="ADMIN_FIELD_DOC" context_field="owner"/>
5298                 <retrieve/>
5299                 <update   permission="ADMIN_FIELD_DOC" context_field="owner"/>
5300                 <delete   permission="ADMIN_FIELD_DOC" context_field="owner"/>
5301             </actions>
5302         </permacrud>
5303         </class>
5304         <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">
5305                 <fields oils_persist:primary="code">
5306                         <field name="code" reporter:datatype="id" />
5307                         <field name="marc_code" reporter:datatype="text"/>
5308                         <field name="name" reporter:datatype="text" oils_persist:i18n="true"/>
5309                         <field name="description" reporter:datatype="text" oils_persist:i18n="true"/>
5310                 </fields>
5311                 <links/>
5312         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5313             <actions>
5314                 <create permission="CREATE_LOCALE" global_required="true"/>
5315                 <retrieve/>
5316                 <update permission="UPDATE_LOCALE" global_required="true"/>
5317                 <delete permission="DELETE_LOCALE" global_required="true"/>
5318             </actions>
5319         </permacrud>
5320         </class>
5321         <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">
5322                 <fields oils_persist:primary="id" oils_persist:sequence="config.billing_type_id_seq">
5323                         <field name="id" reporter:datatype="id" reporter:label="ID" reporter:selector="name"/>
5324                         <field name="name" reporter:datatype="text" reporter:label="Name" oils_persist:i18n="true"/>
5325                         <field name="owner" reporter:datatype="org_unit" reporter:label="Org Unit" />
5326             <field name="default_price" reporter:datatype="money" reporter:label="Default Price"/>
5327                 </fields>
5328                 <links>
5329                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5330                 </links>
5331         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5332             <actions>
5333                 <create permission="CREATE_BILLING_TYPE" context_field="owner"/>
5334                 <retrieve permission="VIEW_BILLING_TYPE CREATE_BILLING_TYPE UPDATE_BILLING_TYPE DELETE_BILLING_TYPE" context_field="owner"/>
5335                 <update permission="UPDATE_BILLING_TYPE" context_field="owner"/>
5336                 <delete permission="DELETE_BILLING_TYPE" context_field="owner"/>
5337             </actions>
5338         </permacrud>
5339         </class>
5340
5341         <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">
5342                 <fields oils_persist:primary="id">
5343                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
5344                         <field reporter:label="Type Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
5345                 </fields>
5346                 <links/>
5347         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5348             <actions>
5349                 <create permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
5350                 <retrieve/>
5351                 <update permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
5352                 <delete permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
5353             </actions>
5354         </permacrud>
5355         </class>
5356
5357         <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">
5358                 <fields oils_persist:primary="id" oils_persist:sequence="acq.user_request_id_seq">
5359                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
5360                         <field reporter:label="User" name="usr" reporter:datatype="link" />
5361                         <field reporter:label="Request Type" name="request_type" reporter:datatype="link" />
5362                         <field reporter:label="Place Hold" name="hold" reporter:datatype="bool" />
5363                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link" />
5364                         <field reporter:label="Holdable Formats" name="holdable_formats" reporter:datatype="text" />
5365                         <field reporter:label="Phone Notify" name="phone_notify" reporter:datatype="text" />
5366                         <field reporter:label="Email Notify" name="email_notify" reporter:datatype="bool" />
5367                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
5368                         <field reporter:label="Bib Record" name="eg_bib" reporter:datatype="link" />
5369                         <field reporter:label="Request Date/Time" name="request_date" reporter:datatype="timestamp" />
5370                         <field reporter:label="Need Before Date/Time" name="need_before" reporter:datatype="timestamp" />
5371                         <field reporter:label="Max Acceptable Fee" name="max_fee" reporter:datatype="text" />
5372                         <field reporter:label="ISxN" name="isxn" reporter:datatype="text" />
5373                         <field reporter:label="Title" name="title" reporter:datatype="text" />
5374                         <field reporter:label="Volume" name="volume" reporter:datatype="text" />
5375                         <field reporter:label="Author" name="author" reporter:datatype="text" />
5376                         <field reporter:label="Article Title" name="article_title" reporter:datatype="text" />
5377                         <field reporter:label="Article Pages" name="article_pages" reporter:datatype="text" />
5378                         <field reporter:label="Publisher" name="publisher" reporter:datatype="text" />
5379                         <field reporter:label="Publication Location" name="location" reporter:datatype="text" />
5380                         <field reporter:label="Publication Date" name="pubdate" reporter:datatype="text" />
5381                         <field reporter:label="Mentioned In" name="mentioned" reporter:datatype="text" />
5382                         <field reporter:label="Other Info" name="other_info" reporter:datatype="text" />
5383                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
5384                 </fields>
5385                 <links>
5386                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5387                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5388                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
5389                         <link field="eg_bib" reltype="has_a" key="id" map="" class="bre"/>
5390                         <link field="request_type" reltype="has_a" key="id" map="" class="aurt"/>
5391                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
5392                 </links>
5393         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5394             <actions>
5395                 <create permission="user_request.create">
5396                     <context link="usr" field="home_ou"/>
5397                                 </create>
5398                 <retrieve permission="user_request.view">
5399                     <context link="usr" field="home_ou"/>
5400                                 </retrieve>
5401                 <update permission="user_request.update">
5402                     <context link="usr" field="home_ou"/>
5403                                 </update>
5404                 <delete permission="user_request.delete">
5405                     <context link="usr" field="home_ou"/>
5406                                 </delete>
5407             </actions>
5408         </permacrud>
5409         </class>
5410
5411         <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">
5412                 <fields oils_persist:primary="code">
5413                         <field reporter:label="Currency Code" name="code" reporter:datatype="text" reporter:selector='label'/>
5414                         <field reporter:label="Currency Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
5415                 </fields>
5416                 <links/>
5417         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5418             <actions>
5419                 <create permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
5420                 <retrieve/>
5421                 <update permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
5422                 <delete permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
5423             </actions>
5424         </permacrud>
5425         </class>
5426
5427         <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">
5428                 <fields oils_persist:primary="id" oils_persist:sequence="acq.exchange_rate_id_seq">
5429                         <field reporter:label="Exchange Rate ID" name="id" reporter:datatype="id" />
5430                         <field reporter:label="From Currency" name="from_currency" reporter:datatype="link" />
5431                         <field reporter:label="To Currency" name="to_currency" reporter:datatype="link" />
5432                         <field reporter:label="Ratio" name="ratio" />
5433                 </fields>
5434                 <links>
5435                         <link field="from_currency" reltype="has_a" key="code" map="" class="acqct"/>
5436                         <link field="to_currency" reltype="has_a" key="code" map="" class="acqct"/>
5437                 </links>
5438                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5439                         <actions>
5440                                 <create permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
5441                                 <retrieve/>
5442                                 <update permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
5443                                 <delete permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
5444                         </actions>
5445                 </permacrud>
5446         </class>
5447
5448         <class id="acqpro" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::provider" oils_persist:tablename="acq.provider" reporter:label="Provider">
5449                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_id_seq">
5450                         <field reporter:label="Provider ID" name="id" reporter:datatype="id" reporter:selector='code'/>
5451                         <field reporter:label="Provider Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
5452                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" />
5453                         <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" />
5454                         <field reporter:label="Code" name="code" reporter:datatype="text" />
5455                         <field reporter:label="Holdings Tag" name="holding_tag" reporter:datatype="text" />
5456                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link" />
5457                         <field reporter:label="SAN" name="san" reporter:datatype="text" />
5458                         <field reporter:label="EDI Default" name="edi_default" reporter:datatype="link" />
5459                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
5460                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
5461                         <field reporter:label="URL" name="url" reporter:datatype="text" />
5462                         <field reporter:label="Email" name="email" reporter:datatype="text" />
5463                         <field reporter:label="Phone" name="phone" reporter:datatype="text" />
5464                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text" />
5465                         <field reporter:label="Default Claim Policy" name="default_claim_policy" reporter:datatype="link" />
5466                 </fields>
5467                 <links>
5468                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
5469                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5470             <link field="addresses" reltype="has_many" map="" key="provider" class="acqpa"/>
5471             <link field="edi_default" reltype="has_a" map="" key="id" class="acqedi"/>
5472             <link field="default_claim_policy" reltype="has_a" map="" key="id" class="acqclp"/>
5473                 </links>
5474         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5475             <actions>
5476                 <create   permission="ADMIN_PROVIDER" context_field="owner"/>
5477                 <retrieve permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER" context_field="owner"/>
5478                 <update   permission="ADMIN_PROVIDER" context_field="owner"/>
5479                 <delete   permission="ADMIN_PROVIDER" context_field="owner"/>
5480             </actions>
5481         </permacrud>
5482         </class>
5483
5484         <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">
5485                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_note_id_seq">
5486                         <field reporter:label="PO Note ID" name="id" reporter:datatype="id" />
5487                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
5488                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
5489                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
5490                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
5491                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
5492                         <field reporter:label="Note Value" name="value" reporter:datatype="text" />
5493                 </fields>
5494                 <links>
5495                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5496                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5497                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
5498                 </links>
5499         </class>
5500
5501         <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">
5502                 <fields oils_persist:primary="code">
5503                         <field reporter:label="Code" name="code" reporter:datatype="id" reporter:selector="name"/>
5504                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
5505                 </fields>
5506                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5507             <actions>
5508                 <create permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
5509                 <retrieve/>
5510                 <update permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
5511                 <delete permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
5512             </actions>
5513                 </permacrud>
5514         </class>
5515
5516         <class id="acqinv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::invoice" oils_persist:tablename="acq.invoice" reporter:label="Invoice">
5517                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_id_seq">
5518                         <field reporter:label="Internal Invoice ID" name="id" reporter:datatype="id"/>
5519                         <field reporter:label="Receiver" name="receiver" reporter:datatype="org_unit" />
5520                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
5521                         <field reporter:label="Shipper" name="shipper" reporter:datatype="link"/>
5522                         <field reporter:label="Invoice Date" name="recv_date" reporter:datatype="timestamp" />
5523                         <field reporter:label="Receive Method" name="recv_method" reporter:datatype="link" />
5524                         <field reporter:label="Invoice Type" name="inv_type" reporter:datatype="text" />
5525                         <field reporter:label="Vendor Invoice ID" name="inv_ident" reporter:datatype="text" />
5526                         <field reporter:label="Payment Auth" name="payment_auth" reporter:datatype="text" />
5527                         <field reporter:label="Payment Method" name="payment_method" reporter:datatype="link" />
5528                         <field reporter:label="Note" name="note" reporter:datatype="text" />
5529                         <field reporter:label="Complete" name="complete" reporter:datatype="bool" />
5530                         <field reporter:label="Invoice Entries" name="entries" reporter:datatype="link" oils_persist:virtual="true"/>
5531                         <field reporter:label="Invoice Items" name="items" reporter:datatype="link" oils_persist:virtual="true"/>
5532                 </fields>
5533                 <links>
5534                         <link field="receiver" reltype="has_a" key="id" map="" class="aou"/>
5535                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
5536                         <link field="shipper" reltype="has_a" key="id" map="" class="acqpro"/>
5537                         <link field="recv_method" reltype="has_a" key="code" map="" class="acqim"/>
5538                         <link field="payment_method" reltype="has_a" key="code" map="" class="acqipm"/>
5539                         <link field="entries" reltype="has_many" key="invoice" map="" class="acqie"/>
5540                         <link field="items" reltype="has_many" key="invoice" map="" class="acqii"/>
5541                 </links>
5542         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5543             <actions>
5544                 <create   permission="CREATE_INVOICE" context_field="receiver"/>
5545                 <retrieve permission="CREATE_INVOICE VIEW_INVOICE" context_field="receiver"/>
5546                 <update   permission="CREATE_INVOICE" context_field="receiver"/>
5547                 <delete   permission="CREATE_INVOICE" context_field="receiver"/>
5548             </actions>
5549         </permacrud>
5550         </class>
5551
5552         <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">
5553                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_entry_id_seq">
5554                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5555                         <field reporter:label="Invoice" name="invoice" reporter:datatype="link" />
5556                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
5557                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link"/>
5558                         <field reporter:label="Invoice Item Count" name="inv_item_count" reporter:datatype="int" />
5559                         <field reporter:label="Physical Item Count" name="phys_item_count" reporter:datatype="int" />
5560                         <field reporter:label="Note" name="note" reporter:datatype="text" />
5561                         <field reporter:label="Billed Cost per Item" name="billed_per_item" reporter:datatype="bool" />
5562                         <field reporter:label="Cost Billed" name="cost_billed" reporter:datatype="money" />
5563                         <field reporter:label="Actual Cost" name="actual_cost" reporter:datatype="money" />
5564                         <field reporter:label="Amount Paid" name="amount_paid" reporter:datatype="money" />
5565                 </fields>
5566                 <links>
5567                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv"/>
5568                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
5569                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
5570                 </links>
5571         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5572             <actions>
5573                 <create   permission="ADMIN_INVOICE">
5574                                         <context link="invoice" field="receiver"/>
5575                                 </create>
5576                 <retrieve permission="ADMIN_INVOICE">
5577                                         <context link="invoice" field="receiver"/>
5578                                 </retrieve>
5579                 <update   permission="ADMIN_INVOICE">
5580                                         <context link="invoice" field="receiver"/>
5581                                 </update>
5582                                 <delete   permission="ADMIN_INVOICE">
5583                                         <context link="invoice" field="receiver"/>
5584                                 </delete>
5585             </actions>
5586         </permacrud>
5587         </class>
5588
5589         <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">
5590                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_item_id_seq">
5591                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5592                         <field reporter:label="Invoice" name="invoice" reporter:datatype="link" />
5593                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
5594                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
5595                         <field reporter:label="Invoice Item Type" name="inv_item_type" reporter:datatype="link" />
5596                         <field reporter:label="Title or Item Name" name="title" reporter:datatype="text" />
5597                         <field reporter:label="Author" name="author" reporter:datatype="text" />
5598                         <field reporter:label="Note" name="note" reporter:datatype="text" />
5599                         <field reporter:label="Cost Billed" name="cost_billed" reporter:datatype="money" />
5600                         <field reporter:label="Actual Cost" name="actual_cost" reporter:datatype="money" />
5601                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
5602                         <field reporter:label="Amount Paid" name="amount_paid" reporter:datatype="money" />
5603                         <field reporter:label="Purchase Order Item" name="po_item" reporter:datatype="link" />
5604                         <field reporter:label="Target" name="target" reporter:datatype="int" />
5605                 </fields>
5606                 <links>
5607                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv"/>
5608                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
5609                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
5610                         <link field="inv_item_type" reltype="has_a" key="code" map="" class="aiit"/>
5611                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
5612                         <link field="po_item" reltype="has_a" key="id" map="" class="acqpoi"/>
5613                 </links>
5614         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5615             <actions>
5616                 <create   permission="ADMIN_INVOICE">
5617                                         <context link="invoice" field="receiver"/>
5618                                 </create>
5619                 <retrieve permission="ADMIN_INVOICE">
5620                                         <context link="invoice" field="receiver"/>
5621                                 </retrieve>
5622                 <update   permission="ADMIN_INVOICE">
5623                                         <context link="invoice" field="receiver"/>
5624                                 </update>
5625                                 <delete   permission="ADMIN_INVOICE">
5626                                         <context link="invoice" field="receiver"/>
5627                                 </delete>
5628             </actions>
5629         </permacrud>
5630         </class>
5631
5632         <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">
5633                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_address_id_seq">
5634                         <field reporter:label="Address Type" name="address_type"  reporter:datatype="text"/>
5635                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
5636                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
5637                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
5638                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5639                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
5640                         <field reporter:label="Post Code" name="post_code"  reporter:datatype="text"/>
5641                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
5642                         <field reporter:label="Street 1" name="street1"  reporter:datatype="text"/>
5643                         <field reporter:label="Street 2" name="street2"  reporter:datatype="text"/>
5644                         <field reporter:label="Is Valid?" name="valid" reporter:datatype="bool"/>
5645                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text"/>
5646                 </fields>
5647                 <links>
5648                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
5649                 </links>
5650         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5651             <actions>
5652                 <create permission="ADMIN_PROVIDER">
5653                     <context link="provider" field="owner"/>
5654                 </create>
5655                 <retrieve permission="ADMIN_PROVIDER">
5656                     <context link="provider" field="owner"/>
5657                 </retrieve>
5658                 <update permission="ADMIN_PROVIDER">
5659                     <context link="provider" field="owner"/>
5660                 </update>
5661                 <delete permission="ADMIN_PROVIDER">
5662                     <context link="provider" field="owner"/>
5663                 </delete>
5664             </actions>
5665         </permacrud>
5666         </class>
5667
5668         <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">
5669                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_id_seq">
5670                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5671                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
5672                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
5673                         <field reporter:label="Role" name="role" reporter:datatype="text"/>
5674                         <field reporter:label="Email" name="email" reporter:datatype="text"/>
5675                         <field reporter:label="Phone" name="phone" reporter:datatype="text"/>
5676         </fields>
5677                 <links>
5678                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
5679                 </links>
5680         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5681             <actions>
5682                 <create permission="ADMIN_PROVIDER">
5683                     <context link="provider" field="owner"/>
5684                 </create>
5685                 <retrieve permission="ADMIN_PROVIDER">
5686                     <context link="provider" field="owner"/>
5687                 </retrieve>
5688                 <update permission="ADMIN_PROVIDER">
5689                     <context link="provider" field="owner"/>
5690                 </update>
5691                 <delete permission="ADMIN_PROVIDER">
5692                     <context link="provider" field="owner"/>
5693                 </delete>
5694             </actions>
5695         </permacrud>
5696     </class>
5697         <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">
5698                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_address_id_seq">
5699                         <field reporter:label="Type" name="address_type"  reporter:datatype="text"/>
5700                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
5701                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
5702                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
5703                         <field reporter:label="Address ID" name="id" reporter:datatype="id" />
5704                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
5705                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
5706                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
5707                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
5708                         <field reporter:label="Contact" name="contact" reporter:datatype="link"/>
5709                         <field reporter:label="Valid Address?" name="valid" reporter:datatype="bool"/>
5710                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text"/>
5711                 </fields>
5712                 <links>
5713                         <link field="contact" reltype="has_a" key="id" map="" class="acqpc"/>
5714                 </links>
5715         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5716             <actions>
5717                 <create permission="ADMIN_PROVIDER">
5718                     <context link="contact" jump='provider' field="owner"/>
5719                 </create>
5720                 <retrieve permission="ADMIN_PROVIDER">
5721                     <context link="contact" jump='provider' field="owner"/>
5722                 </retrieve>
5723                 <update permission="ADMIN_PROVIDER">
5724                     <context link="contact" jump='provider' field="owner"/>
5725                 </update>
5726                 <delete permission="ADMIN_PROVIDER">
5727                     <context link="contact" jump='provider' field="owner"/>
5728                 </delete>
5729             </actions>
5730         </permacrud>
5731         </class>
5732
5733         <class id="acqftr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::fund_transfer" oils_persist:tablename="acq.fund_transfer" reporter:label="Fund Transfer">
5734                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_transfer_id_seq">
5735                         <field reporter:label="Fund Transfer ID" name="id" reporter:datatype="id"/>
5736                         <field reporter:label="Source Fund" name="src_fund" reporter:datatype="link"/>
5737                         <field reporter:label="Source Amount" name="src_amount" reporter:datatype="money"/>
5738                         <field reporter:label="Destination Fund" name="dest_fund" reporter:datatype="link"/>
5739                         <field reporter:label="Destination Amount" name="dest_amount" reporter:datatype="money"/>
5740                         <field reporter:label="Transfer Time" name="transfer_time" reporter:datatype="timestamp"/>
5741                         <field reporter:label="Transfer User" name="transfer_user" reporter:datatype="link"/>
5742                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5743                         <field reporter:label="Funding Source Credit ID" name="funding_source_credit" reporter:datatype="link"/>
5744                 </fields>
5745                 <links>
5746                         <link field="src_fund" reltype="has_a" key="id" map="" class="acqf"/>
5747                         <link field="dest_fund" reltype="has_a" key="id" map="" class="acqf"/>
5748                         <link field="transfer_user" reltype="has_a" key="id" map="" class="au"/>
5749                         <link field="funding_source_credit" reltype="has_a" key="id" map="" class="acqfscred"/>
5750                 </links>
5751                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5752                 </permacrud>
5753         </class>
5754
5755         <class id="acqfc" controller="open-ils.cstore" oils_obj:fieldmapper="acq::fiscal_calendar" oils_persist:tablename="acq.fiscal_calendar" reporter:label="Fiscal Calendar">
5756                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fiscal_calendar_id_seq">
5757                         <field reporter:label="Fiscal Calendar ID" name="id" reporter:datatype="id" reporter:selector='name'/>
5758                         <field reporter:label="Fiscal Calendar Name" name="name" reporter:datatype="text"/>
5759                         <field reporter:label="Years" name="years" oils_persist:virtual="true" reporter:datatype="link"/>
5760                 </fields>
5761                 <links>
5762             <link field="years" reltype="has_many" map="" key="calendar" class="acqfy"/>
5763                 </links>
5764                 <!--
5765                         For now, we don't have pcrud as one of the controllers, so the permacrud section is moot.
5766                         But here's what it should look like if we ever do use pcrud.
5767                 -->
5768                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5769                         <actions>
5770                                 <create permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
5771                                 <retrieve permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
5772                                 <update permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
5773                                 <delete permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
5774                         </actions>
5775                 </permacrud>
5776         </class>
5777
5778         <class id="acqfy" controller="open-ils.cstore" oils_obj:fieldmapper="acq::fiscal_year" oils_persist:tablename="acq.fiscal_year" reporter:label="Fiscal Year">
5779                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fiscal_year_id_seq">
5780                         <field reporter:label="Fiscal Year ID" name="id" reporter:datatype="id" reporter:selector='year'/>
5781                         <field reporter:label="Calendar" name="calendar" reporter:datatype="link"/>
5782                         <field reporter:label="Fiscal Year" name="year" reporter:datatype="int"/>
5783                         <field reporter:label="Year Begin" name="year_begin" reporter:datatype="timestamp"/>
5784                         <field reporter:label="Year End" name="year_end" reporter:datatype="timestamp"/>
5785                 </fields>
5786                 <links>
5787                         <link field="calendar" reltype="has_a" key="id" map="" class="acqfc"/>
5788                 </links>
5789                 <!--
5790                         For now, we don't have pcrud as one of the controllers, so the permacrud section is moot.
5791                         But here's what it should look like if we ever do use pcrud.
5792                 -->
5793                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5794                         <actions>
5795                                 <create permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
5796                                 <retrieve permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
5797                                 <update permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
5798                                 <delete permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
5799                         </actions>
5800                 </permacrud>
5801         </class>
5802
5803         <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">
5804                 <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_id_seq">
5805                         <field reporter:label="Funding Source ID" name="id" reporter:datatype="id" reporter:selector='code'/>
5806                         <field reporter:label="Funding Source Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
5807                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" />
5808                         <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" />
5809                         <field reporter:label="Code" name="code" reporter:datatype="text" />
5810                         <field reporter:label="Summary" name="summary" oils_persist:virtual="true"/>
5811                         <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>
5812                         <field reporter:label="Credits" name="credits" oils_persist:virtual="true" reporter:datatype="link"/>
5813                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
5814                 </fields>
5815                 <links>
5816                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
5817                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5818             <link field="allocations" reltype="has_many" map="" key="funding_source" class="acqfa"/>
5819             <link field="credits" reltype="has_many" key="funding_source" map="" class="acqfscred"/>
5820                         <link field="fund_alloc_pcts" reltype="has_many" key="funding_source" map="" class="acqfap"/>
5821                 </links>
5822         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5823             <actions>
5824                 <create   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
5825                 <retrieve permission="ADMIN_FUNDING_SOURCE MANAGE_FUNDING_SOURCE VIEW_FUNDING_SOURCE" context_field="owner"/>
5826                 <update   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
5827                 <delete   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
5828             </actions>
5829         </permacrud>
5830         </class>
5831
5832         <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">
5833                 <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_credit_id_seq">
5834                         <field reporter:label="Credit ID" name="id" reporter:datatype="id" />
5835                         <field reporter:label="Funding Source ID" name="funding_source" reporter:datatype="link" />
5836                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5837                         <field reporter:label="Note" name="note" reporter:datatype="text" />
5838                         <field reporter:label="Deadline Date" name="deadline_date" reporter:datatype="timestamp" />
5839                         <field reporter:label="Effective Date" name="effective_date" reporter:datatype="timestamp" />
5840                 </fields>
5841                 <links>
5842                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
5843                 </links>
5844                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5845                         <actions>
5846                                 <create permission="ADMIN_FUNDING_SOURCE">
5847                     <context link="funding_source" field="owner"/>
5848                 </create>
5849                                 <retrieve permission="ADMIN_FUNDING_SOURCE">
5850                     <context link="funding_source" field="owner"/>
5851                 </retrieve>
5852                                 <update permission="ADMIN_FUNDING_SOURCE">
5853                     <context link="funding_source" field="owner"/>
5854                 </update>
5855                                 <delete permission="ADMIN_FUNDING_SOURCE">
5856                     <context link="funding_source" field="owner"/>
5857                 </delete>
5858                         </actions>
5859                 </permacrud>
5860         </class>
5861
5862         <class id="acqofscred" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::ordered_funding_source_credit" oils_persist:tablename="acq.ordered_funding_source_credit" reporter:label="Ordered Funding Source Credit">
5863                 <fields oils_persist:primary="id">
5864                         <field reporter:label="Ordered Fund Src ID" name="id" reporter:datatype="id"/>
5865                         <field reporter:label="Sort Priority" name="sort_priority" reporter:datatype="int"/>
5866                         <field reporter:label="Sort Date" name="sort_date" reporter:datatype="timestamp"/>
5867                         <field reporter:label="Funding Source ID" name="funding_source" reporter:datatype="link"/>
5868                         <field reporter:label="Amount" name="amount" reporter:datatype="money"/>
5869                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5870                 </fields>
5871                 <links>
5872                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
5873                 </links>
5874                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5875                 </permacrud>
5876         </class>
5877
5878         <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">
5879                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_debit_id_seq">
5880                         <field reporter:label="Debit ID" name="id" reporter:datatype="id" />
5881                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
5882                         <field reporter:label="Origin Amount" name="origin_amount" reporter:datatype="money" />
5883                         <field reporter:label="Origin Currency" name="origin_currency_type" reporter:datatype="link" />
5884                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5885                         <field reporter:label="Encumbrance" name="encumbrance" reporter:datatype="bool" />
5886                         <field reporter:label="Debit Type" name="debit_type" reporter:datatype="text" />
5887                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
5888                 </fields>
5889                 <links>
5890                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
5891                         <link field="origin_currency_type" reltype="has_a" key="code" map="" class="acqct"/>
5892                 </links>
5893                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5894                         <actions>
5895                                 <create permission="ADMIN_ACQ_FUND">
5896                     <context link="fund" field="org"/>
5897                 </create>
5898                                 <retrieve permission="ADMIN_ACQ_FUND">
5899                     <context link="fund" field="org"/>
5900                 </retrieve>
5901                                 <update permission="ADMIN_ACQ_FUND">
5902                     <context link="fund" field="org"/>
5903                 </update>
5904                                 <delete permission="ADMIN_ACQ_FUND">
5905                     <context link="fund" field="org"/>
5906                 </delete>
5907                         </actions>
5908                 </permacrud>
5909         </class>
5910
5911         <class id="acqf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::fund" oils_persist:tablename="acq.fund" reporter:label="Fund">
5912                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_id_seq">
5913                         <field reporter:label="Fund ID" name="id" reporter:datatype="id" reporter:selector='code'/>
5914                         <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
5915                         <field reporter:label="Name" name="name" reporter:datatype="text" />
5916                         <field reporter:label="Year" name="year" reporter:datatype="int" />
5917                         <field reporter:label="Currency Type" name="currency_type" reporter:datatype="link" />
5918                         <field reporter:label="Code" name="code" reporter:datatype="text" />
5919                         <field reporter:label="Rollover" name="rollover" reporter:datatype="bool" />
5920                         <field reporter:label="Propagate" name="propagate" reporter:datatype="bool" />
5921                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
5922                         <field reporter:label="Balance Warning Percent" name="balance_warning_percent" reporter:datatype="int" />
5923                         <field reporter:label="Balance Stop Percent" name="balance_stop_percent" reporter:datatype="int" />
5924                         <field reporter:label="Summary" name="summary" oils_persist:virtual="true"/>
5925                         <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>
5926                         <field reporter:label="Debits" name="debits" oils_persist:virtual="true" reporter:datatype="link"/>
5927                         <field reporter:label="Tags" name="tags" oils_persist:virtual="true" reporter:datatype="link"/>
5928                 </fields>
5929                 <links>
5930                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
5931                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
5932             <link field="allocations" reltype="has_many" key="fund" map="" class="acqfa"/>
5933             <link field="debits" reltype="has_many" key="fund" map="" class="acqfdeb"/>
5934             <link field="tags" reltype="has_many" key="fund" map="" class="acqftm"/>
5935                 </links>
5936         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5937             <actions>
5938                 <create permission="ADMIN_ACQ_FUND" context_field="org"/>
5939                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="org"/>
5940                 <update permission="ADMIN_ACQ_FUND" context_field="org"/>
5941                 <delete permission="ADMIN_ACQ_FUND" context_field="org"/>
5942             </actions>
5943         </permacrud>
5944         </class>
5945
5946         <class id="acqfat" controller="open-ils.cstore 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">
5947                 <fields oils_persist:primary="fund">
5948                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
5949                         <field reporter:label="Total Allocation Amount" name="amount" reporter:datatype="money" />
5950                 </fields>
5951                 <links>
5952                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
5953                 </links>
5954         </class>
5955
5956         <class id="acqfdt" controller="open-ils.cstore 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">
5957                 <fields oils_persist:primary="fund">
5958                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
5959                         <field reporter:label="Total Debit Amount" name="amount" reporter:datatype="money" />
5960                 </fields>
5961                 <links>
5962                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
5963                 </links>
5964         </class>
5965
5966         <class id="acqfet" controller="open-ils.cstore 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">
5967                 <fields oils_persist:primary="fund">
5968                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
5969                         <field reporter:label="Total Encumbrance Amount" name="amount" reporter:datatype="money" />
5970                 </fields>
5971                 <links>
5972                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
5973                 </links>
5974         </class>
5975
5976         <class id="acqfst" controller="open-ils.cstore 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">
5977                 <fields oils_persist:primary="fund">
5978                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
5979                         <field reporter:label="Total Spent Amount" name="amount" reporter:datatype="money" />
5980                 </fields>
5981                 <links>
5982                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
5983                 </links>
5984         </class>
5985
5986         <class id="acqfcb" controller="open-ils.cstore 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">
5987                 <fields oils_persist:primary="fund">
5988                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
5989                         <field reporter:label="Balance after Spent and Encumbered" name="amount" reporter:datatype="money" />
5990                 </fields>
5991                 <links>
5992                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
5993                 </links>
5994         </class>
5995
5996    <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">
5997         <fields oils_persist:primary="fund">
5998             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
5999             <field reporter:label="Total Allocation Amount" name="amount" reporter:datatype="money" />
6000         </fields>
6001         <links>
6002             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6003         </links>
6004     </class>
6005
6006    <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">
6007         <fields oils_persist:primary="fund">
6008             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6009             <field reporter:label="Total Encumbered Amount" name="amount" reporter:datatype="money" />
6010         </fields>
6011         <links>
6012             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6013         </links>
6014     </class>
6015
6016    <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">
6017         <fields oils_persist:primary="fund">
6018             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6019             <field reporter:label="Total Spent Amount" name="amount" reporter:datatype="money" />
6020         </fields>
6021         <links>
6022             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6023         </links>
6024     </class>
6025
6026    <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">
6027         <fields oils_persist:primary="fund">
6028             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6029             <field reporter:label="Total Spent Balance" name="amount" reporter:datatype="money" />
6030         </fields>
6031         <links>
6032             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6033         </links>
6034     </class>
6035
6036    <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">
6037         <fields oils_persist:primary="fund">
6038             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6039             <field reporter:label="Total Combined Balance" name="amount" reporter:datatype="money" />
6040         </fields>
6041         <links>
6042             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6043         </links>
6044     </class>
6045
6046         <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">
6047                 <fields oils_persist:primary="funding_source">
6048                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
6049                         <field reporter:label="Total Credits to Funding Source" name="amount" reporter:datatype="money" />
6050                 </fields>
6051                 <links>
6052                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
6053                 </links>
6054         </class>
6055
6056         <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">
6057                 <fields oils_persist:primary="funding_source">
6058                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
6059                         <field reporter:label="Total Allocated from Funding Source" name="amount" reporter:datatype="money" />
6060                 </fields>
6061                 <links>
6062                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
6063                 </links>
6064         </class>
6065
6066         <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">
6067                 <fields oils_persist:primary="funding_source">
6068                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
6069                         <field reporter:label="Balance Remaining" name="amount" reporter:datatype="money" />
6070                 </fields>
6071                 <links>
6072                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
6073                 </links>
6074         </class>
6075
6076         <class id="acqfsb" controller="open-ils.cstore 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">
6077                 <fields oils_persist:primary="fund">
6078                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6079                         <field reporter:label="Balance after Spent" name="amount" reporter:datatype="money" />
6080                 </fields>
6081                 <links>
6082                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6083                 </links>
6084         </class>
6085
6086         <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">
6087                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_allocation_id_seq">
6088                         <field reporter:label="Allocation ID" name="id" reporter:datatype="id" />
6089                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
6090                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
6091                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6092                         <field reporter:label="Allocating User" name="allocator" reporter:datatype="link" />
6093                         <field reporter:label="Note" name="note" reporter:datatype="text" />
6094                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
6095                 </fields>
6096                 <links>
6097                         <link field="allocator" reltype="has_a" key="id" map="" class="au"/>
6098                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6099                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
6100                 </links>
6101                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6102                         <actions>
6103                                 <create permission="ADMIN_ACQ_FUND">
6104                     <context link="fund" field="org"/>
6105                 </create>
6106                                 <retrieve permission="ADMIN_ACQ_FUND">
6107                     <context link="fund" field="org"/>
6108                 </retrieve>
6109                                 <update permission="ADMIN_ACQ_FUND">
6110                     <context link="fund" field="org"/>
6111                 </update>
6112                                 <delete permission="ADMIN_ACQ_FUND">
6113                     <context link="fund" field="org"/>
6114                 </delete>
6115                         </actions>
6116                 </permacrud>
6117         </class>
6118
6119     <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">
6120         <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_allocation_percent_id_seq">
6121             <field reporter:label="Allocation ID" name="id" reporter:datatype="id" />
6122             <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
6123             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
6124             <field reporter:label="Fund Code" name="fund_code" reporter:datatype="text" />
6125             <field reporter:label="Percent" name="percent" reporter:datatype="float" />
6126             <field reporter:label="Allocating User" name="allocator" reporter:datatype="link" />
6127             <field reporter:label="Note" name="note" reporter:datatype="text" />
6128             <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
6129         </fields>
6130         <links>
6131             <link field="allocator" reltype="has_a" key="id" map="" class="au"/>
6132             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
6133             <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
6134         </links>
6135                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6136                         <actions>
6137                                 <create permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
6138                                 <retrieve permission="VIEW_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
6139                                 <update permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
6140                                 <delete permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
6141                         </actions>
6142                 </permacrud>
6143     </class>
6144
6145         <class id="acqpl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::picklist" oils_persist:tablename="acq.picklist" reporter:label="Selection List">
6146                 <fields oils_persist:primary="id" oils_persist:sequence="acq.picklist_id_seq">
6147                         <field reporter:label="Selection List ID" name="id" reporter:datatype="id" reporter:selector='name' />
6148                         <field reporter:label="Owner" name="owner" reporter:datatype="link" />
6149                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit" />
6150                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
6151                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
6152                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
6153                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link" />
6154                         <field reporter:label="Entry Count" name="entry_count" oils_persist:virtual="true"/>
6155                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
6156                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
6157                 </fields>
6158                 <links>
6159                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
6160                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6161                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6162                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
6163                         <link field="entries" reltype="has_many" key="picklist" map="" class="jub"/>
6164                 </links>
6165                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6166                         <actions>
6167                                 <retrieve permission="CREATE_PICKLIST VIEW_PICKLIST" context_field="org_unit"/>
6168                         </actions>
6169                 </permacrud>
6170         </class>
6171
6172         <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">
6173                 <fields oils_persist:primary="id" oils_persist:sequence="acq.cancel_reason_id_seq">
6174                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
6175                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
6176                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
6177                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
6178                         <field reporter:label="Keep Debits?" name="keep_debits" reporter:datatype="bool"/>
6179                 </fields>
6180                 <links>
6181                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
6182                 </links>
6183                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6184                         <actions>
6185                                 <create permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
6186                                 <retrieve permission="STAFF_LOGIN" context_field="org_unit"/>
6187                                 <update permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
6188                                 <delete permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
6189                         </actions>
6190                 </permacrud>
6191         </class>
6192
6193         <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">
6194                 <fields oils_persist:primary="id" oils_persist:sequence="acq.purchase_order_id_seq">
6195                         <field reporter:label="Purchase Order ID" name="id" reporter:datatype="id" reporter:selector='name'/>
6196                         <field reporter:label="Owner" name="owner" reporter:datatype="link" />
6197                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
6198                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
6199                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
6200                         <field reporter:label="State" name="state" reporter:datatype="text" />
6201                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="org_unit" />
6202                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
6203                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
6204                         <field reporter:label="Order Date" name="order_date" reporter:datatype="timestamp" />
6205                         <field reporter:label="Name" name="name" reporter:datatype="text" />
6206                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
6207                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
6208                         <field reporter:label="Line Items" name="lineitems" oils_persist:virtual="true" reporter:datatype="link" />
6209                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link" />
6210                         <field reporter:label="Line Item Count" name="lineitem_count" oils_persist:virtual="true" reporter:datatype="int" />
6211                         <field reporter:label="Amount Encumbered" name="amount_encumbered" oils_persist:virtual="true" reporter:datatype="float" />
6212                         <field reporter:label="Amount Spent" name="amount_spent" oils_persist:virtual="true" reporter:datatype="float" />
6213                         <field reporter:label="PO Items" name="po_items" oils_persist:virtual="true" reporter:datatype="link" />
6214                 </fields>
6215                 <links>
6216                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
6217                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6218                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6219                         <link field="default_fund" reltype="has_a" key="id" map="" class="acqf"/>
6220                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
6221                         <link field="lineitems" reltype="has_many" key="purchase_order" map="" class="jub"/>
6222                         <link field="po_items" reltype="has_many" key="purchase_order" map="" class="acqpoi"/>
6223                         <link field="notes" reltype="has_many" key="purchase_order" map="" class="acqpon"/>
6224                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
6225                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
6226                 </links>
6227                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6228                         <actions>
6229                                 <create permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
6230                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER" context_field="ordering_agency"/>
6231                                 <update permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
6232                                 <delete permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
6233                         </actions>
6234                 </permacrud>
6235         </class>
6236
6237         <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">
6238                 <fields oils_persist:primary="audit_id" oils_persist:sequence="acq.acq_purchase_order_pkey_seq">
6239                         <field reporter:label="Audit ID" name="audit_id" reporter:datatype="id"/>
6240                         <field reporter:label="Audit Time" name="audit_time" reporter:datatype="timestamp"/>
6241                         <field reporter:label="Audit Action" name="audit_action" reporter:datatype="text"/>
6242                         <field reporter:label="Purchase Order ID" name="id" reporter:datatype="link"/>
6243                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
6244                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
6245                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
6246                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="link"/>
6247                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
6248                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
6249                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
6250                         <field reporter:label="State" name="state" reporter:datatype="text"/>
6251                         <field reporter:label="Order Date" name="order_date" reporter:datatype="timestamp"/>
6252                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
6253                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link"/>
6254                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
6255                 </fields>
6256                 <links>
6257                         <link field="id" reltype="has_a" key="id" map="" class="acqpo"/>
6258                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
6259                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6260                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6261                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
6262                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
6263                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
6264                 </links>
6265                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6266             <actions>
6267                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER" context_field="ordering_agency"/>
6268             </actions>
6269                 </permacrud>
6270         </class>
6271
6272         <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">
6273                 <fields oils_persist:primary="id" oils_persist:sequence="acq.po_note_id_seq">
6274                         <field reporter:label="PO Note ID" name="id" reporter:datatype="id" />
6275                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />
6276                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
6277                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
6278                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
6279                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
6280                         <field reporter:label="Vote Value" name="value" reporter:datatype="text" />
6281                         <field reporter:label="Vendor Public" name="vendor_public" reporter:datatype="bool" />
6282                 </fields>
6283                 <links>
6284                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6285                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6286                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
6287                 </links>
6288                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6289             <actions>
6290                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
6291                     <context link="purchase_order" field="ordering_agency"/>
6292                 </retrieve>
6293                 <create permission="CREATE_PURCHASE_ORDER">
6294                     <context link="purchase_order" field="ordering_agency"/>
6295                 </create>
6296                 <update permission="CREATE_PURCHASE_ORDER">
6297                     <context link="purchase_order" field="ordering_agency"/>
6298                 </update>
6299                 <delete permission="CREATE_PURCHASE_ORDER">
6300                     <context link="purchase_order" field="ordering_agency"/>
6301                 </delete>
6302             </actions>
6303                 </permacrud>
6304         </class>
6305
6306         <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">
6307                 <fields oils_persist:primary="id" oils_persist:sequence="acq.po_item_id_seq">
6308                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6309                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
6310                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
6311                         <field reporter:label="Invoice Item Type" name="inv_item_type" reporter:datatype="link"/>
6312                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
6313                         <field reporter:label="Author" name="author" reporter:datatype="text"/>
6314                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6315                         <field reporter:label="Estimated Cost" name="estimated_cost" reporter:datatype="money"/>
6316                         <field reporter:label="Fund" name="fund" reporter:datatype="link"/>
6317                         <field reporter:label="Target" name="target" reporter:datatype="int" />
6318                 </fields>
6319                 <links>
6320                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
6321                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
6322                         <link field="inv_item_type" reltype="has_a" key="code" map="" class="aiit"/>
6323                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6324                 </links>
6325                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6326             <actions>
6327                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
6328                     <context link="purchase_order" field="ordering_agency"/>
6329                 </retrieve>
6330                 <create permission="CREATE_PURCHASE_ORDER">
6331                     <context link="purchase_order" field="ordering_agency"/>
6332                 </create>
6333                 <update permission="CREATE_PURCHASE_ORDER">
6334                     <context link="purchase_order" field="ordering_agency"/>
6335                 </update>
6336                 <delete permission="CREATE_PURCHASE_ORDER">
6337                     <context link="purchase_order" field="ordering_agency"/>
6338                 </delete>
6339             </actions>
6340                 </permacrud>
6341         </class>
6342
6343         <class id="jub" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::lineitem" oils_persist:tablename="acq.lineitem" reporter:label="Line Item">
6344                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_id_seq">
6345                         <field reporter:label="Lineitem ID" name="id" reporter:datatype="id" />
6346                         <field reporter:label="Selecting User" name="selector" reporter:datatype="link" />
6347                         <field reporter:label="Selection List" name="picklist" reporter:datatype="link" />
6348                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />
6349                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
6350                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
6351                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
6352                         <field reporter:label="MARC" name="marc" reporter:datatype="text" />
6353                         <field reporter:label="Evergreen Bib ID" name="eg_bib_id" reporter:datatype="link" />
6354                         <field reporter:label="Source Label" name="source_label" reporter:datatype="text" />
6355                         <field reporter:label="Expected Receive Date" name="expected_recv_time" reporter:datatype="timestamp" />
6356                         <field reporter:label="State" name="state" reporter:datatype="text" />
6357                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
6358                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
6359                         <field reporter:label="Claim Policy" name="claim_policy" reporter:datatype="link" />
6360                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
6361                         <field reporter:label="Estimated Unit Price" name="estimated_unit_price" reporter:datatype="money" />
6362                         <field reporter:label="Item Count" name="item_count" oils_persist:virtual="true" reporter:datatype="int" />
6363                         <field reporter:label="Descriptive Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link" />
6364                         <field reporter:label="Line Item Details" name="lineitem_details" oils_persist:virtual="true" reporter:datatype="link" />
6365                         <field reporter:label="Line Item Notes" name="lineitem_notes" oils_persist:virtual="true" reporter:datatype="link" />
6366                         <field reporter:label="Distribution Formulas" name="distribution_formulas" oils_persist:virtual="true" reporter:datatype="link" />
6367                         <field reporter:label="Invoice Entries" name="invoice_entries" oils_persist:virtual="true" reporter:datatype="link" />
6368                         <field reporter:label="Order Summary" name="order_summary" oils_persist:virtual="true" reporter:datatype="link" />
6369                 </fields>
6370                 <links>
6371                         <link field="selector" reltype="has_a" key="id" map="" class="au"/>
6372                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6373                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6374                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
6375                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
6376                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl"/>
6377                         <link field="eg_bib_id" reltype="has_a" key="id" map="" class="bre"/>
6378                         <link field="attributes" reltype="has_many" key="lineitem" map="" class="acqlia"/>
6379                         <link field="lineitem_details" reltype="has_many" key="lineitem" map="" class="acqlid"/>
6380                         <link field="lineitem_notes" reltype="has_many" key="lineitem" map="" class="acqlin"/>
6381                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
6382                         <link field="distribution_formulas" reltype="has_many" key="lineitem" map="" class="acqdfa"/>
6383                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
6384                         <link field="invoice_entries" reltype="has_many" key="lineitem" map="" class="acqie"/>
6385                         <link field="order_summary" reltype="might_have" key="lineitem" map="" class="acqlisum"/>
6386                 </links>
6387                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6388                         <actions>
6389                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER CREATE_PICKLIST VIEW_PICKLIST">
6390                                         <context link="purchase_order" field="ordering_agency"/>
6391                                         <context link="picklist" field="org_unit"/>
6392                                 </retrieve>
6393                         </actions>
6394                 </permacrud>
6395         </class>
6396
6397         <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">
6398                 <fields oils_persist:primary="audit_id" oils_persist:sequence="acq.acq_lineitem_pkey_seq">
6399                         <field reporter:label="Audit ID" name="audit_id" reporter:datatype="id"/>
6400                         <field reporter:label="Audit Time" name="audit_time" reporter:datatype="timestamp"/>
6401                         <field reporter:label="Audit Action" name="audit_action" reporter:datatype="text"/>
6402                         <field reporter:label="Lineitem ID" name="id" reporter:datatype="link"/>
6403                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
6404                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
6405                         <field reporter:label="Selector" name="selector" reporter:datatype="link"/>
6406                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
6407                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
6408                         <field reporter:label="Selection List" name="picklist" reporter:datatype="link"/>
6409                         <field reporter:label="Expected Receive Time" name="expected_recv_time" reporter:datatype="timestamp"/>
6410                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
6411                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
6412                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
6413                         <field reporter:label="Evergreen Bib ID" name="eg_bib_id" reporter:datatype="link"/>
6414                         <field reporter:label="Source Label" name="source_label" reporter:datatype="text"/>
6415                         <field reporter:label="State" name="state" reporter:datatype="text"/>
6416                         <field reporter:label="Claim Policy" name="claim_policy" reporter:datatype="link"/>
6417                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link"/>
6418                         <field reporter:label="Estimated Unit Price" name="estimated_unit_price" reporter:datatype="money" />
6419                 </fields>
6420                 <links>
6421                         <link field="id" reltype="has_a" key="id" map="" class="jub"/>
6422                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6423                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6424                         <link field="selector" reltype="has_a" key="id" map="" class="au"/>
6425                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
6426                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
6427                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl"/>
6428                         <link field="eg_bib_id" reltype="has_a" key="id" map="" class="bre"/>
6429                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
6430                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
6431                 </links>
6432                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6433                         <actions>
6434                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
6435                                         <context link="purchase_order" field="ordering_agency"/>
6436                                         <context link="picklist" field="org_unit"/>
6437                                 </retrieve>
6438                         </actions>
6439                 </permacrud>
6440         </class>
6441
6442         <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">
6443                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_alert_text_id_seq">
6444                         <field reporter:label="Alert Text ID" name="id" reporter:datatype="id"/>
6445                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
6446                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
6447                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link"/>
6448                 </fields>
6449                 <links>
6450                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
6451                 </links>
6452                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6453                         <actions>
6454                                 <create permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
6455                                 <retrieve permission="STAFF_LOGIN" context_field="owning_lib"/>
6456                                 <update permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
6457                                 <delete permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
6458                         </actions>
6459                 </permacrud>
6460         </class>
6461
6462         <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">
6463                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_note_id_seq">
6464                         <field reporter:label="PO Line Item Note ID" name="id" reporter:datatype="id" />
6465                         <field reporter:label="Line Item" name="lineitem" reporter:datatype="link" />
6466                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
6467                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
6468                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
6469                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
6470                         <field reporter:label="Note Value" name="value" reporter:datatype="text" />
6471                         <field reporter:label="Alert Text" name="alert_text" reporter:datatype="link" />
6472                         <field reporter:label="Vendor Public" name="vendor_public" reporter:datatype="bool" />
6473                 </fields>
6474                 <links>
6475                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6476                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6477                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
6478                         <link field="alert_text" reltype="has_a" key="id" map="" class="acqliat"/>
6479                 </links>
6480         </class>
6481
6482         <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">
6483                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_id_seq">
6484                         <field reporter:label="Attribute Value ID" name="id" reporter:datatype="id" />
6485                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link" />
6486                         <field reporter:label="Type" name="attr_type" reporter:datatype="text" />
6487                         <field reporter:label="Name" name="attr_name" reporter:datatype="text" />
6488                         <field reporter:label="Value" name="attr_value" reporter:datatype="text" />
6489                         <field reporter:label="Definition" name="definition" reporter:datatype="text" />
6490                 </fields>
6491                 <links>
6492                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
6493                         <link field="definition" reltype="has_a" key="id" map="" class="acqliad"/>
6494                 </links>
6495         </class>
6496
6497         <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">
6498                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_detail_id_seq">
6499                         <field reporter:label="Item Detail ID" name="id" reporter:datatype="id" />
6500                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
6501                         <field reporter:label="Evergreen Copy ID" name="eg_copy_id" reporter:datatype="link" />
6502                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text" />
6503                         <field reporter:label="Call Number Label" name="cn_label" reporter:datatype="text" />
6504                         <field reporter:label="Actual Receive Date" name="recv_time" reporter:datatype="timestamp" />
6505                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
6506                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link" />
6507                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" />
6508                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link" />
6509                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="link" />
6510                         <field reporter:label="Note" name="note" reporter:datatype="text" />
6511                         <field reporter:label="Collection Code" name="collection_code" reporter:datatype="text" />
6512                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
6513                         <field reporter:label="Claims" name="claims" reporter:datatype="link" oils_persist:virtual="true" />
6514                 </fields>
6515                 <links>
6516                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
6517                         <link field="eg_copy_id" reltype="has_a" key="id" map="" class="acp"/>
6518                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6519                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
6520                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
6521                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
6522                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
6523                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
6524                         <link field="claims" reltype="has_many" key="lineitem_detail" map="" class="acqcl"/>
6525                 </links>
6526         </class>
6527
6528         <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">
6529                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
6530                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
6531                         <field reporter:label="Code" name="code" reporter:datatype="text" />
6532                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
6533                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
6534                 </fields>
6535                 <links/>
6536                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6537                         <actions>
6538                                 <retrieve />
6539                         </actions>
6540                 </permacrud>
6541         </class>
6542
6543         <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">
6544                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
6545                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
6546                         <field reporter:label="Code" name="code" reporter:datatype="text" />
6547                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
6548                         <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
6549                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
6550             <field reporter:label="Remove" name="remove" reporter:datatype="text" />
6551                 </fields>
6552                 <links/>
6553         <permacrud>
6554             <actions>
6555                 <create permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
6556                 <retrieve />
6557                 <update permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
6558                 <delete permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
6559             </actions>
6560         </permacrud>
6561         </class>
6562
6563         <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">
6564                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
6565                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
6566                         <field reporter:label="Code" name="code" reporter:datatype="text" />
6567                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
6568                         <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
6569                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
6570                 </fields>
6571                 <links/>
6572         </class>
6573         <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">
6574                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
6575                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
6576                         <field reporter:label="Code" name="code" reporter:datatype="text" />
6577                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
6578                         <field reporter:label="User" name="usr" reporter:datatype="link" />
6579                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
6580                 </fields>
6581                 <links>
6582                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6583                 </links>
6584         </class>
6585
6586         <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">
6587             <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
6588                 <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
6589                 <field reporter:label="Code" name="code" reporter:datatype="text" />
6590                 <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
6591                 <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
6592                 <field reporter:label="Provider" name="provider" reporter:datatype="link" />
6593                 <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
6594         <field reporter:label="Remove" name="remove" reporter:datatype="text" />
6595
6596             </fields>
6597             <links>
6598                 <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
6599             </links>
6600             <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6601                 <actions>
6602                     <create permission="ADMIN_PROVIDER">
6603                         <context link="provider" field="owner"/>
6604                     </create>
6605                     <retrieve permission="ADMIN_PROVIDER">
6606                         <context link="provider" field="owner"/>
6607                     </retrieve>
6608                     <update permission="ADMIN_PROVIDER">
6609                         <context link="provider" field="owner"/>
6610                     </update>
6611                     <delete permission="ADMIN_PROVIDER">
6612                         <context link="provider" field="owner"/>
6613                     </delete>
6614                 </actions>
6615             </permacrud>
6616         </class>
6617         
6618         <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">
6619             <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_holding_subfield_map_id_seq">
6620                 <field reporter:label="ID" name="id" reporter:datatype="id" />
6621                 <field reporter:label="Provider" name="provider" reporter:datatype="link" />
6622                 <field reporter:label="Name" name="name" reporter:datatype="text" />
6623                 <field reporter:label="Subfield" name="subfield" reporter:datatype="text" />
6624             </fields>
6625             <links>
6626                 <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
6627             </links>
6628             <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6629                 <actions>
6630                     <create permission="ADMIN_PROVIDER">
6631                         <context link="provider" field="owner"/>
6632                     </create>
6633                     <retrieve permission="ADMIN_PROVIDER">
6634                         <context link="provider" field="owner"/>
6635                     </retrieve>
6636                     <update permission="ADMIN_PROVIDER">
6637                         <context link="provider" field="owner"/>
6638                     </update>
6639                     <delete permission="ADMIN_PROVIDER">
6640                         <context link="provider" field="owner"/>
6641                     </delete>
6642                 </actions>
6643             </permacrud>
6644         </class>
6645         
6646         <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">
6647             <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
6648                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
6649                         <field reporter:label="Code" name="code" reporter:datatype="text" />
6650                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
6651                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
6652                 </fields>
6653                 <links/>
6654         </class>
6655
6656         <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">
6657                 <fields oils_persist:primary="id" oils_persist:sequence="config.remote_account_id_seq"><!-- edi_account inherits from config.remote_account, hence the seq -->
6658                         <field name="id"            reporter:datatype="id"        reporter:label="EDI Account ID" reporter:selector="label"/>
6659                         <field name="label"         reporter:datatype="text"      reporter:label="Label"/>
6660                         <field name="host"          reporter:datatype="text"      reporter:label="Host"/>
6661                         <field name="username"      reporter:datatype="text"      reporter:label="Username"/>
6662                         <field name="password"      reporter:datatype="text"      reporter:label="Password"/>
6663                         <field name="account"       reporter:datatype="text"      reporter:label="Account"/>
6664                         <field name="path"          reporter:datatype="text"      reporter:label="Path"/>
6665                         <field name="owner"         reporter:datatype="link"      reporter:label="Owner"/>
6666                         <field name="last_activity" reporter:datatype="timestamp" reporter:label="Last Activity"/>
6667                         <field name="provider"      reporter:datatype="link"      reporter:label="Provider"/>
6668                         <field name="in_dir"        reporter:datatype="text"      reporter:label="Incoming Directory"/>
6669                         <field name="vendacct"      reporter:datatype="text"      reporter:label="Vendor Account Number"/>
6670                         <field name="vendcode"      reporter:datatype="text"      reporter:label="Vendor Assigned Code"/>
6671                 </fields>
6672                 <links>
6673                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
6674                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6675                 </links>
6676         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6677             <actions>
6678                 <create permission="ADMIN_PROVIDER">
6679                     <context link="provider" field="owner"/>
6680                 </create>
6681                 <retrieve permission="ADMIN_PROVIDER">
6682                     <context link="provider" field="owner"/>
6683                 </retrieve>
6684                 <update permission="ADMIN_PROVIDER">
6685                     <context link="provider" field="owner"/>
6686                 </update>
6687                 <delete permission="ADMIN_PROVIDER">
6688                     <context link="provider" field="owner"/>
6689                 </delete>
6690             </actions>
6691         </permacrud>
6692         </class>
6693
6694         <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">
6695                 <fields oils_persist:primary="id" oils_persist:sequence="acq.edi_message_id_seq">
6696                         <field name="id"               reporter:datatype="id"        reporter:label="EDI Message ID"/>
6697                         <field name="account"          reporter:datatype="link"      reporter:label="EDI Account"/>
6698                         <field name="remote_file"      reporter:datatype="text"      reporter:label="Filename"/>
6699                         <field name="create_time"      reporter:datatype="timestamp" reporter:label="Time Created"/>
6700                         <field name="translate_time"   reporter:datatype="timestamp" reporter:label="Time Translated"/>
6701                         <field name="process_time"     reporter:datatype="timestamp" reporter:label="Time Processed"/>
6702                         <field name="error_time"       reporter:datatype="timestamp" reporter:label="Time of Error"/>
6703                         <field name="status"           reporter:datatype="text"      reporter:label="Status"/>
6704                         <field name="edi"              reporter:datatype="text"      reporter:label="EDI Message Body"/>
6705                         <field name="jedi"             reporter:datatype="text"      reporter:label="JEDI Message Body"/>
6706                         <field name="error"            reporter:datatype="text"      reporter:label="Error"/>
6707                         <field name="purchase_order"   reporter:datatype="link"      reporter:label="Purchase Order"/>
6708                         <field name="message_type"     reporter:datatype="text"      reporter:label="Message Type"/>
6709                 </fields>
6710                 <links>
6711                         <link field="account" reltype="has_a" key="id" map="" class="acqedi"/>
6712                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
6713                 </links>
6714         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6715             <actions>
6716                 <retrieve permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
6717                     <context link="account" jump="provider" field="owner"/>
6718                 </retrieve>
6719                 <update   permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
6720                     <context link="account" jump="provider" field="owner"/>
6721                 </update>
6722                 <delete   permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
6723                     <context link="account" jump="provider" field="owner"/>
6724                 </delete>
6725             </actions>
6726         </permacrud>
6727         </class>
6728
6729
6730         <class id="rof" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::output_folder" oils_persist:tablename="reporter.output_folder" reporter:label="Output Folder">
6731                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.output_folder_id_seq">
6732                         <field name="id" reporter:datatype="id" />
6733                         <field name="parent" reporter:datatype="link"/>
6734                         <field name="owner" reporter:datatype="link"/>
6735                         <field name="create_time" reporter:datatype="timestamp"/>
6736                         <field name="name" reporter:datatype="text"/>
6737                         <field name="shared" reporter:datatype="bool"/>
6738                         <field name="share_with" reporter:datatype="link"/>
6739                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
6740                         <field name="outputs" oils_persist:virtual="true" reporter:datatype="link"/>
6741                 </fields>
6742                 <links>
6743                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
6744                         <link field="parent" reltype="has_a" key="id" map="" class="rof"/>
6745                         <link field="children" reltype="has_many" key="parent" map="" class="rof"/>
6746                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
6747                         <link field="outputs" reltype="has_many" key="folder" map="" class="rs"/>
6748                 </links>
6749         </class>
6750         <class id="rtf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::template_folder" oils_persist:tablename="reporter.template_folder" reporter:label="Template Folder">
6751                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_folder_id_seq">
6752                         <field name="id" reporter:datatype="id" />
6753                         <field name="parent" reporter:datatype="link"/>
6754                         <field name="owner" reporter:datatype="link"/>
6755                         <field name="create_time" reporter:datatype="timestamp"/>
6756                         <field name="name" reporter:datatype="text"/>
6757                         <field name="shared" reporter:datatype="bool"/>
6758                         <field name="share_with" reporter:datatype="link"/>
6759                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
6760                         <field name="templates" oils_persist:virtual="true" reporter:datatype="link"/>
6761                 </fields>
6762                 <links>
6763                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
6764                         <link field="parent" reltype="has_a" key="id" map="" class="rtf"/>
6765                         <link field="children" reltype="has_many" key="parent" map="" class="rtf"/>
6766                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
6767                         <link field="templates" reltype="has_many" key="folder" map="" class="rt"/>
6768                 </links>
6769         </class>
6770         <class id="rrf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report_folder" oils_persist:tablename="reporter.report_folder" reporter:label="Report Folder">
6771                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_folder_id_seq">
6772                         <field name="id" reporter:datatype="id" />
6773                         <field name="parent" reporter:datatype="link"/>
6774                         <field name="owner" reporter:datatype="link"/>
6775                         <field name="create_time" reporter:datatype="timestamp"/>
6776                         <field name="name" reporter:datatype="text"/>
6777                         <field name="shared" reporter:datatype="bool"/>
6778                         <field name="share_with" reporter:datatype="link"/>
6779                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
6780                         <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>
6781                 </fields>
6782                 <links>
6783                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
6784                         <link field="parent" reltype="has_a" key="id" map="" class="rrf"/>
6785                         <link field="children" reltype="has_many" key="parent" map="" class="rrf"/>
6786                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
6787                         <link field="reports" reltype="has_many" key="folder" map="" class="rr"/>
6788                 </links>
6789         </class>
6790         <class id="rt" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::template" oils_persist:tablename="reporter.template" reporter:label="Template">
6791                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_id_seq">
6792                         <field name="id" reporter:datatype="id" />
6793                         <field name="owner" reporter:datatype="link"/>
6794                         <field name="create_time" reporter:datatype="timestamp"/>
6795                         <field name="name" reporter:datatype="text"/>
6796                         <field name="data" reporter:datatype="text"/>
6797                         <field name="folder" reporter:datatype="link"/>
6798                         <field name="description" reporter:datatype="text"/>
6799                         <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>
6800                 </fields>
6801                 <links>
6802                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
6803                         <link field="folder" reltype="has_a" key="id" map="" class="rtf"/>
6804                         <link field="reports" reltype="has_many" key="template" map="" class="rr"/>
6805                 </links>
6806         </class>
6807         <class id="rr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report" oils_persist:tablename="reporter.report" reporter:label="Report">
6808                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_id_seq">
6809                         <field name="id" reporter:datatype="id" />
6810                         <field name="owner" reporter:datatype="link"/>
6811                         <field name="create_time" reporter:datatype="timestamp"/>
6812                         <field name="template" reporter:datatype="link"/>
6813                         <field name="data" reporter:datatype="text"/>
6814                         <field name="folder" reporter:datatype="link"/>
6815                         <field name="recur" reporter:datatype="bool"/>
6816                         <field name="recurrence" reporter:datatype="interval"/>
6817                         <field name="name" reporter:datatype="text"/>
6818                         <field name="description" reporter:datatype="text"/>
6819                         <field name="runs" oils_persist:virtual="true" reporter:datatype="link"/>
6820                 </fields>
6821                 <links>
6822                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
6823                         <link field="template" reltype="has_a" key="id" map="" class="rt"/>
6824                         <link field="folder" reltype="has_a" key="id" map="" class="rrf"/>
6825                         <link field="runs" reltype="has_many" key="report" map="" class="rs"/>
6826                 </links>
6827         </class>
6828         <class id="rs" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::schedule" oils_persist:tablename="reporter.schedule" reporter:label="Schedule">
6829                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.schedule_id_seq">
6830                         <field name="id" reporter:datatype="id" />
6831                         <field name="runner" reporter:datatype="link"/>
6832                         <field name="start_time" reporter:datatype="timestamp"/>
6833                         <field name="complete_time" reporter:datatype="timestamp"/>
6834                         <field name="run_time" reporter:datatype="timestamp"/>
6835                         <field name="email" reporter:datatype="text"/>
6836                         <field name="excel_format" reporter:datatype="bool"/>
6837                         <field name="csv_format" reporter:datatype="bool"/>
6838                         <field name="html_format" reporter:datatype="bool"/>
6839                         <field name="error_code" reporter:datatype="int"/>
6840                         <field name="error_text" reporter:datatype="text"/>
6841                         <field name="report" reporter:datatype="link"/>
6842                         <field name="folder" reporter:datatype="link"/>
6843                         <field name="chart_pie" reporter:datatype="bool"/>
6844                         <field name="chart_bar" reporter:datatype="bool"/>
6845                         <field name="chart_line" reporter:datatype="bool"/>
6846                 </fields>
6847                 <links>
6848                         <link field="runner" reltype="has_a" key="id" map="" class="au"/>
6849                         <link field="report" reltype="has_a" key="id" map="" class="rr"/>
6850                         <link field="folder" reltype="has_a" key="id" map="" class="rof"/>
6851                 </links>
6852         </class>
6853         <class id="rmsr" controller="open-ils.reporter-store open-ils.cstore" oils_obj:fieldmapper="reporter::materialized_simple_record" oils_persist:tablename="reporter.materialized_simple_record" reporter:label="Fast Simple Record Extracts">
6854                 <fields oils_persist:primary="id">
6855                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
6856                         <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>
6857                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
6858                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
6859                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
6860                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
6861                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
6862                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
6863                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
6864                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
6865                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
6866                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
6867                 </fields>
6868                 <links>
6869                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
6870                 </links>
6871         </class>
6872         <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">
6873                 <fields oils_persist:primary="id">
6874                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
6875                         <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>
6876                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
6877                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
6878                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
6879                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
6880                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
6881                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
6882                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
6883                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
6884                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
6885                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
6886                 </fields>
6887                 <links>
6888                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
6889                 </links>
6890         </class>
6891         <class id="rsr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::simple_record" oils_persist:tablename="reporter.simple_record" reporter:label="Simple Record">
6892                 <fields oils_persist:primary="id">
6893                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
6894                         <field reporter:label="Metarecord" name="metarecord" reporter:datatype="link"/>
6895                         <field reporter:label="Fingerprint" name="fingerprint" />
6896                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
6897                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
6898                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
6899                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
6900                         <field reporter:label="Uniform Title (normalized)" name="uniform_title" reporter:datatype="text"/>
6901                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
6902                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
6903                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
6904                         <field reporter:label="Series Title (normalized)" name="series_title" reporter:datatype="text"/>
6905                         <field reporter:label="Series Statement (normalized)" name="series_statement" reporter:datatype="text"/>
6906                         <field reporter:label="Summary (normalized)" name="summary" reporter:datatype="text"/>
6907                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
6908                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
6909                         <field reporter:label="Topic Subjects (normalized)" name="topic_subject" reporter:datatype="text"/>
6910                         <field reporter:label="Geographic Subjects (normalized)" name="geographic_subject" reporter:datatype="text"/>
6911                         <field reporter:label="Genres (normalized)" name="genre" reporter:datatype="text"/>
6912                         <field reporter:label="Personal Name Subjects (normalized)" name="name_subject" reporter:datatype="text"/>
6913                         <field reporter:label="Corporate Name Subjects (normalized)" name="corporate_subject" reporter:datatype="text"/>
6914                         <field reporter:label="External URI List (normalized)" name="external_uri" reporter:datatype="text"/>
6915                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
6916                 </fields>
6917                 <links>
6918                         <link field="metarecord" reltype="has_a" key="id" map="" class="mmr"/>
6919                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
6920                 </links>
6921         </class>
6922         <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">
6923                 <fields oils_persist:primary="id">
6924                         <field reporter:label="User ID" name="id" reporter:datatype="id" />
6925                         <field reporter:label="Date of Birth" name="dob" reporter:datatype="timestamp"/>
6926                         <field reporter:label="General Demographic Division" name="general_division" reporter:datatype="text"/>
6927                 </fields>
6928                 <links>
6929                         <link field="id" reltype="might_have" key="id" map="" class="au"/>
6930                 </links>
6931         </class>
6932         <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">
6933                 <fields oils_persist:primary="id">
6934                         <field reporter:label="Circulation ID" name="id" reporter:datatype="id" />
6935                         <field reporter:label="Circulation Type" name="type" reporter:datatype="text"/>
6936                 </fields>
6937                 <links>
6938                         <link field="id" reltype="might_have" key="id" map="" class="circ"/>
6939                 </links>
6940         </class>
6941         <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">
6942                 <fields oils_persist:primary="id">
6943                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
6944                         <field reporter:label="Hold Target" name="target" reporter:datatype="int" />
6945                         <field reporter:label="Hold Request Type" name="hold_type" reporter:datatype="text"/>
6946                         <field reporter:label="Target Bib Record" name="bib_record" reporter:datatype="link"/>
6947                 </fields>
6948                 <links>
6949                         <link field="id" reltype="might_have" key="id" map="" class="ahr"/>
6950                         <link field="bib_record" reltype="has_a" key="id" map="" class="bre"/>
6951                 </links>
6952         </class>
6953         <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">
6954                 <fields oils_persist:primary="xact">
6955                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />
6956                         <field reporter:label="Unvoided Billing Amount" name="unvoided" reporter:datatype="int" />
6957                         <field reporter:label="Voided Billing Amount" name="voided" reporter:datatype="money"/>
6958                         <field reporter:label="Total Billing Amount" name="total" reporter:datatype="money"/>
6959                 </fields>
6960                 <links>
6961                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
6962                 </links>
6963         </class>
6964         <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">
6965                 <fields oils_persist:primary="xact">
6966                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />
6967                         <field reporter:label="Unvoided Paid Amount" name="unvoided" reporter:datatype="int" />
6968                         <field reporter:label="Voided (Returned) Paid Amount" name="voided" reporter:datatype="money"/>
6969                         <field reporter:label="Total Paid Amount" name="total" reporter:datatype="money"/>
6970                 </fields>
6971                 <links>
6972                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
6973                 </links>
6974         </class>
6975         <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)">
6976                 <fields oils_persist:primary="id">
6977                         <field reporter:label="Bib ID" name="id" reporter:datatype="id" />
6978                         <field reporter:label="Update Time" name="holding_update" reporter:datatype="timestamp" />
6979                         <field reporter:label="Update Type" name="update_type" reporter:datatype="text" />
6980                 </fields>
6981                 <links>
6982                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
6983                 </links>
6984         </class>
6985         <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">
6986                 <fields oils_persist:primary="id">
6987                         <field reporter:label="Copy ID" name="id" reporter:datatype="int" />
6988                         <field reporter:label="Total Circulation Count" name="circ_count" reporter:datatype="int" />
6989                 </fields>
6990                 <links>
6991                         <link field="id" reltype="has_a" key="id" map="" class="acp"/>
6992                 </links>
6993         </class>
6994         <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">
6995                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_id_seq">
6996                         <field reporter:label="Formula ID" name="id" reporter:datatype="id"/>
6997                         <field reporter:label="Formula Owner" name="owner" reporter:datatype="org_unit"/>
6998                         <field reporter:label="Formula Name" name="name" reporter:datatype="text"/>
6999                         <field reporter:label="Skip Count" name="skip_count" reporter:datatype="int"/>
7000                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
7001                         <field reporter:label="Use Count" name="use_count" oils_persist:virtual="true" reporter:datatype="int"/>
7002                 </fields>
7003                 <links>
7004                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7005                         <link field="entries" reltype="has_many" key="formula" map="" class="acqdfe"/>
7006                 </links>
7007                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7008                         <actions>
7009                                 <create permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
7010                                 <retrieve permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
7011                                 <update permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
7012                                 <delete permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
7013                         </actions>
7014                 </permacrud>
7015         </class>
7016         <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">
7017                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_entry_id_seq">
7018                         <field reporter:label="Entry ID" name="id" reporter:datatype="id"/>
7019                         <field reporter:label="Formula ID" name="formula" reporter:datatype="link"/>
7020                         <field reporter:label="Position" name="position" reporter:datatype="int"/>
7021                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
7022                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
7023                         <field reporter:label="Location" name="location" reporter:datatype="link"/>
7024                 </fields>
7025                 <links>
7026                         <link field="formula" reltype="has_a" key="id" map="" class="acqdf"/>
7027                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
7028                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
7029                 </links>
7030                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7031                         <actions>
7032                                 <create permission="ADMIN_ACQ_DISTRIB_FORMULA">
7033                                         <context link="formula" field="owner"/>
7034                                 </create>
7035                                 <retrieve permission="ADMIN_ACQ_DISTRIB_FORMULA">
7036                                         <context link="formula" field="owner"/>
7037                                 </retrieve>
7038                                 <update permission="ADMIN_ACQ_DISTRIB_FORMULA">
7039                                         <context link="formula" field="owner"/>
7040                                 </update>
7041                                 <delete permission="ADMIN_ACQ_DISTRIB_FORMULA">
7042                                         <context link="formula" field="owner"/>
7043                                 </delete>
7044                         </actions>
7045                 </permacrud>
7046         </class>
7047
7048         <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">
7049                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_application_id_seq">
7050                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7051                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
7052                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
7053                         <field reporter:label="Distribution Formula" name="formula" reporter:datatype="link"/>
7054                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
7055                 </fields>
7056                 <links>
7057                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7058                         <link field="formula" reltype="has_a" key="id" map="" class="acqdf"/>
7059                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
7060                 </links>
7061                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7062                         <actions>
7063                                 <create permission="CREATE_PURCHASE_ORDER">
7064                                         <context link="formula" field="owner"/>
7065                 </create>
7066                                 <retrieve permission="CREATE_PURCHASE_ORDER">
7067                                         <context link="formula" field="owner"/>
7068                 </retrieve>
7069                                 <update permission="CREATE_PURCHASE_ORDER">
7070                                         <context link="formula" field="owner"/>
7071                 </update>
7072                                 <delete permission="CREATE_PURCHASE_ORDER">
7073                                         <context link="formula" field="owner"/>
7074                 </delete>
7075                         </actions>
7076                 </permacrud>
7077         </class>
7078
7079         <class id="acqda" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::debit_attribution" oils_persist:tablename="acq.debit_attribution" reporter:label="Debit Attribution">
7080                 <fields oils_persist:primary="id">
7081                         <field reporter:label="Debit Attribution ID" name="id" reporter:datatype="id"/>
7082                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
7083                         <field reporter:label="Debit Amount" name="debit_amount" reporter:datatype="money"/>
7084                         <field reporter:label="Funding Source Credit" name="funding_source_credit" reporter:datatype="link"/>
7085                         <field reporter:label="Credit Amount" name="credit_amount" reporter:datatype="money"/>
7086                 </fields>
7087                 <links>
7088                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
7089                         <link field="funding_source_credit" reltype="has_a" key="id" map="" class="acqfscred"/>
7090                 </links>
7091                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7092                 </permacrud>
7093         </class>
7094
7095         <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">
7096                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_type_id_seq">
7097                         <field reporter:label="Claim Type ID" name="id" reporter:datatype="id" reporter:selector="code" />
7098                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
7099                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
7100                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
7101                 </fields>
7102                 <links>
7103                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
7104                 </links>
7105                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7106                         <actions>
7107                                 <create permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
7108                                 <retrieve permission="ADMIN_ACQ_CLAIM_TYPE ADMIN_ACQ_CLAIM VIEW_CLAIM MANAGE_CLAIM" context_field="org_unit"/>
7109                                 <update permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
7110                                 <delete permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
7111                         </actions>
7112                 </permacrud>
7113         </class>
7114
7115         <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">
7116                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_event_type_id_seq">
7117                         <field reporter:label="Claim Event Type ID" name="id" reporter:datatype="id" reporter:selector="code" />
7118                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
7119                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
7120                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
7121                         <field reporter:label="Library Initiated" name="library_initiated" reporter:datatype="bool"/>
7122                 </fields>
7123                 <links>
7124                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
7125                 </links>
7126                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7127                         <actions>
7128                                 <create permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
7129                                 <retrieve permission="ADMIN_ACQ_CLAIM_EVENT_TYPE ADMIN_ACQ_CLAIM VIEW_CLAIM MANAGE_CLAIM" context_field="org_unit"/>
7130                                 <update permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
7131                                 <delete permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
7132                         </actions>
7133                 </permacrud>
7134         </class>
7135
7136         <class id="acqcl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::claim" oils_persist:tablename="acq.claim" reporter:label="Claim">
7137                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_id_seq">
7138                         <field reporter:label="Claim ID" name="id" reporter:datatype="id"/>
7139                         <field reporter:label="Claim Type" name="type" reporter:datatype="link"/>
7140                         <field reporter:label="Lineitem Detail" name="lineitem_detail" reporter:datatype="link"/>
7141                 </fields>
7142                 <links>
7143                         <link field="type" reltype="has_a" key="id" map="" class="acqclt"/>
7144                         <link field="lineitem_detail" reltype="has_a" key="id" map="" class="acqlid"/>
7145                 </links>
7146                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7147                 </permacrud>
7148         </class>
7149
7150         <class id="acqcle" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::claim_event" oils_persist:tablename="acq.claim_event" reporter:label="Claim Event">
7151                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_event_id_seq">
7152                         <field reporter:label="Claim Event ID" name="id" reporter:datatype="id"/>
7153                         <field reporter:label="Claim Event Type" name="type" reporter:datatype="link"/>
7154                         <field reporter:label="Claim ID" name="claim" reporter:datatype="link"/>
7155                         <field reporter:label="Event Date" name="event_date" reporter:datatype="timestamp"/>
7156                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
7157                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7158                 </fields>
7159                 <links>
7160                         <link field="type" reltype="has_a" key="id" map="" class="acqclet"/>
7161                         <link field="claim" reltype="has_a" key="id" map="" class="acqcl"/>
7162                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7163                 </links>
7164                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7165                 </permacrud>
7166         </class>
7167
7168         <class id="acqscl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::serial_claim" oils_persist:tablename="acq.serial_claim" reporter:label="Serial Claim">
7169                 <fields oils_persist:primary="id" oils_persist:sequence="acq.serial_claim_id_seq">
7170                         <field reporter:label="Claim ID" name="id" reporter:datatype="id"/>
7171                         <field reporter:label="Claim Type" name="type" reporter:datatype="link"/>
7172                         <field reporter:label="Serial Item" name="item" reporter:datatype="link"/>
7173                 </fields>
7174                 <links>
7175                         <link field="type" reltype="has_a" key="id" map="" class="acqclt"/>
7176                         <link field="item" reltype="has_a" key="id" map="" class="sitem"/>
7177                 </links>
7178                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7179                 </permacrud>
7180         </class>
7181
7182         <class id="acqscle" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::serial_claim_event" oils_persist:tablename="acq.serial_claim_event" reporter:label="Serial Claim Event">
7183                 <fields oils_persist:primary="id" oils_persist:sequence="acq.serial_claim_event_id_seq">
7184                         <field reporter:label="Claim Event ID" name="id" reporter:datatype="id"/>
7185                         <field reporter:label="Claim Event Type" name="type" reporter:datatype="link"/>
7186                         <field reporter:label="Claim ID" name="claim" reporter:datatype="link"/>
7187                         <field reporter:label="Event Date" name="event_date" reporter:datatype="timestamp"/>
7188                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
7189                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7190                 </fields>
7191                 <links>
7192                         <link field="type" reltype="has_a" key="id" map="" class="acqclet"/>
7193                         <link field="claim" reltype="has_a" key="id" map="" class="acqscl"/>
7194                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7195                 </links>
7196                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7197                 </permacrud>
7198         </class>
7199
7200         <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">
7201                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_policy_id_seq">
7202                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
7203                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
7204                         <field reporter:label="Claim Policy Name" name="name" reporter:datatype="text"/>
7205                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
7206                 </fields>
7207                 <links>
7208                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
7209                 </links>
7210                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7211             <actions>
7212                 <create   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
7213                 <retrieve permission="ADMIN_CLAIM_POLICY VIEW_PROVIDER" context_field="org_unit"/>
7214                 <update   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
7215                 <delete   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
7216             </actions>
7217                 </permacrud>
7218         </class>
7219
7220         <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">
7221                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_policy_action_id_seq">
7222                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="action"/>
7223                         <field reporter:label="Claim Policy ID" name="claim_policy" reporter:datatype="link"/>
7224                         <field reporter:label="Action Interval" name="action_interval" reporter:datatype="interval"/>
7225                         <field reporter:label="Action (Event Type)" name="action" reporter:datatype="link"/>
7226                 </fields>
7227                 <links>
7228                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
7229                         <link field="action" reltype="has_a" key="id" map="" class="acqclet"/>
7230                 </links>
7231                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7232                         <actions>
7233                                 <create permission="ADMIN_CLAIM_POLICY">
7234                                         <context link="claim_policy" field="org_unit"/>
7235                 </create>
7236                                 <retrieve permission="ADMIN_CLAIM_POLICY VIEW_PROVIDER">
7237                                         <context link="claim_policy" field="org_unit"/>
7238                 </retrieve>
7239                                 <update permission="ADMIN_CLAIM_POLICY">
7240                                         <context link="claim_policy" field="org_unit"/>
7241                 </update>
7242                                 <delete permission="ADMIN_CLAIM_POLICY">
7243                                         <context link="claim_policy" field="org_unit"/>
7244                 </delete>
7245                         </actions>
7246                 </permacrud>
7247         </class>
7248
7249     <class id="stgu" controller="open-ils.cstore" oils_obj:fieldmapper="staging::user_stage" oils_persist:tablename="staging.user_stage" reporter:label="User Stage">
7250         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.usr_stage_row_id_seq">
7251             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
7252             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
7253             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
7254             <field reporter:label="Main (Profile) Permission Group" name="profile" reporter:datatype="text"/>
7255             <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
7256             <field reporter:label="Password" name="passwd" reporter:datatype="text"/>
7257             <field reporter:label="Primary Identification Type" name="ident_type" reporter:datatype="int"/>
7258             <field reporter:label="First Name" name="first_given_name" reporter:datatype="text"/>
7259             <field reporter:label="Middle Name" name="second_given_name" reporter:datatype="text"/>
7260             <field reporter:label="Last Name" name="family_name" reporter:datatype="text"/>
7261             <field reporter:label="Daytime Phone" name="day_phone" reporter:datatype="text"/>
7262             <field reporter:label="Evening Phone" name="evening_phone" reporter:datatype="text"/>
7263             <field reporter:label="Home Library" name="home_ou" reporter:datatype="int"/>
7264             <field reporter:label="Date of Birth" name="dob" reporter:datatype="text"/>
7265             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
7266         </fields>
7267     </class>
7268
7269     <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">
7270         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.card_stage_row_id_seq">
7271             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
7272             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
7273             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
7274             <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
7275             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
7276         </fields>
7277     </class>
7278
7279     <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">
7280         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.mailing_address_stage_row_id_seq">
7281             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
7282             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
7283             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
7284             <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
7285             <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
7286             <field reporter:label="City" name="city" reporter:datatype="text"/>
7287             <field reporter:label="State" name="state" reporter:datatype="text"/>
7288             <field reporter:label="Country" name="country" reporter:datatype="text"/>
7289             <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
7290             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
7291         </fields>
7292     </class>
7293
7294     <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">
7295         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.billing_address_stage_row_id_seq">
7296             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
7297             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
7298             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
7299             <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
7300             <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
7301             <field reporter:label="City" name="city" reporter:datatype="text"/>
7302             <field reporter:label="State" name="state" reporter:datatype="text"/>
7303             <field reporter:label="Country" name="country" reporter:datatype="text"/>
7304             <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
7305             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
7306         </fields>
7307     </class>
7308
7309     <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">
7310         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.statcat_stage_row_id_seq">
7311             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
7312             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
7313             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
7314             <field reporter:label="Stat Cat ID" name="statcat" reporter:datatype="text"/>
7315             <field reporter:label="Stat Cat Value" name="value" reporter:datatype="text"/>
7316             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
7317         </fields>
7318     </class>
7319
7320         <class id="afs" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::fieldset" oils_persist:tablename="action.fieldset" reporter:label="Fieldset">
7321                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_id_seq">
7322                         <field reporter:label="Fieldset ID" name="id" reporter:datatype="id"/>
7323                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
7324                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link"/>
7325                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
7326                         <field reporter:label="Creation Time" name="creation_time" reporter:datatype="timestamp"/>
7327                         <field reporter:label="Scheduled Time" name="scheduled_time" reporter:datatype="timestamp"/>
7328                         <field reporter:label="Applied Time" name="applied_time" reporter:datatype="timestamp"/>
7329                         <field reporter:label="Class Name" name="classname" reporter:datatype="text"/>
7330                         <field reporter:label="Fieldset Name" name="name" reporter:datatype="text"/>
7331                         <field reporter:label="Stored Query" name="stored_query" reporter:datatype="link"/>
7332                         <field reporter:label="Primary Key Value" name="pkey_value" reporter:datatype="text"/>
7333                 </fields>
7334                 <links>
7335                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7336                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
7337                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
7338                 </links>
7339                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7340                 </permacrud>
7341         </class>
7342
7343         <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">
7344                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_col_val_id_seq">
7345                         <field reporter:label="Column Value ID" name="id" reporter:datatype="id"/>
7346                         <field reporter:label="Fieldset ID" name="fieldset" reporter:datatype="link"/>
7347                         <field reporter:label="Column Name" name="col" reporter:datatype="text"/>
7348                         <field reporter:label="Column Value" name="val" reporter:datatype="text"/>
7349                 </fields>
7350                 <links>
7351                         <link field="fieldset" reltype="has_a" key="id" map="" class="afs"/>
7352                 </links>
7353                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7354                 </permacrud>
7355         </class>
7356
7357     <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">
7358         <fields>
7359             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
7360             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
7361             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
7362         </fields>
7363                 <links>
7364                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
7365                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
7366                 </links>
7367     </class>
7368
7369     <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">
7370         <fields>
7371             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
7372             <field reporter:label="Min Loop" name="min" reporter:datatype="int"/>
7373         </fields>
7374                 <links>
7375                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
7376                 </links>
7377     </class>
7378
7379     <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">
7380         <fields>
7381             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
7382             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
7383             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
7384         </fields>
7385                 <links>
7386                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
7387                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
7388                 </links>
7389     </class>
7390
7391     <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">
7392         <fields>
7393             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
7394             <field reporter:label="Max Loop" name="max" reporter:datatype="int"/>
7395         </fields>
7396                 <links>
7397                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
7398                 </links>
7399     </class>
7400
7401     <class id="aufhol" controller="open-ils.cstore" oils_obj:fieldmapper="action::unfulfilled_hold_outermost_loop" oils_persist:readonly="true">
7402                 <oils_persist:source_definition>
7403
7404             SELECT  DISTINCT l.*
7405               FROM  action.unfulfilled_hold_loops l
7406                     JOIN action.unfulfilled_hold_max_loop m USING (hold)
7407               WHERE l.count = m.max
7408
7409                 </oils_persist:source_definition>
7410         <fields>
7411             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
7412             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
7413             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
7414         </fields>
7415                 <links>
7416                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
7417                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
7418                 </links>
7419     </class>
7420
7421         <class id="qsq" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::stored_query" oils_persist:tablename="query.stored_query" reporter:label="Stored Query">
7422                 <fields oils_persist:primary="id" oils_persist:sequence="query.stored_query_id_seq">
7423                         <field reporter:label="Query ID" name="id" reporter:datatype="id"/>
7424                         <field reporter:label="Query type" name="type" reporter:datatype="text"/>
7425                         <field reporter:label="Use ALL" name="use_all" reporter:datatype="bool"/>
7426                         <field reporter:label="Use DISTINCT" name="use_distinct" reporter:datatype="bool"/>
7427                         <field reporter:label="FROM Clause" name="from_clause" reporter:datatype="link"/>
7428                         <field reporter:label="WHERE Clause" name="where_clause" reporter:datatype="link"/>
7429                         <field reporter:label="HAVING Clause" name="having_clause" reporter:datatype="link"/>
7430                         <field reporter:label="LIMIT count" name="limit_count" reporter:datatype="link"/>
7431                         <field reporter:label="OFFSET count" name="offset_count" reporter:datatype="link"/>
7432                 </fields>
7433                 <links>
7434                         <link field="from_clause" reltype="has_a" key="id" map="" class="qfr"/>
7435                         <link field="having_clause" reltype="has_a" key="id" map="" class="qxp"/>
7436                         <link field="where_clause" reltype="has_a" key="id" map="" class="qxp"/>
7437                         <link field="limit_count" reltype="has_a" key="id" map="" class="qxp"/>
7438                         <link field="offset_count" reltype="has_a" key="id" map="" class="qxp"/>
7439                 </links>
7440                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7441                 </permacrud>
7442         </class>
7443
7444         <class id="qseq" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::query_sequence" oils_persist:tablename="query.query_sequence" reporter:label="Query Sequence">
7445                 <fields oils_persist:primary="id" oils_persist:sequence="query.query_sequence_id_seq">
7446                         <field reporter:label="Query Seq ID" name="id" reporter:datatype="id"/>
7447                         <field reporter:label="Parent Query" name="parent_query" reporter:datatype="link"/>
7448                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7449                         <field reporter:label="Child Query" name="child_query" reporter:datatype="link"/>
7450                 </fields>
7451                 <links>
7452                         <link field="parent_query" reltype="has_a" key="id" map="" class="qsq"/>
7453                         <link field="child_query" reltype="has_a" key="id" map="" class="qsq"/>
7454                 </links>
7455                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7456                 </permacrud>
7457         </class>
7458
7459         <class id="qdt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::datatype" oils_persist:tablename="query.datatype" reporter:label="Datatype">
7460                 <fields oils_persist:primary="id" oils_persist:sequence="query.datatype_id_seq">
7461                         <field reporter:label="Datatype ID" name="id" reporter:datatype="id"/>
7462                         <field reporter:label="Datatype Name" name="datatype_name" reporter:datatype="text"/>
7463                         <field reporter:label="Is Numeric" name="is_numeric" reporter:datatype="bool"/>
7464                         <field reporter:label="Is Composite" name="is_composite" reporter:datatype="bool"/>
7465                 </fields>
7466                 <links>
7467                 </links>
7468                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7469                 </permacrud>
7470         </class>
7471
7472         <class id="qsf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::subfield" oils_persist:tablename="query.subfield" reporter:label="Subfield">
7473                 <fields oils_persist:primary="id" oils_persist:sequence="query.subfield_id_seq">
7474                         <field reporter:label="Subfield ID" name="id" reporter:datatype="id"/>
7475                         <field reporter:label="Composite Type" name="composite_type" reporter:datatype="link"/>
7476                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7477                         <field reporter:label="Subfield Type" name="subfield_type" reporter:datatype="link"/>
7478                 </fields>
7479                 <links>
7480                         <link field="composite_type" reltype="has_a" key="id" map="" class="qdt"/>
7481                         <link field="subfield_type" reltype="has_a" key="id" map="" class="qdt"/>
7482                 </links>
7483                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7484                 </permacrud>
7485         </class>
7486         
7487         <class id="qfs" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::function_sig" oils_persist:tablename="query.function_sig" reporter:label="Function Signature">
7488                 <fields oils_persist:primary="id" oils_persist:sequence="query.function_sig_id_seq">
7489                         <field reporter:label="Function Signature ID" name="id" reporter:datatype="id"/>
7490                         <field reporter:label="Function Name" name="function_name" reporter:datatype="text"/>
7491                         <field reporter:label="Return Type" name="return_type" reporter:datatype="link"/>
7492                         <field reporter:label="Is Aggregate" name="is_aggregate" reporter:datatype="bool"/>
7493                 </fields>
7494                 <links>
7495                         <link field="return_type" reltype="has_a" key="id" map="" class="qdt"/>
7496                 </links>
7497                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7498                 </permacrud>
7499         </class>
7500         
7501         <class id="qfpd" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::function_param_def" oils_persist:tablename="query.function_param_def" reporter:label="Function Parameter Definition">
7502                 <fields oils_persist:primary="id" oils_persist:sequence="query.function_param_def_id_seq">
7503                         <field reporter:label="Function Param Def ID" name="id" reporter:datatype="id"/>
7504                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
7505                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7506                         <field reporter:label="Datatype" name="datatype" reporter:datatype="link"/>
7507                 </fields>
7508                 <links>
7509                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
7510                         <link field="datatype" reltype="has_a" key="id" map="" class="qdt"/>
7511                 </links>
7512                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7513                 </permacrud>
7514         </class>
7515
7516         <class id="qbv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::bind_variable" oils_persist:tablename="query.bind_variable" reporter:label="Bind Variable">
7517                 <fields oils_persist:primary="name">
7518                         <field reporter:label="Name" name="name" reporter:datatype="id"/>
7519                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
7520                         <field reporter:label="Type" name="type" reporter:datatype="text"/>
7521                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
7522                         <field reporter:label="Default Value" name="default_value" reporter:datatype="text"/>
7523                         <field reporter:label="Actual Value" name="actual_value" oils_persist:virtual="true" reporter:datatype="text"/>
7524                 </fields>
7525                 <links>
7526                 </links>
7527                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7528                 </permacrud>
7529         </class>
7530
7531         <class id="qxp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::expression" oils_persist:tablename="query.expression" reporter:label="Expression">
7532                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
7533                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
7534                         <field reporter:label="Expression Type" name="type" reporter:datatype="text"/>
7535                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
7536                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
7537                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7538                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
7539                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
7540                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
7541                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
7542                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
7543                         <field reporter:label="Right Operand" name="right_operand" reporter:datatype="link"/>
7544                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
7545                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
7546                         <field reporter:label="Cast Type" name="cast_type" reporter:datatype="link"/>
7547                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
7548                         <field reporter:label="Bind Variable" name="bind_variable" reporter:datatype="link"/>
7549                 </fields>
7550                 <links>
7551                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
7552                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
7553                         <link field="right_operand" reltype="has_a" key="id" map="" class="qxp"/>
7554                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
7555                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
7556                         <link field="cast_type" reltype="has_a" key="id" map="" class="qdt"/>
7557                         <link field="bind_variable" reltype="has_a" key="name" map="" class="qbv"/>
7558                 </links>
7559                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7560                 </permacrud>
7561         </class>
7562
7563         <class id="qcb" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::case_branch" oils_persist:tablename="query.case_branch" reporter:label="Case Branch">
7564                 <fields oils_persist:primary="id" oils_persist:sequence="query.case_branch_id_seq">
7565                         <field reporter:label="Case Branch ID" name="id" reporter:datatype="id"/>
7566                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
7567                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7568                         <field reporter:label="Condition" name="condition" reporter:datatype="link"/>
7569                         <field reporter:label="Result" name="result" reporter:datatype="link"/>
7570                 </fields>
7571                 <links>
7572                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
7573                         <link field="condition" reltype="has_a" key="id" map="" class="qxp"/>
7574                         <link field="result" reltype="has_a" key="id" map="" class="qxp"/>
7575                 </links>
7576                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7577                 </permacrud>
7578         </class>
7579
7580         <class id="qfr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::from_relation" oils_persist:tablename="query.from_relation" reporter:label="From Relation">
7581                 <fields oils_persist:primary="id" oils_persist:sequence="query.from_relation_id_seq">
7582                         <field reporter:label="From Relation ID" name="id" reporter:datatype="id"/>
7583                         <field reporter:label="From Relation Type" name="type" reporter:datatype="text"/>
7584                         <field reporter:label="Table Name" name="table_name" reporter:datatype="text"/>
7585                         <field reporter:label="Class Name" name="class_name" reporter:datatype="text"/>
7586                         <field reporter:label="Subquery ID" name="subquery" reporter:datatype="link"/>
7587                         <field reporter:label="Function Call ID" name="function_call" reporter:datatype="link"/>
7588                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
7589                         <field reporter:label="Parent Relation ID" name="parent_relation" reporter:datatype="link"/>
7590                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7591                         <field reporter:label="Join Type" name="join_type" reporter:datatype="text"/>
7592                         <field reporter:label="On Clause ID" name="on_clause" reporter:datatype="link"/>
7593                 </fields>
7594                 <links>
7595                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
7596                         <link field="function_call" reltype="has_a" key="id" map="" class="qxp"/>
7597                         <link field="parent_relation" reltype="has_a" key="id" map="" class="qfr"/>
7598                         <link field="on_clause" reltype="has_a" key="id" map="" class="qxp"/>
7599                 </links>
7600                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7601                 </permacrud>
7602         </class>
7603
7604         <class id="qrc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::record_column" oils_persist:tablename="query.record_column" reporter:label="Record Column">
7605                 <fields oils_persist:primary="id" oils_persist:sequence="query.record_column_id_seq">
7606                         <field reporter:label="Record Column ID" name="id" reporter:datatype="id"/>
7607                         <field reporter:label="From Relation ID" name="from_relation" reporter:datatype="link"/>
7608                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7609                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
7610                         <field reporter:label="Column Type" name="column_type" reporter:datatype="link"/>
7611                 </fields>
7612                 <links>
7613                         <link field="from_relation" reltype="has_a" key="id" map="" class="qfr"/>
7614                         <link field="column_type" reltype="has_a" key="id" map="" class="qdt"/>
7615                 </links>
7616                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7617                 </permacrud>
7618         </class>
7619
7620         <class id="qsi" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::select_item" oils_persist:tablename="query.select_item" reporter:label="Select Item">
7621                 <fields oils_persist:primary="id" oils_persist:sequence="query.select_item_id_seq">
7622                         <field reporter:label="Select Item ID" name="id" reporter:datatype="id"/>
7623                         <field reporter:label="Stored Query ID" name="stored_query" reporter:datatype="link"/>
7624                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7625                         <field reporter:label="Expression" name="expression" reporter:datatype="link"/>
7626                         <field reporter:label="Column Alias" name="column_alias" reporter:datatype="text"/>
7627                         <field reporter:label="Is Grouped By" name="grouped_by" reporter:datatype="bool"/>
7628                 </fields>
7629                 <links>
7630                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
7631                         <link field="expression" reltype="has_a" key="id" map="" class="qxp"/>
7632                 </links>
7633                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7634                 </permacrud>
7635         </class>
7636
7637         <class id="qobi" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::order_by_item" oils_persist:tablename="query.order_by_item" reporter:label="Order By Item">
7638                 <fields oils_persist:primary="id" oils_persist:sequence="query.order_by_item_id_seq">
7639                         <field reporter:label="Order By Item ID" name="id" reporter:datatype="id"/>
7640                         <field reporter:label="Stored Query ID" name="stored_query" reporter:datatype="link"/>
7641                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7642                         <field reporter:label="Expression" name="expression" reporter:datatype="link"/>
7643                 </fields>
7644                 <links>
7645                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
7646                         <link field="expression" reltype="has_a" key="id" map="" class="qxp"/>
7647                 </links>
7648                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7649                 </permacrud>
7650         </class>
7651
7652         <class id="xbet" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::expr_xbet" oils_persist:tablename="query.expr_xbet" reporter:label="Between Expression">
7653                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
7654                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
7655                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
7656                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
7657                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7658                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
7659                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
7660                 </fields>
7661                 <links>
7662                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
7663                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
7664                 </links>
7665                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7666                 </permacrud>
7667         </class>
7668
7669         <class id="xbind" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::expr_xbind" oils_persist:tablename="query.expr_xbind" reporter:label="Bind Variable Expression">
7670                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
7671                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
7672                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
7673                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
7674                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7675                         <field reporter:label="Bind Variable" name="bind_variable" reporter:datatype="link"/>
7676                 </fields>
7677                 <links>
7678                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
7679                         <link field="bind_variable" reltype="has_a" key="name" map="" class="qbv"/>
7680                 </links>
7681                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7682                 </permacrud>
7683         </class>
7684
7685         <class id="xbool" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::expr_xbool" oils_persist:tablename="query.expr_xbool" reporter:label="Boolean Expression">
7686                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
7687                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
7688                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
7689                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
7690                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7691                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
7692                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
7693                 </fields>
7694                 <links>
7695                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
7696                 </links>
7697                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7698                 </permacrud>
7699         </class>
7700
7701         <class id="xcase" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::expr_xcase" oils_persist:tablename="query.expr_xcase" reporter:label="Case Expression">
7702                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
7703                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
7704                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
7705                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
7706                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7707                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
7708                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
7709                 </fields>
7710                 <links>
7711                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
7712                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
7713                 </links>
7714                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7715                 </permacrud>
7716         </class>
7717
7718         <class id="xcast" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::expr_xcast" oils_persist:tablename="query.expr_xcast" reporter:label="Cast Expression">
7719                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
7720                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
7721                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
7722                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
7723                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7724                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
7725                         <field reporter:label="Cast Type" name="cast_type" reporter:datatype="link"/>
7726                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
7727                 </fields>
7728                 <links>
7729                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
7730                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
7731                         <link field="cast_type" reltype="has_a" key="id" map="" class="qdt"/>
7732                 </links>
7733                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7734                 </permacrud>
7735         </class>
7736
7737         <class id="xcol" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::expr_xcol" oils_persist:tablename="query.expr_xcol" reporter:label="Column Expression">
7738                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
7739                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
7740                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
7741                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
7742                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7743                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
7744                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
7745                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
7746                 </fields>
7747                 <links>
7748                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
7749                 </links>
7750                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7751                 </permacrud>
7752         </class>
7753
7754         <class id="xex" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::expr_xex" oils_persist:tablename="query.expr_xex" reporter:label="Exists Expression">
7755                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
7756                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
7757                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
7758                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
7759                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7760                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
7761                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
7762                 </fields>
7763                 <links>
7764                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
7765                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
7766                 </links>
7767                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7768                 </permacrud>
7769         </class>
7770
7771         <class id="xfunc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::expr_xfunc" oils_persist:tablename="query.expr_xfunc" reporter:label="Function Expression">
7772                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
7773                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
7774                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
7775                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
7776                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7777                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
7778                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
7779                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
7780                 </fields>
7781                 <links>
7782                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
7783                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
7784                 </links>
7785                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7786                 </permacrud>
7787         </class>
7788
7789         <class id="xin" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::expr_xin" oils_persist:tablename="query.expr_xin" reporter:label="In Expression">
7790                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
7791                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
7792                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
7793                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
7794                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7795                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
7796                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
7797                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
7798                 </fields>
7799                 <links>
7800                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
7801                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
7802                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
7803                 </links>
7804                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7805                 </permacrud>
7806         </class>
7807
7808         <class id="xisnull" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::expr_xisnull" oils_persist:tablename="query.expr_xisnull" reporter:label="IS NULL Expression">
7809                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
7810                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
7811                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
7812                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
7813                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7814                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
7815                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
7816                 </fields>
7817                 <links>
7818                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
7819                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
7820                 </links>
7821                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7822                 </permacrud>
7823         </class>
7824
7825         <class id="xnull" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::expr_xnull" oils_persist:tablename="query.expr_xnull" reporter:label="Null Expression">
7826                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
7827                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
7828                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
7829                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
7830                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7831                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
7832                 </fields>
7833                 <links>
7834                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
7835                 </links>
7836                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7837                 </permacrud>
7838         </class>
7839
7840         <class id="xnum" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::expr_xnum" oils_persist:tablename="query.expr_xnum" reporter:label="Number Expression">
7841                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
7842                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
7843                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
7844                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
7845                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7846                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
7847                 </fields>
7848                 <links>
7849                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
7850                 </links>
7851                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7852                 </permacrud>
7853         </class>
7854
7855         <class id="xop" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::expr_xop" oils_persist:tablename="query.expr_xop" reporter:label="Operator Expression">
7856                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
7857                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
7858                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
7859                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
7860                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7861                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
7862                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
7863                         <field reporter:label="Right Operand" name="right_operand" reporter:datatype="link"/>
7864                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
7865                 </fields>
7866                 <links>
7867                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
7868                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
7869                         <link field="right_operand" reltype="has_a" key="id" map="" class="qxp"/>
7870                 </links>
7871                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7872                 </permacrud>
7873         </class>
7874
7875         <class id="xser" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::expr_xser" oils_persist:tablename="query.expr_xser" reporter:label="Operator Expression">
7876                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
7877                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
7878                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
7879                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
7880                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7881                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
7882                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
7883                 </fields>
7884                 <links>
7885                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
7886                 </links>
7887                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7888                 </permacrud>
7889         </class>
7890
7891         <class id="xstr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::expr_xstr" oils_persist:tablename="query.expr_xstr" reporter:label="String Expression">
7892                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
7893                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
7894                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
7895                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
7896                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7897                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
7898                 </fields>
7899                 <links>
7900                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
7901                 </links>
7902                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7903                 </permacrud>
7904         </class>
7905
7906         <class id="xsubq" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::expr_xsubq" oils_persist:tablename="query.expr_xsubq" reporter:label="Subquery Expression">
7907                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
7908                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
7909                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
7910                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
7911                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7912                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
7913                 </fields>
7914                 <links>
7915                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
7916                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
7917                 </links>
7918                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7919                 </permacrud>
7920         </class>
7921
7922         <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">
7923                 <fields oils_persist:primary="id">
7924                         <field reporter:label="Temp ID" name="id" reporter:datatype="id"/>
7925                         <field reporter:label="Type" name="ptype" reporter:datatype="link"/>
7926                         <field reporter:label="Subfield" name="subfield" reporter:datatype="link"/>
7927                         <field reporter:label="Value" name="value" reporter:datatype="link"/>
7928                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
7929                 </fields>
7930                 <links>
7931                         <link field="ptype" reltype="has_a" key="id" map="" class="cmpctm"/>
7932                         <link field="subfield" reltype="has_a" key="id" map="" class="cmpcsm"/>
7933                         <link field="value" reltype="has_a" key="id" map="" class="cmpcvm"/>
7934                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
7935                 </links>
7936         </class>
7937
7938         <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">
7939                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_ff_pos_map_id_seq">
7940                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7941                         <field reporter:label="Fixed Field" name="fixed_field" reporter:datatype="text"/>
7942                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
7943                         <field reporter:label="Record Type" name="rec_type" reporter:datatype="text"/>
7944                         <field reporter:label="Start Postion" name="start_pos" reporter:datatype="int"/>
7945                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
7946                         <field reporter:label="Default Value" name="default_val" reporter:datatype="text"/>
7947                 </fields>
7948                 <links/>
7949                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7950                         <actions>
7951                                 <retrieve/>
7952                         </actions>
7953                 </permacrud>
7954         </class>
7955
7956         <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">
7957                 <fields oils_persist:primary="ptype_key">
7958                         <field reporter:label="Type Key" name="ptype_key" reporter:datatype="id"/>
7959                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
7960                 </fields>
7961                 <links/>
7962                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7963                         <actions>
7964                                 <retrieve/>
7965                         </actions>
7966                 </permacrud>
7967         </class>
7968
7969         <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">
7970                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_physical_characteristic_subfield_map_id_seq">
7971                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7972                         <field reporter:label="Type Key" name="ptype_key" reporter:datatype="link"/>
7973                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
7974                         <field reporter:label="Start Postion" name="start_pos" reporter:datatype="int"/>
7975                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
7976                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
7977                 </fields>
7978                 <links>
7979                         <link field="ptype_key" reltype="has_a" key="id" map="" class="cmpctm"/>
7980                 </links>
7981                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7982                         <actions>
7983                                 <retrieve/>
7984                         </actions>
7985                 </permacrud>
7986         </class>
7987
7988         <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">
7989                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_physical_characteristic_value_map_id_seq">
7990                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7991                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
7992                         <field reporter:label="Subfield" name="ptype_subfield" reporter:datatype="link"/>
7993                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
7994                 </fields>
7995                 <links>
7996                         <link field="ptype_subfield" reltype="has_a" key="id" map="" class="cmpcsm"/>
7997                 </links>
7998                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7999                         <actions>
8000                                 <retrieve/>
8001                         </actions>
8002                 </permacrud>
8003         </class>
8004
8005         <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">
8006                 <fields oils_persist:primary="code">
8007                         <field reporter:label="Code" name="code" reporter:datatype="id"/>
8008                         <field reporter:label="Type Value" name="type_val" reporter:datatype="text"/>
8009                         <field reporter:label="BLvl Value" name="blvl_val" reporter:datatype="text"/>
8010                 </fields>
8011                 <links/>
8012                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8013                         <actions>
8014                                 <retrieve/>
8015                         </actions>
8016                 </permacrud>
8017         </class>
8018
8019         <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">
8020                 <oils_persist:source_definition>
8021
8022             SELECT  b.id,
8023                     MAX(dcp.edit_date) AS last_delete_date
8024              FROM   biblio.record_entry b
8025                     JOIN asset.call_number cn ON (cn.record = b.id)
8026                     JOIN asset.copy dcp ON (cn.id = dcp.call_number)
8027              WHERE  NOT b.deleted
8028              GROUP BY b.id
8029              HAVING SUM( CASE WHEN NOT dcp.deleted THEN 1 ELSE 0 END) = 0 
8030
8031                 </oils_persist:source_definition>
8032                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
8033                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
8034                         <field reporter:label="Delete Date/Time" name="last_delete_date" reporter:datatype="timestamp"/>
8035                 </fields>
8036                 <links>
8037                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
8038                 </links>
8039                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8040                         <actions>
8041                                 <retrieve/>
8042                         </actions>
8043                 </permacrud>
8044         </class>
8045
8046         <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">
8047                 <oils_persist:source_definition>
8048
8049             -- -- 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.
8050             -- -- 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
8051             -- -- may not.
8052             -- SELECT
8053             --     bre.id AS "bib_id",
8054             --     COALESCE( z.copy_count, 0 ) AS "copy_count",
8055             --     COALESCE( z.hold_count, 0 ) AS "hold_count",
8056             --     COALESCE( z.copy_hold_ratio, 0 ) AS "hold_copy_ratio"
8057             -- FROM (
8058                 SELECT
8059                     y.bre AS "id",
8060                     COALESCE( x.copy_count, 0 ) AS "copy_count",
8061                     y.hold_count AS "hold_count",
8062                     (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"
8063                 FROM (
8064                         SELECT
8065                             (SELECT bib_record FROM reporter.hold_request_record r WHERE r.id = h.id LIMIT 1) AS "bre",
8066                             COUNT(*) AS "hold_count"
8067                         FROM action.hold_request h
8068                         WHERE
8069                             cancel_time IS NULL
8070                             AND fulfillment_time IS NULL
8071                             -- AND NOT frozen  -- a frozen hold is still a desired hold, eh?
8072                         GROUP BY 1
8073                     )y LEFT JOIN (
8074                         SELECT 
8075                             (SELECT id
8076                                 FROM biblio.record_entry 
8077                                 WHERE id = (SELECT record FROM asset.call_number WHERE id = call_number)
8078                             ) AS "bre", 
8079                             COUNT(*) AS "copy_count"
8080                         FROM asset.copy
8081                             JOIN asset.copy_location loc ON (copy.location = loc.id AND loc.holdable)
8082                         WHERE copy.holdable 
8083                             AND NOT copy.deleted 
8084                             AND copy.status IN ( SELECT id FROM config.copy_status WHERE holdable ) 
8085                         GROUP BY 1
8086                     )x ON x.bre = y.bre
8087                 -- )z RIGHT JOIN (
8088                 --     SELECT id
8089                 --     FROM biblio.record_entry
8090                 --     WHERE NOT deleted
8091                 -- )bre ON (z.bib_id = bre.id)
8092                 
8093
8094                 </oils_persist:source_definition>
8095                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
8096                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
8097                         <field reporter:label="Holdable Copy Count" name="copy_count" reporter:datatype="int"/>
8098                         <field reporter:label="Active Holds" name="hold_count" reporter:datatype="int"/>
8099                         <field reporter:label="Hold/Copy Ratio" name="hold_copy_ratio" reporter:datatype="float"/>
8100                 </fields>
8101                 <links>
8102                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
8103                 </links>
8104                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8105                         <actions>
8106                                 <retrieve/>
8107                         </actions>
8108                 </permacrud>
8109         </class>
8110
8111         <!-- ********************************************************************************************************************* -->
8112         <!-- What follows is a set of example extensions that are useful for PINES.  Comment out or remove if you don't want them. -->
8113         <!-- ********************************************************************************************************************* -->
8114         <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">
8115                 <fields oils_persist:primary="id">
8116                         <field reporter:label="Circulation" name="id" reporter:datatype="id" />
8117                         <field reporter:label="Library Circulation Location Short (Policy) Name" name="circ_lib" reporter:datatype="text"/>
8118                         <field reporter:label="Library Circulation Location Link" name="circ_lib_id" reporter:datatype="org_unit"/>
8119                         <field reporter:label="Circulation Date/Time" name="xact_start" reporter:datatype="timestamp"/>
8120                         <field reporter:label="Circulation Type" name="circ_type" reporter:datatype="text"/>
8121                         <field reporter:label="Copy Link" name="copy_id" reporter:datatype="link"/>
8122                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
8123                         <field reporter:label="Owning Library Short (Policy) Name" name="owning_lib_name" reporter:datatype="text"/>
8124                         <field reporter:label="Item Language" name="language" reporter:datatype="text"/>
8125                         <field reporter:label="Literary Form" name="lit_form" reporter:datatype="text"/>
8126                         <field reporter:label="MARC Form" name="item_form" reporter:datatype="text"/>
8127                         <field reporter:label="MARC Type" name="item_type" reporter:datatype="text"/>
8128                         <field reporter:label="Shelving Location" name="shelving_location" reporter:datatype="text"/>
8129                         <field reporter:label="Patron Profile Group" name="profile_group" reporter:datatype="text"/>
8130                         <field reporter:label="Patron Age Demographic" name="demographic_general_division" reporter:datatype="text"/>
8131                         <field reporter:label="Call Number Link" name="call_number" reporter:datatype="link"/>
8132                         <field reporter:label="Call Number Label" name="call_number_label" reporter:datatype="text"/>
8133                         <field reporter:label="Call Number Dewey/Prefix" name="dewey" reporter:datatype="text"/>
8134                         <field reporter:label="Patron Link" name="patron_id" reporter:datatype="link"/>
8135                         <field reporter:label="Patron Home Library Link" name="patron_home_lib" reporter:datatype="link"/>
8136                         <field reporter:label="Patron Home Library Short (Policy) Name" name="patron_home_lib_shortname" reporter:datatype="text"/>
8137                         <field reporter:label="Patron County" name="patron_county" reporter:datatype="text"/>
8138                         <field reporter:label="Patron City" name="patron_city" reporter:datatype="text"/>
8139                         <field reporter:label="Patron ZIP Code" name="patron_zip" reporter:datatype="text"/>
8140                         <field reporter:label="Legacy CAT1 Link" name="stat_cat_1" reporter:datatype="link"/>
8141                         <field reporter:label="Legacy CAT2 Link" name="stat_cat_2" reporter:datatype="link"/>
8142                         <field reporter:label="Dewey Range - Tens" name="dewey_range_tens" reporter:datatype="text"/>
8143                         <field reporter:label="Dewey Range - Hundreds" name="dewey_range_hundreds" reporter:datatype="text"/>
8144                         <field reporter:label="Dewey Block - Tens" name="dewey_block_tens" reporter:datatype="text"/>
8145                         <field reporter:label="Dewey Block - Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
8146                         <field reporter:label="Legacy CAT1 Value" name="stat_cat_1_value" reporter:datatype="text"/>
8147                         <field reporter:label="Legacy CAT2 Value" name="stat_cat_2_value" reporter:datatype="text"/>
8148                 </fields>
8149                 <links>
8150                         <link field="id" reltype="has_a" key="id" map="" class="circ"/>
8151                         <link field="copy_id" reltype="has_a" key="id" map="" class="acp"/>
8152                         <link field="patron_id" reltype="has_a" key="id" map="" class="au"/>
8153                         <link field="circ_lib_id" reltype="has_a" key="id" map="" class="aou"/>
8154                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
8155                         <link field="patron_home_lib" reltype="has_a" key="id" map="" class="aou"/>
8156                         <link field="stat_cat_1" reltype="has_a" key="id" map="" class="rsce1"/>
8157                         <link field="stat_cat_2" reltype="has_a" key="id" map="" class="rsce2"/>
8158                 </links>
8159         </class>
8160
8161         <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">
8162                 <fields oils_persist:primary="id">
8163                         <field reporter:label="Entry ID" name="id" reporter:selector="value" reporter:datatype="id" />
8164                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
8165                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
8166                 </fields>
8167                 <links>
8168                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
8169                 </links>
8170         </class>
8171
8172         <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">
8173                 <fields oils_persist:primary="id">
8174                         <field reporter:label="Entry ID" name="id" reporter:selector="value" reporter:datatype="id" />
8175                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
8176                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
8177                 </fields>
8178                 <links>
8179                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
8180                 </links>
8181         </class>
8182
8183         <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">
8184                 <fields oils_persist:primary="id">
8185                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
8186
8187                         <field reporter:label="Billing Location Short (Policy) Name" name="billing_location_shortname" reporter:datatype="text"/>
8188                         <field reporter:label="Billing Location Name" name="billing_location_name" reporter:datatype="text"/>
8189                         <field reporter:label="Billing Location Link" name="billing_location" reporter:datatype="org_unit"/>
8190
8191                         <field reporter:label="User Home Library Short (Policy) Name" name="usr_home_ou_shortname" reporter:datatype="text"/>
8192                         <field reporter:label="User Home Library Name" name="usr_home_ou_name" reporter:datatype="text"/>
8193                         <field reporter:label="User Home Library Link" name="usr_home_ou" reporter:datatype="org_unit"/>
8194
8195                         <field reporter:label="User Barcode" name="barcode" reporter:datatype="text"/>
8196                         <field reporter:label="User Link" name="usr" reporter:datatype="link"/>
8197
8198                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
8199                         <field reporter:label="Transaction End Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
8200                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
8201
8202                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
8203                         <field reporter:label="Total Billed" name="total_owed" reporter:datatype="money"/>
8204
8205                         <field reporter:label="Last Payment Date/Time" name="last_payment_ts" reporter:datatype="timestamp"/>
8206                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
8207                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
8208
8209                         <field reporter:label="Last Billing Date/Time" name="last_billing_ts" reporter:datatype="timestamp"/>
8210                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
8211                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
8212
8213                         <field reporter:label="User Age Demographic" name="demographic_general_division" reporter:datatype="text"/>
8214                         <field reporter:label="User County" name="patron_county" reporter:datatype="text"/>
8215                         <field reporter:label="User City" name="patron_city" reporter:datatype="text"/>
8216                         <field reporter:label="User ZIP Code" name="patron_zip" reporter:datatype="text"/>
8217
8218                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
8219                         <field reporter:label="User Profile Group" name="profile_group" reporter:datatype="text"/>
8220
8221                 </fields>
8222                 <links>
8223                         <link field="id" reltype="has_a" key="id" map="" class="mbt"/>
8224                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
8225                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
8226                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
8227                 </links>
8228         </class>
8229
8230         <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">
8231                 <oils_persist:source_definition>
8232
8233             SELECT
8234                 po.ordering_agency AS ordering_agency,
8235                 po.id AS purchase_order,
8236                 li.id AS lineitem,
8237                 lid.id AS lineitem_detail,
8238                 cpa.id AS claim_policy_action
8239             FROM
8240                 acq.lineitem_detail lid
8241                 JOIN acq.lineitem li ON (li.id = lid.lineitem)
8242                 JOIN acq.purchase_order po ON (po.id = li.purchase_order)
8243                 JOIN acq.claim_policy cp ON (li.claim_policy = cp.id)
8244                 JOIN acq.claim_policy_action cpa ON (
8245                     cpa.claim_policy = cp.id
8246
8247                     -- we only care about claim policy actions whose claim
8248                     -- interval we'd reached or exceeded
8249                     AND (NOW() - cpa.action_interval) &gt; po.order_date
8250
8251                     -- filter out all claim policy actions where claim events
8252                     -- have occurred on or after the action's action_interval
8253                     AND NOT EXISTS (
8254                         SELECT 1
8255                         FROM
8256                             acq.claim_event evt
8257                             JOIN acq.claim claim ON (
8258                                 claim.id = evt.claim
8259                                 AND claim.lineitem_detail = lid.id
8260                             )
8261                         WHERE
8262                             evt.event_date &gt;= (po.order_date + cpa.action_interval)
8263                     )
8264                 )
8265             WHERE
8266                 lid.cancel_reason IS NULL
8267                 AND li.cancel_reason IS NULL -- belt/suspenders
8268                 AND po.cancel_reason IS NULL -- belt/suspenders
8269                 AND lid.recv_time IS NULL
8270                 AND po.state = 'on-order'
8271             ORDER BY 1, 2, 3, 4, 5
8272
8273                 </oils_persist:source_definition>
8274                 <fields>
8275                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="link"/>
8276                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
8277                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
8278                         <field reporter:label="Lineitem Detail" name="lineitem_detail" reporter:datatype="link"/>
8279                         <field reporter:label="Claim Policy Action" name="claim_policy_action" reporter:datatype="link"/>
8280                 </fields>
8281                 <links>
8282                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
8283                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8284                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
8285                         <link field="lineitem_detail" reltype="has_a" key="id" map="" class="acqlid"/>
8286                         <link field="claim_policy_action" reltype="has_a" key="id" map="" class="acqclpa"/>
8287                 </links>
8288         </class>
8289
8290         <class id="acqlisum" controller="open-ils.cstore" oils_obj:fieldmapper="acq::lineitem_summary" oils_persist:readonly="true" reporter:label="Lineitem Summary">
8291                 <oils_persist:source_definition>
8292
8293             SELECT 
8294                 li.id AS lineitem, 
8295                 (
8296                     SELECT COUNT(lid.id) 
8297                     FROM acq.lineitem_detail lid
8298                     WHERE lineitem = li.id
8299                 ) AS item_count,
8300                 (
8301                     SELECT COUNT(lid.id) 
8302                     FROM acq.lineitem_detail lid
8303                     WHERE recv_time IS NOT NULL AND lineitem = li.id
8304                 ) AS recv_count,
8305                 (
8306                     SELECT COUNT(lid.id) 
8307                     FROM acq.lineitem_detail lid
8308                     WHERE cancel_reason IS NOT NULL AND lineitem = li.id
8309                 ) AS cancel_count,
8310                 (
8311                     SELECT COUNT(lid.id) 
8312                     FROM acq.lineitem_detail lid
8313                         JOIN acq.fund_debit debit ON (lid.fund_debit = debit.id)
8314                     WHERE NOT debit.encumbrance AND lineitem = li.id
8315                 ) AS invoice_count,
8316                 (
8317                     SELECT COUNT(DISTINCT(lid.id)) 
8318                     FROM acq.lineitem_detail lid
8319                         JOIN acq.claim claim ON (claim.lineitem_detail = lid.id)
8320                     WHERE lineitem = li.id
8321                 ) AS claim_count,
8322                 (
8323                     SELECT (COUNT(lid.id) * li.estimated_unit_price)::NUMERIC(8,2)
8324                     FROM acq.lineitem_detail lid
8325                     WHERE lid.cancel_reason IS NULL AND lineitem = li.id
8326                 ) AS estimated_amount,
8327                 (
8328                     SELECT SUM(debit.amount)::NUMERIC(8,2)
8329                     FROM acq.lineitem_detail lid
8330                         JOIN acq.fund_debit debit ON (lid.fund_debit = debit.id)
8331                     WHERE debit.encumbrance AND lineitem = li.id
8332                 ) AS encumbrance_amount,
8333                 (
8334                     SELECT SUM(debit.amount)::NUMERIC(8,2)
8335                     FROM acq.lineitem_detail lid
8336                         JOIN acq.fund_debit debit ON (lid.fund_debit = debit.id)
8337                     WHERE NOT debit.encumbrance AND lineitem = li.id
8338                 ) AS paid_amount
8339
8340                 FROM acq.lineitem AS li
8341         </oils_persist:source_definition>
8342                 <fields oils_persist:primary="lineitem" oils_persist:sequence="acq.lineitem_id_seq">
8343                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
8344                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
8345                         <field reporter:label="Receive Count" name="recv_count" reporter:datatype="int"/>
8346                         <field reporter:label="Cancel Count" name="cancel_count" reporter:datatype="int"/>
8347                         <field reporter:label="Invoice Count" name="invoice_count" reporter:datatype="int"/>
8348                         <field reporter:label="Claim Count" name="claim_count" reporter:datatype="int"/>
8349                         <field reporter:label="Estimated Amount" name="estimated_amount" reporter:datatype="money"/>
8350                         <field reporter:label="Encumbrance Amount" name="encumbrance_amount" reporter:datatype="money"/>
8351                         <field reporter:label="Paid Amount" name="paid_amount" reporter:datatype="money"/>
8352                 </fields>
8353                 <links>
8354                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
8355                 </links>
8356     </class>
8357
8358
8359         <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">
8360                 <oils_persist:source_definition>
8361
8362                         SELECT  t.*
8363                           FROM  action.transit_copy t
8364                                 JOIN actor.org_unit AS s ON (t.source = s.id)
8365                                 JOIN actor.org_unit AS d ON (t.dest = d.id)
8366                           WHERE s.parent_ou &lt;&gt; d.parent_ou
8367
8368                 </oils_persist:source_definition>
8369                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
8370                         <field reporter:label="Pretransit Copy Status" name="copy_status" reporter:datatype="link"/>
8371                         <field reporter:label="Destination" name="dest" reporter:datatype="link"/>
8372                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
8373                         <field reporter:label="Transit ID" name="id" reporter:datatype="id"/>
8374                         <field reporter:label="Is Persistent? (unused)" name="persistant_transfer" reporter:datatype="bool"/>
8375                         <field reporter:label="Previous Hop (unused)" name="prev_hop" reporter:datatype="link"/>
8376                         <field reporter:label="Source" name="source" reporter:datatype="link"/>
8377                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
8378                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
8379                         <field reporter:label="Hold Transit" name="hold_transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
8380                 </fields>
8381                 <links>
8382                         <link field="hold_transit_copy" reltype="might_have" key="id" map="" class="ahtc"/>
8383                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
8384                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
8385                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
8386                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
8387                         <link field="prev_hop" reltype="has_a" key="id" map="" class="atc"/>
8388                 </links>
8389         </class>
8390
8391     <class id="circbyyr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::circ_counts_by_year" oils_persist:readonly="true">
8392                 <oils_persist:source_definition>
8393
8394         SELECT copy, SUM(count) AS count, year, is_renewal FROM (
8395                 SELECT
8396                         cp.id as copy,
8397                         COUNT(circ.id),
8398                         EXTRACT(YEAR FROM circ.xact_start) AS year,
8399                         (phone_renewal OR desk_renewal OR opac_renewal) as is_renewal
8400                 FROM
8401                         asset.copy cp
8402                                 JOIN action.circulation circ ON (cp.id = circ.target_copy)
8403                 GROUP BY 1, 3, 4
8404                 UNION
8405                 SELECT
8406                         cp.id as copy,
8407                         COUNT(circ.id),
8408                         EXTRACT(YEAR FROM circ.xact_start) AS year,
8409                         (phone_renewal OR desk_renewal OR opac_renewal) as is_renewal
8410                 FROM
8411                         asset.copy cp
8412                                 JOIN action.aged_circulation circ ON (cp.id = circ.target_copy)
8413                 GROUP BY 1, 3, 4
8414                 UNION
8415                 SELECT
8416                         id as copy,
8417                         circ_count,
8418                         -1 AS year,
8419                         false as is_renewal
8420                 FROM
8421                         extend_reporter.legacy_circ_count
8422         )x GROUP BY 1, 3, 4
8423
8424                 </oils_persist:source_definition>
8425         <fields>
8426             <field reporter:label="Copy ID" name="copy" reporter:datatype="link"/>
8427             <field reporter:label="Count" name="count" reporter:datatype="int"/>
8428             <field reporter:label="Year" name="year" reporter:datatype="int"/>
8429             <field reporter:label="Renewal" name="is_renewal" reporter:datatype="bool"/>
8430         </fields>
8431                 <links>
8432                         <link field="copy" reltype="has_a" key="id" map="" class="acp"/>
8433                 </links>
8434                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8435                         <actions>
8436                                 <retrieve/>
8437                         </actions>
8438                 </permacrud>
8439     </class>
8440
8441         <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">
8442                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
8443                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
8444                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
8445                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
8446                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
8447                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
8448                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
8449                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
8450                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
8451                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
8452                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
8453                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
8454                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
8455                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
8456                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
8457                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
8458                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
8459                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
8460                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
8461                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
8462                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
8463                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
8464                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
8465                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
8466                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
8467                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
8468                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
8469                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
8470                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="link"/>
8471                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="link"/>
8472                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="link"/>
8473                 </fields>
8474                 <links>
8475                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
8476                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
8477                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
8478                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
8479                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
8480                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
8481                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
8482                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
8483                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
8484                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
8485                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
8486                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
8487                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
8488                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
8489                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
8490                 </links>
8491         </class>
8492
8493     <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">
8494         <fields oils_persist:primary="id">
8495             <field reporter:label="Title" name="title" reporter:datatype="text"/>
8496             <field reporter:label="Author" name="author" reporter:datatype="text"/>
8497             <field reporter:label="Pubdate" name="pubdate" reporter:datatype="int"/>
8498             <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
8499             <field reporter:label="Price" name="price" reporter:datatype="money"/>
8500             <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
8501             <field reporter:label="Callnumber Label" name="call_number_label" reporter:datatype="text"/>
8502             <field reporter:label="Dewy Tens" name="dewey_block_tens" reporter:datatype="text"/>
8503             <field reporter:label="Dewy Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
8504             <field reporter:label="Use Count" name="use_count" reporter:datatype="int"/>
8505             <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
8506             <field reporter:label="Shelving Location Name" name="shelving_location" reporter:datatype="text"/>
8507             <field reporter:label="Legacy Stat Cat 1" name="stat_cat_1" reporter:datatype="text"/>
8508             <field reporter:label="Legacy Stat Cat 2" name="stat_cat_2" reporter:datatype="text"/>
8509             <field reporter:label="Legacy Stat Cat 1 Value" name="stat_cat_1_value" reporter:datatype="text"/>
8510             <field reporter:label="Legacy Stat Cat 2 Value" name="stat_cat_2_value" reporter:datatype="text"/>
8511             <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
8512             <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
8513             <field reporter:label="Owning Lib Name" name="owning_lib_name" reporter:datatype="text"/>
8514             <field reporter:label="Circ Lib Name" name="circ_lib_name" reporter:datatype="text"/>
8515             <field reporter:label="Owning Lib" name="owning_lib" reporter:datatype="link"/>
8516             <field reporter:label="Circ Lib" name="circ_lib" reporter:datatype="link"/>
8517             <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
8518             <field reporter:label="Age Protection" name="age_protect" reporter:datatype="link"/>
8519             <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
8520             <field reporter:label="Reference" name="ref" reporter:datatype="bool"/>
8521             <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="text"/>
8522             <field reporter:label="Deleted" name="deleted" reporter:datatype="bool"/>
8523             <field reporter:label="TCN" name="tcn_value" reporter:datatype="text"/>
8524             <field reporter:label="Status" name="status" reporter:datatype="link"/>
8525             <field reporter:label="Stop Fines Reason" name="stop_fines" reporter:datatype="text"/>
8526             <field reporter:label="Due Date" name="due_date" reporter:datatype="timestamp"/>
8527             <field reporter:label="Patron Barcode" name="patron_barcode" reporter:datatype="text"/>
8528             <field reporter:label="Patron Name" name="patron_name" reporter:datatype="text"/>
8529         </fields>
8530         <links>
8531             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
8532             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
8533             <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8534             <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
8535             <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
8536         </links>
8537     </class>
8538
8539     <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">
8540         <fields oils_persist:primary="id">
8541             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
8542             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
8543             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
8544             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
8545         </fields>
8546         <links>
8547             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
8548             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
8549         </links>
8550     </class>
8551
8552     <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">
8553         <fields oils_persist:primary="owning_lib">
8554             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
8555             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
8556             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
8557         </fields>
8558         <links>
8559             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
8560         </links>
8561     </class>
8562
8563     <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">
8564         <fields oils_persist:primary="id">
8565             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
8566             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
8567             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
8568             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
8569             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
8570         </fields>
8571         <links>
8572             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
8573             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
8574             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
8575         </links>
8576     </class>
8577
8578     <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">
8579         <fields oils_persist:primary="circ_lib">
8580             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
8581             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
8582             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
8583             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
8584         </fields>
8585         <links>
8586             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
8587             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
8588         </links>
8589     </class>
8590
8591     <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">
8592         <fields oils_persist:primary="id">
8593             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
8594             <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
8595             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
8596             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
8597             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
8598         </fields>
8599         <links>
8600             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
8601             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
8602             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
8603         </links>
8604     </class>
8605
8606     <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">
8607         <fields oils_persist:primary="home_ou">
8608             <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
8609             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
8610             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
8611             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
8612         </fields>
8613         <links>
8614             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
8615             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
8616         </links>
8617     </class>
8618         <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">
8619                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_id_seq">
8620                         <field reporter:label="Fund Tag ID" name="id" reporter:datatype="id"/>
8621                         <field reporter:label="Fund Tag Owner" name="owner" reporter:datatype="org_unit"/>
8622                         <field reporter:label="Fund Tag Name" name="name" reporter:datatype="text"/>
8623                         <field reporter:label="Map Entries" name="map_entries" oils_persist:virtual="true" reporter:datatype="link"/>
8624                 </fields>
8625                 <links>
8626                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
8627                         <link field="map_entries" reltype="has_many" key="fund" map="" class="acqftm"/>
8628                 </links>
8629                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8630                         <actions>
8631                                 <create permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
8632                                 <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="owner"/>
8633                                 <update permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
8634                         <delete permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
8635                         </actions>
8636                 </permacrud>
8637         </class>
8638         <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">
8639                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_map_id_seq">
8640                         <field reporter:label="Map Entry ID" name="id" reporter:datatype="id"/>
8641                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link"/>
8642                         <field reporter:label="Tag ID" name="tag" reporter:datatype="link"/>
8643                 </fields>
8644                 <links>
8645                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8646                         <link field="tag" reltype="has_a" key="id" map="" class="acqft"/>
8647                         </links>
8648                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8649                 <actions>
8650                                 <create permission="ADMIN_ACQ_FUND_TAG">
8651                                         <context link="tag" field="owner"/>
8652                                 </create>
8653                                 <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
8654                                         <context link="tag" field="owner"/>
8655                                 </retrieve>
8656                                 <update permission="ADMIN_ACQ_FUND_TAG">
8657                                         <context link="tag" field="owner"/>
8658                                 </update>
8659                                 <delete permission="ADMIN_ACQ_FUND_TAG">
8660                                         <context link="tag" field="owner"/>
8661                                 </delete>
8662                         </actions>
8663                 </permacrud>
8664         </class>
8665
8666         <!-- ********************************************************************************************************************* -->
8667
8668 </IDL>
8669
8670 <!--
8671     vim:noet:ts=4:sw=4:
8672 -->