[freeside-commits] branch master updated. 7b153f2ca026421681ffd5f37c95efdff4f0a5d1
Ivan
ivan at 420.am
Sat Nov 9 13:00:01 PST 2013
The branch, master has been updated
via 7b153f2ca026421681ffd5f37c95efdff4f0a5d1 (commit)
from 0c04fc78f66d17a5736686757cd8f838715c8380 (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 7b153f2ca026421681ffd5f37c95efdff4f0a5d1
Author: Ivan Kohler <ivan at freeside.biz>
Date: Sat Nov 9 13:00:00 2013 -0800
discounts with bulk packages, RT#24655
diff --git a/FS/FS/part_pkg/bulk_Common.pm b/FS/FS/part_pkg/bulk_Common.pm
index 26550df..2ee2548 100644
--- a/FS/FS/part_pkg/bulk_Common.pm
+++ b/FS/FS/part_pkg/bulk_Common.pm
@@ -106,10 +106,13 @@ sub calc_recur {
}
}
- sprintf('%.2f', $self->base_recur($cust_pkg, $sdate) + $total_svc_charge );
-}
+ my $charge = $self->base_recur($cust_pkg, $sdate) + $total_svc_charge;
+
+ $param->{'override_charges'} = $total_svc_charge / $self->freq;
+ my $discount = $self->calc_discount($cust_pkg, $sdate, $details, $param);
-sub can_discount { 0; }
+ sprintf('%.2f', $charge - $discount );
+}
sub hide_svc_detail { 1; }
-----------------------------------------------------------------------
Summary of changes:
FS/FS/part_pkg/bulk_Common.pm | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
More information about the freeside-commits
mailing list