From 074464a707b2c8b83cc50cd0bb067660ef4d0f9f Mon Sep 17 00:00:00 2001 From: ivan Date: Sat, 14 Jan 2012 07:05:18 +0000 Subject: improve echeck validation for canada, deprecate echeck-nonus and cust_main-require-bank-branch config in favor of echeck-country, RT#15982 --- httemplate/misc/payment.cgi | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) (limited to 'httemplate/misc/payment.cgi') diff --git a/httemplate/misc/payment.cgi b/httemplate/misc/payment.cgi index 4a867d28d..093494a06 100644 --- a/httemplate/misc/payment.cgi +++ b/httemplate/misc/payment.cgi @@ -140,7 +140,7 @@ % or die "unparsable payinfo ". $cust_main->payinfo; % ($account, $aba) = ($1, $2); % ($branch,$aba) = split('\.',$aba) -% if $conf->exists('cust_main-require-bank-branch'); +% if $conf->config('echeck-country') eq 'CA'; % $payname = $cust_main->payname; % $ss = $cust_main->ss; % $paytype = $cust_main->getfield('paytype'); @@ -148,6 +148,13 @@ % $stateid = $cust_main->getfield('stateid'); % $stateid_state = $cust_main->getfield('stateid_state'); % } +% +% #false laziness w/{edit,view}/cust_main/billing.html +% my $routing_label = $conf->config('echeck-country') eq 'US' +% ? 'ABA/Routing number' +% : 'Routing number'; +% my $routing_size = $conf->config('echeck-country') eq 'CA' ? 4 : 10; +% my $routing_maxlength = $conf->config('echeck-country') eq 'CA' ? 3 : 9; @@ -158,17 +165,17 @@ - <% mt('ABA/Routing number') |h %> + <% mt($routing_label) |h %> - + (<% mt('help') |h %>) -% if ( $conf->exists('cust_main-require-bank-branch') ) { +% if ( $conf->config('echeck-country') eq 'CA' ) { <% mt('Branch number') |h %> - + % } -- cgit v1.2.1