From: Ivan Kohler Date: Sat, 9 Nov 2013 21:00:02 +0000 (-0800) Subject: discounts with bulk packages, RT#24655 X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=commitdiff_plain;h=a60a4b806ce280ed589199fcfe0cc20824b43fa5 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 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; }