X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fmisc%2Fpayment.cgi;h=aec68af455c12f97daa0ee278a155812a9fd6223;hb=3a4bf42c4385863ea83423b279b39ff6e650f79d;hp=8d7baa5da8baf0fbdd86c75e7771e2209799b8da;hpb=331e3441a2eb49396ed3234da33022ce25244974;p=freeside.git diff --git a/httemplate/misc/payment.cgi b/httemplate/misc/payment.cgi index 8d7baa5da..aec68af45 100644 --- a/httemplate/misc/payment.cgi +++ b/httemplate/misc/payment.cgi @@ -67,6 +67,11 @@ % } +<% include('/elements/tr-select-discount_term.html', + 'custnum' => $custnum, + 'cgi' => $cgi + ) +%> % if ( $payby eq 'CARD' ) { % @@ -300,8 +305,12 @@ my $fee = ''; my $fee_pkg = ''; my $fee_display = ''; my $fee_op = ''; +my $num_payments = scalar($cust_main->cust_pay); +#handle old cust_main.pm (remove...) +$num_payments = scalar( @{ [ $cust_main->cust_pay ] } ) + unless defined $num_payments; if ( $conf->config('manual_process-pkgpart') - and ! $conf->exists('manual_process-skip_first') || $cust_main->cust_pay + and ! $conf->exists('manual_process-skip_first') || $num_payments ) { @@ -323,6 +332,10 @@ if ( $balance > 0 ) { $amount = $balance; $amount += $fee if $fee && $fee_display eq 'subtract'; + + my $cc_surcharge_pct = $conf->config('credit-card-surcharge-percentage'); + $amount += $amount * $cc_surcharge_pct/100 if $cc_surcharge_pct > 0; + $amount = sprintf("%.2f", $amount); }