From: Francesc Bassas i Bullich Date: Fri, 25 Jan 2019 09:39:25 +0000 (+0100) Subject: dev/core#682 Add basic contact filters to Summary Contributions Report X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=1ebe1a570c325369811d5df6d8e3a861dda9f6c0;p=civicrm-core.git dev/core#682 Add basic contact filters to Summary Contributions Report --- diff --git a/CRM/Report/Form.php b/CRM/Report/Form.php index a5c1741f89..a69e37d51e 100644 --- a/CRM/Report/Form.php +++ b/CRM/Report/Form.php @@ -4834,9 +4834,11 @@ LEFT JOIN civicrm_contact {$field['alias']} ON {$field['alias']}.id = {$this->_a /** * Get a standard set of contact filters. * + * @param array $defaults + * * @return array */ - public function getBasicContactFilters() { + public function getBasicContactFilters($defaults = array()) { return array( 'sort_name' => array( 'title' => ts('Contact Name'), @@ -4872,7 +4874,7 @@ LEFT JOIN civicrm_contact {$field['alias']} ON {$field['alias']}.id = {$this->_a 'is_deceased' => array( 'title' => ts('Deceased'), 'type' => CRM_Utils_Type::T_BOOLEAN, - 'default' => 0, + 'default' => CRM_Utils_Array::value('deceased', $defaults, 0), ), 'do_not_email' => array( 'title' => ts('Do not email'), diff --git a/CRM/Report/Form/Contribute/Summary.php b/CRM/Report/Form/Contribute/Summary.php index 1ea03719f7..b5f682a987 100644 --- a/CRM/Report/Form/Contribute/Summary.php +++ b/CRM/Report/Form/Contribute/Summary.php @@ -81,6 +81,7 @@ class CRM_Report_Form_Contribute_Summary extends CRM_Report_Form { ), ) ), + 'filters' => $this->getBasicContactFilters(array('deceased' => NULL)), 'grouping' => 'contact-fields', 'group_bys' => array( 'id' => array('title' => ts('Contact ID')),