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:
48bbf0e
)
RT# 33362 - fixed Argument 1d is not numeric when trying to discount daily recuring...
author
Christopher Burger
<burgerc@freeside.biz>
Tue, 27 Mar 2018 18:20:11 +0000
(14:20 -0400)
committer
Christopher Burger
<burgerc@freeside.biz>
Mon, 2 Apr 2018 14:47:28 +0000
(10:47 -0400)
FS/FS/part_pkg/discount_Mixin.pm
patch
|
blob
|
history
diff --git
a/FS/FS/part_pkg/discount_Mixin.pm
b/FS/FS/part_pkg/discount_Mixin.pm
index
1e46536
..
ec37624
100644
(file)
--- 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'};
}