From 7c99539887f6362371b956509d959c4e28200885 Mon Sep 17 00:00:00 2001 From: Josh Stompro Date: Fri, 4 Mar 2016 13:51:34 -0600 Subject: [PATCH] LP#1550495 - Add EDI Cancel Code 85 - used by Baker & Taylor Baker & Taylor send back a quantity code 85 response when they cancel a line item. This code wasn't included as one of the built in EDI codes so those line items were not being canceled automatically in evergreen. The system looks for the response code + 1200 to find the cancel reason, so this code is entered as ID 1285 in the acq.cancel_reason table. I received confirmation from another system that uses B&T as an EDI vendor that they also receive code 85 responses when something gets canceled. Signed-off-by: Josh Stompro Signed-off-by: Galen Charlton --- Open-ILS/src/sql/Pg/950.data.seed-values.sql | 4 +++- .../sql/Pg/upgrade/xxxx.acq.cancel_reason-add-85.sql | 18 ++++++++++++++++++ .../Acquisitions/add_cancel_reason_85.adoc | 6 ++++++ 3 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 Open-ILS/src/sql/Pg/upgrade/xxxx.acq.cancel_reason-add-85.sql create mode 100644 docs/RELEASE_NOTES_NEXT/Acquisitions/add_cancel_reason_85.adoc 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 ffb07878c5..9e9e09a991 100644 --- a/Open-ILS/src/sql/Pg/950.data.seed-values.sql +++ b/Open-ILS/src/sql/Pg/950.data.seed-values.sql @@ -11482,7 +11482,9 @@ INSERT INTO acq.cancel_reason (org_unit, keep_debits, id, label, description) VA (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, 'Delayed: Backorder', 'acqcr', 'label'), - oils_i18n_gettext(1283, 'The quantity of goods that is on back-order.', 'acqcr', 'description')); + oils_i18n_gettext(1283, 'The quantity of goods that is on back-order.', 'acqcr', 'description')), +(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 config.global_flag (name, label, enabled) VALUES ( diff --git a/Open-ILS/src/sql/Pg/upgrade/xxxx.acq.cancel_reason-add-85.sql b/Open-ILS/src/sql/Pg/upgrade/xxxx.acq.cancel_reason-add-85.sql new file mode 100644 index 0000000000..d2e2273bb9 --- /dev/null +++ b/Open-ILS/src/sql/Pg/upgrade/xxxx.acq.cancel_reason-add-85.sql @@ -0,0 +1,18 @@ +BEGIN; + +-- INSERT INTO config.upgrade_log (version) VALUES ('xxxx'); + +-- LP#1550495 - Add Baker&Taylor EDI Quantity Cancel Code +-- Insert EDI Cancel Reason 85 (1200 + 85 = 1285) if it doesn't already exist +INSERT INTO acq.cancel_reason + (org_unit, keep_debits, id, label, description) + SELECT + 1, 'f',( 85+1200), + oils_i18n_gettext(1285, 'Canceled: By Vendor', 'acqcr', 'label'), + oils_i18n_gettext(1285, 'Line item canceled by vendor', 'acqcr', 'description') + WHERE NOT EXISTS ( + SELECT 1 FROM acq.cancel_reason where id=(85+1200) + ); + + +COMMIT; diff --git a/docs/RELEASE_NOTES_NEXT/Acquisitions/add_cancel_reason_85.adoc b/docs/RELEASE_NOTES_NEXT/Acquisitions/add_cancel_reason_85.adoc new file mode 100644 index 0000000000..62ec0c10fa --- /dev/null +++ b/docs/RELEASE_NOTES_NEXT/Acquisitions/add_cancel_reason_85.adoc @@ -0,0 +1,6 @@ +Add Acquisitions Cancel Reason 85 for Baker&Taylor EDI +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +Baker & Taylor send back a quantity status code of 85 +when a line item is canceled when using EDI. That code +is now included in the system so those cancelations get +properly registered. -- 2.11.0