LP1952931 ASN shipment notifiation Perl
authorBill Erickson <berickxx@gmail.com>
Mon, 6 Dec 2021 16:01:12 +0000 (11:01 -0500)
committerBill Erickson <berickxx@gmail.com>
Tue, 7 Dec 2021 21:29:58 +0000 (16:29 -0500)
Signed-off-by: Bill Erickson <berickxx@gmail.com>
Open-ILS/src/perlmods/lib/OpenILS/Application/Acq/EDI.pm
Open-ILS/src/perlmods/lib/OpenILS/Utils/EDIReader.pm

index c7f1e26..9ff2681 100644 (file)
@@ -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"
index cd2ecbe..076667a 100644 (file)
@@ -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:([^:]+)/,