X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=httemplate%2Felements%2Ftr-select-contact.html;h=4eb8a9879afbea1165b2609cf117f58c6d118c1b;hp=d6bc67f3616788c89e170629299b6bc904cb70ea;hb=3f2a7b01b59902faed5767d81e2959e131bdbdfd;hpb=06f92269d9fe378cfa2f00c958404a6e8df642ff diff --git a/httemplate/elements/tr-select-contact.html b/httemplate/elements/tr-select-contact.html index d6bc67f36..4eb8a9879 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->cust_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(@prospect_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;