projects
/
freeside.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
discounts with bulk packages, RT#24655
[freeside.git]
/
FS
/
FS
/
part_pkg
/
bulk_Common.pm
diff --git
a/FS/FS/part_pkg/bulk_Common.pm
b/FS/FS/part_pkg/bulk_Common.pm
index
67a683a
..
ede2fef
100644
(file)
--- a/
FS/FS/part_pkg/bulk_Common.pm
+++ b/
FS/FS/part_pkg/bulk_Common.pm
@@
-47,7
+47,7
@@
sub price_info {
#some false laziness-ish w/agent.pm... not a lot
sub calc_recur {
#some false laziness-ish w/agent.pm... not a lot
sub calc_recur {
- my($self, $cust_pkg, $sdate, $details ) = @_;
+ my($self, $cust_pkg, $sdate, $details
, $param
) = @_;
my $conf = new FS::Conf;
my $money_char = $conf->config('money_char') || '$';
my $conf = new FS::Conf;
my $money_char = $conf->config('money_char') || '$';
@@
-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; }
sub hide_svc_detail { 1; }