projects
/
freeside.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0c04fc7
)
discounts with bulk packages, RT#24655
author
Ivan Kohler
<ivan@freeside.biz>
Sat, 9 Nov 2013 21:00:00 +0000
(13:00 -0800)
committer
Ivan Kohler
<ivan@freeside.biz>
Sat, 9 Nov 2013 21:00:00 +0000
(13:00 -0800)
FS/FS/part_pkg/bulk_Common.pm
patch
|
blob
|
history
diff --git
a/FS/FS/part_pkg/bulk_Common.pm
b/FS/FS/part_pkg/bulk_Common.pm
index
26550df
..
2ee2548
100644
(file)
--- 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; }