EDI avoid canceling backorder items (from bradley patch)
authorBill Erickson <berickxx@gmail.com>
Thu, 11 Dec 2014 23:10:31 +0000 (18:10 -0500)
committerBill Erickson <berickxx@gmail.com>
Thu, 21 Mar 2019 19:46:23 +0000 (15:46 -0400)
Quoth Bradley:

I did a quick and dirty hack to the perl file EDI.pm to get around this
temporarily. (version 2.4.5)

Normally, the EDI response read would interpret a 400 response as
back-ordererd and assign a cancel reason(and cancel the line item and
its copies). I just tried changing it to 401 instead, causing a 400 to
be ignored.

If there IS a legitimate 401 returned, that might cause trouble! And, I
don't have a way in the client to see back ordered items, although our
staff has other ways to determine that from the vendors.

snippet changed (400 changed to 401):

if ($stat = $li_hash->{order_status}) { $logger->info("EDI: lineitem has
order status $stat");

    if ($stat eq '200') { $reason_id = 1007; # not
    accepted

    } elsif ($stat eq '401') { $reason_id = 1283; #
    back-order }

Signed-off-by: Bill Erickson <berickxx@gmail.com>
Open-ILS/src/perlmods/lib/OpenILS/Application/Acq/EDI.pm

index 49feb96..e0fc040 100644 (file)
@@ -788,7 +788,7 @@ sub process_parsed_msg {
                     if ($stat eq '200') { 
                         $reason_id = 1007; # not accepted
 
-                    } elsif ($stat eq '400') { 
+                    } elsif ($stat eq '401') { 
                         $reason_id = 1283; # back-order
                     }