From 117558bd8ac2db47761b28beb10c48944cd2c889 Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Thu, 27 Sep 2012 14:13:30 -0400 Subject: [PATCH] Exctract SAN from INVOIC buyer san Some vendors encode the SAN as "$SAN $vendcode". This code pulls the first set of non-space characters to use as the SAN. Signed-off-by: Bill Erickson --- Open-ILS/src/perlmods/lib/OpenILS/Application/Acq/EDI.pm | 3 +++ 1 file changed, 3 insertions(+) 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 6e9ce69d0d..5b6e8a2d5f 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Acq/EDI.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Acq/EDI.pm @@ -640,6 +640,9 @@ sub create_acq_invoice_from_edi { return 0; } + # some vendors encode the SAN as "$SAN $vendcode" + $buyer_san =~ s/\s.*//g; + # Find the matching org unit based on SAN via 'aoa' table. my $addrs = $e->search_actor_org_address({valid => "t", san => $buyer_san}); -- 2.11.0