From: ivan Date: Tue, 3 Aug 2010 06:31:09 +0000 (+0000) Subject: fix problem with expiring discounts, RT#6679 X-Git-Tag: TORRUS_1_0_9~447 X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=commitdiff_plain;h=dbab5e19dd56c2439a7c74c1dad5dcbd43e82865 fix problem with expiring discounts, RT#6679 --- diff --git a/FS/FS/part_pkg/flat.pm b/FS/FS/part_pkg/flat.pm index 6db6eee24..cc2310503 100644 --- a/FS/FS/part_pkg/flat.pm +++ b/FS/FS/part_pkg/flat.pm @@ -192,7 +192,7 @@ sub calc_discount { my $months = $discount->months ? min( $chg_months, - $discount->months - $cust_pkg->months_used ) + $discount->months - $cust_pkg_discount->months_used ) : $chg_months; my $error = $cust_pkg_discount->increment_months_used($months);