From: Rohan Katkar Date: Tue, 9 Sep 2014 09:55:19 +0000 (+0530) Subject: Fix for CRM-15264 X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=b77b3cdff4fe14a1b8a33ae47afbd2dfbf75fe35;p=civicrm-core.git Fix for CRM-15264 --- 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']} } } } -