[freeside-commits] branch master updated. 2224bc4165a482da4bbaf4f09210f358cd825f99

Mark Wells mark at 420.am
Tue May 20 10:51:55 PDT 2014


The branch, master has been updated
       via  2224bc4165a482da4bbaf4f09210f358cd825f99 (commit)
      from  48ddc2a473201e09daaff99b3dd22d56ebe8f939 (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 2224bc4165a482da4bbaf4f09210f358cd825f99
Author: Mark Wells <mark at freeside.biz>
Date:   Tue May 20 10:51:46 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 034601d..212c4b6 100644
--- 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++;

-----------------------------------------------------------------------

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