</permacrud>
</class>
+ <class id="acqeasc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::edi_availability_status_code" oils_persist:tablename="acq.edi_availability_status_code" reporter:label="EDI Availability Status Code">
+ <fields oils_persist:primary="id" oils_persist:sequence="acq.edi_availability_status_code_id_seq">
+ <field name="id" reporter:datatype="id" reporter:label="Availability Status Code ID"/>
+ <field name="code" reporter:datatype="text" reporter:label="Code"/>
+ <field name="description" reporter:datatype="text" reporter:label="Description"/>
+ </fields>
+ <links />
+ <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
+ <actions>
+ <create permission="ADMIN_EDI_STATUS_CODE" global_required="true"/>
+ <retrieve permission="ADMIN_EDI_STATUS_CODE" global_required="true"/>
+ <update permission="ADMIN_EDI_STATUS_CODE" global_required="true"/>
+ <delete permission="ADMIN_EDI_STATUS_CODE" global_required="true"/>
+ </actions>
+ </permacrud>
+ </class>
+
+ <class id="acqeosc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::edi_order_status_code" oils_persist:tablename="acq.edi_order_status_code" reporter:label="EDI Order Status Code">
+ <fields oils_persist:primary="id" oils_persist:sequence="acq.edi_order_status_code_id_seq">
+ <field name="id" reporter:datatype="id" reporter:label="Order Status Code ID"/>
+ <field name="code" reporter:datatype="text" reporter:label="Code"/>
+ <field name="description" reporter:datatype="text" reporter:label="Description"/>
+ </fields>
+ <links />
+ <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
+ <actions>
+ <create permission="ADMIN_EDI_STATUS_CODE" global_required="true"/>
+ <retrieve permission="ADMIN_EDI_STATUS_CODE" global_required="true"/>
+ <update permission="ADMIN_EDI_STATUS_CODE" global_required="true"/>
+ <delete permission="ADMIN_EDI_STATUS_CODE" global_required="true"/>
+ </actions>
+ </permacrud>
+ </class>
+
+ <class id="acqpascm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::provider_availability_status_code_map" oils_persist:tablename="acq.provider_availability_status_code_map" reporter:label="Provider Availablity Status Code Map">
+ <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_availability_status_code_map_seq">
+ <field name="id" reporter:datatype="id" reporter:label="Mapping ID"/>
+ <field name="provider" reporter:datatype="link" reporter:label="Provider"/>
+ <field name="availability_status_code" reporter:datatype="link" reporter:label="Availability Status Code"/>
+ <field name="cancel_reason" reporter:datatype="link" reporter:label="Cancel Reason"/>
+ </fields>
+ <links>
+ <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
+ <link field="availability_status_code" reltype="has_a" map="" class="acqeasc"/>
+ <link field="cancel_reason" rel_type="might_have" map="" class="acqcr"/>
+ </links>
+ <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
+ <create permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
+ <context link="account" jump="provider" field="owner"/>
+ </create>
+ <retrieve permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
+ <context link="account" jump="provider" field="owner"/>
+ </retrieve>
+ <update permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
+ <context link="account" jump="provider" field="owner"/>
+ </update>
+ <delete permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
+ <context link="account" jump="provider" field="owner"/>
+ </delete>
+ </permacrud>
+ </class>
+
+ <class id="acqposcm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::provider_order_status_code_map" oils_persist:tablename="acq.provider_order_status_code_map" reporter:label="Provider Order Status Code Map">
+ <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_order_status_code_map_seq">
+ <field name="id" reporter:datatype="id" reporter:label="Mapping ID"/>
+ <field name="provider" reporter:datatype="link" reporter:label="Provider"/>
+ <field name="order_status_code" reporter:datatype="link" reporter:label="Order Status Code"/>
+ <field name="cancel_reason" reporter:datatype="link" reporter:label="Cancel Reason"/>
+ </fields>
+ <links>
+ <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
+ <link field="order_status_code" reltype="has_a" map="" class="acqeosc"/>
+ <link field="cancel_reason" rel_type="might_have" map="" class="acqcr"/>
+ </links>
+ <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
+ <create permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
+ <context link="account" jump="provider" field="owner"/>
+ </create>
+ <retrieve permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
+ <context link="account" jump="provider" field="owner"/>
+ </retrieve>
+ <update permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
+ <context link="account" jump="provider" field="owner"/>
+ </update>
+ <delete permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
+ <context link="account" jump="provider" field="owner"/>
+ </delete>
+ </permacrud>
+ </class>
<class id="rof" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::output_folder" oils_persist:tablename="reporter.output_folder" reporter:label="Output Folder">
<fields oils_persist:primary="id" oils_persist:sequence="reporter.output_folder_id_seq">
CREATE INDEX edi_message_account_status_idx ON acq.edi_message (account,status);
CREATE INDEX edi_message_po_idx ON acq.edi_message (purchase_order);
+CREATE TABLE acq.edi_order_status_code (
+ id SERIAL PRIMARY KEY,
+ code TEXT UNIQUE,
+ description TEXT
+);
+
+CREATE INDEX acq_edi_order_status_code_idx
+ ON acq.edit_order_status( code );
+
+CREATE TABLE acq.edi_availability_status_code (
+ id SERIAL PRIMARY KEY,
+ code TEXT UNIQUE,
+ description TEXT
+);
+
+CREATE INDEX acq_edi_availability_status_code_idx
+ ON acq.edi_availability_status_code( code );
+
+CREATE TABLE acq.provider_order_status_code_map (
+ id SERIAL PRIMARY KEY,
+ provider INT NOT NULL
+ REFERENCES acq.provider
+ DEFERRABLE INITIALLY DEFERRED,
+ order_status_code INT NOT NULL
+ REFERENCES acq.edi_order_status_code
+ DEFERRABLE INITIALLY DEFERRED,
+ cancel_reason INT REFERENCES acq.cancel_reason
+ DEFERRABLE INITIALLY DEFERRED,
+ CONSTRAINT order_status_once_per_provider UNIQUE(provider, order_status_code)
+);
+
+CREATE TABLE acq.provider_availability_status_code_map (
+ id SERIAL PRIMARY KEY,
+ provider INT NOT NULL
+ REFERENCES acq.provider
+ DEFERRABLE INITIALLY DEFERRED,
+ availability_status_code INT NOT NULL
+ REFERENCES acq.edi_availability_status_code
+ DEFERRABLE INITIALLY DEFERRED,
+ cancel_reason INT REFERENCES acq.cancel_reason
+ DEFERRABLE INITIALLY DEFERRED,
+ CONSTRAINT avail_status_once_per_provider UNIQUE(provider, availability_status_code)
+);
+
-- Note below that the primary key is NOT a SERIAL type. We will periodically truncate and rebuild
-- the table, assigning ids programmatically instead of using a sequence.
CREATE TABLE acq.debit_attribution (
'Allow administration of MARC tag tables', 'ppl', 'description' )),
( 563, 'ADJUST_BILLS', oils_i18n_gettext( 563,
'Allow a user to adjust a bill (generally to zero)', 'ppl', 'description' ))
+ ( 564, 'ADMIN_EDI_STATUS_CODE', oils_i18n_gettext( 564,
+ 'Allow a user to administer EDI order and availability status codes', 'ppl', 'description'))
;
SELECT SETVAL('permission.perm_list_id_seq'::TEXT, 1000);
(1, 'f',( 85+1200), oils_i18n_gettext(1285, 'Canceled: By Vendor', 'acqcr', 'label'),
oils_i18n_gettext(1285, 'Line item canceled by vendor', 'acqcr', 'description'));
+INSERT INTO acq.edi_availability_status_code (id, code, description) VALUES
+(1, 'AB', oils_i18n_gettext(1, 'Publication abandoned (canceled by publisher)', 'acqeasc', 'description')),
+(2, 'AD', oils_i18n_gettext(2, 'Apply direct: item not available to trade', 'acqeasc', 'description')),
+(3, 'AU', oils_i18n_gettext(3, 'Publisher''s address unknown', 'acqeasc', 'description')),
+(4, 'CS', oils_i18n_gettext(4, 'Status uncertain: check with customer service', 'acqeasc', 'description')),
+(5, 'FQ', oils_i18n_gettext(5, 'Only obtainable abroad', 'acqeasc', 'description')),
+(6, 'HK', oils_i18n_gettext(6, 'Paperback out of print: hardback available', 'acqeasc', 'description')),
+(7, 'IB', oils_i18n_gettext(7, 'In stock (at wholesaler or bookseller', 'acqeasc', 'description')),
+(8, 'IP', oils_i18n_gettext(8, 'In print and in stock (at publisher)', 'acqeasc', 'description')),
+(9, 'MD', oils_i18n_gettext(9, 'Manufactured on demand', 'acqeasc', 'description')),
+(10, 'NK', oils_i18n_gettext(10, 'Item not known (we cannot trace)', 'acqeasc', 'description')),
+(11, 'NN', oils_i18n_gettext(11, 'We do not supply this item', 'acqeasc', 'description')),
+(12, 'NP', oils_i18n_gettext(12, 'Not yet published', 'acqeasc', 'description')),
+(13, 'NQ', oils_i18n_gettext(13, 'Not stocked', 'acqeasc', 'description')),
+(14, 'NS', oils_i18n_gettext(14, 'Not sold separately', 'acqeasc', 'description')),
+(15, 'OB', oils_i18n_gettext(15, 'Temporarily out of stock (at wholesaler or bookseller)', 'acqeasc', 'description')),
+(16, 'OF', oils_i18n_gettext(16, 'This format out of print: other format available', 'acqeasc', 'description')),
+(17, 'OP', oils_i18n_gettext(17, 'Out of print', 'acqeasc', 'description')),
+(18, 'OR', oils_i18n_gettext(18, 'Out of print: (to be) replaced by new edition', 'acqeasc', 'description')),
+(19, 'PK', oils_i18n_gettext(19, 'Hardback out of print: paperback available', 'acqeasc', 'description')),
+(20, 'PN', oils_i18n_gettext(20, 'Publisher no longer in business', 'acqeasc', 'description')),
+(21, 'RE', oils_i18n_gettext(21, 'Awaiting reissue', 'acqeasc', 'description')),
+(22, 'RF', oils_i18n_gettext(22, 'Refer to other publisher or distributor', 'acqeasc', 'description')),
+(23, 'RM', oils_i18n_gettext(23, 'Remaindered', 'acqeasc', 'description')),
+(24, 'RP', oils_i18n_gettext(24, 'Reprinting', 'acqeasc', 'description')),
+(25, 'RR', oils_i18n_gettext(25, 'Rights restricted (cannot supply in this market)', 'acqeasc', 'description')),
+(26, 'SD', oils_i18n_gettext(26, 'Sold (for unique copies of secondhand/antiquarian items)', 'acqeasc', 'description')),
+(27, 'SN', oils_i18n_gettext(27, 'Our supplier cannot trace', 'acqeasc', 'description')),
+(28, 'SO', oils_i18n_gettext(28, 'Pack/set not available: available as single items only', 'acqeasc', 'description')),
+(29, 'ST', oils_i18n_gettext(29, 'Stocktaking: temporarily unavailable', 'acqeasc', 'description')),
+(30, 'TO', oils_i18n_gettext(30, 'Only to order', 'acqeasc', 'description')),
+(31, 'TU', oils_i18n_gettext(31, 'Temporarily unavailable, reason unspecified', 'acqeasc', 'description')),
+(32, 'UB', oils_i18n_gettext(32, 'Item unobtainable from our suppliers', 'acqeasc', 'description')),
+(33, 'UC', oils_i18n_gettext(33, 'Unavailable; may or may not become available again ("reprint under consideration")', 'acqeasc', 'description'));
+
+INSERT INTO acq.edi_order_status_code (id, code, description) VALUES
+(1, '100', oils_i18n_gettext(1, 'Order line accepted', 'acqeosc', 'description')),
+(2, '101', oils_i18n_gettext(2, 'Price query: order line will be held awaiting customer response', 'acqeosc', 'description')),
+(3, '102', oils_i18n_gettext(3, 'Discount query: order line will be held awaiting customer response', 'acqeosc', 'description')),
+(4, '103', oils_i18n_gettext(4, 'Minimum order value not reached: order line will be held until required value is reached', 'acqeosc', 'description')),
+(5, '104', oils_i18n_gettext(5, 'Firm order required: order line will be held awaiting customer response', 'acqeosc', 'description')),
+(6, '110', oils_i18n_gettext(6, 'Order line accepted, substitute product will be supplied', 'acqeosc', 'description')),
+(7, '200', oils_i18n_gettext(7, 'Order line not accepted', 'acqeosc', 'description')),
+(8, '201', oils_i18n_gettext(8, 'Price query: order line not accepted', 'acqeosc', 'description')),
+(9, '202', oils_i18n_gettext(9, 'Discount query: order line not accepted', 'acqeosc', 'description')),
+(10, '203', oils_i18n_gettext(10, 'Minimum order value not reached: order line not accepted', 'acqeosc', 'description')),
+(11, '205', oils_i18n_gettext(11, 'Order line not accepted: quoted promotion is invalid', 'acqeosc', 'description')),
+(12, '206', oils_i18n_gettext(12, 'Order line not accepted: quoted promotion has ended', 'acqeosc', 'description')),
+(13, '207', oils_i18n_gettext(13, 'Order line not accepted: customer ineligible for quoted promotion', 'acqeosc', 'description')),
+(14, '210', oils_i18n_gettext(14, 'Order line not accepted: substitute product is offered', 'acqeosc', 'description')),
+(15, '220', oils_i18n_gettext(15, 'Outstanding order line canceled: reason unspecified', 'acqeosc', 'description')),
+(16, '221', oils_i18n_gettext(16, 'Outstanding order line canceled: past order expiry date', 'acqeosc', 'description')),
+(17, '222', oils_i18n_gettext(17, 'Outstanding order line canceled by customer request', 'acqeosc', 'description')),
+(18, '223', oils_i18n_gettext(18, 'Outstanding order line canceled - unable to supply', 'acqeosc', 'description')),
+(19, '300', oils_i18n_gettext(19, 'Order line passed to new supplier', 'acqeosc', 'description')),
+(20, '301', oils_i18n_gettext(20, 'Order line passed to secondhand department', 'acqeosc', 'description')),
+(21, '400', oils_i18n_gettext(21, 'Backordered - awaiting supply', 'acqeosc', 'description')),
+(22, '401', oils_i18n_gettext(22, 'On order from our supplier', 'acqeosc', 'description')),
+(23, '402', oils_i18n_gettext(23, 'On order from abroad', 'acqeosc', 'description')),
+(24, '403', oils_i18n_gettext(24, 'Backordered, waiting to reach minimum order value', 'acqeosc', 'description')),
+(25, '404', oils_i18n_gettext(25, 'Dispatched from our supplier, awaiting delivery', 'acqeosc', 'description')),
+(26, '405', oils_i18n_gettext(26, 'Our supplier sent wrong item(s), re-ordered', 'acqeosc', 'description')),
+(27, '406', oils_i18n_gettext(27, 'Our supplier sent short, re-ordered', 'acqeosc', 'description')),
+(28, '407', oils_i18n_gettext(28, 'Our supplier sent damaged item(s), re-ordered', 'acqeosc', 'description')),
+(29, '408', oils_i18n_gettext(29, 'Our supplier sent imperfect item(s), re-ordered', 'acqeosc', 'description')),
+(30, '409', oils_i18n_gettext(30, 'Our supplier cannot trace order, re-ordered', 'acqeosc', 'description')),
+(31, '410', oils_i18n_gettext(31, 'Ordered item(s) being processed by bookseller', 'acqeosc', 'description')),
+(32, '411', oils_i18n_gettext(32, 'Ordered item(s) begin processed by bookseller, awaiting customer action', 'acqeosc', 'description')),
+(33, '412', oils_i18n_gettext(33, 'Order line held awaiting customer instruction', 'acqeosc', 'description')),
+(34, '500', oils_i18n_gettext(34, 'Order line on hold - contact customer service', 'acqeosc', 'description')),
+(35, '800', oils_i18n_gettext(35, 'Order line already dispatched/stock allocated for dispatch', 'acqeosc', 'description')),
+(36, '900', oils_i18n_gettext(36, 'Cannot trace order line', 'acqeosc', 'description')),
+(37, '901', oils_i18n_gettext(37, 'Order line held: note title change', 'acqeosc', 'description')),
+(38, '902', oils_i18n_gettext(38, 'Order line held: note pubdate or availability date delay', 'acqeosc', 'description')),
+(39, '903', oils_i18n_gettext(39, 'Order line held: note price change', 'acqeosc', 'description')),
+(40, '999', oils_i18n_gettext(40, 'Temporary hold: order action not yet determined', 'acqeosc', 'description'));
+
INSERT INTO config.global_flag (name, label, enabled)
VALUES (
'circ.holds.usr_not_requestor',
--- /dev/null
+BEGIN;
+
+SELECT evergreen.upgrade_deps_block_check('XXXX', :eg_version);
+
+CREATE TABLE acq.edi_order_status_code (
+ id SERIAL PRIMARY KEY,
+ code TEXT UNIQUE,
+ description TEXT
+);
+
+CREATE INDEX acq_edi_order_status_code_idx
+ ON acq.edit_order_status( code );
+
+CREATE TABLE acq.edi_availability_status_code (
+ id SERIAL PRIMARY KEY,
+ code TEXT UNIQUE,
+ description TEXT
+);
+
+CREATE INDEX acq_edi_availability_status_code_idx
+ ON acq.edi_availability_status_code( code );
+
+CREATE TABLE acq.provider_order_status_code_map (
+ id SERIAL PRIMARY KEY,
+ provider INT NOT NULL
+ REFERENCES acq.provider
+ DEFERRABLE INITIALLY DEFERRED,
+ order_status_code INT NOT NULL
+ REFERENCES acq.edi_order_status_code
+ DEFERRABLE INITIALLY DEFERRED,
+ cancel_reason INT REFERENCES acq.cancel_reason
+ DEFERRABLE INITIALLY DEFERRED,
+ CONSTRAINT order_status_once_per_provider UNIQUE(provider, order_status_code)
+);
+
+CREATE TABLE acq.provider_availability_status_code_map (
+ id SERIAL PRIMARY KEY,
+ provider INT NOT NULL
+ REFERENCES acq.provider
+ DEFERRABLE INITIALLY DEFERRED,
+ availability_status_code INT NOT NULL
+ REFERENCES acq.edi_availability_status_code
+ DEFERRABLE INITIALLY DEFERRED,
+ cancel_reason INT REFERENCES acq.cancel_reason
+ DEFERRABLE INITIALLY DEFERRED,
+ CONSTRAINT avail_status_once_per_provider UNIQUE(provider, availability_status_code)
+);
+
+INSERT INTO acq.edi_availability_status_code (id, code, description) VALUES
+(1, 'AB', oils_i18n_gettext(1, 'Publication abandoned (canceled by publisher)', 'acqeasc', 'description')),
+(2, 'AD', oils_i18n_gettext(2, 'Apply direct: item not available to trade', 'acqeasc', 'description')),
+(3, 'AU', oils_i18n_gettext(3, 'Publisher''s address unknown', 'acqeasc', 'description')),
+(4, 'CS', oils_i18n_gettext(4, 'Status uncertain: check with customer service', 'acqeasc', 'description')),
+(5, 'FQ', oils_i18n_gettext(5, 'Only obtainable abroad', 'acqeasc', 'description')),
+(6, 'HK', oils_i18n_gettext(6, 'Paperback out of print: hardback available', 'acqeasc', 'description')),
+(7, 'IB', oils_i18n_gettext(7, 'In stock (at wholesaler or bookseller', 'acqeasc', 'description')),
+(8, 'IP', oils_i18n_gettext(8, 'In print and in stock (at publisher)', 'acqeasc', 'description')),
+(9, 'MD', oils_i18n_gettext(9, 'Manufactured on demand', 'acqeasc', 'description')),
+(10, 'NK', oils_i18n_gettext(10, 'Item not known (we cannot trace)', 'acqeasc', 'description')),
+(11, 'NN', oils_i18n_gettext(11, 'We do not supply this item', 'acqeasc', 'description')),
+(12, 'NP', oils_i18n_gettext(12, 'Not yet published', 'acqeasc', 'description')),
+(13, 'NQ', oils_i18n_gettext(13, 'Not stocked', 'acqeasc', 'description')),
+(14, 'NS', oils_i18n_gettext(14, 'Not sold separately', 'acqeasc', 'description')),
+(15, 'OB', oils_i18n_gettext(15, 'Temporarily out of stock (at wholesaler or bookseller)', 'acqeasc', 'description')),
+(16, 'OF', oils_i18n_gettext(16, 'This format out of print: other format available', 'acqeasc', 'description')),
+(17, 'OP', oils_i18n_gettext(17, 'Out of print', 'acqeasc', 'description')),
+(18, 'OR', oils_i18n_gettext(18, 'Out of print: (to be) replaced by new edition', 'acqeasc', 'description')),
+(19, 'PK', oils_i18n_gettext(19, 'Hardback out of print: paperback available', 'acqeasc', 'description')),
+(20, 'PN', oils_i18n_gettext(20, 'Publisher no longer in business', 'acqeasc', 'description')),
+(21, 'RE', oils_i18n_gettext(21, 'Awaiting reissue', 'acqeasc', 'description')),
+(22, 'RF', oils_i18n_gettext(22, 'Refer to other publisher or distributor', 'acqeasc', 'description')),
+(23, 'RM', oils_i18n_gettext(23, 'Remaindered', 'acqeasc', 'description')),
+(24, 'RP', oils_i18n_gettext(24, 'Reprinting', 'acqeasc', 'description')),
+(25, 'RR', oils_i18n_gettext(25, 'Rights restricted (cannot supply in this market)', 'acqeasc', 'description')),
+(26, 'SD', oils_i18n_gettext(26, 'Sold (for unique copies of secondhand/antiquarian items)', 'acqeasc', 'description')),
+(27, 'SN', oils_i18n_gettext(27, 'Our supplier cannot trace', 'acqeasc', 'description')),
+(28, 'SO', oils_i18n_gettext(28, 'Pack/set not available: available as single items only', 'acqeasc', 'description')),
+(29, 'ST', oils_i18n_gettext(29, 'Stocktaking: temporarily unavailable', 'acqeasc', 'description')),
+(30, 'TO', oils_i18n_gettext(30, 'Only to order', 'acqeasc', 'description')),
+(31, 'TU', oils_i18n_gettext(31, 'Temporarily unavailable, reason unspecified', 'acqeasc', 'description')),
+(32, 'UB', oils_i18n_gettext(32, 'Item unobtainable from our suppliers', 'acqeasc', 'description')),
+(33, 'UC', oils_i18n_gettext(33, 'Unavailable; may or may not become available again ("reprint under consideration")', 'acqeasc', 'description'));
+
+INSERT INTO acq.edi_order_status_code (id, code, description) VALUES
+(1, '100', oils_i18n_gettext(1, 'Order line accepted', 'acqeosc', 'description')),
+(2, '101', oils_i18n_gettext(2, 'Price query: order line will be held awaiting customer response', 'acqeosc', 'description')),
+(3, '102', oils_i18n_gettext(3, 'Discount query: order line will be held awaiting customer response', 'acqeosc', 'description')),
+(4, '103', oils_i18n_gettext(4, 'Minimum order value not reached: order line will be held until required value is reached', 'acqeosc', 'description')),
+(5, '104', oils_i18n_gettext(5, 'Firm order required: order line will be held awaiting customer response', 'acqeosc', 'description')),
+(6, '110', oils_i18n_gettext(6, 'Order line accepted, substitute product will be supplied', 'acqeosc', 'description')),
+(7, '200', oils_i18n_gettext(7, 'Order line not accepted', 'acqeosc', 'description')),
+(8, '201', oils_i18n_gettext(8, 'Price query: order line not accepted', 'acqeosc', 'description')),
+(9, '202', oils_i18n_gettext(9, 'Discount query: order line not accepted', 'acqeosc', 'description')),
+(10, '203', oils_i18n_gettext(10, 'Minimum order value not reached: order line not accepted', 'acqeosc', 'description')),
+(11, '205', oils_i18n_gettext(11, 'Order line not accepted: quoted promotion is invalid', 'acqeosc', 'description')),
+(12, '206', oils_i18n_gettext(12, 'Order line not accepted: quoted promotion has ended', 'acqeosc', 'description')),
+(13, '207', oils_i18n_gettext(13, 'Order line not accepted: customer ineligible for quoted promotion', 'acqeosc', 'description')),
+(14, '210', oils_i18n_gettext(14, 'Order line not accepted: substitute product is offered', 'acqeosc', 'description')),
+(15, '220', oils_i18n_gettext(15, 'Outstanding order line canceled: reason unspecified', 'acqeosc', 'description')),
+(16, '221', oils_i18n_gettext(16, 'Outstanding order line canceled: past order expiry date', 'acqeosc', 'description')),
+(17, '222', oils_i18n_gettext(17, 'Outstanding order line canceled by customer request', 'acqeosc', 'description')),
+(18, '223', oils_i18n_gettext(18, 'Outstanding order line canceled - unable to supply', 'acqeosc', 'description')),
+(19, '300', oils_i18n_gettext(19, 'Order line passed to new supplier', 'acqeosc', 'description')),
+(20, '301', oils_i18n_gettext(20, 'Order line passed to secondhand department', 'acqeosc', 'description')),
+(21, '400', oils_i18n_gettext(21, 'Backordered - awaiting supply', 'acqeosc', 'description')),
+(22, '401', oils_i18n_gettext(22, 'On order from our supplier', 'acqeosc', 'description')),
+(23, '402', oils_i18n_gettext(23, 'On order from abroad', 'acqeosc', 'description')),
+(24, '403', oils_i18n_gettext(24, 'Backordered, waiting to reach minimum order value', 'acqeosc', 'description')),
+(25, '404', oils_i18n_gettext(25, 'Dispatched from our supplier, awaiting delivery', 'acqeosc', 'description')),
+(26, '405', oils_i18n_gettext(26, 'Our supplier sent wrong item(s), re-ordered', 'acqeosc', 'description')),
+(27, '406', oils_i18n_gettext(27, 'Our supplier sent short, re-ordered', 'acqeosc', 'description')),
+(28, '407', oils_i18n_gettext(28, 'Our supplier sent damaged item(s), re-ordered', 'acqeosc', 'description')),
+(29, '408', oils_i18n_gettext(29, 'Our supplier sent imperfect item(s), re-ordered', 'acqeosc', 'description')),
+(30, '409', oils_i18n_gettext(30, 'Our supplier cannot trace order, re-ordered', 'acqeosc', 'description')),
+(31, '410', oils_i18n_gettext(31, 'Ordered item(s) being processed by bookseller', 'acqeosc', 'description')),
+(32, '411', oils_i18n_gettext(32, 'Ordered item(s) begin processed by bookseller, awaiting customer action', 'acqeosc', 'description')),
+(33, '412', oils_i18n_gettext(33, 'Order line held awaiting customer instruction', 'acqeosc', 'description')),
+(34, '500', oils_i18n_gettext(34, 'Order line on hold - contact customer service', 'acqeosc', 'description')),
+(35, '800', oils_i18n_gettext(35, 'Order line already dispatched/stock allocated for dispatch', 'acqeosc', 'description')),
+(36, '900', oils_i18n_gettext(36, 'Cannot trace order line', 'acqeosc', 'description')),
+(37, '901', oils_i18n_gettext(37, 'Order line held: note title change', 'acqeosc', 'description')),
+(38, '902', oils_i18n_gettext(38, 'Order line held: note pubdate or availability date delay', 'acqeosc', 'description')),
+(39, '903', oils_i18n_gettext(39, 'Order line held: note price change', 'acqeosc', 'description')),
+(40, '999', oils_i18n_gettext(40, 'Temporary hold: order action not yet determined', 'acqeosc', 'description'));
+
+INSERT INTO permission.perm_list ( id, code, description) VALUES
+ ( 564, 'ADMIN_EDI_STATUS_CODE', oils_i18n_gettext( 564,$
+ 'Allow a user to administer EDI order and availability status codes', 'ppl', 'description'));
+
+COMMIT;