X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=httemplate%2Felements%2Fcust_payby.html;h=f30d185571e04cc980d2f9ef2cd9da7325af6897;hp=60e6eb8b1b594c877415b701ab0cbe2ec653327a;hb=4924d635301e5c365d55b0c008f12e9cff40350f;hpb=948b9b8b79874f68bfe24f32035ce0d259da2a31 diff --git a/httemplate/elements/cust_payby.html b/httemplate/elements/cust_payby.html index 60e6eb8b1..f30d18557 100644 --- a/httemplate/elements/cust_payby.html +++ b/httemplate/elements/cust_payby.html @@ -298,8 +298,17 @@ if ( $curr_value ) { $cust_payby = new FS::cust_payby {}; } my $sel_payby = $cgi->param($name.'_payby') || $cust_payby->payby; -$sel_payby = 'CARD' if $sel_payby eq 'DCRD' || $sel_payby eq ''; -$sel_payby = 'CHEK' if $sel_payby eq 'DCHK'; +# convert DCRD to CARD + no weight, and the same for DCHK/CHEK +if ($sel_payby eq 'DCRD') { + $sel_payby = 'CARD'; + $cust_payby->weight(''); +} elsif ($sel_payby eq 'DCHK') { + $sel_payby = 'CHEK'; + $cust_payby->weight(''); +} elsif (!$sel_payby) { + # default + $sel_payby = 'CARD'; +} my @payby = FS::payby->cust_payby; my %conf_payby = map { $_=>1 } $conf->config('payby');