summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIvan Kohler <ivan@freeside.biz>2013-11-09 13:00:01 -0800
committerIvan Kohler <ivan@freeside.biz>2013-11-09 13:00:01 -0800
commitf1731704579a2de6a1723b98af92be654eb23095 (patch)
tree33514c8702d5442b396c9835a38381d066dd1106
parent4c385c9d52247aa9540678cd0a9a8feaa5b6be32 (diff)
discounts with bulk packages, RT#24655
-rw-r--r--FS/FS/part_pkg/bulk_Common.pm9
1 files changed, 6 insertions, 3 deletions
diff --git a/FS/FS/part_pkg/bulk_Common.pm b/FS/FS/part_pkg/bulk_Common.pm
index 67a683a12..50115958e 100644
--- a/FS/FS/part_pkg/bulk_Common.pm
+++ b/FS/FS/part_pkg/bulk_Common.pm
@@ -100,10 +100,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; }