add unsuspend-always_adjust_next_bill_date config option for qis
authorivan <ivan>
Fri, 27 Oct 2006 19:10:21 +0000 (19:10 +0000)
committerivan <ivan>
Fri, 27 Oct 2006 19:10:21 +0000 (19:10 +0000)
FS/FS/Conf.pm
FS/FS/cust_pkg.pm

index 1d7490f..edb1ca3 100644 (file)
@@ -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)',
index 4166f09..ec47538 100644 (file)
@@ -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'} = '';