From b77b3cdff4fe14a1b8a33ae47afbd2dfbf75fe35 Mon Sep 17 00:00:00 2001 From: Rohan Katkar Date: Tue, 9 Sep 2014 15:25:19 +0530 Subject: [PATCH] Fix for CRM-15264 --- CRM/Report/Form/Contact/CurrentEmployer.php | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/CRM/Report/Form/Contact/CurrentEmployer.php b/CRM/Report/Form/Contact/CurrentEmployer.php index a74bc6e720..6a8177a5d6 100644 --- a/CRM/Report/Form/Contact/CurrentEmployer.php +++ b/CRM/Report/Form/Contact/CurrentEmployer.php @@ -137,6 +137,18 @@ class CRM_Report_Form_Contact_CurrentEmployer extends CRM_Report_Form { ), ), ), + 'civicrm_phone' => + array( + 'dao' => 'CRM_Core_DAO_Phone', + 'grouping' => 'contact-fields', + 'fields' => + array( + 'phone' => + array('title' => ts('Phone'), + 'default' => TRUE, + ), + ), + ), 'civicrm_email' => array( 'dao' => 'CRM_Core_DAO_Email', @@ -241,6 +253,9 @@ FROM civicrm_contact {$this->_aliases['civicrm_contact']} ON ({$this->_aliases['civicrm_contact']}.id = {$this->_aliases['civicrm_address']}.contact_id AND {$this->_aliases['civicrm_address']}.is_primary = 1 ) + LEFT JOIN civicrm_phone {$this->_aliases['civicrm_phone']} + ON ({$this->_aliases['civicrm_contact']}.id = {$this->_aliases['civicrm_phone']}.contact_id + AND {$this->_aliases['civicrm_phone']}.is_primary = 1) LEFT JOIN civicrm_email {$this->_aliases['civicrm_email']} ON ({$this->_aliases['civicrm_contact']}.id = {$this->_aliases['civicrm_email']}.contact_id AND {$this->_aliases['civicrm_email']}.is_primary = 1) "; @@ -387,4 +402,3 @@ FROM civicrm_contact {$this->_aliases['civicrm_contact']} } } } - -- 2.25.1