summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIvan Kohler <ivan@freeside.biz>2013-08-07 12:07:43 -0700
committerIvan Kohler <ivan@freeside.biz>2013-08-07 12:07:43 -0700
commiteea6ec1b7864295af60402dca64a0e0d1a9160e7 (patch)
treecaf9c6e88bab23469330c5206b729653f7714506
parent5801680c99f98d90011be15e36e1fb70696bee34 (diff)
parent3639f310be1be6953fe04b4da9296f6cdedb27d9 (diff)
Merge branch 'FREESIDE_2_3_BRANCH' of git.freeside.biz:/home/git/freeside into FREESIDE_2_3_BRANCH
-rw-r--r--FS/FS/Cron/bill.pm9
1 files changed, 7 insertions, 2 deletions
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 );
+ }
}