From: Bill Erickson Date: Mon, 6 Dec 2021 16:01:12 +0000 (-0500) Subject: LP1952931 ASN shipment notifiation Perl X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=d658b42c9964a38aaecf16785d99439814c737ff;p=working%2FEvergreen.git LP1952931 ASN shipment notifiation Perl Signed-off-by: Bill Erickson --- 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 c7f1e26acd..9ff26810bf 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Acq/EDI.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Acq/EDI.pm @@ -526,7 +526,9 @@ sub process_message_buyer { # some vendors encode the account number as the SAN. # starting with the san value, then the account value, # treat each as a san, then an acct number until the first success - for my $buyer ( ($msg_hash->{buyer_san}, $msg_hash->{buyer_acct}) ) { + for my $buyer ( ($msg_hash->{buyer_san}, + $msg_hash->{buyer_acct}, $msg_hash->{buyer_ident}) ) { + next unless $buyer; # some vendors encode the SAN as "$SAN $vendcode" diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Utils/EDIReader.pm b/Open-ILS/src/perlmods/lib/OpenILS/Utils/EDIReader.pm index cd2ecbeb1d..076667afd1 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/Utils/EDIReader.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/Utils/EDIReader.pm @@ -23,9 +23,11 @@ my %edi_fields = ( message_type => qr/^UNH\+[A-z0-9]+\+(\S{6})/, buyer_san => qr/^NAD\+BY\+([^:]+)::31B/, buyer_acct => qr/^NAD\+BY\+([^:]+)::91/, + buyer_ident => qr/^NAD\+BY\+([^:]+)::9$/, # alternate SAN buyer_code => qr/^RFF\+API:(\S+)/, vendor_san => qr/^NAD\+SU\+([^:]+)::31B/, vendor_acct => qr/^NAD\+SU\+([^:]+)::91/, + vendor_ident => qr/^NAD\+SU\+([^:]+)::9$/, # alternate SAN purchase_order => qr/^RFF\+ON:(\S+)/, invoice_ident => qr/^BGM\+380\+([^\+]+)/, total_billed => qr/^MOA\+86:([^:]+)/,