X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2FCron%2Fbill.pm;h=d046930491c33039a5ab603631b7c8810b121f42;hb=42eaf0aec334e15163848eb2bed33db9fd349efa;hp=6e110e85230c80fd3d801730812c5f394599bf10;hpb=06fb1346ff8076a84f743fa07de31852942e144f;p=freeside.git diff --git a/FS/FS/Cron/bill.pm b/FS/FS/Cron/bill.pm index 6e110e852..d04693049 100644 --- a/FS/FS/Cron/bill.pm +++ b/FS/FS/Cron/bill.pm @@ -41,9 +41,10 @@ sub bill { #$FS::cust_event::DEBUG = $opt{'l'} if $opt{'l'}; my $conf = new FS::Conf; + my $disable_bill = 0; if ( $conf->exists('disable_cron_billing') ) { warn "disable_cron_billing set, skipping billing\n" if $debug; - return; + $disable_bill = 1; } #we're at now now (and later). @@ -127,7 +128,11 @@ sub bill { } else { my $cust_main = qsearchs( 'cust_main', { 'custnum' => $custnum } ); - $cust_main->bill_and_collect( %args, 'debug' => $debug ); + if ( $disable_bill ) { + $cust_main->collect( %args, 'debug' => $debug ); + } else { + $cust_main->bill_and_collect( %args, 'debug' => $debug ); + } } @@ -201,7 +206,8 @@ sub bill_where { # generate where_pkg/where_event search clause ### - my $billtime = day_end($time); + my $conf = new FS::Conf; + my $billtime = $conf->exists('next-bill-ignore-time') ? day_end($time) : $time; # select * from cust_main where my $where_pkg = <<"END";