summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--FS/FS/Conf.pm7
-rw-r--r--FS/FS/cust_pkg.pm5
2 files changed, 11 insertions, 1 deletions
diff --git a/FS/FS/Conf.pm b/FS/FS/Conf.pm
index 1d7490f76..edb1ca33e 100644
--- a/FS/FS/Conf.pm
+++ b/FS/FS/Conf.pm
@@ -1000,6 +1000,13 @@ httemplate/docs/config.html
},
{
+ 'key' => 'unsuspend-always_adjust_next_bill_date',
+ 'section' => 'billing',
+ 'description' => 'Global override that causes unsuspensions to always adjust the next bill date under any circumstances. This is now controlled on a per-package bases - probably best not to use this option unless you are a legacy installation that requires this behaviour.',
+ 'type' => 'checkbox',
+ },
+
+ {
'key' => 'usernamemin',
'section' => 'username',
'description' => 'Minimum username length (default 2)',
diff --git a/FS/FS/cust_pkg.pm b/FS/FS/cust_pkg.pm
index 4166f090e..ec47538cd 100644
--- a/FS/FS/cust_pkg.pm
+++ b/FS/FS/cust_pkg.pm
@@ -643,8 +643,11 @@ sub unsuspend {
my %hash = $self->hash;
my $inactive = time - $hash{'susp'};
+ my $conf = new FS::Conf;
+
$hash{'bill'} = ( $hash{'bill'} || $hash{'setup'} ) + $inactive
- if $opt{'adjust_next_bill'}
+ if ( $opt{'adjust_next_bill'}
+ || $conf->config('unsuspend-always_adjust_next_bill_date') )
&& $inactive > 0 && ( $hash{'bill'} || $hash{'setup'} );
$hash{'susp'} = '';