diff options
| author | Ivan Kohler <ivan@freeside.biz> | 2015-02-03 07:14:45 -0800 |
|---|---|---|
| committer | Ivan Kohler <ivan@freeside.biz> | 2015-02-03 07:14:45 -0800 |
| commit | 167dbdad01e2c1b62fd9be43cc05212e8c874a02 (patch) | |
| tree | 0d49c9ba03d64560f21b02a20d32d6005a790ced /httemplate/elements/tr-select-contact.html | |
| parent | 475ae93877f1d834941f7b9adcc35ee84c5c22fa (diff) | |
contacts can be shared among customers / "duplicate contact emails", RT#27943
Diffstat (limited to 'httemplate/elements/tr-select-contact.html')
| -rw-r--r-- | httemplate/elements/tr-select-contact.html | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/httemplate/elements/tr-select-contact.html b/httemplate/elements/tr-select-contact.html index e37d26d1b..0bfa8934c 100644 --- a/httemplate/elements/tr-select-contact.html +++ b/httemplate/elements/tr-select-contact.html @@ -138,8 +138,8 @@ if ( $cgi->param('error') ) { if ( length($opt{'curr_value'}) ) { $contactnum = $opt{'curr_value'}; } elsif ($prospect_main) { - my @cust_contact = $prospect_main->contact; - $contactnum = $cust_contact[0]->contactnum if scalar(@cust_contact)==1; + my @prospect_contact = $prospect_main->prospect_contact; + $contactnum = $prospect_contact[0]->contactnum if scalar(@cust_contact)==1; } else { #$cust_main $cgi->param('contactnum') =~ /^(\-?\d*)$/ or die "illegal contactnum"; $contactnum = $1; @@ -176,8 +176,10 @@ my $contact_sort = sub { }; my @contact; -push @contact, $cust_main->cust_contact if $cust_main; -push @contact, $prospect_main->contact if $prospect_main; +push @contact, map $_->contact, $cust_main->cust_contact + if $cust_main; +push @contact, map $_->contact, $prospect_main->prospect_contact + if $prospect_main; push @contact, $contact if !$cust_main && $contact && $contact->contactnum > 0 && ! grep { $_->contactnum == $contact->contactnum } @contact; |
