X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Fcust_main%2FBilling.pm;h=fff0cb0763eb023cb2cadde126040fc9bd1fc116;hb=729956733bf21293c801358c3e711c81d7df5b4f;hp=d0fd12cfa83604756fb3969be2ae59630b3cb77e;hpb=207978f5897048e616e2c49a6e11cf8af35b0444;p=freeside.git diff --git a/FS/FS/cust_main/Billing.pm b/FS/FS/cust_main/Billing.pm index d0fd12cfa..fff0cb076 100644 --- a/FS/FS/cust_main/Billing.pm +++ b/FS/FS/cust_main/Billing.pm @@ -1117,10 +1117,16 @@ sub _make_lines { my @recur_discounts = (); my $sdate; if ( ! $cust_pkg->start_date - and ( ! $cust_pkg->susp || $cust_pkg->option('suspend_bill',1) - || ( $part_pkg->option('suspend_bill', 1) ) - && ! $cust_pkg->option('no_suspend_bill',1) - ) + and + ( ! $cust_pkg->susp + || ( $cust_pkg->susp != $cust_pkg->order_date + && ( $cust_pkg->option('suspend_bill',1) + || ( $part_pkg->option('suspend_bill', 1) + && ! $cust_pkg->option('no_suspend_bill',1) + ) + ) + ) + ) and ( $part_pkg->freq ne '0' && ( $cust_pkg->bill || 0 ) <= $cmp_time ) || ( $part_pkg->plan eq 'voip_cdr'