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)
commitf057fb1630fe7339539c6f4f0ff35e31be66e583
treeffea1567e0589aa0d5e6abcfa9fdc2332ffc5a1c
parent0c8439f195663e5c7aa277024cc81a4e1191be3e
EDI avoid canceling backorder items (from bradley patch)

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