[freeside-commits] branch FREESIDE_3_BRANCH updated. fe708edd0ced9686d96b3ceb3de1300f5984a92e

Jonathan Prykop jonathan at 420.am
Fri Feb 27 23:08:13 PST 2015


The branch, FREESIDE_3_BRANCH has been updated
       via  fe708edd0ced9686d96b3ceb3de1300f5984a92e (commit)
       via  7e8446b68291dcc4ae2b305f048d1966aa27f1fc (commit)
      from  ca9f1e88e00736efff1deff396d25165e67094cd (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit fe708edd0ced9686d96b3ceb3de1300f5984a92e
Author: Jonathan Prykop <jonathan at freeside.biz>
Date:   Sat Feb 28 01:05:53 2015 -0600

    RT#33582 RBC return batch processing failure [added comments]

diff --git a/FS/FS/pay_batch/RBC.pm b/FS/FS/pay_batch/RBC.pm
index a9b670d..f3f8170 100644
--- a/FS/FS/pay_batch/RBC.pm
+++ b/FS/FS/pay_batch/RBC.pm
@@ -11,6 +11,18 @@ my ($client_num, $shortname, $longname, $trans_code, $i);
 $name = 'RBC';
 # Royal Bank of Canada ACH Direct Payments Service
 
+# Meaning of initial characters in records:
+# 0 - header row, skipped by begin_condition
+# 1 - Debit Detail Record (only when subtype is 0)
+# 2 - Credit Detail Record, we die with a parse error (shouldn't appear in freeside-generated batches)
+# 3 - Account Trailer Record (appears after Returned items, we skip)
+# 4 - Client Trailer Record, indicates end of batch in end_condition
+#
+# Subtypes (27th char) indicate different kinds of Debit/Credit records
+# 0 - Credit/Debit Detail Record
+# 3 - Error Message Record
+# 4 - Foreign Currency Information Records
+# We skip all subtypes except 0
 %import_info = (
   'filetype'    => 'fixed',
   'formatre'    => 

commit 7e8446b68291dcc4ae2b305f048d1966aa27f1fc
Author: Jonathan Prykop <jonathan at freeside.biz>
Date:   Thu Feb 26 14:16:47 2015 -0600

    RT#33582: RBC return batch processing failure

diff --git a/FS/FS/pay_batch/RBC.pm b/FS/FS/pay_batch/RBC.pm
index 4b11fdb..a9b670d 100644
--- a/FS/FS/pay_batch/RBC.pm
+++ b/FS/FS/pay_batch/RBC.pm
@@ -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}\r?$',
+  '^([0134]).{18}(.{4}).{3}(.).{11}(.{19}).{6}(.{30}).{17}(.{9})(.{18}).{6}(.{14}).{23}(.).{9}\r?$',
   'fields' => [ qw(
     recordtype
     batchnum
@@ -61,7 +61,8 @@ $name = 'RBC';
   },
   'skip_condition' => sub {
       my $hash = shift;
-      $hash->{'subtype'} ne '0';
+      $hash->{'recordtype'} eq '3' ||
+        $hash->{'subtype'} ne '0';
   },
 );
 

-----------------------------------------------------------------------

Summary of changes:
 FS/FS/pay_batch/RBC.pm |   17 +++++++++++++++--
 1 file changed, 15 insertions(+), 2 deletions(-)




More information about the freeside-commits mailing list