Skip to content

Commit

Permalink
Rename card_type to card_type_id of civicrm_financial_trxn table (IID…
Browse files Browse the repository at this point in the history
…A-126)
  • Loading branch information
monishdeb committed Apr 18, 2017
1 parent 218b1a5 commit 5e0343e
Show file tree
Hide file tree
Showing 17 changed files with 109 additions and 106 deletions.
2 changes: 1 addition & 1 deletion CRM/Core/DAO/AllCoreTables.data.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
| see the CiviCRM license FAQ at http://civicrm.org/licensing |
+--------------------------------------------------------------------+
*/
// (GenCodeChecksum:4cb264e1d72064f4be4909c4e3ecf3ad)
// (GenCodeChecksum:345a72fb0f5f60672c3145e2fd078a37)
return array(
'CRM_Core_DAO_AddressFormat' => array(
'name' => 'AddressFormat',
Expand Down
10 changes: 5 additions & 5 deletions CRM/Financial/DAO/FinancialTrxn.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
*
* Generated from xml/schema/CRM/Financial/FinancialTrxn.xml
* DO NOT EDIT. Generated by CRM_Core_CodeGen
* (GenCodeChecksum:505b36cf7c6c052f88ab1ca0f0fc82a0)
* (GenCodeChecksum:2c30f842e4a913eaac8e180219bc522e)
*/
require_once 'CRM/Core/DAO.php';
require_once 'CRM/Utils/Type.php';
Expand Down Expand Up @@ -138,7 +138,7 @@ class CRM_Financial_DAO_FinancialTrxn extends CRM_Core_DAO {
*
* @var int unsigned
*/
public $card_type;
public $card_type_id;
/**
* Check number
*
Expand Down Expand Up @@ -401,10 +401,10 @@ static function &fields() {
'optionEditPath' => 'civicrm/admin/options/payment_instrument',
)
) ,
'financial_trxn_card_type' => array(
'name' => 'card_type',
'financial_trxn_card_type_id' => array(
'name' => 'card_type_id',
'type' => CRM_Utils_Type::T_INT,
'title' => ts('Card Type') ,
'title' => ts('Card Type ID') ,
'description' => 'FK to accept_creditcard option group values',
'table_name' => 'civicrm_financial_trxn',
'entity' => 'FinancialTrxn',
Expand Down
16 changes: 8 additions & 8 deletions CRM/Report/Form/Contribute/Bookkeeping.php
Original file line number Diff line number Diff line change
Expand Up @@ -347,8 +347,8 @@ public function __construct() {
'title' => ts('Trans #'),
'default' => TRUE,
),
'card_type' => array(
'title' => ts('Credit Card Type'),
'card_type_id' => array(
'title' => ts('Credit Card Type ID'),
),
),
'filters' => array(
Expand Down Expand Up @@ -376,10 +376,10 @@ public function __construct() {
'options' => CRM_Contribute_PseudoConstant::contributionStatus(),
'default' => array(1),
),
'card_type' => array(
'title' => ts('Credit Card Type'),
'card_type_id' => array(
'title' => ts('Credit Card Type ID'),
'operatorType' => CRM_Report_Form::OP_MULTISELECT,
'options' => CRM_Core_PseudoConstant::get('CRM_Financial_DAO_FinancialTrxn', 'card_type'),
'options' => CRM_Core_PseudoConstant::get('CRM_Financial_DAO_FinancialTrxn', 'card_type_id'),
'default' => NULL,
'type' => CRM_Utils_Type::T_STRING,
),
Expand Down Expand Up @@ -648,7 +648,7 @@ public function alterDisplay(&$rows) {
$contributionTypes = CRM_Contribute_PseudoConstant::financialType();
$paymentInstruments = CRM_Contribute_PseudoConstant::paymentInstrument();
$contributionStatus = CRM_Contribute_PseudoConstant::contributionStatus();
$creditCardTypes = CRM_Core_PseudoConstant::get('CRM_Financial_DAO_FinancialTrxn', 'card_type');
$creditCardTypes = CRM_Core_PseudoConstant::get('CRM_Financial_DAO_FinancialTrxn', 'card_type_id');
foreach ($rows as $rowNum => $row) {
// convert display name to links
if (array_key_exists('civicrm_contact_sort_name', $row) &&
Expand Down Expand Up @@ -690,8 +690,8 @@ public function alterDisplay(&$rows) {
$entryFound = TRUE;
}

if (!empty($row['civicrm_financial_trxn_card_type'])) {
$rows[$rowNum]['civicrm_financial_trxn_card_type'] = CRM_Utils_Array::value($row['civicrm_financial_trxn_card_type'], $creditCardTypes);
if (!empty($row['civicrm_financial_trxn_card_type_id'])) {
$rows[$rowNum]['civicrm_financial_trxn_card_type_id'] = CRM_Utils_Array::value($row['civicrm_financial_trxn_card_type_id'], $creditCardTypes);
$entryFound = TRUE;
}

Expand Down
16 changes: 8 additions & 8 deletions CRM/Report/Form/Contribute/Detail.php
Original file line number Diff line number Diff line change
Expand Up @@ -292,16 +292,16 @@ public function __construct() {
'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 ",")',
'card_type_id' => array(
'title' => ts('Credit Card Type ID'),
'dbAlias' => 'GROUP_CONCAT(financial_trxn_civireport.card_type_id SEPARATOR ",")',
),
),
'filters' => array(
'card_type' => array(
'title' => ts('Credit Card Type'),
'card_type_id' => array(
'title' => ts('Credit Card Type ID'),
'operatorType' => CRM_Report_Form::OP_MULTISELECT,
'options' => CRM_Financial_DAO_FinancialTrxn::buildOptions('card_type'),
'options' => CRM_Financial_DAO_FinancialTrxn::buildOptions('card_type_id'),
'default' => NULL,
'type' => CRM_Utils_Type::T_STRING,
),
Expand Down Expand Up @@ -765,8 +765,8 @@ public function alterDisplay(&$rows) {
$rows[$rowNum]['civicrm_batch_batch_id'] = CRM_Utils_Array::value($row['civicrm_batch_batch_id'], $batches);
$entryFound = TRUE;
}
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');
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;
}

Expand Down
16 changes: 8 additions & 8 deletions CRM/Report/Form/Contribute/History.php
Original file line number Diff line number Diff line change
Expand Up @@ -273,16 +273,16 @@ public function __construct() {
'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 ",")',
'card_type_id' => array(
'title' => ts('Credit Card Type ID'),
'dbAlias' => 'GROUP_CONCAT(financial_trxn_civireport.card_type_id SEPARATOR ",")',
),
),
'filters' => array(
'card_type' => array(
'title' => ts('Credit Card Type'),
'card_type_id' => array(
'title' => ts('Credit Card Type ID'),
'operatorType' => CRM_Report_Form::OP_MULTISELECT,
'options' => CRM_Financial_DAO_FinancialTrxn::buildOptions('card_type'),
'options' => CRM_Financial_DAO_FinancialTrxn::buildOptions('card_type_id'),
'default' => NULL,
'type' => CRM_Utils_Type::T_STRING,
),
Expand Down Expand Up @@ -876,8 +876,8 @@ public function alterDisplay(&$rows) {
$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');
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;
}

Expand Down
16 changes: 8 additions & 8 deletions CRM/Report/Form/Contribute/HouseholdSummary.php
Original file line number Diff line number Diff line change
Expand Up @@ -164,16 +164,16 @@ public function __construct() {
'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 ",")',
'card_type_id' => array(
'title' => ts('Credit Card Type ID'),
'dbAlias' => 'GROUP_CONCAT(financial_trxn_civireport.card_type_id SEPARATOR ",")',
),
),
'filters' => array(
'card_type' => array(
'title' => ts('Credit Card Type'),
'card_type_id' => array(
'title' => ts('Credit Card Type ID'),
'operatorType' => CRM_Report_Form::OP_MULTISELECT,
'options' => CRM_Financial_DAO_FinancialTrxn::buildOptions('card_type'),
'options' => CRM_Financial_DAO_FinancialTrxn::buildOptions('card_type_id'),
'default' => NULL,
'type' => CRM_Utils_Type::T_STRING,
),
Expand Down Expand Up @@ -561,8 +561,8 @@ public function alterDisplay(&$rows) {
$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'])) {
$rows[$rowNum]['civicrm_financial_trxn_card_type'] = $this->getLabels($row['civicrm_financial_trxn_card_type'], 'CRM_Financial_DAO_FinancialTrxn', 'card_type');
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;
}

Expand Down
16 changes: 8 additions & 8 deletions CRM/Report/Form/Contribute/Lybunt.php
Original file line number Diff line number Diff line change
Expand Up @@ -252,16 +252,16 @@ public function __construct() {
'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 ",")',
'card_type_id' => array(
'title' => ts('Credit Card Type ID'),
'dbAlias' => 'GROUP_CONCAT(financial_trxn_civireport.card_type_id SEPARATOR ",")',
),
),
'filters' => array(
'card_type' => array(
'title' => ts('Credit Card Type'),
'card_type_id' => array(
'title' => ts('Credit Card Type ID'),
'operatorType' => CRM_Report_Form::OP_MULTISELECT,
'options' => CRM_Financial_DAO_FinancialTrxn::buildOptions('card_type'),
'options' => CRM_Financial_DAO_FinancialTrxn::buildOptions('card_type_id'),
'default' => NULL,
'type' => CRM_Utils_Type::T_STRING,
),
Expand Down Expand Up @@ -756,8 +756,8 @@ public function alterDisplay(&$rows) {
$entryFound = TRUE;
}

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');
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;
}

Expand Down
16 changes: 8 additions & 8 deletions CRM/Report/Form/Contribute/OrganizationSummary.php
Original file line number Diff line number Diff line change
Expand Up @@ -196,16 +196,16 @@ public function __construct() {
'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 ",")',
'card_type_id' => array(
'title' => ts('Credit Card Type ID'),
'dbAlias' => 'GROUP_CONCAT(financial_trxn_civireport.card_type_id SEPARATOR ",")',
),
),
'filters' => array(
'card_type' => array(
'title' => ts('Credit Card Type'),
'card_type_id' => array(
'title' => ts('Credit Card Type ID'),
'operatorType' => CRM_Report_Form::OP_MULTISELECT,
'options' => CRM_Financial_DAO_FinancialTrxn::buildOptions('card_type'),
'options' => CRM_Financial_DAO_FinancialTrxn::buildOptions('card_type_id'),
'default' => NULL,
'type' => CRM_Utils_Type::T_STRING,
),
Expand Down Expand Up @@ -553,8 +553,8 @@ public function alterDisplay(&$rows) {
$entryFound = TRUE;
}

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');
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;
}

Expand Down
16 changes: 8 additions & 8 deletions CRM/Report/Form/Contribute/PCP.php
Original file line number Diff line number Diff line change
Expand Up @@ -169,16 +169,16 @@ public function __construct() {
'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 ",")',
'card_type_id' => array(
'title' => ts('Credit Card Type ID'),
'dbAlias' => 'GROUP_CONCAT(financial_trxn_civireport.card_type_id SEPARATOR ",")',
),
),
'filters' => array(
'card_type' => array(
'title' => ts('Credit Card Type'),
'card_type_id' => array(
'title' => ts('Credit Card Type ID'),
'operatorType' => CRM_Report_Form::OP_MULTISELECT,
'options' => CRM_Financial_DAO_FinancialTrxn::buildOptions('card_type'),
'options' => CRM_Financial_DAO_FinancialTrxn::buildOptions('card_type_id'),
'default' => NULL,
'type' => CRM_Utils_Type::T_STRING,
),
Expand Down Expand Up @@ -376,8 +376,8 @@ public function alterDisplay(&$rows) {
$entryFound = TRUE;
}

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');
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;
}

Expand Down
16 changes: 8 additions & 8 deletions CRM/Report/Form/Contribute/Recur.php
Original file line number Diff line number Diff line change
Expand Up @@ -109,16 +109,16 @@ public function __construct() {
'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 ",")',
'card_type_id' => array(
'title' => ts('Credit Card Type ID'),
'dbAlias' => 'GROUP_CONCAT(financial_trxn_civireport.card_type_id SEPARATOR ",")',
),
),
'filters' => array(
'card_type' => array(
'title' => ts('Credit Card Type'),
'card_type_id' => array(
'title' => ts('Credit Card Type ID'),
'operatorType' => CRM_Report_Form::OP_MULTISELECT,
'options' => CRM_Financial_DAO_FinancialTrxn::buildOptions('card_type'),
'options' => CRM_Financial_DAO_FinancialTrxn::buildOptions('card_type_id'),
'default' => NULL,
'type' => CRM_Utils_Type::T_STRING,
),
Expand Down Expand Up @@ -392,8 +392,8 @@ public function alterDisplay(&$rows) {
$rows[$rowNum]['civicrm_contribution_recur_amount'] = CRM_Utils_Money::format($rows[$rowNum]['civicrm_contribution_recur_amount'], $rows[$rowNum]['civicrm_contribution_recur_currency']);
}

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');
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');
}
}
}
Expand Down
16 changes: 8 additions & 8 deletions CRM/Report/Form/Contribute/SoftCredit.php
Original file line number Diff line number Diff line change
Expand Up @@ -305,16 +305,16 @@ public function __construct() {
'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 ",")',
'card_type_id' => array(
'title' => ts('Credit Card Type ID'),
'dbAlias' => 'GROUP_CONCAT(financial_trxn_civireport.card_type_id SEPARATOR ",")',
),
),
'filters' => array(
'card_type' => array(
'title' => ts('Credit Card Type'),
'card_type_id' => array(
'title' => ts('Credit Card Type ID'),
'operatorType' => CRM_Report_Form::OP_MULTISELECT,
'options' => CRM_Financial_DAO_FinancialTrxn::buildOptions('card_type'),
'options' => CRM_Financial_DAO_FinancialTrxn::buildOptions('card_type_id'),
'default' => NULL,
'type' => CRM_Utils_Type::T_STRING,
),
Expand Down Expand Up @@ -661,8 +661,8 @@ public function alterDisplay(&$rows) {
$entryFound = TRUE;
}

if (!empty($row['civicrm_financial_trxn_card_type']) && !in_array('Subtotal', $rows[$rowNum])) {
$rows[$rowNum]['civicrm_financial_trxn_card_type'] = $this->getLabels($row['civicrm_financial_trxn_card_type'], 'CRM_Financial_DAO_FinancialTrxn', 'card_type');
if (!empty($row['civicrm_financial_trxn_card_type_id']) && !in_array('Subtotal', $rows[$rowNum])) {
$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;
}

Expand Down
14 changes: 7 additions & 7 deletions CRM/Report/Form/Contribute/Summary.php
Original file line number Diff line number Diff line change
Expand Up @@ -229,16 +229,16 @@ public function __construct() {
'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 ",")',
'card_type_id' => array(
'title' => ts('Credit Card Type ID'),
'dbAlias' => 'GROUP_CONCAT(financial_trxn_civireport.card_type_id SEPARATOR ",")',
),
),
'filters' => array(
'card_type' => array(
'card_type_id' => array(
'title' => ts('Credit Card Type'),
'operatorType' => CRM_Report_Form::OP_MULTISELECT,
'options' => CRM_Core_PseudoConstant::get('CRM_Financial_DAO_FinancialTrxn', 'card_type'),
'options' => CRM_Core_PseudoConstant::get('CRM_Financial_DAO_FinancialTrxn', 'card_type_id'),
'default' => NULL,
'type' => CRM_Utils_Type::T_STRING,
),
Expand Down Expand Up @@ -968,8 +968,8 @@ public function alterDisplay(&$rows) {
$entryFound = TRUE;
}

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');
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;
}

Expand Down
Loading

0 comments on commit 5e0343e

Please sign in to comment.