From d943fb14f0fa311385cddeb9422b6f476f72c3d3 Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Fri, 28 Sep 2012 11:45:33 -0400 Subject: [PATCH] isbn may live in the PIA+5 Signed-off-by: Bill Erickson --- Open-ILS/src/support-scripts/test-scripts/edi_parser.pl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Open-ILS/src/support-scripts/test-scripts/edi_parser.pl b/Open-ILS/src/support-scripts/test-scripts/edi_parser.pl index 82b4bccb26..bb5d8ca947 100644 --- a/Open-ILS/src/support-scripts/test-scripts/edi_parser.pl +++ b/Open-ILS/src/support-scripts/test-scripts/edi_parser.pl @@ -17,6 +17,7 @@ my $BUYER_SAN_RE = '^NAD\+BY\+([^:]+).*'; my $VENDOR_SAN_RE = '^NAD\+SU\+([^:]+).*'; my $LIN_INDEX_RE = '^LIN\+([^\+]+).*'; my $LIN_IDENT_RE = '^LIN\+\S+\++([^:]+).*'; # e.g. ISBN +my $LIN_IDENT_2RE = '^PIA\+0*5\+([^:]+).*'; # e.g. ISBN PIA+05+1594097801:IB my $LIN_QUANTITY_RE = '^QTY\+47:(\d+).*'; my $LIN_AMOUNT_RE = '^MOA\+203:(\d+)'; my $LIN_ID_RE = '^RFF\+LI:\S+\/(\S+)'; @@ -55,6 +56,7 @@ foreach (split(/'/, $edi)) { } if ($msg->{_current_li}) { + ($msg->{_current_li}->{ident} = $_) =~ s/$LIN_IDENT_2RE/$1/g if /$LIN_IDENT_2RE/; ($msg->{_current_li}->{quantity} = $_) =~ s/$LIN_QUANTITY_RE/$1/g if /$LIN_QUANTITY_RE/; ($msg->{_current_li}->{amount} = $_) =~ s/$LIN_AMOUNT_RE/$1/g if /$LIN_AMOUNT_RE/; ($msg->{_current_li}->{id} = $_) =~ s/$LIN_ID_RE/$1/g if /$LIN_ID_RE/; -- 2.11.0