From 18bc864bfbf806ea49323094f2f571e9cefd0498 Mon Sep 17 00:00:00 2001 From: Christopher Burger Date: Fri, 11 May 2018 20:43:48 -0400 Subject: RT# 79737 - fixed error in code --- httemplate/misc/payment.cgi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/httemplate/misc/payment.cgi b/httemplate/misc/payment.cgi index de060b010..4f6f7ef75 100644 --- a/httemplate/misc/payment.cgi +++ b/httemplate/misc/payment.cgi @@ -25,7 +25,7 @@ ? scalar($conf->config('credit-card-surcharge-percentage', $cust_main->agentnum)) : 0 ), - 'surcharge_flatfee:Q' => + 'surcharge_flatfee' => ( $payby eq 'CARD' ? scalar($conf->config('credit-card-surcharge-flatfee', $cust_main->agentnum)) : 0 -- cgit v1.2.1 From 88371c24e0b727646f0b01288f01439a06967fe7 Mon Sep 17 00:00:00 2001 From: Christopher Burger Date: Mon, 14 May 2018 10:21:15 -0400 Subject: RT# 34134 - fixed error with credit surchage not attached to total --- httemplate/elements/tr-amount_fee.html | 32 +++++++++++++---- httemplate/elements/tr-select-payment_options.html | 41 ++++++++++++++++++++-- 2 files changed, 63 insertions(+), 10 deletions(-) diff --git a/httemplate/elements/tr-amount_fee.html b/httemplate/elements/tr-amount_fee.html index 9e6d9e96d..3ad2cdf06 100644 --- a/httemplate/elements/tr-amount_fee.html +++ b/httemplate/elements/tr-amount_fee.html @@ -8,7 +8,7 @@ VALUE = "<% $amount %>" SIZE = 8 STYLE = "text-align:right;" -% if ( $fee ) { +% if ( $fee || $surcharge ) { onChange = "amount_changed(this)" onKeyDown = "amount_changed(this)" onKeyUp = "amount_changed(this)" @@ -27,18 +27,24 @@ <% length($amount) ? $money_char. sprintf('%.2f', ($fee_display eq 'add') ? $amount + $fee : $amount - $fee ) : '' %> <% $fee_display eq 'add' ? 'TOTAL' : 'AVAILABLE' %> +% } +% if ( $surcharge ) { + + + + A credit card surcharge of <% $money_char. sprintf('%.2f', ($amount * $surcharge_percentage) + $surcharge_flatfee) %> is included in this payment % } -% if ( $fee ) { +% if ($fee || $surcharge) {