[freeside-commits] branch master updated. 1b523e698fce6720d6b9389ef636e7fe9e8b9f98

Ivan ivan at 420.am
Thu Feb 7 21:38:36 PST 2013


The branch, master has been updated
       via  1b523e698fce6720d6b9389ef636e7fe9e8b9f98 (commit)
      from  737c5d8b82defb7e3e40a14ee33c4f80c64a8f71 (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 1b523e698fce6720d6b9389ef636e7fe9e8b9f98
Author: Ivan Kohler <ivan at freeside.biz>
Date:   Thu Feb 7 21:38:31 2013 -0800

    fix prorating w/quantities, RT#21283

diff --git a/FS/FS/part_pkg/prorate_Mixin.pm b/FS/FS/part_pkg/prorate_Mixin.pm
index d148c96..153ed56 100644
--- a/FS/FS/part_pkg/prorate_Mixin.pm
+++ b/FS/FS/part_pkg/prorate_Mixin.pm
@@ -154,7 +154,10 @@ sub calc_prorate {
                                                   #so 1.005 rounds to 1.01
   $charge = sprintf('%.2f', $permonth * $months + 0.00000001 );
 
-  return $charge;
+  my $quantity = $cust_pkg->quantity || 1;
+  $charge *= $quantity;
+
+  return sprintf('%.2f', $charge);
 }
 
 =item prorate_setup CUST_PKG SDATE

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

Summary of changes:
 FS/FS/part_pkg/prorate_Mixin.pm |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)




More information about the freeside-commits mailing list