X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;ds=sidebyside;f=httemplate%2Felements%2Fcust_payby.html;h=6765df0778f13fd575e69f0d8e81de6845f685ee;hb=0d43df4e3b41cbd964d7ca32ac07d9f13a2b0a1d;hp=f30d185571e04cc980d2f9ef2cd9da7325af6897;hpb=65b639012a5dc547eccb01fd0e55efd4aa728039;p=freeside.git diff --git a/httemplate/elements/cust_payby.html b/httemplate/elements/cust_payby.html index f30d18557..6765df077 100644 --- a/httemplate/elements/cust_payby.html +++ b/httemplate/elements/cust_payby.html @@ -71,7 +71,15 @@ VALUE = "<% scalar($cgi->param($name.'_paycvv')) || ('*' x length($cust_payby->paycvv)) %>" onChange = "<% $onchange %>" > -
<% mt('CVV2') |h %> (<% mt('help') |h %>) +
<% mt('CVV2') |h %> <& /elements/popup_link.html, + 'action' => $p.'docs/cvv2.html', + 'label' => mt('(help)'), + 'actionlabel' => 'CVV2 Help', + 'width' => 480, + 'height' => 275, + 'nocenter' => 1, + #popup_name => 'cvv2_popup', + &> > @@ -180,11 +188,11 @@ <& /elements/select-state.html, 'prefix' => $name. '_pay', 'empty' => emt('(choose)'), - 'state' => $cgi->param($name.'_paystate') - || $cust_payby->paystate, + 'state' => ( scalar($cgi->param($name.'_paystate')) + || $cust_payby->paystate ), #was cust_main->country in 3.x, but this will do until/unlesss # someone needs to track foreign bank states - 'country' => scalar($conf->config('countrydefault')) || 'US', + 'country' => ( scalar($conf->config('countrydefault')) || 'US' ), &>
<% mt('Bank state') |h %> @@ -298,8 +306,11 @@ if ( $curr_value ) { $cust_payby = new FS::cust_payby {}; } my $sel_payby = $cgi->param($name.'_payby') || $cust_payby->payby; +# add a weight for CARD/CHEK imports, so we don't turn off auto-charge on edit # convert DCRD to CARD + no weight, and the same for DCHK/CHEK -if ($sel_payby eq 'DCRD') { +if ( $cust_payby->custpaybynum && $sel_payby =~ /^(CARD|CHEK)$/ && ! $cust_payby->weight ) { + $cust_payby->weight(1); +} elsif ($sel_payby eq 'DCRD') { $sel_payby = 'CARD'; $cust_payby->weight(''); } elsif ($sel_payby eq 'DCHK') {