From: gmc Date: Fri, 29 Oct 2010 00:06:02 +0000 (+0000) Subject: loosen cross-check of line item ID when processing incoming EDI messages X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=45418f98bcc0cc1478d6e2391af45840f93bb4e5;p=evergreen%2Fbjwebb.git loosen cross-check of line item ID when processing incoming EDI messages Signed-off-by: Galen Charlton git-svn-id: svn://svn.open-ils.org/ILS/trunk@18538 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- diff --git a/Open-ILS/src/perlmods/OpenILS/Application/Acq/EDI.pm b/Open-ILS/src/perlmods/OpenILS/Application/Acq/EDI.pm index 8b9012901..df6abefc5 100644 --- a/Open-ILS/src/perlmods/OpenILS/Application/Acq/EDI.pm +++ b/Open-ILS/src/perlmods/OpenILS/Application/Acq/EDI.pm @@ -656,12 +656,21 @@ sub eg_li { $logger->warn("EDI ORDRSP RFF/1153 unexpected value ('$val_1153', not 'LI'). Attempting failover to LIN/1082"); } - if ($id and $val_1082 and $val_1082 ne $id) { - $logger->warn("EDI ORDRSP LIN/1082 Line Item ID mismatch ($id vs. $val_1082): cannot target update"); + # FIXME - the line item ID in LIN/1082 ought to match RFF/1154, but + # not all materials vendors obey this. Commenting out check for now + # as being too strict. + #if ($id and $val_1082 and $val_1082 ne $id) { + # $logger->warn("EDI ORDRSP LIN/1082 Line Item ID mismatch ($id vs. $val_1082): cannot target update"); + # return; + #} + + $id ||= $val_1082 || ''; + if ($id eq '') { + $logger->warn('Cannot identify line item from EDI message'); return; } - $id ||= $val_1082 || ''; - print STDERR "EDI retrieve/update lineitem $id\n"; + + $logger->info("EDI retrieve/update lineitem $id"); my $li = OpenILS::Application::Acq::Lineitem::retrieve_lineitem_impl($e, $id, { flesh_li_details => 1,