diff options
| author | Ivan Kohler <ivan@freeside.biz> | 2018-05-11 11:12:03 -0700 |
|---|---|---|
| committer | Ivan Kohler <ivan@freeside.biz> | 2018-05-11 11:12:03 -0700 |
| commit | 4171d4440a6bf042f342095f13439a5f9d27487d (patch) | |
| tree | 6715a2e911d43d8fe5333be330713a4f30f22a83 /httemplate | |
| parent | 715bfdf1b5b98a5431112d95b4382730e817674c (diff) | |
| parent | 01c9143a54bf5e1513537547fd362822f58d1e2a (diff) | |
Merge branch 'master' of git.freeside.biz:/home/git/freeside
Diffstat (limited to 'httemplate')
| -rw-r--r-- | httemplate/elements/tr-amount_fee.html | 3 | ||||
| -rw-r--r-- | httemplate/elements/tr-select-payment_options.html | 5 | ||||
| -rw-r--r-- | httemplate/misc/payment.cgi | 5 |
3 files changed, 13 insertions, 0 deletions
diff --git a/httemplate/elements/tr-amount_fee.html b/httemplate/elements/tr-amount_fee.html index 9c13f5952..9e6d9e96d 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 2304c22d0..8859b9b36 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> diff --git a/httemplate/misc/payment.cgi b/httemplate/misc/payment.cgi index 5bfa29d70..de060b010 100644 --- a/httemplate/misc/payment.cgi +++ b/httemplate/misc/payment.cgi @@ -25,6 +25,11 @@ ? scalar($conf->config('credit-card-surcharge-percentage', $cust_main->agentnum)) : 0 ), + 'surcharge_flatfee:Q' => + ( $payby eq 'CARD' + ? scalar($conf->config('credit-card-surcharge-flatfee', $cust_main->agentnum)) + : 0 + ), &> % if ( $conf->exists('part_pkg-term_discounts') ) { |
