projects
/
freeside.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
fix edge case with prorated packages discounted 100% causing discounts to be off...
[freeside.git]
/
FS
/
FS
/
part_pkg
/
discount_Mixin.pm
diff --git
a/FS/FS/part_pkg/discount_Mixin.pm
b/FS/FS/part_pkg/discount_Mixin.pm
index
0657f3e
..
1305942
100644
(file)
--- a/
FS/FS/part_pkg/discount_Mixin.pm
+++ b/
FS/FS/part_pkg/discount_Mixin.pm
@@
-133,7
+133,7
@@
sub calc_discount {
$amount *= $months;
}
- $amount = sprintf('%.2f', $amount
);
+ $amount = sprintf('%.2f', $amount
+ 0.00000001 ); #so 1.005 rounds to 1.01
next unless $amount > 0;