[freeside-commits] branch master updated. e75717bd49c68a49940ebd668368a6542097a234
Christopher Burger
burgerc at freeside.biz
Tue Mar 27 11:20:40 PDT 2018
The branch, master has been updated
via e75717bd49c68a49940ebd668368a6542097a234 (commit)
from fc7ed3676b8723339b3e756220d7af024c6c6191 (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 e75717bd49c68a49940ebd668368a6542097a234
Author: Christopher Burger <burgerc at freeside.biz>
Date: Tue Mar 27 14:20:11 2018 -0400
RT# 33362 - fixed Argument 1d is not numeric when trying to discount daily recuring packages
diff --git a/FS/FS/part_pkg/discount_Mixin.pm b/FS/FS/part_pkg/discount_Mixin.pm
index 1e4653639..ec37624f2 100644
--- a/FS/FS/part_pkg/discount_Mixin.pm
+++ b/FS/FS/part_pkg/discount_Mixin.pm
@@ -102,7 +102,10 @@ sub calc_discount {
# $chg_months: the number of months we are charging recur for
# $months: $chg_months or the months left on the discount, whchever is less
- my $chg_months = $cust_pkg->part_pkg->freq || 1;
+ my $chg_months = 1;
+ unless ($cust_pkg->part_pkg->freq !~ /^\d+$/) {
+ $chg_months = $cust_pkg->part_pkg->freq || 1;
+ }
if ( defined($param->{'months'}) ) { # then override
$chg_months = $param->{'months'};
}
-----------------------------------------------------------------------
Summary of changes:
FS/FS/part_pkg/discount_Mixin.pm | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
More information about the freeside-commits
mailing list