don't apply credit-card-surcharge-percentage to ACH, RT#34815
[freeside.git] / httemplate / misc / payment.cgi
index b83ad71..a48aa01 100644 (file)
        'process-display'    => scalar($conf->config('manual_process-display')),
        'process-skip_first' => $conf->exists('manual_process-skip_first'),
        'num_payments'       => scalar($cust_main->cust_pay), 
-       'surcharge_percentage' => scalar($conf->config('credit-card-surcharge-percentage')),
+       'surcharge_percentage' =>
+         ( $payby eq 'CARD'
+             ? scalar($conf->config('credit-card-surcharge-percentage'))
+             : 0
+         ),
   &>
 
 % if ( $conf->exists('part_pkg-term_discounts') ) {
@@ -273,6 +277,8 @@ my @states = sort { $a cmp $b } keys %states;
 
 my $amount = '';
 if ( $balance > 0 ) {
+  # when configured to do so, amount will only auto-fill with balance
+  # if balance represents a single invoice
   $amount = $balance
     unless $conf->exists('manual_process-single_invoice_amount')
       && ($cust_main->open_cust_bill != 1);