[freeside-commits] branch FREESIDE_3_BRANCH updated. c1cf74717bd47f5b89123eb1324c0e990c6dfe4d
Christopher Burger
burgerc at freeside.biz
Tue Jun 25 10:01:43 PDT 2019
The branch, FREESIDE_3_BRANCH has been updated
via c1cf74717bd47f5b89123eb1324c0e990c6dfe4d (commit)
from cfde6a0e4f1c3c129a1a2d8b6c4e38930c71f998 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit c1cf74717bd47f5b89123eb1324c0e990c6dfe4d
Author: Christopher Burger <burgerc at freeside.biz>
Date: Tue Jun 25 10:55:00 2019 -0400
RT# 82137 - added processing fee template substitution.
Conflicts:
httemplate/edit/msg_template/email.html
httemplate/elements/tr-amount_fee.html
diff --git a/httemplate/edit/msg_template.html b/httemplate/edit/msg_template.html
index 17e9966de..1fa94ab2b 100644
--- a/httemplate/edit/msg_template.html
+++ b/httemplate/edit/msg_template.html
@@ -291,6 +291,7 @@ my %substitutions = (
'cust_pay' => [
'$paynum' => 'Payment#',
'$paid' => 'Amount',
+ '$processing_fee' => 'Processing fee',
'$payby' => 'Payment method',
'$date' => 'Payment date',
'$payinfo' => 'Card/account# (masked)',
@@ -365,6 +366,7 @@ Substitutions: '
<BR>Enclose substitutions and other Perl expressions in braces:
<BR>{ $name } = ExampleCo (Smith, John)
<BR>{ time2str("%D", time) } = '.time2str("%D", time).'
+<BR>{ "processing fee of $processing_fee" if $processing_fee; } = Will display text if there is a processing fee
</FONT></TD>
';
diff --git a/httemplate/elements/tr-amount_fee.html b/httemplate/elements/tr-amount_fee.html
index 7797f6c2b..e90d36459 100644
--- a/httemplate/elements/tr-amount_fee.html
+++ b/httemplate/elements/tr-amount_fee.html
@@ -123,7 +123,9 @@ if ( $opt{'process-pkgpart'}
}
-my $amount = $opt{'amount'};
+$processing_fee = $opt{'processing_fee'} if $opt{'processing_fee'} > 0;
+
+my $amount = $opt{'amount'} ? $opt{'amount'} : "0.00";
if ( $amount > 0 ) {
$amount += $fee
if $fee && $fee_display eq 'subtract';
@@ -135,8 +137,6 @@ if ( $amount > 0 ) {
$amount += $opt{'surcharge_flatfee'}
if $opt{'surcharge_flatfee'} > 0;
- $processing_fee = $opt{'processing_fee'} if $opt{'processing_fee'} > 0;
-
$amount += $processing_fee; ## needed if processing fee is checked on default.
$amount = sprintf("%.2f", $amount);
-----------------------------------------------------------------------
Summary of changes:
httemplate/edit/msg_template.html | 2 ++
httemplate/elements/tr-amount_fee.html | 6 +++---
2 files changed, 5 insertions(+), 3 deletions(-)
More information about the freeside-commits
mailing list