% }
+<% include('/elements/tr-select-discount_term.html',
+ 'custnum' => $custnum,
+ 'cgi' => $cgi
+ )
+%>
% if ( $payby eq 'CARD' ) {
%
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
)
{
$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);
}