From: Mark Wells Date: Tue, 23 Jul 2013 01:07:58 +0000 (-0700) Subject: change behavior of disable_cron_billing option, #19873 X-Git-Url: http://git.freeside.biz/gitweb/?a=commitdiff_plain;h=3639f310be1be6953fe04b4da9296f6cdedb27d9;p=freeside.git change behavior of disable_cron_billing option, #19873 --- diff --git a/FS/FS/Cron/bill.pm b/FS/FS/Cron/bill.pm index 8dc2add19..df4b6e7df 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 ); + } }