diff options
author | Jonathan Prykop <jonathan@freeside.biz> | 2016-03-24 21:41:04 -0500 |
---|---|---|
committer | Jonathan Prykop <jonathan@freeside.biz> | 2016-03-24 21:41:04 -0500 |
commit | a472d8ff6bf5c87d7181c4a3f1757bae487a6ddf (patch) | |
tree | 7fa3ec442cc1bb7aaa873f46c31daf29b60edcb3 /FS/FS/cust_svc.pm | |
parent | 028e089bd3219330418ce40ab07926a320584e7e (diff) |
RT#37912: Service Provisioning Export for ISPConfig 3
Diffstat (limited to 'FS/FS/cust_svc.pm')
-rw-r--r-- | FS/FS/cust_svc.pm | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/FS/FS/cust_svc.pm b/FS/FS/cust_svc.pm index d91fa0d..c06b302 100644 --- a/FS/FS/cust_svc.pm +++ b/FS/FS/cust_svc.pm @@ -169,6 +169,17 @@ sub delete { local $FS::UID::AutoCommit = 0; my $dbh = dbh; + # delete associated export_cust_svc + foreach my $export_cust_svc ( + qsearch('export_cust_svc',{ 'svcnum' => $self->svcnum }) + ) { + my $error = $export_cust_svc->delete; + if ( $error ) { + $dbh->rollback if $oldAutoCommit; + return $error; + } + } + my $error = $self->SUPER::delete; if ( $error ) { $dbh->rollback if $oldAutoCommit; |