[freeside-commits] freeside/httemplate/edit/cust_main billing.html, 1.50, 1.51
Ivan,,,
ivan at wavetail.420.am
Fri Jan 13 23:05:17 PST 2012
Update of /home/cvs/cvsroot/freeside/httemplate/edit/cust_main
In directory wavetail.420.am:/tmp/cvs-serv10611/httemplate/edit/cust_main
Modified Files:
billing.html
Log Message:
improve echeck validation for canada, deprecate echeck-nonus and cust_main-require-bank-branch config in favor of echeck-country, RT#15982
Index: billing.html
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/edit/cust_main/billing.html,v
retrieving revision 1.50
retrieving revision 1.51
diff -u -w -d -r1.50 -r1.51
--- billing.html 28 Dec 2011 23:33:33 -0000 1.50
+++ billing.html 14 Jan 2012 07:05:15 -0000 1.51
@@ -127,7 +127,7 @@
% my( $account, $aba ) = split('@', $payinfo);
% my $branch = '';
% ($branch,$aba) = split('\.',$aba)
-% if $conf->exists('cust_main-require-bank-branch');
+% if $conf->config('echeck-country') eq 'CA';
%
% my $disabled = 'DISABLED style="background-color: #dddddd"';
% my $text_disabled = 'style="color: #999999"';
@@ -161,6 +161,14 @@
% my $card_billday_select_disabled = $payby eq 'CARD' ? '' : 'DISABLED';
% my $chek_billday_select_disabled = $payby eq 'CHEK' ? '' : 'DISABLED';
%
+% #false laziness w/view/cust_main/billing.html and misc/payment.cgi
+% 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;
+%
+%
% my %payby = (
%
% 'CARD' =>
@@ -235,17 +243,17 @@
% join('', map { qq!<OPTION VALUE="$_" !.($paytype eq $_ ? 'SELECTED' : '').">$_</OPTION>" } @FS::cust_main::paytypes).
% qq!</SELECT></TD></TR>!.
%
-% qq!<TR><TD ALIGN="right" WIDTH="200">${r}!.emt('ABA/Routing number').qq! </TD>!.
-% qq!<TD COLSPAN="3" WIDTH="408"><INPUT TYPE="text" SIZE=10 MAXLENGTH=9 NAME="CHEK_payinfo2" VALUE="!. ( $payby =~ /^(CHEK|DCHK)$/ ? $aba : '' ). qq!" SIZE=10 MAXLENGTH=9> !.
+% qq!<TR><TD ALIGN="right" WIDTH="200">${r}!.emt($routing_label).qq! </TD>!.
+% qq!<TD COLSPAN="3" WIDTH="408"><INPUT TYPE="text" SIZE=$routing_size MAXLENGTH=$routing_maxlength NAME="CHEK_payinfo2" VALUE="!. ( $payby =~ /^(CHEK|DCHK)$/ ? $aba : '' ). qq!"> !.
% qq!(<A HREF="javascript:void(0);" onClick="overlib( OLiframeContent('../docs/ach.html', 380, 240, 'ach_popup' ), CAPTION, 'ACH Help', STICKY, AUTOSTATUSCAP, CLOSECLICK, DRAGGABLE ); return false;">!.emt('help').qq!</A>)!.
% qq!</TD></TR>!.
%
% 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') ?
+% ( $conf->config('echeck-country') eq 'CA' ?
% qq!<TR><TD ALIGN="right">$r !.emt('Branch number').qq!</TD><TD COLSPAN="3">
-% <INPUT TYPE="text" name="CHEK_payinfo3" VALUE=$branch></TD></TR>! : '' ).
+% <INPUT TYPE="text" name="CHEK_payinfo3" VALUE="$branch" SIZE=6 MAXLENGTH=5></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>!.
More information about the freeside-commits
mailing list