diff options
author | khoff <khoff> | 2007-03-07 19:49:15 +0000 |
---|---|---|
committer | khoff <khoff> | 2007-03-07 19:49:15 +0000 |
commit | 6188f26711f96878292c37c8a5aa60156e8fe96f (patch) | |
tree | 8e2659322f3a74418aec41321a627964c2e87cd8 | |
parent | 2b00700a730f73846ced46b90b8622e6a0e1a2b6 (diff) |
Option to disable the charging of the setup fee while a package is suspended.
-rw-r--r-- | FS/FS/Conf.pm | 7 | ||||
-rw-r--r-- | FS/FS/cust_main.pm | 9 |
2 files changed, 15 insertions, 1 deletions
diff --git a/FS/FS/Conf.pm b/FS/FS/Conf.pm index 8db0b0c6a..1c552a4bd 100644 --- a/FS/FS/Conf.pm +++ b/FS/FS/Conf.pm @@ -2045,6 +2045,13 @@ httemplate/docs/config.html 'type' => 'textarea', }, + { + 'key' => 'disable_setup_suspended_pkgs', + 'section' => 'billing', + 'description' => 'Disables charging of setup fees for suspended packages.', + 'type' => 'checkbox', + }, + ); 1; diff --git a/FS/FS/cust_main.pm b/FS/FS/cust_main.pm index 7fed174de..4066b8f4b 100644 --- a/FS/FS/cust_main.pm +++ b/FS/FS/cust_main.pm @@ -1902,7 +1902,14 @@ sub bill { ### my $setup = 0; - if ( !$cust_pkg->setup || $options{'resetup'} ) { + if ( ! $cust_pkg->setup && + ( + ( $conf->exists('disable_setup_suspended_pkgs') && + ! $cust_pkg->getfield('susp') + ) || ! $conf->exists('disable_setup_suspended_pkgs') + ) + || $options{'resetup'} + ) { warn " bill setup\n" if $DEBUG > 1; |