From 302ccf933dd63c7b0c7c3346b79be5c170bfc70b Mon Sep 17 00:00:00 2001 From: yashodha Date: Thu, 13 Jun 2019 14:49:33 +0530 Subject: [PATCH] Expose Primary member only/Non primary member only filter in membership reports --- CRM/Report/Form/Member/Detail.php | 12 ++++++++++++ CRM/Report/Form/Member/Summary.php | 12 ++++++++++++ 2 files changed, 24 insertions(+) diff --git a/CRM/Report/Form/Member/Detail.php b/CRM/Report/Form/Member/Detail.php index 4d816ee3db..93a64ce21c 100644 --- a/CRM/Report/Form/Member/Detail.php +++ b/CRM/Report/Form/Member/Detail.php @@ -284,6 +284,18 @@ class CRM_Report_Form_Member_Detail extends CRM_Report_Form { } } + public function getOperationPair($type = "string", $fieldName = NULL) { + $result = parent::getOperationPair($type, $fieldName); + + //re-name IS NULL/IS NOT NULL for clarity + if ($fieldName == 'owner_membership_id') { + $result['nll'] = ts('Primary members only'); + $result['nnll'] = ts('Non-primary members only'); + } + + return $result; + } + /** * Alter display of rows. * diff --git a/CRM/Report/Form/Member/Summary.php b/CRM/Report/Form/Member/Summary.php index 9ad2a41fb3..cc390e7c2e 100644 --- a/CRM/Report/Form/Member/Summary.php +++ b/CRM/Report/Form/Member/Summary.php @@ -436,6 +436,18 @@ GROUP BY {$this->_aliases['civicrm_contribution']}.currency parent::postProcess(); } + public function getOperationPair($type = "string", $fieldName = NULL) { + $result = parent::getOperationPair($type, $fieldName); + + //re-name IS NULL/IS NOT NULL for clarity + if ($fieldName == 'owner_membership_id') { + $result['nll'] = ts('Primary members only'); + $result['nnll'] = ts('Non-primary members only'); + } + + return $result; + } + /** * @param $rows */ -- 2.25.1