LP 1519465: POs with spaces in the name cause EDI problems.
authorJason Stephenson <jstephenson@mvlc.org>
Tue, 24 Nov 2015 18:57:33 +0000 (13:57 -0500)
committerBen Shum <bshum@biblio.org>
Tue, 5 Jan 2016 21:29:39 +0000 (16:29 -0500)
This is a small modification to the regular expression for parsing
the id from the edi line item fields in EDIReader.pm that allows the
ids to parse correctly when the PO name contained a space or spaces
in it.  This change was suggesting by Bill Erickson (berick) in
http://irc.evergreen-ils.org/evergreen/2015-11-24#i_216736

Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
Signed-off-by: Ben Shum <bshum@biblio.org>
Open-ILS/src/perlmods/lib/OpenILS/Utils/EDIReader.pm

index 3a3ecc6..4c17d34 100644 (file)
@@ -32,7 +32,7 @@ my %edi_fields = (
 );
 
 my %edi_li_fields = (
-    id      => qr/^RFF\+LI:(?:\S+\/)?(\d+)/,
+    id      => qr/^RFF\+LI:(?:[^\/]+\/)?(\d+)/,
     index   => qr/^LIN\+([^\+]+)/,
     amount_billed   => qr/^MOA\+203:([^:]+)/,
     net_unit_price  => qr/^PRI\+AAA:([^:]+)/,