From 93be423815b0ee8c4aa0946c38bb877ffbfd5195 Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Mon, 2 Jun 2014 17:22:11 -0400 Subject: [PATCH] LP#1270289 improve stock acq cancel reason labels Add "Delayed:" and "Canceled:" prefixes to stock labels based on their keep_debits flag to better differentiate between delayed and canceled items in the UI. Signed-off-by: Bill Erickson Signed-off-by: Kathy Lussier Signed-off-by: Ben Shum --- Open-ILS/src/sql/Pg/950.data.seed-values.sql | 28 +++++----- .../Pg/upgrade/XXXY.data.acq-cancel-display.sql | 63 ++++++++++++++++++++++ 2 files changed, 77 insertions(+), 14 deletions(-) create mode 100644 Open-ILS/src/sql/Pg/upgrade/XXXY.data.acq-cancel-display.sql diff --git a/Open-ILS/src/sql/Pg/950.data.seed-values.sql b/Open-ILS/src/sql/Pg/950.data.seed-values.sql index 2852f3f8f2..2343fce842 100644 --- a/Open-ILS/src/sql/Pg/950.data.seed-values.sql +++ b/Open-ILS/src/sql/Pg/950.data.seed-values.sql @@ -9597,37 +9597,37 @@ INSERT INTO acq.invoice_method (code,name) VALUES ('EDI',oils_i18n_gettext('EDI' INSERT INTO acq.invoice_method (code,name) VALUES ('PPR',oils_i18n_gettext('PPR', 'Paper', 'acqit', 'name')); INSERT INTO acq.cancel_reason ( id, org_unit, label, description ) VALUES ( - 1, 1, oils_i18n_gettext(1,'invalid_isbn', 'acqcr', 'label'), oils_i18n_gettext( 1, 'ISBN is unrecognizable', 'acqcr', 'description' )); + 1, 1, oils_i18n_gettext(1,'Canceled: Invalid ISBN', 'acqcr', 'label'), oils_i18n_gettext( 1, 'ISBN is unrecognizable', 'acqcr', 'description' )); INSERT INTO acq.cancel_reason ( id, org_unit, label, description ) VALUES ( - 2, 1, oils_i18n_gettext(2,'postpone', 'acqcr', 'label'), oils_i18n_gettext( 2, 'Title has been postponed', 'acqcr', 'description' )); + 2, 1, oils_i18n_gettext(2,'Canceled: Postpone', 'acqcr', 'label'), oils_i18n_gettext( 2, 'Title has been postponed', 'acqcr', 'description' )); INSERT INTO acq.cancel_reason ( id, org_unit, label, description, keep_debits ) VALUES ( - 3, 1, oils_i18n_gettext(3, 'delivered_but_lost', 'acqcr', 'label'), + 3, 1, oils_i18n_gettext(3, 'Delayed: Delivered but Lost', 'acqcr', 'label'), oils_i18n_gettext( 3, 'Delivered but not received; presumed lost', 'acqcr', 'description' ), TRUE ); INSERT INTO acq.cancel_reason (keep_debits, id, org_unit, label, description) VALUES -('f',( 2+1000), 1, oils_i18n_gettext(1002, 'Deleted', 'acqcr', 'label'), +('f',( 2+1000), 1, oils_i18n_gettext(1002, 'Canceled: Deleted', 'acqcr', 'label'), oils_i18n_gettext(1002, 'The information is to be or has been deleted.', 'acqcr', 'description')), -('t',( 3+1000), 1, oils_i18n_gettext(1003, 'Changed', 'acqcr', 'label'), +('t',( 3+1000), 1, oils_i18n_gettext(1003, 'Delayed: Changed', 'acqcr', 'label'), oils_i18n_gettext(1003, 'The information is to be or has been changed.', 'acqcr', 'description')), -('t',( 4+1000), 1, oils_i18n_gettext(1004, 'No action', 'acqcr', 'label'), +('t',( 4+1000), 1, oils_i18n_gettext(1004, 'Delayed: No Action', 'acqcr', 'label'), oils_i18n_gettext(1004, 'This line item is not affected by the actual message.', 'acqcr', 'description')), -('t',( 5+1000), 1, oils_i18n_gettext(1005, 'Accepted without amendment', 'acqcr', 'label'), +('t',( 5+1000), 1, oils_i18n_gettext(1005, 'Delayed: Accepted without amendment', 'acqcr', 'label'), oils_i18n_gettext(1005, 'This line item is entirely accepted by the seller.', 'acqcr', 'description')), -('f',( 7+1000), 1, oils_i18n_gettext(1007, 'Not accepted', 'acqcr', 'label'), +('f',( 7+1000), 1, oils_i18n_gettext(1007, 'Canceled: Not Accepted', 'acqcr', 'label'), oils_i18n_gettext(1007, 'This line item is not accepted by the seller.', 'acqcr', 'description')), -('f',( 10+1000), 1, oils_i18n_gettext(1010, 'Not found', 'acqcr', 'label'), +('f',( 10+1000), 1, oils_i18n_gettext(1010, 'Canceled: Not Found', 'acqcr', 'label'), oils_i18n_gettext(1010, 'This line item is not found in the referenced message.', 'acqcr', 'description')), -('t',( 24+1000), 1, oils_i18n_gettext(1024, 'Accepted with amendment, no confirmation required', 'acqcr', 'label'), +('t',( 24+1000), 1, oils_i18n_gettext(1024, 'Delayed: Accepted with amendment', 'acqcr', 'label'), oils_i18n_gettext(1024, 'Accepted with changes which require no confirmation.', 'acqcr', 'description')); INSERT INTO acq.cancel_reason (org_unit, keep_debits, id, label, description) VALUES -(1, 't', 1211, oils_i18n_gettext(1211, 'Split quantity', 'acqcr', 'label'), +(1, 't', 1211, oils_i18n_gettext(1211, 'Delayed: Split Quantity', 'acqcr', 'label'), oils_i18n_gettext(1211, 'Part of the whole quantity.', 'acqcr', 'description')), -(1, 't', 1221, oils_i18n_gettext(1221, 'Ordered quantity', 'acqcr', 'label'), +(1, 't', 1221, oils_i18n_gettext(1221, 'Delayed: Ordered Quantity', 'acqcr', 'label'), oils_i18n_gettext(1221, '[6024] The quantity which has been ordered.', 'acqcr', 'description')), -(1, 't', 1246, oils_i18n_gettext(1246, 'Pieces delivered', 'acqcr', 'label'), +(1, 't', 1246, oils_i18n_gettext(1246, 'Delayed: Pieces Delivered', 'acqcr', 'label'), oils_i18n_gettext(1246, 'Number of pieces actually received at the final destination.', 'acqcr', 'description')), -(1, 't', 1283, oils_i18n_gettext(1283, 'Backorder quantity', 'acqcr', 'label'), +(1, 't', 1283, oils_i18n_gettext(1283, 'Delayed: Backorder', 'acqcr', 'label'), oils_i18n_gettext(1283, 'The quantity of goods that is on back-order.', 'acqcr', 'description')); INSERT INTO config.global_flag (name, label, enabled) diff --git a/Open-ILS/src/sql/Pg/upgrade/XXXY.data.acq-cancel-display.sql b/Open-ILS/src/sql/Pg/upgrade/XXXY.data.acq-cancel-display.sql new file mode 100644 index 0000000000..153602b2bf --- /dev/null +++ b/Open-ILS/src/sql/Pg/upgrade/XXXY.data.acq-cancel-display.sql @@ -0,0 +1,63 @@ + +BEGIN; + +-- Update ACQ cancel reason names, but only those that +-- have not already been locally modified from stock values. + +UPDATE acq.cancel_reason + SET label = oils_i18n_gettext(1,'Canceled: Invalid ISBN', 'acqcr', 'label') + WHERE id = 1 AND label = 'invalid_isbn'; + +UPDATE acq.cancel_reason + SET label = oils_i18n_gettext(1,'Canceled: Postpone', 'acqcr', 'label') + WHERE id = 2 AND label = 'postpone'; + +UPDATE acq.cancel_reason + SET label = oils_i18n_gettext(1,'Delayed: Delivered but Lost', 'acqcr', 'label') + WHERE id = 3 AND label = 'delivered_but_lost'; + +UPDATE acq.cancel_reason + SET label = oils_i18n_gettext(1,'Canceled: Deleted', 'acqcr', 'label') + WHERE id = 1002 AND label = 'Deleted'; + +UPDATE acq.cancel_reason + SET label = oils_i18n_gettext(1,'Delayed: Changed', 'acqcr', 'label') + WHERE id = 1003 AND label = 'Changed'; + +UPDATE acq.cancel_reason + SET label = oils_i18n_gettext(1,'Delayed: No Action', 'acqcr', 'label') + WHERE id = 1004 AND label = 'No action'; + +UPDATE acq.cancel_reason + SET label = oils_i18n_gettext(1,'Delayed: Accepted without amendment', 'acqcr', 'label') + WHERE id = 1005 AND label = 'Accepted without amendment'; + +UPDATE acq.cancel_reason + SET label = oils_i18n_gettext(1,'Canceled: Not Accepted', 'acqcr', 'label') + WHERE id = 1007 AND label = 'Not accepted'; + +UPDATE acq.cancel_reason + SET label = oils_i18n_gettext(1,'Canceled: Not Found', 'acqcr', 'label') + WHERE id = 1010 AND label = 'Not found'; + +UPDATE acq.cancel_reason + SET label = oils_i18n_gettext(1,'Delayed : Accepted with amendment', 'acqcr', 'label') + WHERE id = 1024 AND label = 'Accepted with amendment, no confirmation required'; + +UPDATE acq.cancel_reason + SET label = oils_i18n_gettext(1,'Delayed : Split Quantity', 'acqcr', 'label') + WHERE id = 1211 AND label = 'Split quantity'; + +UPDATE acq.cancel_reason + SET label = oils_i18n_gettext(1,'Delayed : Ordered Quantity', 'acqcr', 'label') + WHERE id = 1221 AND label = 'Ordered quantity'; + +UPDATE acq.cancel_reason + SET label = oils_i18n_gettext(1,'Delayed : Pieces Delivered', 'acqcr', 'label') + WHERE id = 1246 AND label = 'Pieces delivered'; + +UPDATE acq.cancel_reason + SET label = oils_i18n_gettext(1,'Delayed : Backorder', 'acqcr', 'label') + WHERE id = 1283 AND label = 'Backorder quantity'; + +COMMIT; -- 2.11.0