From: Jane Sandberg Date: Wed, 23 May 2018 17:14:47 +0000 (-0700) Subject: LP1770202: Handle EDI order statuses 220, 221, 222, 223, 401, 402 X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=912abdeaefe5db11d686b185f602aa7838b3496a;p=working%2FEvergreen.git 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 --- 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 }