Acq: Be more liberal reading EDIFACT message reference number
authorLebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Thu, 24 Jan 2013 22:16:07 +0000 (17:16 -0500)
committerLebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Tue, 5 Feb 2013 22:17:26 +0000 (17:17 -0500)
Spec, if I read it correctly, says that this is alphanumeric, not just
numeric, and ULS is one vendor I've seen taking advantage of letters and
numbers in that space.

This commit makes the relevant regex in our EDIReader appropriately more
tolerant.

Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Open-ILS/src/perlmods/lib/OpenILS/Utils/EDIReader.pm

index 222b40d..bfa0a50 100644 (file)
@@ -19,7 +19,7 @@ my $NEW_MSG_RE = '^UNH'; # starts a new message
 my $NEW_LIN_RE = '^LIN'; # starts a new line item
 
 my %edi_fields = (
-    message_type    => qr/^UNH\+\d+\+(\S{6})/,
+    message_type    => qr/^UNH\+[A-z0-9]+\+(\S{6})/,
     buyer_san       => qr/^NAD\+BY\+([^:]+)::31B/,
     buyer_acct      => qr/^NAD\+BY\+([^:]+)::91/,
     vendor_san      => qr/^NAD\+SU\+([^:]+)::31B/,