<field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
<field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
<field reporter:label="Provider" name="provider" reporter:datatype="link" />
- <field reporter:label="State" name="state" reporter:datatype="text" />
+ <field reporter:label="Status" name="state" reporter:datatype="link" />
<field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="org_unit" />
<field reporter:label="Creator" name="creator" reporter:datatype="link" />
<field reporter:label="Editor" name="editor" reporter:datatype="link" />
<field reporter:label="PO Items" name="po_items" oils_persist:virtual="true" reporter:datatype="link" />
</fields>
<links>
+ <link field="state" reltype="has_a" key="id" map="" class="acqpostlbl"/>
<link field="owner" reltype="has_a" key="id" map="" class="au"/>
<link field="creator" reltype="has_a" key="id" map="" class="au"/>
<link field="editor" reltype="has_a" key="id" map="" class="au"/>
<field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
<field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
<field reporter:label="Provider" name="provider" reporter:datatype="link"/>
- <field reporter:label="State" name="state" reporter:datatype="text"/>
+ <field reporter:label="Status" name="state" reporter:datatype="text"/>
<field reporter:label="Order Date" name="order_date" reporter:datatype="timestamp"/>
<field reporter:label="Name" name="name" reporter:datatype="text"/>
<field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link"/>
<field reporter:label="Evergreen Bib ID" name="eg_bib_id" reporter:datatype="link" />
<field reporter:label="Source Label" name="source_label" reporter:datatype="text" />
<field reporter:label="Expected Receive Date" name="expected_recv_time" reporter:datatype="timestamp" />
- <field reporter:label="State" name="state" reporter:datatype="text" />
+ <field reporter:label="Status" name="state" reporter:datatype="link" />
<field reporter:label="Creator" name="creator" reporter:datatype="link" />
<field reporter:label="Editor" name="editor" reporter:datatype="link" />
<field reporter:label="Claim Policy" name="claim_policy" reporter:datatype="link" />
<field reporter:label="Order Summary" name="order_summary" oils_persist:virtual="true" reporter:datatype="link" />
</fields>
<links>
+ <link field="state" reltype="has_a" key="id" map="" class="jubstlbl"/>
<link field="selector" reltype="has_a" key="id" map="" class="au"/>
<link field="editor" reltype="has_a" key="id" map="" class="au"/>
<link field="creator" reltype="has_a" key="id" map="" class="au"/>
<field reporter:label="MARC" name="marc" reporter:datatype="text"/>
<field reporter:label="Evergreen Bib ID" name="eg_bib_id" reporter:datatype="link"/>
<field reporter:label="Source Label" name="source_label" reporter:datatype="text"/>
- <field reporter:label="State" name="state" reporter:datatype="text"/>
+ <field reporter:label="Status" name="state" reporter:datatype="text"/>
<field reporter:label="Claim Policy" name="claim_policy" reporter:datatype="link"/>
<field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link"/>
<field reporter:label="Estimated Unit Price" name="estimated_unit_price" reporter:datatype="money" />
</permacrud>
</class>
+ <class id="jubstlbl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::li_state_label" oils_persist:tablename="acq.li_state_label" oils_persist:readonly="true" reporter:label="Line Item State Labels" oils_persist:field_safe="true">
+ <fields oils_persist:primary="id">
+ <field reporter:label="State ID" reporter:selector="label" name="id" reporter:datatype="text"/>
+ <field reporter:label="State Label" name="label" oils_persist:i18n="true" reporter:datatype="text"/>
+ </fields>
+ <links/>
+ <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
+ <actions>
+ <retrieve/>
+ </actions>
+ </permacrud>
+ </class>
+
+ <class id="acqpostlbl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::po_state_label" oils_persist:tablename="acq.po_state_label" oils_persist:readonly="true" reporter:label="PO State Labels">
+ <fields oils_persist:primary="id">
+ <field reporter:label="State ID" reporter:selector="label" name="id" reporter:datatype="text"/>
+ <field reporter:label="State Label" name="label" oils_persist:i18n="true" reporter:datatype="text"/>
+ </fields>
+ <links/>
+ <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
+ <actions>
+ <retrieve/>
+ </actions>
+ </permacrud>
+ </class>
+
+
<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">
<oils_persist:source_definition><![CDATA[
FROM acq.lineitem AS li;
+
+CREATE VIEW acq.li_state_label AS
+ SELECT *
+ FROM (VALUES
+ ('new', oils_i18n_gettext('new', 'New', 'jubstlbl', 'label')),
+ ('selector-ready', oils_i18n_gettext('selector-ready', 'Selector-Ready', 'jubstlbl', 'label')),
+ ('order-ready', oils_i18n_gettext('order-ready', 'Order-Ready', 'jubstlbl', 'label')),
+ ('approved', oils_i18n_gettext('approved', 'Approved', 'jubstlbl', 'label')),
+ ('pending-order', oils_i18n_gettext('pending-order', 'Pending-Order', 'jubstlbl', 'label')),
+ ('on-order', oils_i18n_gettext('on-order', 'On-Order', 'jubstlbl', 'label')),
+ ('received', oils_i18n_gettext('received', 'Received', 'jubstlbl', 'label')),
+ ('cancelled', oils_i18n_gettext('cancelled', 'Cancelled', 'jubstlbl', 'label'))
+ ) AS t (id,label);
+
+CREATE VIEW acq.po_state_label AS
+ SELECT *
+ FROM (VALUES
+ ('new', oils_i18n_gettext('new', 'New', 'acqpostlbl', 'label')),
+ ('pending', oils_i18n_gettext('pending', 'Pending', 'acqpostlbl', 'label')),
+ ('on-order', oils_i18n_gettext('on-order', 'On-Order', 'acqpostlbl', 'label')),
+ ('received', oils_i18n_gettext('received', 'Received', 'acqpostlbl', 'label')),
+ ('cancelled', oils_i18n_gettext('cancelled', 'Cancelled', 'acqpostlbl', 'label'))
+ ) AS t (id,label);
+
COMMIT;
--- /dev/null
+BEGIN;
+
+-- SELECT evergreen.upgrade_deps_block_check('XXXX', :eg_version);
+
+CREATE VIEW acq.li_state_label AS
+ SELECT *
+ FROM (VALUES
+ ('new', 'New'),
+ ('selector-ready', 'Selector-Ready'),
+ ('order-ready', 'Order-Ready'),
+ ('approved', 'Approved'),
+ ('pending-order', 'Pending-Order'),
+ ('on-order', 'On-Order'),
+ ('received', 'Received'),
+ ('cancelled', 'Cancelled')
+ ) AS t (id,label);
+
+CREATE VIEW acq.po_state_label AS
+ SELECT *
+ FROM (VALUES
+ ('new', 'New'),
+ ('pending', 'Pending'),
+ ('on-order', 'On-Order'),
+ ('received', 'Received'),
+ ('cancelled', 'Cancelled')
+ ) AS t (id,label);
+
+COMMIT;