RT#7274: accept CR/LF in RBC batch import
authormark <mark>
Wed, 10 Feb 2010 02:12:43 +0000 (02:12 +0000)
committermark <mark>
Wed, 10 Feb 2010 02:12:43 +0000 (02:12 +0000)
FS/FS/pay_batch.pm
FS/FS/pay_batch/RBC.pm

index 59ff2c3..6a27554 100644 (file)
@@ -272,11 +272,12 @@ sub import_results {
         };
         push @all_values, [ $csv->fields(), $line ];
       }elsif ($filetype eq 'fixed'){
-        my @values = ( $line =~ /$formatre/, $line );
+        my @values = ( $line =~ /$formatre/ );
         unless (@values) {
           $dbh->rollback if $oldAutoCommit;
           return "can't parse: ". $line;
         };
+        push @values, $line;
         push @all_values, \@values;
       }else{
         $dbh->rollback if $oldAutoCommit;
index daf6548..26ff959 100644 (file)
@@ -14,7 +14,7 @@ $name = 'RBC';
 %import_info = (
   'filetype'    => 'fixed',
   'formatre'    => 
-  '^(.).{18}(.{4}).{3}(.).{11}(.{19}).{6}(.{30}).{17}(.{9})(.{18}).{6}(.{14}).{23}(.).{9}$',
+  '^(.).{18}(.{4}).{3}(.).{11}(.{19}).{6}(.{30}).{17}(.{9})(.{18}).{6}(.{14}).{23}(.).{9}\r?$',
   'fields' => [ qw(
     recordtype
     batchnum