summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--FS/FS/contact.pm9
1 files changed, 9 insertions, 0 deletions
diff --git a/FS/FS/contact.pm b/FS/FS/contact.pm
index d0dd8b773..9ce73e1dd 100644
--- a/FS/FS/contact.pm
+++ b/FS/FS/contact.pm
@@ -207,6 +207,15 @@ sub delete {
local $FS::UID::AutoCommit = 0;
my $dbh = dbh;
+ foreach my $cust_pkg ( $self->cust_pkg ) {
+ $cust_pkg->contactnum('');
+ my $error = $cust_pkg->replace;
+ if ( $error ) {
+ $dbh->rollback if $oldAutoCommit;
+ return $error;
+ }
+ }
+
foreach my $object ( $self->contact_phone, $self->contact_email ) {
my $error = $object->delete;
if ( $error ) {