diff options
author | Ivan Kohler <ivan@freeside.biz> | 2013-02-07 21:38:31 -0800 |
---|---|---|
committer | Ivan Kohler <ivan@freeside.biz> | 2013-02-07 21:38:31 -0800 |
commit | 1b523e698fce6720d6b9389ef636e7fe9e8b9f98 (patch) | |
tree | 7760c99054046469f640d377170aa81b06452e83 | |
parent | 737c5d8b82defb7e3e40a14ee33c4f80c64a8f71 (diff) |
fix prorating w/quantities, RT#21283
-rw-r--r-- | FS/FS/part_pkg/prorate_Mixin.pm | 5 |
1 files changed, 4 insertions, 1 deletions
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 |