projects
/
freeside.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
48ddc2a
)
fix one-cent errors in cust_bill_pkg_tax_location upgrade, #940
author
Mark Wells
<mark@freeside.biz>
Tue, 20 May 2014 17:51:46 +0000
(10:51 -0700)
committer
Mark Wells
<mark@freeside.biz>
Tue, 20 May 2014 17:51:46 +0000
(10:51 -0700)
FS/FS/cust_bill_pkg.pm
patch
|
blob
|
history
diff --git
a/FS/FS/cust_bill_pkg.pm
b/FS/FS/cust_bill_pkg.pm
index
034601d
..
212c4b6
100644
(file)
--- a/
FS/FS/cust_bill_pkg.pm
+++ b/
FS/FS/cust_bill_pkg.pm
@@
-1461,7
+1461,9
@@
sub upgrade_tax_location {
my $i = 0;
my $nlinks = scalar(@tax_links);
if ( $nlinks ) {
- while (int($cents_remaining) > 0) {
+ # ensure that it really is an integer
+ $cents_remaining = sprintf('%.0f', $cents_remaining);
+ while ($cents_remaining > 0) {
$tax_links[$i % $nlinks]->{cents} += 1;
$cents_remaining--;
$i++;