),
),
);
+ $this->_columns += array(
+ 'civicrm_financial_trxn' => array(
+ 'dao' => 'CRM_Financial_DAO_FinancialTrxn',
+ 'fields' => array(
+ 'card_type' => array(
+ 'title' => ts('Credit Card Type'),
+ 'dbAlias' => 'GROUP_CONCAT(financial_trxn_civireport.card_type SEPARATOR ",")',
+ ),
+ ),
+ 'filters' => array(
+ 'card_type' => array(
+ 'title' => ts('Credit Card Type'),
+ 'operatorType' => CRM_Report_Form::OP_MULTISELECT,
+ 'options' => CRM_Financial_DAO_FinancialTrxn::buildOptions('card_type'),
+ 'default' => NULL,
+ 'type' => CRM_Utils_Type::T_STRING,
+ ),
+ ),
+ ),
+ );
$this->_columns['civicrm_contribution']['fields']['civicrm_upto_' .
$this->_yearStatisticsFrom] = array(
$this->_relationshipFrom = " INNER JOIN civicrm_relationship {$this->_aliases['civicrm_relationship']}
ON (({$this->_aliases['civicrm_relationship']}.contact_id_a = {$relContacAlias}.id OR {$this->_aliases['civicrm_relationship']}.contact_id_b = {$relContacAlias}.id ) AND {$this->_aliases['civicrm_relationship']}.is_active = 1) ";
- if ($this->_addressField) {
- $this->_from .= "
- LEFT JOIN civicrm_address {$this->_aliases['civicrm_address']}
- ON {$this->_aliases['civicrm_contact']}.id =
- {$this->_aliases['civicrm_address']}.contact_id AND
- {$this->_aliases['civicrm_address']}.is_primary = 1\n";
- }
+ $this->addAddressFromClause();
+
+ // for credit card type
+ $this->addFinancialTrxnFromClause();
}
public function where() {
$rows[$rowNum]['civicrm_contact_sort_name_hover'] = ts("View Contribution Details for this Contact.");
}
+ if (!empty($row['civicrm_financial_trxn_card_type'])) {
+ $rows[$rowNum]['civicrm_financial_trxn_card_type'] = $this->getLabels($row['civicrm_financial_trxn_card_type'], 'CRM_Financial_DAO_FinancialTrxn', 'card_type');
+ $entryFound = TRUE;
+ }
+
// display birthday in the configured custom format
if (array_key_exists('civicrm_contact_birth_date', $row)) {
$birthDate = $row['civicrm_contact_birth_date'];