projects
/
freeside.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
a769250
)
fix interaction of percentage discount and quantity, #19354, etc.
author
Mark Wells
<mark@freeside.biz>
Tue, 27 Oct 2015 23:28:32 +0000
(16:28 -0700)
committer
Mark Wells
<mark@freeside.biz>
Tue, 27 Oct 2015 23:37:47 +0000
(16:37 -0700)
FS/FS/part_pkg/discount_Mixin.pm
patch
|
blob
|
history
diff --git
a/FS/FS/part_pkg/discount_Mixin.pm
b/FS/FS/part_pkg/discount_Mixin.pm
index
1e39f6a
..
dcca343
100644
(file)
--- a/
FS/FS/part_pkg/discount_Mixin.pm
+++ b/
FS/FS/part_pkg/discount_Mixin.pm
@@
-145,7
+145,7
@@
sub calc_discount {
# XXX it would be more accurate for calc_recur to just _tell us_ what
# it's going to charge
- my $recur_charge = $br *
($cust_pkg->quantity || 1) *
$chg_months / $self->freq;
+ my $recur_charge = $br * $chg_months / $self->freq;
# round this, because the real recur charge is rounded
$recur_charge = sprintf('%.2f', $recur_charge);