X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fmisc%2Fpayment.cgi;h=2f76b85f143e04ce5ac0b2e5002658033fc73c28;hb=be4379d3f8238376f913337b6402dd8b6167913a;hp=5b9f63dc0950f3ac2e24aa8d41194c2aa324fa05;hpb=2b10c0594ff2ab9ce37d9f8af9c154d3bedde731;p=freeside.git diff --git a/httemplate/misc/payment.cgi b/httemplate/misc/payment.cgi index 5b9f63dc0..2f76b85f1 100644 --- a/httemplate/misc/payment.cgi +++ b/httemplate/misc/payment.cgi @@ -17,13 +17,19 @@ '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 + ), &> - <& /elements/tr-select-discount_term.html, - 'custnum' => $custnum, - 'amount_id' => 'amount', - &> +% if ( $conf->exists('part_pkg-term_discounts') ) { + <& /elements/tr-select-discount_term.html, + 'custnum' => $custnum, + 'amount_id' => 'amount', + &> +% } % if ( $payby eq 'CARD' ) { % @@ -198,11 +204,13 @@ +% my $disallow_no_auto_apply = 0; % if ( $conf->exists("batch-enable") % || grep $payby eq $_, $conf->config('batch-enable_payby') % ) { % % if ( grep $payby eq $_, $conf->config('realtime-disable_payby') ) { +% $disallow_no_auto_apply = 1; @@ -210,7 +218,7 @@ - + <% mt('Add to current batch') |h %> @@ -225,6 +233,35 @@ +% unless ($disallow_no_auto_apply) { +% # false laziness with edit/cust_pay.cgi + + + + <% mt('Auto-apply to invoices') |h %> + + + + +% # this can go away if no_auto_apply handling gets added to batch payment processing + + +% } +
@@ -271,7 +308,11 @@ my @states = sort { $a cmp $b } keys %states; my $amount = ''; if ( $balance > 0 ) { - $amount = $balance; + # 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); } my $payunique = "webui-payment-". time. "-$$-". rand() * 2**32;