From: ivan Date: Fri, 25 Jun 2004 08:44:56 +0000 (+0000) Subject: move up next bill date on unsuspend X-Git-Tag: freeside_1_4_2beta1~54 X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=commitdiff_plain;h=74d6490b9bb61dfb0a4f0633e074ab6126638bdb move up next bill date on unsuspend --- diff --git a/FS/FS/cust_pkg.pm b/FS/FS/cust_pkg.pm index a62c44e00..a3297ab47 100644 --- a/FS/FS/cust_pkg.pm +++ b/FS/FS/cust_pkg.pm @@ -462,7 +462,10 @@ sub unsuspend { 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 ) {