[freeside-commits] branch master updated. 9acc16fbf3b990f4d98d2dc31b46a0e486e73f4a
Ivan
ivan at 420.am
Tue May 13 12:35:09 PDT 2014
The branch, master has been updated
via 9acc16fbf3b990f4d98d2dc31b46a0e486e73f4a (commit)
from f2e9af8087362231b37e878ed3ef06cf6bbe3fd3 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 9acc16fbf3b990f4d98d2dc31b46a0e486e73f4a
Author: Ivan Kohler <ivan at freeside.biz>
Date: Tue May 13 12:35:08 2014 -0700
remove deleted contacts from packages, RT#28949
diff --git a/FS/FS/contact.pm b/FS/FS/contact.pm
index d0dd8b7..9ce73e1 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 ) {
-----------------------------------------------------------------------
Summary of changes:
FS/FS/contact.pm | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
More information about the freeside-commits
mailing list