+
+% my $auto = 0;
% if ( $payby eq 'CARD' ) {
%
% my( $payinfo, $paycvv, $month, $year ) = ( '', '', '', '' );
% my $payname = $cust_main->first. ' '. $cust_main->getfield('last');
-% if ( $cust_main->payby =~ /^(CARD|DCRD)$/ ) {
-% $payinfo = $cust_main->paymask;
-% $paycvv = $cust_main->paycvv;
-% ( $month, $year ) = $cust_main->paydate_monthyear;
-% $payname = $cust_main->payname if $cust_main->payname;
-% }
+% my $location = $cust_main->bill_location;
<% mt('Card number') |h %> |
@@ -124,7 +179,7 @@
<& /elements/location.html,
- 'object' => $cust_main, #XXX errors???
+ 'object' => $location,
'no_asterisks' => 1,
'address1_label' => emt('Card billing address'),
&>
@@ -134,19 +189,13 @@
% my( $account, $aba, $branch, $payname, $ss, $paytype, $paystate,
% $stateid, $stateid_state )
% = ( '', '', '', '', '', '', '', '', '' );
-% if ( $cust_main->payby =~ /^(CHEK|DCHK)$/ ) {
-% $cust_main->paymask =~ /^([\dx]+)\@([\d\.x]*)$/i
-% or die "unparsable payinfo ". $cust_main->payinfo;
-% ($account, $aba) = ($1, $2);
-% ($branch,$aba) = split('\.',$aba)
-% if $conf->exists('cust_main-require-bank-branch');
-% $payname = $cust_main->payname;
-% $ss = $cust_main->ss;
-% $paytype = $cust_main->getfield('paytype');
-% $paystate = $cust_main->getfield('paystate');
-% $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;
@@ -154,20 +203,20 @@
<% mt('Account number') |h %> |
|
<% mt('Type') |h %> |
- |
+ |
- <% 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 %> |
-
+
|
% }
@@ -230,46 +279,50 @@
-
+ |
<% mt('Remember this information') |h %>
|
-% if ( $conf->exists("batch-enable")
-% || grep $payby eq $_, $conf->config('batch-enable_payby')
-% ) {
-%
-% if ( grep $payby eq $_, $conf->config('realtime-disable_payby') ) {
-
-
-
-% } else {
-
-
-
-
- <% mt('Add to current batch') |h %>
- |
-
-
-% }
-% }
-
-
- payby ne 'DCRD' ) || ( $payby eq 'CHEK' && $cust_main->payby eq 'CHEK' ) ) ? ' CHECKED' : '' %> NAME="auto" VALUE="1" onClick="if (this.checked) { document.OneTrueForm.save.checked=true; }">
+ |
+ NAME="auto" VALUE="1" onClick="if (this.checked) { document.OneTrueForm.save.checked=true; }">
<% mt("Charge future payments to this [_1] automatically",$type{$payby}) |h %>
+% if ( @cust_payby ) {
+ <% mt('as') |h %>
+
+% } else {
+
+% }
|