diff options
| author | ivan <ivan> | 2009-11-16 02:27:14 +0000 | 
|---|---|---|
| committer | ivan <ivan> | 2009-11-16 02:27:14 +0000 | 
| commit | de347c7577a31301fffae333ec3ce8f4e2864600 (patch) | |
| tree | ba7cc14817c067d585391b3736ea438aa615d497 /FS | |
| parent | 2339b763230e33505b8a5302acd32269fbfd9f7e (diff) | |
add disable_cron_billing config, RT#6407
Diffstat (limited to 'FS')
| -rw-r--r-- | FS/FS/Conf.pm | 6 | ||||
| -rw-r--r-- | FS/FS/Cron/bill.pm | 6 | ||||
| -rwxr-xr-x | FS/bin/freeside-daily | 1 | 
3 files changed, 13 insertions, 0 deletions
| diff --git a/FS/FS/Conf.pm b/FS/FS/Conf.pm index 13457adc3..c0f894fc2 100644 --- a/FS/FS/Conf.pm +++ b/FS/FS/Conf.pm @@ -3209,6 +3209,12 @@ worry that config_items is freeside-specific and icky.      'type'        => 'select-pkg_class',    }, +  { +    'key'         => 'disable_cron_billing', +    'section'     => 'billing', +    'description' => 'Disable billing and collection from being run by freeside-daily and freeside-monthly, while still allowing other actions to run, such as notifications and backup.', +    'type'        => 'checkbox', +  },    { key => "apacheroot", section => "deprecated", description => "<b>DEPRECATED</b>", type => "text" },    { key => "apachemachine", section => "deprecated", description => "<b>DEPRECATED</b>", type => "text" }, diff --git a/FS/FS/Cron/bill.pm b/FS/FS/Cron/bill.pm index dbb6c66c2..27011c69f 100644 --- a/FS/FS/Cron/bill.pm +++ b/FS/FS/Cron/bill.pm @@ -34,6 +34,12 @@ sub bill {    $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'}; diff --git a/FS/bin/freeside-daily b/FS/bin/freeside-daily index 04073d47e..1be98ac9e 100755 --- a/FS/bin/freeside-daily +++ b/FS/bin/freeside-daily @@ -12,6 +12,7 @@ getopts("p:a:d:vl:sy:nmrkg:", \%opt);  my $user = shift or die &usage;  adminsuidsetup $user; +#you can skip this by setting the disable_cron_billing config  use FS::Cron::bill qw(bill);  bill(%opt); | 
