summaryrefslogtreecommitdiff
path: root/FS/FS/Cron
diff options
context:
space:
mode:
authorMark Wells <mark@freeside.biz>2013-06-06 16:37:16 -0700
committerMark Wells <mark@freeside.biz>2013-06-06 16:37:16 -0700
commit5b95c313db51d90197c76d3d644290c66e80149b (patch)
tree98c39611358ea1c1900d660b4ebb91b66f3a1f5a /FS/FS/Cron
parentb3495184423119719067c5438a0f09eabda16306 (diff)
change behavior of disable_cron_billing option, #19873
Diffstat (limited to 'FS/FS/Cron')
-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 98ce8fa..d046930 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 );
+ }
}