From 912abdeaefe5db11d686b185f602aa7838b3496a Mon Sep 17 00:00:00 2001 From: Jane Sandberg Date: Wed, 23 May 2018 10:14:47 -0700 Subject: [PATCH] LP1770202: Handle EDI order statuses 220, 221, 222, 223, 401, 402 To test: 1) Apply this commit 2) Create a purchase order and activate it 3) Create an ORDRSP EDI file relevant to the items on the purchase order that makes use of one of these order statuses. Process it. 4) Make sure that those order statuses cause items to be canceled or backordered properly in the acq interface. Signed-off-by: Jane Sandberg --- Open-ILS/src/perlmods/lib/OpenILS/Application/Acq/EDI.pm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/Acq/EDI.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/Acq/EDI.pm index 49feb96098..871e61fc19 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Acq/EDI.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Acq/EDI.pm @@ -788,7 +788,11 @@ sub process_parsed_msg { if ($stat eq '200') { $reason_id = 1007; # not accepted - } elsif ($stat eq '400') { + } elsif ($stat =~ /22[0-3]/) { + $reason_id = 1285; # canceled by vendor + } + + } elsif ($stat =~ /40[0-2]/) { $reason_id = 1283; # back-order } -- 2.11.0