VALUE = "<% scalar($cgi->param($name.'_paycvv')) || ('*' x length($cust_payby->paycvv)) %>"
onChange = "<% $onchange %>"
>
- <BR><FONT SIZE="-1"><% mt('CVV2') |h %> (<A HREF="javascript:void(0);" onClick="overlib( OLiframeContent('<%$p%>docs/cvv2.html', 480, 275, 'cvv2_popup' ), CAPTION, 'CVV2 Help', STICKY, AUTOSTATUSCAP, CLOSECLICK, DRAGGABLE ); return false;"><% mt('help') |h %></A>)</FONT>
+ <BR><FONT SIZE="-1"><% 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',
+ &></FONT>
</TD>
<TD ID="<%$id%>_td_payname" <%$card_display%>>
$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') {