From 05220333d36991c646a1af48002a9af8bc8f348a Mon Sep 17 00:00:00 2001 From: yashodha Date: Fri, 14 Jun 2019 16:39:29 +0530 Subject: [PATCH] Expose Primary member only/Non primary member only filter in membership reports --- CRM/Report/Form/Member/ContributionDetail.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/CRM/Report/Form/Member/ContributionDetail.php b/CRM/Report/Form/Member/ContributionDetail.php index beabdbc122..e3dd884f8d 100644 --- a/CRM/Report/Form/Member/ContributionDetail.php +++ b/CRM/Report/Form/Member/ContributionDetail.php @@ -612,6 +612,18 @@ class CRM_Report_Form_Member_ContributionDetail extends CRM_Report_Form { return $statistics; } + 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; + } + public function postProcess() { // get the acl clauses built before we assemble the query $this->buildACLClause($this->_aliases['civicrm_contact']); -- 2.25.1