diff options
author | Christopher Burger <burgerc@freeside.biz> | 2018-05-11 11:29:36 -0400 |
---|---|---|
committer | Christopher Burger <burgerc@freeside.biz> | 2018-05-11 11:29:36 -0400 |
commit | 01c9143a54bf5e1513537547fd362822f58d1e2a (patch) | |
tree | 5c35d49a858a95818dc3459c5892a3e2f3774a71 /httemplate/elements | |
parent | d2cc614910c251801564615a268c7ca3bdb2c954 (diff) |
RT# 79737 - Added ability to us a cc surcharge of a flat fee.
Diffstat (limited to 'httemplate/elements')
-rw-r--r-- | httemplate/elements/tr-amount_fee.html | 3 | ||||
-rw-r--r-- | httemplate/elements/tr-select-payment_options.html | 5 |
2 files changed, 8 insertions, 0 deletions
diff --git a/httemplate/elements/tr-amount_fee.html b/httemplate/elements/tr-amount_fee.html index 9c13f59..9e6d9e9 100644 --- a/httemplate/elements/tr-amount_fee.html +++ b/httemplate/elements/tr-amount_fee.html @@ -94,6 +94,9 @@ if ( $amount > 0 ) { $amount += $amount * $opt{'surcharge_percentage'}/100 if $opt{'surcharge_percentage'} > 0; + $amount += $opt{'surcharge_flatfee'} + if $opt{'surcharge_flatfee'} > 0; + $amount = sprintf("%.2f", $amount); } diff --git a/httemplate/elements/tr-select-payment_options.html b/httemplate/elements/tr-select-payment_options.html index 2304c22..8859b9b 100644 --- a/httemplate/elements/tr-select-payment_options.html +++ b/httemplate/elements/tr-select-payment_options.html @@ -17,6 +17,11 @@ Example: ? scalar($conf->config('credit-card-surcharge-percentage', $cust_main->agentnum)) : 0 ), + 'surcharge_flatfee' => + ( $payby eq 'CARD' + ? scalar($conf->config('credit-card-surcharge-flatfee', $cust_main->agentnum)) + : 0 + ), ) </%doc> |