From 90c3e1211a0731b95a2b1df0f5f5e082dcf20e9b Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Mon, 6 Dec 2021 11:01:12 -0500 Subject: [PATCH] LP1952931 ASN shipment notifiation Perl Signed-off-by: Bill Erickson --- Open-ILS/src/perlmods/lib/OpenILS/Application/Acq/EDI.pm | 4 +++- Open-ILS/src/perlmods/lib/OpenILS/Utils/EDIReader.pm | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) 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:([^:]+)/, -- 2.11.0