[freeside-commits] branch master updated. d9a303be7f60e3cf54c7603e65861606c06045fd

Christopher Burger burgerc at 420.am
Mon Sep 18 10:25:51 PDT 2017


The branch, master has been updated
       via  d9a303be7f60e3cf54c7603e65861606c06045fd (commit)
      from  4c6d9e9b97885be2d42f352086b4d27193759d52 (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 d9a303be7f60e3cf54c7603e65861606c06045fd
Author: Christopher Burger <burgerc at freeside.biz>
Date:   Mon Sep 18 13:25:39 2017 -0400

    RT# 77532 - Updated customer contact reports to display contact phone numers

diff --git a/httemplate/search/contact.html b/httemplate/search/contact.html
index 759f095..1615dfa 100644
--- a/httemplate/search/contact.html
+++ b/httemplate/search/contact.html
@@ -29,6 +29,27 @@ my $email_sub = sub {
   join(', ', map $_->emailaddress, @contact_email);
 };
 
+my $work_phone_sub = sub {
+  my $contact = shift;
+  #can't because contactnum is in the wrong field
+  my @contact_workphone = qsearch('contact_phone', { 'contactnum' => $contact->contact_contactnum, 'phonetypenum' => '1' } );
+  join(', ', map $_->phonenum, @contact_workphone);
+};
+
+my $mobile_phone_sub = sub {
+  my $contact = shift;
+  #can't because contactnum is in the wrong field
+  my @contact_mobilephone = qsearch('contact_phone', { 'contactnum' => $contact->contact_contactnum, 'phonetypenum' => '3' } );
+  join(', ', map $_->phonenum, @contact_mobilephone);
+};
+
+my $home_phone_sub = sub {
+  my $contact = shift;
+  #can't because contactnum is in the wrong field
+  my @contact_homephone = qsearch('contact_phone', { 'contactnum' => $contact->contact_contactnum, 'phonetypenum' => '2' } );
+  join(', ', map $_->phonenum, @contact_homephone);
+};
+
 my $link; #for closure in this sub, we'll define it later
 my $contact_classname_sub = sub {
   my $contact = shift;
@@ -44,9 +65,9 @@ my $contact_classname_sub = sub {
   $X_contact->contact_classname;
 };
 
-my @header = ( 'First', 'Last', 'Title', 'Email', 'Type' );
-my @fields = ( 'first', 'last', 'title', $email_sub, $contact_classname_sub );
-my @links = ( '', '', '', '', '', );
+my @header = ( 'First', 'Last', 'Title', 'Email', 'Work Phone', 'Mobile Phone', 'Home Phone', 'Type' );
+my @fields = ( 'first', 'last', 'title', $email_sub, $work_phone_sub, $mobile_phone_sub, $home_phone_sub, $contact_classname_sub );
+my @links = ( '', '', '', '', '', '', '', '', );
 
 my $company_link = '';
 

-----------------------------------------------------------------------

Summary of changes:
 httemplate/search/contact.html |   27 ++++++++++++++++++++++++---
 1 file changed, 24 insertions(+), 3 deletions(-)




More information about the freeside-commits mailing list