freeside/FS/FS cust_pkg.pm,1.45,1.46

ivan ivan at pouncequick.420.am
Fri Jun 25 01:44:57 PDT 2004


Update of /home/cvs/cvsroot/freeside/FS/FS
In directory pouncequick:/tmp/cvs-serv28427

Modified Files:
	cust_pkg.pm 
Log Message:
move up next bill date on unsuspend

Index: cust_pkg.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/cust_pkg.pm,v
retrieving revision 1.45
retrieving revision 1.46
diff -u -d -r1.45 -r1.46
--- cust_pkg.pm	5 Apr 2004 11:55:35 -0000	1.45
+++ cust_pkg.pm	25 Jun 2004 08:44:54 -0000	1.46
@@ -452,7 +452,10 @@
 
   unless ( ! $self->getfield('susp') ) {
     my %hash = $self->hash;
+    my $inactive = time - $hash{'susp'};
     $hash{'susp'} = '';
+    $hash{'bill'} = ( $hash{'bill'} || $hash{'setup'} ) + $inactive
+      if $inactive > 0 && ( $hash{'bill'} || $hash{'setup'} );
     my $new = new FS::cust_pkg ( \%hash );
     $error = $new->replace($self);
     if ( $error ) {




More information about the freeside-commits mailing list