X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fsearch%2Fcontact.html;h=759f095216b3bfd62deb79d23d63258e9843908a;hb=d2d8c2d81508b6e26e2a199c00819f392476d6fb;hp=c3667df98c2c9e1c6cc972219080509be5e8a9bb;hpb=ec7e8155fce544f19f2b6734476ed6db8c200aa9;p=freeside.git diff --git a/httemplate/search/contact.html b/httemplate/search/contact.html index c3667df98..759f09521 100644 --- a/httemplate/search/contact.html +++ b/httemplate/search/contact.html @@ -22,6 +22,13 @@ push @select, map "contact.$_", qw( first last title ); my %hash = (); my $addl_from = ''; +my $email_sub = sub { + my $contact = shift; + #can't because contactnum is in the wrong field #my @contact_email = $contact->contact_email; + my @contact_email = qsearch('contact_email', { 'contactnum' => $contact->contact_contactnum } ); + join(', ', map $_->emailaddress, @contact_email); +}; + my $link; #for closure in this sub, we'll define it later my $contact_classname_sub = sub { my $contact = shift; @@ -37,9 +44,9 @@ my $contact_classname_sub = sub { $X_contact->contact_classname; }; -my @header = ( 'First', 'Last', 'Title', 'Type' ); -my @fields = ( 'first', 'last', 'title', $contact_classname_sub ); -my @links = ( '', '', '', '', ); +my @header = ( 'First', 'Last', 'Title', 'Email', 'Type' ); +my @fields = ( 'first', 'last', 'title', $email_sub, $contact_classname_sub ); +my @links = ( '', '', '', '', '', ); my $company_link = '';