From: khoff Date: Wed, 7 Mar 2007 19:48:32 +0000 (+0000) Subject: Option to disable the charging of the setup fee while a package is suspended. X-Git-Tag: TRIXBOX_2_6~601 X-Git-Url: http://git.freeside.biz/gitweb/?a=commitdiff_plain;h=7a67b0df697c1aa35e148bd5b2f1f765bf1969f6;p=freeside.git Option to disable the charging of the setup fee while a package is suspended. --- diff --git a/FS/FS/Conf.pm b/FS/FS/Conf.pm index f2b1bea56..d9f7d1972 100644 --- a/FS/FS/Conf.pm +++ b/FS/FS/Conf.pm @@ -2076,6 +2076,13 @@ httemplate/docs/config.html 'type' => 'checkbox', }, + { + '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 c6212756a..9c4b8bed7 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;