summaryrefslogtreecommitdiff
path: root/httemplate/edit
diff options
context:
space:
mode:
authorlevinse <levinse>2011-06-23 04:09:48 +0000
committerlevinse <levinse>2011-06-23 04:09:48 +0000
commita0dd6f2c04a3f22aa741d1d639f8985a81c6e81b (patch)
tree6f8a8e24615a28a201e6f774827f5048624fa94c /httemplate/edit
parent3545cf7c664f5cd24a5c4e9cf8c7ef368ac51f1f (diff)
echeck: add optional bank branch format, RT13360
Diffstat (limited to 'httemplate/edit')
-rwxr-xr-xhttemplate/edit/cust_main.cgi2
-rw-r--r--httemplate/edit/cust_main/billing.html6
-rw-r--r--httemplate/edit/cust_main/bottomfixup.js2
-rwxr-xr-xhttemplate/edit/process/cust_main.cgi7
4 files changed, 13 insertions, 4 deletions
diff --git a/httemplate/edit/cust_main.cgi b/httemplate/edit/cust_main.cgi
index 516423860..2ba40d23a 100755
--- a/httemplate/edit/cust_main.cgi
+++ b/httemplate/edit/cust_main.cgi
@@ -194,7 +194,7 @@ function samechanged(what) {
%# cust_main/bottomfixup.js
% foreach my $hidden (
% 'payauto',
-% 'payinfo', 'payinfo1', 'payinfo2', 'paytype',
+% 'payinfo', 'payinfo1', 'payinfo2', 'payinfo3', 'paytype',
% 'payname', 'paystate', 'exp_month', 'exp_year', 'paycvv',
% 'paystart_month', 'paystart_year', 'payissue',
% 'payip',
diff --git a/httemplate/edit/cust_main/billing.html b/httemplate/edit/cust_main/billing.html
index 049e7ed19..8a90204dd 100644
--- a/httemplate/edit/cust_main/billing.html
+++ b/httemplate/edit/cust_main/billing.html
@@ -125,6 +125,8 @@
% my $payby = $cust_main->payby;
% my $paytype = $cust_main->paytype;
% my( $account, $aba ) = split('@', $payinfo);
+% my $branch = '';
+% ($branch,$aba) = split('\.',$aba) if $conf->exists('cust_main-require-bank-branch');
%
% my $disabled = 'DISABLED style="background-color: #dddddd"';
% my $text_disabled = 'style="color: #999999"';
@@ -240,6 +242,10 @@
% qq!<INPUT TYPE="hidden" NAME="CHEK_exp_month" VALUE="12">!.
% qq!<INPUT TYPE="hidden" NAME="CHEK_exp_year" VALUE="2037">!.
%
+% ( $conf->exists('cust_main-require-bank-branch') ?
+% qq!<TR><TD ALIGN="right">$r Branch number</TD><TD COLSPAN="3">
+% <INPUT TYPE="text" name="CHEK_payinfo3" VALUE=$branch></TD></TR>! : '' ).
+%
% qq!<TR><TD ALIGN="right" WIDTH="200">${r}!.emt('Bank name').qq! </TD>!.
% qq!<TD COLSPAN="3" WIDTH="408"><INPUT TYPE="text" NAME="CHEK_payname" VALUE="!. ( $payby =~ /^(CHEK|DCHK)$/ ? $cust_main->payname : '' ). qq!"></TD></TR>!.
% ( $conf->exists('show_bankstate') ?
diff --git a/httemplate/edit/cust_main/bottomfixup.js b/httemplate/edit/cust_main/bottomfixup.js
index 942fc0e66..24156f792 100644
--- a/httemplate/edit/cust_main/bottomfixup.js
+++ b/httemplate/edit/cust_main/bottomfixup.js
@@ -3,7 +3,7 @@ function bottomfixup(what) {
%# ../cust_main.cgi
var layervars = new Array(
'payauto',
- 'payinfo', 'payinfo1', 'payinfo2', 'paytype',
+ 'payinfo', 'payinfo1', 'payinfo2', 'payinfo3', 'paytype',
'payname', 'paystate', 'exp_month', 'exp_year', 'paycvv',
'paystart_month', 'paystart_year', 'payissue',
'payip',
diff --git a/httemplate/edit/process/cust_main.cgi b/httemplate/edit/process/cust_main.cgi
index 3d56a8255..df6cec9df 100755
--- a/httemplate/edit/process/cust_main.cgi
+++ b/httemplate/edit/process/cust_main.cgi
@@ -42,8 +42,11 @@ $cgi->param('payby', $payby);
if ( $payby ) {
if ( $payby eq 'CHEK' || $payby eq 'DCHK' ) {
- $cgi->param('payinfo',
- $cgi->param('payinfo1'). '@'. $cgi->param('payinfo2') );
+ my $payinfo = $cgi->param('payinfo1'). '@';
+ $payinfo .= $cgi->param('payinfo3').'.'
+ if $conf->exists('cust_main-require-bank-branch');
+ $payinfo .= $cgi->param('payinfo2');
+ $cgi->param('payinfo',$payinfo);
}
$cgi->param('paydate',
$cgi->param( 'exp_month' ). '-'. $cgi->param( 'exp_year' ) );