[freeside-commits] branch master updated. cd44a115510c3e0c88b64fe51baaba1e76d0e355
Mark Wells
mark at 420.am
Sun Nov 16 21:20:51 PST 2014
The branch, master has been updated
via cd44a115510c3e0c88b64fe51baaba1e76d0e355 (commit)
via e46ece7def297a50492a2c92f4fcd27584370fd7 (commit)
from 77e772f611f080e537d5bc33a661e82dec0c3502 (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 cd44a115510c3e0c88b64fe51baaba1e76d0e355
Author: Mark Wells <mark at freeside.biz>
Date: Sun Nov 16 21:20:37 2014 -0800
fix discounts in general, #31273
diff --git a/FS/FS/part_pkg/discount_Mixin.pm b/FS/FS/part_pkg/discount_Mixin.pm
index 50b3312..3180275 100644
--- a/FS/FS/part_pkg/discount_Mixin.pm
+++ b/FS/FS/part_pkg/discount_Mixin.pm
@@ -162,6 +162,7 @@ sub calc_discount {
'months' => $months,
};
push @{ $param->{'discounts'} }, $cust_bill_pkg_discount;
+ $tot_discount += $amount;
#add details on discount to invoice
# no longer! this is now done during rendering based on the existence
@@ -189,7 +190,6 @@ sub calc_discount {
#push @$details, $d;
#push @$details, sprintf( $format, $money_char, $br );
- #$tot_discount += $amount;
}
sprintf('%.2f', $tot_discount);
commit e46ece7def297a50492a2c92f4fcd27584370fd7
Author: Mark Wells <mark at freeside.biz>
Date: Sun Nov 16 21:20:33 2014 -0800
fix discounts on one-time charges, #28956
diff --git a/FS/FS/cust_main/Billing.pm b/FS/FS/cust_main/Billing.pm
index f65d495..9e2082f 100644
--- a/FS/FS/cust_main/Billing.pm
+++ b/FS/FS/cust_main/Billing.pm
@@ -946,7 +946,9 @@ sub _make_lines {
my $setup = 0;
my $unitsetup = 0;
my @setup_discounts = ();
- my %setup_param = ( 'discounts' => \@setup_discounts );
+ my %setup_param = ( 'discounts' => \@setup_discounts,
+ 'real_pkgpart' => $params{real_pkgpart}
+ );
my $setup_billed_currency = '';
my $setup_billed_amount = 0;
# Conditions for setting setup date and charging the setup fee:
-----------------------------------------------------------------------
Summary of changes:
FS/FS/cust_main/Billing.pm | 4 +++-
FS/FS/part_pkg/discount_Mixin.pm | 2 +-
2 files changed, 4 insertions(+), 2 deletions(-)
More information about the freeside-commits
mailing list