projects
/
freeside.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
737c5d8
)
fix prorating w/quantities, RT#21283
author
Ivan Kohler
<ivan@freeside.biz>
Fri, 8 Feb 2013 05:38:31 +0000
(21:38 -0800)
committer
Ivan Kohler
<ivan@freeside.biz>
Fri, 8 Feb 2013 05:38:31 +0000
(21:38 -0800)
FS/FS/part_pkg/prorate_Mixin.pm
patch
|
blob
|
history
diff --git
a/FS/FS/part_pkg/prorate_Mixin.pm
b/FS/FS/part_pkg/prorate_Mixin.pm
index
d148c96
..
153ed56
100644
(file)
--- 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