projects
/
freeside.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f2e9af8
)
remove deleted contacts from packages, RT#28949
author
Ivan Kohler
<ivan@freeside.biz>
Tue, 13 May 2014 19:35:08 +0000
(12:35 -0700)
committer
Ivan Kohler
<ivan@freeside.biz>
Tue, 13 May 2014 19:35:08 +0000
(12:35 -0700)
FS/FS/contact.pm
patch
|
blob
|
history
diff --git
a/FS/FS/contact.pm
b/FS/FS/contact.pm
index
d0dd8b7
..
9ce73e1
100644
(file)
--- 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 ) {