[freeside-commits] branch FREESIDE_3_BRANCH updated. 24b3cded842823df810e6bee6ef66237c783f033
Mark Wells
mark at 420.am
Tue May 20 10:51:54 PDT 2014
The branch, FREESIDE_3_BRANCH has been updated
via 24b3cded842823df810e6bee6ef66237c783f033 (commit)
from d81ba2cb27849831d3946d408e9f39697f66702b (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 24b3cded842823df810e6bee6ef66237c783f033
Author: Mark Wells <mark at freeside.biz>
Date: Tue May 20 10:51:28 2014 -0700
fix one-cent errors in cust_bill_pkg_tax_location upgrade, #940
diff --git a/FS/FS/cust_bill_pkg.pm b/FS/FS/cust_bill_pkg.pm
index 4b85d30..bddadbd 100644
--- a/FS/FS/cust_bill_pkg.pm
+++ b/FS/FS/cust_bill_pkg.pm
@@ -1485,7 +1485,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++;
-----------------------------------------------------------------------
Summary of changes:
FS/FS/cust_bill_pkg.pm | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
More information about the freeside-commits
mailing list