EDI: accept all misc. invoice charge values
authorBill Erickson <berick@esilibrary.com>
Fri, 25 Jan 2013 15:54:23 +0000 (10:54 -0500)
committerLebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Tue, 5 Feb 2013 22:17:26 +0000 (17:17 -0500)
Don't be picky about which types of invoice charges we extract.  If the
invoice has a charge, extract the value regardless of how its encoded.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Open-ILS/src/perlmods/lib/OpenILS/Utils/EDIReader.pm

index bfa0a50..25f59ee 100644 (file)
@@ -55,12 +55,9 @@ my %edi_li_quant_fields = (
 
 my %edi_charge_fields = (
     charge_type   => qr/^ALC\+C\++([^\+]+)/,
-    charge_amount => qr/^MOA\+(?:8|131|304):([^:]+)/
+    charge_amount => qr/^MOA\+\d+:([^:]+)/
 );
 
-# XXX can't help but wonder whether this might be ok in %edi_charge_fields:
-#   charge_amount => qr/^MOA\+(\d+):([^:]+)/
-
 sub new {
     return bless({}, shift());
 }