From 3282cbbac2bc04fcf5beebffcffaebb3ce72b956 Mon Sep 17 00:00:00 2001 From: Lebbeous Fogle-Weekley Date: Thu, 5 Sep 2013 13:24:54 -0400 Subject: [PATCH] Better handling of purchase_order being non-numeric Signed-off-by: Lebbeous Fogle-Weekley Signed-off-by: Ben Shum --- Open-ILS/src/perlmods/lib/OpenILS/Application/Acq/EDI.pm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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 70642bddde..a7b05a4684 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Acq/EDI.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Acq/EDI.pm @@ -224,8 +224,8 @@ sub process_retrieval { # up PO number later from the lineitems themselves if necessary. if ($msg_hash->{purchase_order} !~ /^\d+$/) { - $logger->warn("EDI: PO identifier is non-numeric. Continuing."); - # No "next" here; we'll process this and just not link to acqpo. + $logger->warn("EDI: PO identifier is non-numeric. Blanking and continuing."); + undef $msg_hash->{purchase_order}; } else { $logger->info("EDI: processing message for PO " . $msg_hash->{purchase_order}); @@ -898,6 +898,7 @@ sub invoice_lineitem_to_invoice_entry { # references from the electronic invoice. # @param $message An acqedim object # @param $invoice_lineitems An arrayref from part of EDIReader output +# NOTE: This sub can have side-effects on $message. sub process_invoice_lineitems { my ($e, $msg_kludges, $log_prefix, $message, $invoice_lineitems) = @_; -- 2.43.2