X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=CRM%2FReport%2FForm%2FContribute%2FHouseholdSummary.php;h=43135d64e31f964ec4a566265a2c2fa1466908e6;hb=d72b084aac44d729ff3e47e3d9d8783b6be0f492;hp=5484fe3d6b45fdc33c74fb78e45067fc5b5934b1;hpb=c2eb0d94521a805425dad2d18d447a7dd8d03b03;p=civicrm-core.git diff --git a/CRM/Report/Form/Contribute/HouseholdSummary.php b/CRM/Report/Form/Contribute/HouseholdSummary.php index 5484fe3d6b..43135d64e3 100644 --- a/CRM/Report/Form/Contribute/HouseholdSummary.php +++ b/CRM/Report/Form/Contribute/HouseholdSummary.php @@ -3,7 +3,7 @@ +--------------------------------------------------------------------+ | CiviCRM version 4.7 | +--------------------------------------------------------------------+ - | Copyright CiviCRM LLC (c) 2004-2016 | + | Copyright CiviCRM LLC (c) 2004-2017 | +--------------------------------------------------------------------+ | This file is a part of CiviCRM. | | | @@ -28,7 +28,7 @@ /** * * @package CRM - * @copyright CiviCRM LLC (c) 2004-2016 + * @copyright CiviCRM LLC (c) 2004-2017 * $Id$ * */ @@ -161,6 +161,24 @@ class CRM_Report_Form_Contribute_HouseholdSummary extends CRM_Report_Form { ), 'grouping' => 'contri-fields', ), + 'civicrm_financial_trxn' => array( + 'dao' => 'CRM_Financial_DAO_FinancialTrxn', + 'fields' => array( + 'card_type_id' => array( + 'title' => ts('Credit Card Type'), + 'dbAlias' => 'GROUP_CONCAT(financial_trxn_civireport.card_type_id SEPARATOR ",")', + ), + ), + 'filters' => array( + 'card_type_id' => array( + 'title' => ts('Credit Card Type'), + 'operatorType' => CRM_Report_Form::OP_MULTISELECT, + 'options' => CRM_Financial_DAO_FinancialTrxn::buildOptions('card_type_id'), + 'default' => NULL, + 'type' => CRM_Utils_Type::T_STRING, + ), + ), + ), 'civicrm_address' => array( 'dao' => 'CRM_Core_DAO_Address', 'fields' => array( @@ -267,6 +285,9 @@ class CRM_Report_Form_Contribute_HouseholdSummary extends CRM_Report_Form { {$this->_aliases['civicrm_contact']}.id = {$this->_aliases['civicrm_email']}.contact_id AND {$this->_aliases['civicrm_email']}.is_primary = 1\n "; } + + // for credit card type + $this->addFinancialTrxnFromClause(); } public function where() { @@ -540,6 +561,11 @@ class CRM_Report_Form_Contribute_HouseholdSummary extends CRM_Report_Form { $row['civicrm_contribution_total_amount'] = CRM_Utils_Money::format($row['civicrm_contribution_total_amount'], $row['civicrm_contribution_currency']); } + if (!empty($row['civicrm_financial_trxn_card_type_id'])) { + $rows[$rowNum]['civicrm_financial_trxn_card_type_id'] = $this->getLabels($row['civicrm_financial_trxn_card_type_id'], 'CRM_Financial_DAO_FinancialTrxn', 'card_type_id'); + $entryFound = TRUE; + } + // Contribution amount links to view contribution if (($value = CRM_Utils_Array::value('civicrm_contribution_total_amount', $row)) && CRM_Core_Permission::check('access CiviContribute')