summaryrefslogtreecommitdiff
path: root/FS
diff options
context:
space:
mode:
authorIvan Kohler <ivan@freeside.biz>2012-05-10 20:30:17 -0700
committerIvan Kohler <ivan@freeside.biz>2012-05-10 20:30:17 -0700
commit053116d325050963ada4455c83b7bd1c154ce59f (patch)
tree7a5a4a7d47e6f23a57480c60613f7ff2a99e4ae2 /FS
parent47822a049bc96a4cc0d868553f87d7c4568e868c (diff)
fix uncancellation w/services that have been re-provisioned, RT#17518
Diffstat (limited to 'FS')
-rw-r--r--FS/FS/cust_pkg.pm11
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;
}