From e86ec47d33949f62f58a05c2dddd17c054a9034d Mon Sep 17 00:00:00 2001 From: levinse Date: Mon, 13 Jun 2011 21:25:09 +0000 Subject: [PATCH] bug fix for discounts on setup fees, RT11512 --- FS/FS/part_pkg/discount_Mixin.pm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/FS/FS/part_pkg/discount_Mixin.pm b/FS/FS/part_pkg/discount_Mixin.pm index 17e2f5344..a789ab309 100644 --- a/FS/FS/part_pkg/discount_Mixin.pm +++ b/FS/FS/part_pkg/discount_Mixin.pm @@ -120,6 +120,9 @@ sub calc_discount { $param->{'discount_left_recur'}{$discount->discountnum} = 0; $months = 1; } + elsif ( $discount->setup && $discount->months == 1 && $discount->amount ) { + next; + } my $error = $cust_pkg_discount->increment_months_used($months) if (defined $param->{'real_pkgpart'} -- 2.11.0