X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=FS%2FFS%2Fsvc_acct.pm;h=f0b0abc2a69772a414a0b9f7cfbf739f17577145;hp=e3589d846da6e8121065351dcaaca02a701b8ab9;hb=6a5e93685fe7d6d3ca00d389338487578a848b84;hpb=d42c7a08d933e3e91fcfa988c15cf1791b68ee85 diff --git a/FS/FS/svc_acct.pm b/FS/FS/svc_acct.pm index e3589d846..f0b0abc2a 100644 --- a/FS/FS/svc_acct.pm +++ b/FS/FS/svc_acct.pm @@ -433,10 +433,11 @@ sub suspend { ) { $hash{_password} = '*SUSPENDED* '.$hash{_password}; my $new = new FS::svc_acct ( \%hash ); - $new->replace($self); - } else { - ''; #no error (already suspended) + my $error = $new->replace($self); + return $error if $error; } + + $self->SUPER::suspend; } =item unsuspend @@ -454,10 +455,11 @@ sub unsuspend { if ( $hash{_password} =~ /^\*SUSPENDED\* (.*)$/ ) { $hash{_password} = $1; my $new = new FS::svc_acct ( \%hash ); - $new->replace($self); - } else { - ''; #no error (already unsuspended) + my $error = $new->replace($self); + return $error if $error; } + + $self->SUPER::unsuspend; } =item cancel