diff options
Diffstat (limited to 'FS')
| -rw-r--r-- | FS/FS/cust_pkg.pm | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/FS/FS/cust_pkg.pm b/FS/FS/cust_pkg.pm index 27c25daa9..1d4a90c56 100644 --- a/FS/FS/cust_pkg.pm +++ b/FS/FS/cust_pkg.pm @@ -972,7 +972,16 @@ sub uncancel { my $svc_error = $svc_x->insert; if ( $svc_error && $options{svc_fatal} ) { $dbh->rollback if $oldAutoCommit; - return $error; + return $svc_error; + } else { + my $cust_svc = qsearchs('cust_svc', { 'svcnum' => $svc_x->svcnum }); + if ( $cust_svc ) { + my $cs_error = $cust_svc->delete; + if ( $cs_error ) { + $dbh->rollback if $oldAutoCommit; + return $cs_error; + } + } } push @svc_errors, $svc_error if $svc_error; } |
