From 958afb8d05de67e12df258b57bedcf85028b6253 Mon Sep 17 00:00:00 2001 From: ivan Date: Fri, 7 Aug 2009 00:39:14 +0000 Subject: don't start recurring billing when a start date hasn't been reached yet either... and since that works, add the start date to new package order, RT#5347 --- FS/FS/cust_main.pm | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'FS') diff --git a/FS/FS/cust_main.pm b/FS/FS/cust_main.pm index becb9054b..8cd03ebc6 100644 --- a/FS/FS/cust_main.pm +++ b/FS/FS/cust_main.pm @@ -2857,9 +2857,10 @@ sub _make_lines { my $recur = 0; my $unitrecur = 0; my $sdate; - if ( ! $cust_pkg->getfield('susp') and - ( $part_pkg->getfield('freq') ne '0' && - ( $cust_pkg->getfield('bill') || 0 ) <= $time + if ( ! $cust_pkg->get('susp') + and ! $cust_pkg->get('start_date') + and ( $part_pkg->getfield('freq') ne '0' + && ( $cust_pkg->getfield('bill') || 0 ) <= $time ) || ( $part_pkg->plan eq 'voip_cdr' && $part_pkg->option('bill_every_call') -- cgit v1.2.1