[freeside-commits] freeside/FS/FS Conf.pm, 1.397.2.56, 1.397.2.57 cust_main.pm, 1.568.2.8, 1.568.2.9

Erik Levinson levinse at wavetail.420.am
Wed Jun 22 21:08:53 PDT 2011


Update of /home/cvs/cvsroot/freeside/FS/FS
In directory wavetail.420.am:/tmp/cvs-serv6700/FS/FS

Modified Files:
      Tag: FREESIDE_2_1_BRANCH
	Conf.pm cust_main.pm 
Log Message:
echeck: add optional bank branch format, RT13360

Index: Conf.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/Conf.pm,v
retrieving revision 1.397.2.56
retrieving revision 1.397.2.57
diff -u -w -d -r1.397.2.56 -r1.397.2.57
--- Conf.pm	21 Jun 2011 18:20:42 -0000	1.397.2.56
+++ Conf.pm	23 Jun 2011 04:08:50 -0000	1.397.2.57
@@ -4403,6 +4403,13 @@
   },
   
   {
+    'key'         => 'cust_main-require-bank-branch',
+    'section'     => 'UI',
+    'description' => 'An alternate DCHK/CHEK format; require entry of bank branch number.',
+    'type'        => 'checkbox',
+  },
+  
+  {
     'key'         => 'cust-edit-alt-field-order',
     'section'     => 'UI',
     'description' => 'An alternate ordering of fields for the New Customer and Edit Customer screens.',

Index: cust_main.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/cust_main.pm,v
retrieving revision 1.568.2.8
retrieving revision 1.568.2.9
diff -u -w -d -r1.568.2.8 -r1.568.2.9
--- cust_main.pm	29 Apr 2011 15:07:44 -0000	1.568.2.8
+++ cust_main.pm	23 Jun 2011 04:08:50 -0000	1.568.2.9
@@ -1881,8 +1881,12 @@
   } elsif ( $check_payinfo && $self->payby =~ /^(CHEK|DCHK)$/ ) {
 
     my $payinfo = $self->payinfo;
-    $payinfo =~ s/[^\d\@]//g;
-    if ( $conf->exists('echeck-nonus') ) {
+    $payinfo =~ s/[^\d\@\.]//g;
+    if ( $conf->exists('cust_main-require-bank-branch') ) {
+      $payinfo =~ /^(\d+)\@(\d+)\.(\d+)$/ or return 'invalid echeck account at branch.bank';
+      $payinfo = "$1\@$2.$3";
+    }
+    elsif ( $conf->exists('echeck-nonus') ) {
       $payinfo =~ /^(\d+)\@(\d+)$/ or return 'invalid echeck account at aba';
       $payinfo = "$1\@$2";
     } else {



More information about the freeside-commits mailing list