X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=FS%2FFS%2Fcust_pkg.pm;h=fb41dfcf8b6f7a5fc5493120a371d7468eac3485;hp=db0f7d423d0ae5148a900bf6795ae4e9e690a050;hb=ebccee59f6339778da851c5c13e7238e457f3e62;hpb=af723d02722d00c863ec4552627fe4ad77973d75 diff --git a/FS/FS/cust_pkg.pm b/FS/FS/cust_pkg.pm index db0f7d423..fb41dfcf8 100644 --- a/FS/FS/cust_pkg.pm +++ b/FS/FS/cust_pkg.pm @@ -452,7 +452,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 ) {