From 2feca82fc7579c8afbe48ba5a2d574f0ac353fb2 Mon Sep 17 00:00:00 2001 From: Allen Shaw Date: Tue, 10 Oct 2017 11:35:56 -0500 Subject: [PATCH] CRM-21287: Add Financial Type column and filter. --- CRM/Report/Form/Contribute/HouseholdSummary.php | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/CRM/Report/Form/Contribute/HouseholdSummary.php b/CRM/Report/Form/Contribute/HouseholdSummary.php index 43135d64e3..1c82dbc92c 100644 --- a/CRM/Report/Form/Contribute/HouseholdSummary.php +++ b/CRM/Report/Form/Contribute/HouseholdSummary.php @@ -138,6 +138,9 @@ class CRM_Report_Form_Contribute_HouseholdSummary extends CRM_Report_Form { 'required' => TRUE, 'no_display' => TRUE, ), + 'financial_type_id' => array( + 'title' => ts('Financial Type'), + ), 'trxn_id' => NULL, 'receive_date' => array('default' => TRUE), 'receipt_date' => NULL, @@ -158,6 +161,11 @@ class CRM_Report_Form_Contribute_HouseholdSummary extends CRM_Report_Form { 'options' => CRM_Contribute_PseudoConstant::contributionStatus(), 'default' => array(1), ), + 'financial_type_id' => array( + 'title' => ts('Financial Type'), + 'operatorType' => CRM_Report_Form::OP_MULTISELECT, + 'options' => CRM_Contribute_PseudoConstant::financialType(), + ), ), 'grouping' => 'contri-fields', ), @@ -526,6 +534,12 @@ class CRM_Report_Form_Contribute_HouseholdSummary extends CRM_Report_Form { } } + if (array_key_exists('civicrm_contribution_financial_type_id', $row)) { + if ($value = $row['civicrm_contribution_financial_type_id']) { + $rows[$rowNum]['civicrm_contribution_financial_type_id'] = CRM_Contribute_PseudoConstant::financialType($value); + } + } + // handle state province if (array_key_exists('civicrm_address_state_province_id', $row)) { if ($value = $row['civicrm_address_state_province_id']) { -- 2.25.1