diff options
| author | Christopher Burger <burgerc@freeside.biz> | 2019-01-22 10:59:45 -0500 |
|---|---|---|
| committer | Christopher Burger <burgerc@freeside.biz> | 2019-01-22 11:08:00 -0500 |
| commit | 55c64419cb3bd874df204c0192f8f6ff06cbf11e (patch) | |
| tree | 308b01c9ae5b537808bb5586cf7a86c9d82a3f75 | |
| parent | 1595ded97f613dd951072f936c95c88a470de14e (diff) | |
RT# 79352 - keep original email if all new emails are attached to other contacts on contact replace.
| -rw-r--r-- | FS/FS/contact.pm | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/FS/FS/contact.pm b/FS/FS/contact.pm index c024232f0..5c7e29eba 100644 --- a/FS/FS/contact.pm +++ b/FS/FS/contact.pm @@ -468,6 +468,13 @@ sub replace { } + ## were all emails duplicates? if so reset original emails + if (scalar @contact_emails < 1 && scalar (keys %contact_nums) > 1) { + foreach (qsearch('contact_email', {'contactnum' => $self->contactnum})) { + push @contact_emails, $_->emailaddress; + } + } + my $emails = join(' , ', @contact_emails); $self->emailaddress($emails); |
