[freeside-commits] branch master updated. 61c4e7640f905d326b36e61ad3ce81d22a9a663a
Carl J. Adams-Collier
cjac at 420.am
Mon Sep 8 12:26:18 PDT 2014
The branch, master has been updated
via 61c4e7640f905d326b36e61ad3ce81d22a9a663a (commit)
via 5d7bec95fa2b821878a318d32c25a691d219055f (commit)
from 7f1bc9c18dc4a2cd1c9a8f972c3107821af0e649 (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 61c4e7640f905d326b36e61ad3ce81d22a9a663a
Author: C.J. Adams-Collier <cjac at colliertech.org>
Date: Mon Sep 8 11:56:13 2014 -0700
for one-time discounts, print line item in different format - FS RT #27189
diff --git a/FS/FS/part_pkg/discount_Mixin.pm b/FS/FS/part_pkg/discount_Mixin.pm
index 1edf258..48ca94d 100644
--- a/FS/FS/part_pkg/discount_Mixin.pm
+++ b/FS/FS/part_pkg/discount_Mixin.pm
@@ -168,10 +168,17 @@ sub calc_discount {
$months = sprintf('%.2f', $months) if $months =~ /\./;
my $d = 'Includes ';
- $d .= 'setup ' if defined $param->{'setup_charge'};
- $d .= 'discount of '. $discount->description_short;
- $d .= " for $months month". ( $months!=1 ? 's' : '' ) unless defined $param->{'setup_charge'};
- $d .= ": $money_char$amount" if $months != 1 || $discount->percent;
+
+ if ( $months eq '1' ) {
+ $d .= "discount of $money_char$amount each";
+ } else {
+ $d .= 'setup ' if defined $param->{'setup_charge'};
+ $d .= 'discount of '. $discount->description_short;
+ $d .= " for $months month". ( $months!=1 ? 's' : '' )
+ unless defined $param->{'setup_charge'};
+ $d .= ": $money_char$amount" if $months != 1 || $discount->percent;
+ }
+
push @$details, $d;
$tot_discount += $amount;
commit 5d7bec95fa2b821878a318d32c25a691d219055f
Author: C.J. Adams-Collier <cjac at colliertech.org>
Date: Mon Sep 8 11:56:53 2014 -0700
corrected POD syntax which was causing error
diff --git a/FS/FS/Log.pm b/FS/FS/Log.pm
index b11630b..2fd0020 100644
--- a/FS/FS/Log.pm
+++ b/FS/FS/Log.pm
@@ -49,7 +49,7 @@ to the database. FS::Log inherits from L<Log::Dispatch>.
=over 4
-new CONTEXT
+=item new CONTEXT
Constructs and returns a log handle. CONTEXT must be a known context tag
indicating what activity is going on, such as the name of the function or
-----------------------------------------------------------------------
Summary of changes:
FS/FS/Log.pm | 2 +-
FS/FS/part_pkg/discount_Mixin.pm | 15 +++++++++++----
2 files changed, 12 insertions(+), 5 deletions(-)
More information about the freeside-commits
mailing list