$FS::cust_main::DEBUG = $debug;
#$FS::cust_event::DEBUG = $opt{'l'} if $opt{'l'};
+ my $conf = new FS::Conf;
+ if ( $conf->exists('disable_cron_billing') ) {
+ warn "disable_cron_billing set, skipping billing\n" if $debug;
+ return;
+ }
+
#we're at now now (and later).
$opt{'time'} = $opt{'d'} ? str2time($opt{'d'}) : $^T;
$opt{'time'} += $opt{'y'} * 86400 if $opt{'y'};
push @search, "cust_main.payby = '". $opt{'p'}. "'"
if $opt{'p'};
- push @search, "cust_main.agentnum = ". $opt{'a'}
+ push @search, "cust_main.agentnum IN ( ". $opt{'a'}. " ) "
if $opt{'a'};
#it would be useful if i recognized $opt{g} / $not_pkgpart...