Skip to content
Snippets Groups Projects
Commit 6c8752fa authored by Kevin Cristiano's avatar Kevin Cristiano :earth_americas:
Browse files

add primary email address to Bookkeeping extra report

parent b0bce9bd
No related branches found
No related tags found
No related merge requests found
......@@ -154,6 +154,21 @@ class CRM_Additionalreports_Form_Report_BookkeepingExtra extends CRM_Report_Form
),
),
),
'civicrm_email' => array(
'dao' => 'CRM_Core_DAO_Email',
'fields' => array(
'email' => array(
'title' => ts('Email'),
'no_repeat' => TRUE,
),
),
'grouping' => 'contact-fields',
'order_bys' => array(
'email' => array(
'title' => ts('Email'),
),
),
),
'civicrm_membership' => array(
'dao' => 'CRM_Member_DAO_Membership',
'fields' => array(
......@@ -452,6 +467,12 @@ class CRM_Additionalreports_Form_Report_BookkeepingExtra extends CRM_Report_Form
LEFT JOIN civicrm_batch batch
ON ent_batch.batch_id = batch.id";
}
if ($this->isTableSelected('civicrm_email')) {
$this->_from .= "
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) ";
}
$this->getPermissionedFTQuery($this, "civicrm_line_item_1");
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment