Skip to content

Commit

Permalink
Merge pull request #11106 from twomice/CRM-21287_contributions_by_hou…
Browse files Browse the repository at this point in the history
…sehold_add_financial_type

CRM-21287: Add Financial Type column and filter.
  • Loading branch information
eileenmcnaughton authored Oct 10, 2017
2 parents 6616513 + 2feca82 commit e4a4f30
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions CRM/Report/Form/Contribute/HouseholdSummary.php
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,9 @@ public function __construct() {
'required' => TRUE,
'no_display' => TRUE,
),
'financial_type_id' => array(
'title' => ts('Financial Type'),
),
'trxn_id' => NULL,
'receive_date' => array('default' => TRUE),
'receipt_date' => NULL,
Expand All @@ -158,6 +161,11 @@ public function __construct() {
'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',
),
Expand Down Expand Up @@ -526,6 +534,12 @@ public function alterDisplay(&$rows) {
}
}

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']) {
Expand Down

0 comments on commit e4a4f30

Please sign in to comment.