X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2FCron%2Fbill.pm;h=b6925d095e345cb45ad20bf7fc498cbc941108fa;hb=f0547b5c6821995268ae3a68dbc80eef08885b77;hp=9926fea9e099589e8746ed189cfab18c5775f5cb;hpb=893a697cfa7c60c9663057a02a251e7397813acc;p=freeside.git diff --git a/FS/FS/Cron/bill.pm b/FS/FS/Cron/bill.pm index 9926fea9e..b6925d095 100644 --- a/FS/FS/Cron/bill.pm +++ b/FS/FS/Cron/bill.pm @@ -34,6 +34,7 @@ sub bill { and ( setup is null or setup = 0 or bill is null or bill <= $time or ( expire is not null and expire <= $^T ) + or ( adjourn is not null and adjourn <= $^T ) ) ) END @@ -91,8 +92,10 @@ END } # $^T not $time because -d is for pre-printing invoices foreach my $cust_pkg ( - grep { $_->part_pkg->is_prepaid - && $_->bill && $_->bill < $^T && ! $_->susp + grep { ( $_->part_pkg->is_prepaid && $_->bill && $_->bill < $^T + || $_->adjourn && $_->adjourn <= $^T + ) + && ! $_->susp } $cust_main->ncancelled_pkgs ) {