summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorivan <ivan>2011-11-22 04:35:10 +0000
committerivan <ivan>2011-11-22 04:35:10 +0000
commitd01b288624d883262266afe4775367a5e0e5a328 (patch)
treeb1ef01ac060e66dd095544ca9cb56f67c71288f8
parenta0460d90ee5bdbb6a4df992c6480a238edd68bd6 (diff)
fix incorrect error message: Discount does not apply to setup fees, and package has no recurring, RT#15257
-rw-r--r--FS/FS/cust_pkg_discount.pm2
1 files changed, 1 insertions, 1 deletions
diff --git a/FS/FS/cust_pkg_discount.pm b/FS/FS/cust_pkg_discount.pm
index 015b6e388..a20794027 100644
--- a/FS/FS/cust_pkg_discount.pm
+++ b/FS/FS/cust_pkg_discount.pm
@@ -172,7 +172,7 @@ sub check {
return $error if $error;
return "Discount does not apply to setup fees, and package has no recurring"
- if ! $self->discount->setup && ! $self->cust_pkg->part_pkg->freq;
+ if ! $self->discount->setup && $self->cust_pkg->part_pkg->freq =~ /^0/;
$self->usernum($FS::CurrentUser::CurrentUser->usernum) unless $self->usernum;