[freeside-commits] freeside/FS/FS Conf.pm, 1.168, 1.169 cust_pkg.pm, 1.66, 1.67

Ivan,,, ivan at wavetail.420.am
Fri Oct 27 12:10:23 PDT 2006


Update of /home/cvs/cvsroot/freeside/FS/FS
In directory wavetail:/tmp/cvs-serv21723

Modified Files:
	Conf.pm cust_pkg.pm 
Log Message:
add unsuspend-always_adjust_next_bill_date config option for qis

Index: Conf.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/Conf.pm,v
retrieving revision 1.168
retrieving revision 1.169
diff -u -d -r1.168 -r1.169
--- Conf.pm	22 Oct 2006 11:42:39 -0000	1.168
+++ Conf.pm	27 Oct 2006 19:10:21 -0000	1.169
@@ -1000,6 +1000,13 @@
   },
 
   {
+    '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: cust_pkg.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/cust_pkg.pm,v
retrieving revision 1.66
retrieving revision 1.67
diff -u -d -r1.66 -r1.67
--- cust_pkg.pm	23 Oct 2006 04:21:02 -0000	1.66
+++ cust_pkg.pm	27 Oct 2006 19:10:21 -0000	1.67
@@ -643,8 +643,11 @@
     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'} = '';



More information about the freeside-commits mailing list