From 5e0343e840d7d82e71cda6f71b41460707a98521 Mon Sep 17 00:00:00 2001 From: "deb.monish" Date: Tue, 18 Apr 2017 12:09:46 +0530 Subject: [PATCH] Rename card_type to card_type_id of civicrm_financial_trxn table (IIDA-126) --- CRM/Core/DAO/AllCoreTables.data.php | 2 +- CRM/Financial/DAO/FinancialTrxn.php | 10 +++++----- CRM/Report/Form/Contribute/Bookkeeping.php | 16 ++++++++-------- CRM/Report/Form/Contribute/Detail.php | 16 ++++++++-------- CRM/Report/Form/Contribute/History.php | 16 ++++++++-------- CRM/Report/Form/Contribute/HouseholdSummary.php | 16 ++++++++-------- CRM/Report/Form/Contribute/Lybunt.php | 16 ++++++++-------- .../Form/Contribute/OrganizationSummary.php | 16 ++++++++-------- CRM/Report/Form/Contribute/PCP.php | 16 ++++++++-------- CRM/Report/Form/Contribute/Recur.php | 16 ++++++++-------- CRM/Report/Form/Contribute/SoftCredit.php | 16 ++++++++-------- CRM/Report/Form/Contribute/Summary.php | 14 +++++++------- CRM/Report/Form/Contribute/Sybunt.php | 16 ++++++++-------- CRM/Report/Form/Contribute/TopDonor.php | 16 ++++++++-------- CRM/Upgrade/Incremental/sql/4.7.19.mysql.tpl | 5 ++++- sql/civicrm_generated.mysql | 2 +- xml/schema/Financial/FinancialTrxn.xml | 6 +++--- 17 files changed, 109 insertions(+), 106 deletions(-) diff --git a/CRM/Core/DAO/AllCoreTables.data.php b/CRM/Core/DAO/AllCoreTables.data.php index 3b769206c0..42aff8cb26 100644 --- a/CRM/Core/DAO/AllCoreTables.data.php +++ b/CRM/Core/DAO/AllCoreTables.data.php @@ -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', diff --git a/CRM/Financial/DAO/FinancialTrxn.php b/CRM/Financial/DAO/FinancialTrxn.php index a9d9ab0791..b0a6c67f4d 100644 --- a/CRM/Financial/DAO/FinancialTrxn.php +++ b/CRM/Financial/DAO/FinancialTrxn.php @@ -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'; @@ -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 * @@ -401,10 +401,10 @@ class CRM_Financial_DAO_FinancialTrxn extends CRM_Core_DAO { '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', diff --git a/CRM/Report/Form/Contribute/Bookkeeping.php b/CRM/Report/Form/Contribute/Bookkeeping.php index a1ae400587..351dcb7298 100644 --- a/CRM/Report/Form/Contribute/Bookkeeping.php +++ b/CRM/Report/Form/Contribute/Bookkeeping.php @@ -347,8 +347,8 @@ class CRM_Report_Form_Contribute_Bookkeeping extends CRM_Report_Form { '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( @@ -376,10 +376,10 @@ class CRM_Report_Form_Contribute_Bookkeeping extends CRM_Report_Form { '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, ), @@ -648,7 +648,7 @@ class CRM_Report_Form_Contribute_Bookkeeping extends CRM_Report_Form { $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) && @@ -690,8 +690,8 @@ class CRM_Report_Form_Contribute_Bookkeeping extends CRM_Report_Form { $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; } diff --git a/CRM/Report/Form/Contribute/Detail.php b/CRM/Report/Form/Contribute/Detail.php index 3c3d536fab..600e0daf37 100644 --- a/CRM/Report/Form/Contribute/Detail.php +++ b/CRM/Report/Form/Contribute/Detail.php @@ -292,16 +292,16 @@ class CRM_Report_Form_Contribute_Detail extends CRM_Report_Form { '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, ), @@ -765,8 +765,8 @@ UNION ALL $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; } diff --git a/CRM/Report/Form/Contribute/History.php b/CRM/Report/Form/Contribute/History.php index d70e4847a0..85563c3777 100644 --- a/CRM/Report/Form/Contribute/History.php +++ b/CRM/Report/Form/Contribute/History.php @@ -273,16 +273,16 @@ class CRM_Report_Form_Contribute_History extends CRM_Report_Form { '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, ), @@ -876,8 +876,8 @@ class CRM_Report_Form_Contribute_History extends CRM_Report_Form { $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; } diff --git a/CRM/Report/Form/Contribute/HouseholdSummary.php b/CRM/Report/Form/Contribute/HouseholdSummary.php index ffaa4fd237..ac8da1e4af 100644 --- a/CRM/Report/Form/Contribute/HouseholdSummary.php +++ b/CRM/Report/Form/Contribute/HouseholdSummary.php @@ -164,16 +164,16 @@ class CRM_Report_Form_Contribute_HouseholdSummary extends CRM_Report_Form { '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, ), @@ -561,8 +561,8 @@ 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'])) { - $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; } diff --git a/CRM/Report/Form/Contribute/Lybunt.php b/CRM/Report/Form/Contribute/Lybunt.php index 93bcf8ec56..8ac77ee3db 100644 --- a/CRM/Report/Form/Contribute/Lybunt.php +++ b/CRM/Report/Form/Contribute/Lybunt.php @@ -252,16 +252,16 @@ class CRM_Report_Form_Contribute_Lybunt extends CRM_Report_Form { '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, ), @@ -756,8 +756,8 @@ class CRM_Report_Form_Contribute_Lybunt extends CRM_Report_Form { $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; } diff --git a/CRM/Report/Form/Contribute/OrganizationSummary.php b/CRM/Report/Form/Contribute/OrganizationSummary.php index 64b97337fe..bec6fff7cf 100644 --- a/CRM/Report/Form/Contribute/OrganizationSummary.php +++ b/CRM/Report/Form/Contribute/OrganizationSummary.php @@ -196,16 +196,16 @@ class CRM_Report_Form_Contribute_OrganizationSummary extends CRM_Report_Form { '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, ), @@ -553,8 +553,8 @@ class CRM_Report_Form_Contribute_OrganizationSummary extends CRM_Report_Form { $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; } diff --git a/CRM/Report/Form/Contribute/PCP.php b/CRM/Report/Form/Contribute/PCP.php index 6a137a1b15..22d57dbf56 100644 --- a/CRM/Report/Form/Contribute/PCP.php +++ b/CRM/Report/Form/Contribute/PCP.php @@ -169,16 +169,16 @@ class CRM_Report_Form_Contribute_PCP extends CRM_Report_Form { '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, ), @@ -376,8 +376,8 @@ LEFT JOIN civicrm_contribution_page {$this->_aliases['civicrm_contribution_page' $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; } diff --git a/CRM/Report/Form/Contribute/Recur.php b/CRM/Report/Form/Contribute/Recur.php index 6ec3dd3cac..d3510c2002 100644 --- a/CRM/Report/Form/Contribute/Recur.php +++ b/CRM/Report/Form/Contribute/Recur.php @@ -109,16 +109,16 @@ class CRM_Report_Form_Contribute_Recur extends CRM_Report_Form { '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, ), @@ -392,8 +392,8 @@ class CRM_Report_Form_Contribute_Recur extends CRM_Report_Form { $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'); } } } diff --git a/CRM/Report/Form/Contribute/SoftCredit.php b/CRM/Report/Form/Contribute/SoftCredit.php index 1ebfb6e830..45806b5524 100644 --- a/CRM/Report/Form/Contribute/SoftCredit.php +++ b/CRM/Report/Form/Contribute/SoftCredit.php @@ -305,16 +305,16 @@ class CRM_Report_Form_Contribute_SoftCredit extends CRM_Report_Form { '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, ), @@ -661,8 +661,8 @@ GROUP BY {$this->_aliases['civicrm_contribution']}.currency $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; } diff --git a/CRM/Report/Form/Contribute/Summary.php b/CRM/Report/Form/Contribute/Summary.php index 8838977993..16984a8f3c 100644 --- a/CRM/Report/Form/Contribute/Summary.php +++ b/CRM/Report/Form/Contribute/Summary.php @@ -229,16 +229,16 @@ class CRM_Report_Form_Contribute_Summary extends CRM_Report_Form { '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, ), @@ -968,8 +968,8 @@ ROUND(AVG({$this->_aliases['civicrm_contribution_soft']}.amount), 2) as civicrm_ $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; } diff --git a/CRM/Report/Form/Contribute/Sybunt.php b/CRM/Report/Form/Contribute/Sybunt.php index 0892bb172d..2b428bdbe3 100644 --- a/CRM/Report/Form/Contribute/Sybunt.php +++ b/CRM/Report/Form/Contribute/Sybunt.php @@ -250,17 +250,17 @@ class CRM_Report_Form_Contribute_Sybunt extends CRM_Report_Form { '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, 'default' => NULL, - 'options' => CRM_Financial_DAO_FinancialTrxn::buildOptions('card_type'), + 'options' => CRM_Financial_DAO_FinancialTrxn::buildOptions('card_type_id'), 'type' => CRM_Utils_Type::T_STRING, ), ), @@ -635,8 +635,8 @@ class CRM_Report_Form_Contribute_Sybunt extends CRM_Report_Form { $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; } diff --git a/CRM/Report/Form/Contribute/TopDonor.php b/CRM/Report/Form/Contribute/TopDonor.php index 856807efb4..766a892755 100644 --- a/CRM/Report/Form/Contribute/TopDonor.php +++ b/CRM/Report/Form/Contribute/TopDonor.php @@ -165,16 +165,16 @@ class CRM_Report_Form_Contribute_TopDonor extends CRM_Report_Form { '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, ), @@ -516,8 +516,8 @@ ORDER BY civicrm_contribution_total_amount_sum DESC $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; } diff --git a/CRM/Upgrade/Incremental/sql/4.7.19.mysql.tpl b/CRM/Upgrade/Incremental/sql/4.7.19.mysql.tpl index 2716b062d3..2bcc98cf09 100644 --- a/CRM/Upgrade/Incremental/sql/4.7.19.mysql.tpl +++ b/CRM/Upgrade/Incremental/sql/4.7.19.mysql.tpl @@ -5,7 +5,7 @@ SELECT @close_acc_period_act_val := `value` FROM civicrm_option_value WHERE opti SELECT @close_accounting_period_activity_count := count(id) FROM `civicrm_activity` WHERE `activity_type_id` = @close_acc_period_act_val; -- Delete Close Accounting Period activity type -DELETE FROM civicrm_option_value +DELETE FROM civicrm_option_value WHERE option_group_id = @option_group_id_act AND name = 'Close Accounting Period' AND @close_accounting_period_activity_count = 0; -- CRM-19517 Disable all price fields and price field options that use disabled fianancial types @@ -38,3 +38,6 @@ INSERT INTO `civicrm_option_value` (`option_group_id`, {localize field='label'}label{/localize}, `value`, `name`, `grouping`, `filter`, `is_default`, `weight`, {localize field='description'}description{/localize}, `is_optgroup`, `is_reserved`, `is_active`, `component_id`, `visibility_id`, `icon`) VALUES (@option_group_id_adOpt, {localize}'{ts escape="sql"}Supplemental Address 3{/ts}'{/localize}, (SELECT @max_val := @max_val + 1), 'supplemental_address_3', NULL, 0, NULL, (SELECT @supp2_wt := @supp2_wt + 1), {localize}''{/localize}, 0, 0, 1, NULL, NULL, NULL); + +-- CRM-20439 rename card_type to card_type_id of civicrm_financial_trxn table (IIDA-126) +ALTER TABLE `civicrm_financial_trxn` CHANGE `card_type` `card_type_id` INT(10) UNSIGNED NULL DEFAULT NULL COMMENT 'FK to accept_creditcard option group values'; diff --git a/sql/civicrm_generated.mysql b/sql/civicrm_generated.mysql index a887350847..fbc51d5a23 100644 --- a/sql/civicrm_generated.mysql +++ b/sql/civicrm_generated.mysql @@ -533,7 +533,7 @@ UNLOCK TABLES; LOCK TABLES `civicrm_financial_trxn` WRITE; /*!40000 ALTER TABLE `civicrm_financial_trxn` DISABLE KEYS */; -INSERT INTO `civicrm_financial_trxn` (`id`, `from_financial_account_id`, `to_financial_account_id`, `trxn_date`, `total_amount`, `fee_amount`, `net_amount`, `currency`, `is_payment`, `trxn_id`, `trxn_result_code`, `status_id`, `payment_processor_id`, `payment_instrument_id`, `card_type`, `check_number`, `pan_truncation`) VALUES (1,NULL,6,'2010-04-11 00:00:00',125.00,NULL,NULL,'USD',1,NULL,NULL,1,NULL,4,NULL,'1041',NULL),(2,NULL,12,'2010-03-21 00:00:00',50.00,NULL,NULL,'USD',1,'P20901X1',NULL,1,NULL,1,NULL,NULL,NULL),(3,NULL,6,'2010-04-29 00:00:00',25.00,NULL,NULL,'USD',1,NULL,NULL,1,NULL,4,NULL,'2095',NULL),(4,NULL,6,'2010-04-11 00:00:00',50.00,NULL,NULL,'USD',1,NULL,NULL,1,NULL,4,NULL,'10552',NULL),(5,NULL,6,'2010-04-15 00:00:00',500.00,NULL,NULL,'USD',1,NULL,NULL,1,NULL,4,NULL,'509',NULL),(6,NULL,6,'2010-04-11 00:00:00',175.00,NULL,NULL,'USD',1,NULL,NULL,1,NULL,4,NULL,'102',NULL),(7,NULL,12,'2010-03-27 00:00:00',50.00,NULL,NULL,'USD',1,'P20193L2',NULL,1,NULL,1,NULL,NULL,NULL),(8,NULL,12,'2010-03-08 00:00:00',10.00,NULL,NULL,'USD',1,'P40232Y3',NULL,1,NULL,1,NULL,NULL,NULL),(9,NULL,12,'2010-04-22 00:00:00',250.00,NULL,NULL,'USD',1,'P20193L6',NULL,1,NULL,1,NULL,NULL,NULL),(10,NULL,12,'2009-07-01 11:53:50',500.00,NULL,NULL,'USD',1,'PL71',NULL,1,NULL,1,NULL,NULL,NULL),(11,NULL,12,'2009-07-01 12:55:41',200.00,NULL,NULL,'USD',1,'PL43II',NULL,1,NULL,1,NULL,NULL,NULL),(12,NULL,12,'2009-10-01 11:53:50',200.00,NULL,NULL,'USD',1,'PL32I',NULL,1,NULL,1,NULL,NULL,NULL),(13,NULL,12,'2009-12-01 12:55:41',200.00,NULL,NULL,'USD',1,'PL32II',NULL,1,NULL,1,NULL,NULL,NULL),(14,NULL,12,'2017-04-16 14:13:14',100.00,NULL,NULL,'USD',1,NULL,NULL,1,NULL,1,NULL,NULL,NULL),(15,NULL,12,'2017-04-16 14:13:14',100.00,NULL,NULL,'USD',1,NULL,NULL,1,NULL,1,NULL,NULL,NULL),(16,NULL,12,'2017-04-16 14:13:14',100.00,NULL,NULL,'USD',1,NULL,NULL,1,NULL,1,NULL,NULL,NULL),(17,NULL,12,'2017-04-16 14:13:14',100.00,NULL,NULL,'USD',1,NULL,NULL,1,NULL,1,NULL,NULL,NULL),(18,NULL,12,'2017-04-16 14:13:14',100.00,NULL,NULL,'USD',1,NULL,NULL,1,NULL,1,NULL,NULL,NULL),(19,NULL,12,'2017-04-16 14:13:14',100.00,NULL,NULL,'USD',1,NULL,NULL,1,NULL,1,NULL,NULL,NULL),(20,NULL,12,'2017-04-16 14:13:14',100.00,NULL,NULL,'USD',1,NULL,NULL,1,NULL,1,NULL,NULL,NULL),(21,NULL,12,'2017-04-16 14:13:14',100.00,NULL,NULL,'USD',1,NULL,NULL,1,NULL,1,NULL,NULL,NULL),(22,NULL,12,'2017-04-16 14:13:14',100.00,NULL,NULL,'USD',1,NULL,NULL,1,NULL,1,NULL,NULL,NULL),(23,NULL,12,'2017-04-16 14:13:14',100.00,NULL,NULL,'USD',1,NULL,NULL,1,NULL,1,NULL,NULL,NULL),(24,NULL,12,'2017-04-16 14:13:14',100.00,NULL,NULL,'USD',1,NULL,NULL,1,NULL,1,NULL,NULL,NULL),(25,NULL,12,'2017-04-16 14:13:14',100.00,NULL,NULL,'USD',1,NULL,NULL,1,NULL,1,NULL,NULL,NULL),(26,NULL,12,'2017-04-16 14:13:14',100.00,NULL,NULL,'USD',1,NULL,NULL,1,NULL,1,NULL,NULL,NULL),(27,NULL,12,'2017-04-16 14:13:14',50.00,NULL,NULL,'USD',1,NULL,NULL,1,NULL,1,NULL,NULL,NULL),(28,NULL,12,'2017-04-16 14:13:14',50.00,NULL,NULL,'USD',1,NULL,NULL,1,NULL,1,NULL,NULL,NULL),(29,NULL,12,'2017-04-16 14:13:14',50.00,NULL,NULL,'USD',1,NULL,NULL,1,NULL,1,NULL,NULL,NULL),(30,NULL,12,'2017-04-16 14:13:14',50.00,NULL,NULL,'USD',1,NULL,NULL,1,NULL,1,NULL,NULL,NULL),(31,NULL,12,'2017-04-16 14:13:14',50.00,NULL,NULL,'USD',1,NULL,NULL,1,NULL,1,NULL,NULL,NULL),(32,NULL,12,'2017-04-16 14:13:14',50.00,NULL,NULL,'USD',1,NULL,NULL,1,NULL,1,NULL,NULL,NULL),(33,NULL,12,'2017-04-16 14:13:14',50.00,NULL,NULL,'USD',1,NULL,NULL,1,NULL,1,NULL,NULL,NULL),(34,NULL,12,'2017-04-16 14:13:14',50.00,NULL,NULL,'USD',1,NULL,NULL,1,NULL,1,NULL,NULL,NULL),(35,NULL,12,'2017-04-16 14:13:14',50.00,NULL,NULL,'USD',1,NULL,NULL,1,NULL,1,NULL,NULL,NULL),(36,NULL,12,'2017-04-16 14:13:14',50.00,NULL,NULL,'USD',1,NULL,NULL,1,NULL,1,NULL,NULL,NULL),(37,NULL,12,'2017-04-16 14:13:14',50.00,NULL,NULL,'USD',1,NULL,NULL,1,NULL,1,NULL,NULL,NULL),(38,NULL,12,'2017-04-16 14:13:14',50.00,NULL,NULL,'USD',1,NULL,NULL,1,NULL,1,NULL,NULL,NULL),(39,NULL,12,'2017-04-16 14:13:14',50.00,NULL,NULL,'USD',1,NULL,NULL,1,NULL,1,NULL,NULL,NULL),(40,NULL,12,'2017-04-16 14:13:14',50.00,NULL,NULL,'USD',1,NULL,NULL,1,NULL,1,NULL,NULL,NULL),(41,NULL,12,'2017-04-16 14:13:14',50.00,NULL,NULL,'USD',1,NULL,NULL,1,NULL,1,NULL,NULL,NULL),(42,NULL,12,'2017-04-16 14:13:14',1200.00,NULL,NULL,'USD',1,NULL,NULL,1,NULL,1,NULL,NULL,NULL),(43,NULL,12,'2017-04-16 14:13:14',1200.00,NULL,NULL,'USD',1,NULL,NULL,1,NULL,1,NULL,NULL,NULL),(44,NULL,12,'2017-04-16 14:13:14',50.00,NULL,NULL,'USD',1,NULL,NULL,1,NULL,1,NULL,NULL,NULL),(45,NULL,12,'2017-04-16 14:13:14',50.00,NULL,NULL,'USD',1,NULL,NULL,1,NULL,1,NULL,NULL,NULL),(46,NULL,12,'2017-04-16 14:13:14',50.00,NULL,NULL,'USD',1,NULL,NULL,1,NULL,1,NULL,NULL,NULL),(47,NULL,12,'2017-04-16 14:13:14',50.00,NULL,NULL,'USD',1,NULL,NULL,1,NULL,1,NULL,NULL,NULL),(48,NULL,12,'2017-04-16 14:13:14',50.00,NULL,NULL,'USD',1,NULL,NULL,1,NULL,1,NULL,NULL,NULL),(49,NULL,12,'2017-04-16 14:13:14',50.00,NULL,NULL,'USD',1,NULL,NULL,1,NULL,1,NULL,NULL,NULL),(50,NULL,12,'2017-04-16 14:13:14',50.00,NULL,NULL,'USD',1,NULL,NULL,1,NULL,1,NULL,NULL,NULL),(51,NULL,12,'2017-04-16 14:13:14',50.00,NULL,NULL,'USD',1,NULL,NULL,1,NULL,1,NULL,NULL,NULL),(52,NULL,12,'2017-04-16 14:13:14',50.00,NULL,NULL,'USD',1,NULL,NULL,1,NULL,1,NULL,NULL,NULL),(53,NULL,12,'2017-04-16 14:13:14',50.00,NULL,NULL,'USD',1,NULL,NULL,1,NULL,1,NULL,NULL,NULL),(54,NULL,12,'2017-04-16 14:13:14',50.00,NULL,NULL,'USD',1,NULL,NULL,1,NULL,1,NULL,NULL,NULL),(55,NULL,12,'2017-04-16 14:13:14',50.00,NULL,NULL,'USD',1,NULL,NULL,1,NULL,1,NULL,NULL,NULL),(56,NULL,12,'2017-04-16 14:13:14',50.00,NULL,NULL,'USD',1,NULL,NULL,1,NULL,1,NULL,NULL,NULL),(57,NULL,12,'2017-04-16 14:13:14',50.00,NULL,NULL,'USD',1,NULL,NULL,1,NULL,1,NULL,NULL,NULL),(58,NULL,12,'2017-04-16 14:13:14',50.00,NULL,NULL,'USD',1,NULL,NULL,1,NULL,1,NULL,NULL,NULL),(59,NULL,12,'2017-04-16 14:13:14',50.00,NULL,NULL,'USD',1,NULL,NULL,1,NULL,1,NULL,NULL,NULL),(60,NULL,12,'2017-04-16 14:13:14',800.00,NULL,NULL,'USD',1,NULL,NULL,1,NULL,1,NULL,NULL,NULL),(61,NULL,12,'2017-04-16 14:13:14',800.00,NULL,NULL,'USD',1,NULL,NULL,1,NULL,1,NULL,NULL,NULL),(62,NULL,12,'2017-04-16 14:13:14',800.00,NULL,NULL,'USD',1,NULL,NULL,1,NULL,1,NULL,NULL,NULL),(63,NULL,12,'2017-04-16 14:13:14',800.00,NULL,NULL,'USD',1,NULL,NULL,1,NULL,1,NULL,NULL,NULL),(64,NULL,12,'2017-04-16 14:13:14',800.00,NULL,NULL,'USD',1,NULL,NULL,1,NULL,1,NULL,NULL,NULL),(65,NULL,12,'2017-04-16 14:13:14',800.00,NULL,NULL,'USD',1,NULL,NULL,1,NULL,1,NULL,NULL,NULL),(66,NULL,12,'2017-04-16 14:13:14',800.00,NULL,NULL,'USD',1,NULL,NULL,1,NULL,1,NULL,NULL,NULL),(67,NULL,12,'2017-04-16 14:13:14',800.00,NULL,NULL,'USD',1,NULL,NULL,1,NULL,1,NULL,NULL,NULL),(68,NULL,12,'2017-04-16 14:13:14',800.00,NULL,NULL,'USD',1,NULL,NULL,1,NULL,1,NULL,NULL,NULL),(69,NULL,12,'2017-04-16 14:13:14',800.00,NULL,NULL,'USD',1,NULL,NULL,1,NULL,1,NULL,NULL,NULL),(70,NULL,12,'2017-04-16 14:13:14',800.00,NULL,NULL,'USD',1,NULL,NULL,1,NULL,1,NULL,NULL,NULL),(71,NULL,12,'2017-04-16 14:13:14',800.00,NULL,NULL,'USD',1,NULL,NULL,1,NULL,1,NULL,NULL,NULL),(72,NULL,12,'2017-04-16 14:13:14',800.00,NULL,NULL,'USD',1,NULL,NULL,1,NULL,1,NULL,NULL,NULL),(73,NULL,12,'2017-04-16 14:13:14',800.00,NULL,NULL,'USD',1,NULL,NULL,1,NULL,1,NULL,NULL,NULL),(74,NULL,12,'2017-04-16 14:13:14',800.00,NULL,NULL,'USD',1,NULL,NULL,1,NULL,1,NULL,NULL,NULL),(75,NULL,12,'2017-04-16 14:13:14',800.00,NULL,NULL,'USD',1,NULL,NULL,1,NULL,1,NULL,NULL,NULL),(76,NULL,12,'2017-04-16 14:13:14',800.00,NULL,NULL,'USD',1,NULL,NULL,1,NULL,1,NULL,NULL,NULL),(77,NULL,12,'2017-04-16 14:13:14',800.00,NULL,NULL,'USD',1,NULL,NULL,1,NULL,1,NULL,NULL,NULL),(78,NULL,12,'2017-04-16 14:13:14',50.00,NULL,NULL,'USD',1,NULL,NULL,1,NULL,1,NULL,NULL,NULL),(79,NULL,12,'2017-04-16 14:13:14',50.00,NULL,NULL,'USD',1,NULL,NULL,1,NULL,1,NULL,NULL,NULL),(80,NULL,12,'2017-04-16 14:13:14',50.00,NULL,NULL,'USD',1,NULL,NULL,1,NULL,1,NULL,NULL,NULL),(81,NULL,12,'2017-04-16 14:13:14',50.00,NULL,NULL,'USD',1,NULL,NULL,1,NULL,1,NULL,NULL,NULL),(82,NULL,12,'2017-04-16 14:13:14',50.00,NULL,NULL,'USD',1,NULL,NULL,1,NULL,1,NULL,NULL,NULL),(83,NULL,12,'2017-04-16 14:13:14',50.00,NULL,NULL,'USD',1,NULL,NULL,1,NULL,1,NULL,NULL,NULL),(84,NULL,12,'2017-04-16 14:13:14',50.00,NULL,NULL,'USD',1,NULL,NULL,1,NULL,1,NULL,NULL,NULL),(85,NULL,12,'2017-04-16 14:13:14',50.00,NULL,NULL,'USD',1,NULL,NULL,1,NULL,1,NULL,NULL,NULL),(86,NULL,12,'2017-04-16 14:13:14',50.00,NULL,NULL,'USD',1,NULL,NULL,1,NULL,1,NULL,NULL,NULL),(87,NULL,12,'2017-04-16 14:13:14',50.00,NULL,NULL,'USD',1,NULL,NULL,1,NULL,1,NULL,NULL,NULL),(88,NULL,12,'2017-04-16 14:13:14',50.00,NULL,NULL,'USD',1,NULL,NULL,1,NULL,1,NULL,NULL,NULL),(89,NULL,12,'2017-04-16 14:13:14',50.00,NULL,NULL,'USD',1,NULL,NULL,1,NULL,1,NULL,NULL,NULL),(90,NULL,12,'2017-04-16 14:13:14',50.00,NULL,NULL,'USD',1,NULL,NULL,1,NULL,1,NULL,NULL,NULL),(91,NULL,12,'2017-04-16 14:13:14',50.00,NULL,NULL,'USD',1,NULL,NULL,1,NULL,1,NULL,NULL,NULL),(92,NULL,12,'2017-04-16 14:13:14',50.00,NULL,NULL,'USD',1,NULL,NULL,1,NULL,1,NULL,NULL,NULL),(93,NULL,12,'2017-04-16 14:13:14',50.00,NULL,NULL,'USD',1,NULL,NULL,1,NULL,1,NULL,NULL,NULL); +INSERT INTO `civicrm_financial_trxn` (`id`, `from_financial_account_id`, `to_financial_account_id`, `trxn_date`, `total_amount`, `fee_amount`, `net_amount`, `currency`, `is_payment`, `trxn_id`, `trxn_result_code`, `status_id`, `payment_processor_id`, `payment_instrument_id`, `card_type_id`, `check_number`, `pan_truncation`) VALUES (1,NULL,6,'2010-04-11 00:00:00',125.00,NULL,NULL,'USD',1,NULL,NULL,1,NULL,4,NULL,'1041',NULL),(2,NULL,12,'2010-03-21 00:00:00',50.00,NULL,NULL,'USD',1,'P20901X1',NULL,1,NULL,1,NULL,NULL,NULL),(3,NULL,6,'2010-04-29 00:00:00',25.00,NULL,NULL,'USD',1,NULL,NULL,1,NULL,4,NULL,'2095',NULL),(4,NULL,6,'2010-04-11 00:00:00',50.00,NULL,NULL,'USD',1,NULL,NULL,1,NULL,4,NULL,'10552',NULL),(5,NULL,6,'2010-04-15 00:00:00',500.00,NULL,NULL,'USD',1,NULL,NULL,1,NULL,4,NULL,'509',NULL),(6,NULL,6,'2010-04-11 00:00:00',175.00,NULL,NULL,'USD',1,NULL,NULL,1,NULL,4,NULL,'102',NULL),(7,NULL,12,'2010-03-27 00:00:00',50.00,NULL,NULL,'USD',1,'P20193L2',NULL,1,NULL,1,NULL,NULL,NULL),(8,NULL,12,'2010-03-08 00:00:00',10.00,NULL,NULL,'USD',1,'P40232Y3',NULL,1,NULL,1,NULL,NULL,NULL),(9,NULL,12,'2010-04-22 00:00:00',250.00,NULL,NULL,'USD',1,'P20193L6',NULL,1,NULL,1,NULL,NULL,NULL),(10,NULL,12,'2009-07-01 11:53:50',500.00,NULL,NULL,'USD',1,'PL71',NULL,1,NULL,1,NULL,NULL,NULL),(11,NULL,12,'2009-07-01 12:55:41',200.00,NULL,NULL,'USD',1,'PL43II',NULL,1,NULL,1,NULL,NULL,NULL),(12,NULL,12,'2009-10-01 11:53:50',200.00,NULL,NULL,'USD',1,'PL32I',NULL,1,NULL,1,NULL,NULL,NULL),(13,NULL,12,'2009-12-01 12:55:41',200.00,NULL,NULL,'USD',1,'PL32II',NULL,1,NULL,1,NULL,NULL,NULL),(14,NULL,12,'2017-04-16 14:13:14',100.00,NULL,NULL,'USD',1,NULL,NULL,1,NULL,1,NULL,NULL,NULL),(15,NULL,12,'2017-04-16 14:13:14',100.00,NULL,NULL,'USD',1,NULL,NULL,1,NULL,1,NULL,NULL,NULL),(16,NULL,12,'2017-04-16 14:13:14',100.00,NULL,NULL,'USD',1,NULL,NULL,1,NULL,1,NULL,NULL,NULL),(17,NULL,12,'2017-04-16 14:13:14',100.00,NULL,NULL,'USD',1,NULL,NULL,1,NULL,1,NULL,NULL,NULL),(18,NULL,12,'2017-04-16 14:13:14',100.00,NULL,NULL,'USD',1,NULL,NULL,1,NULL,1,NULL,NULL,NULL),(19,NULL,12,'2017-04-16 14:13:14',100.00,NULL,NULL,'USD',1,NULL,NULL,1,NULL,1,NULL,NULL,NULL),(20,NULL,12,'2017-04-16 14:13:14',100.00,NULL,NULL,'USD',1,NULL,NULL,1,NULL,1,NULL,NULL,NULL),(21,NULL,12,'2017-04-16 14:13:14',100.00,NULL,NULL,'USD',1,NULL,NULL,1,NULL,1,NULL,NULL,NULL),(22,NULL,12,'2017-04-16 14:13:14',100.00,NULL,NULL,'USD',1,NULL,NULL,1,NULL,1,NULL,NULL,NULL),(23,NULL,12,'2017-04-16 14:13:14',100.00,NULL,NULL,'USD',1,NULL,NULL,1,NULL,1,NULL,NULL,NULL),(24,NULL,12,'2017-04-16 14:13:14',100.00,NULL,NULL,'USD',1,NULL,NULL,1,NULL,1,NULL,NULL,NULL),(25,NULL,12,'2017-04-16 14:13:14',100.00,NULL,NULL,'USD',1,NULL,NULL,1,NULL,1,NULL,NULL,NULL),(26,NULL,12,'2017-04-16 14:13:14',100.00,NULL,NULL,'USD',1,NULL,NULL,1,NULL,1,NULL,NULL,NULL),(27,NULL,12,'2017-04-16 14:13:14',50.00,NULL,NULL,'USD',1,NULL,NULL,1,NULL,1,NULL,NULL,NULL),(28,NULL,12,'2017-04-16 14:13:14',50.00,NULL,NULL,'USD',1,NULL,NULL,1,NULL,1,NULL,NULL,NULL),(29,NULL,12,'2017-04-16 14:13:14',50.00,NULL,NULL,'USD',1,NULL,NULL,1,NULL,1,NULL,NULL,NULL),(30,NULL,12,'2017-04-16 14:13:14',50.00,NULL,NULL,'USD',1,NULL,NULL,1,NULL,1,NULL,NULL,NULL),(31,NULL,12,'2017-04-16 14:13:14',50.00,NULL,NULL,'USD',1,NULL,NULL,1,NULL,1,NULL,NULL,NULL),(32,NULL,12,'2017-04-16 14:13:14',50.00,NULL,NULL,'USD',1,NULL,NULL,1,NULL,1,NULL,NULL,NULL),(33,NULL,12,'2017-04-16 14:13:14',50.00,NULL,NULL,'USD',1,NULL,NULL,1,NULL,1,NULL,NULL,NULL),(34,NULL,12,'2017-04-16 14:13:14',50.00,NULL,NULL,'USD',1,NULL,NULL,1,NULL,1,NULL,NULL,NULL),(35,NULL,12,'2017-04-16 14:13:14',50.00,NULL,NULL,'USD',1,NULL,NULL,1,NULL,1,NULL,NULL,NULL),(36,NULL,12,'2017-04-16 14:13:14',50.00,NULL,NULL,'USD',1,NULL,NULL,1,NULL,1,NULL,NULL,NULL),(37,NULL,12,'2017-04-16 14:13:14',50.00,NULL,NULL,'USD',1,NULL,NULL,1,NULL,1,NULL,NULL,NULL),(38,NULL,12,'2017-04-16 14:13:14',50.00,NULL,NULL,'USD',1,NULL,NULL,1,NULL,1,NULL,NULL,NULL),(39,NULL,12,'2017-04-16 14:13:14',50.00,NULL,NULL,'USD',1,NULL,NULL,1,NULL,1,NULL,NULL,NULL),(40,NULL,12,'2017-04-16 14:13:14',50.00,NULL,NULL,'USD',1,NULL,NULL,1,NULL,1,NULL,NULL,NULL),(41,NULL,12,'2017-04-16 14:13:14',50.00,NULL,NULL,'USD',1,NULL,NULL,1,NULL,1,NULL,NULL,NULL),(42,NULL,12,'2017-04-16 14:13:14',1200.00,NULL,NULL,'USD',1,NULL,NULL,1,NULL,1,NULL,NULL,NULL),(43,NULL,12,'2017-04-16 14:13:14',1200.00,NULL,NULL,'USD',1,NULL,NULL,1,NULL,1,NULL,NULL,NULL),(44,NULL,12,'2017-04-16 14:13:14',50.00,NULL,NULL,'USD',1,NULL,NULL,1,NULL,1,NULL,NULL,NULL),(45,NULL,12,'2017-04-16 14:13:14',50.00,NULL,NULL,'USD',1,NULL,NULL,1,NULL,1,NULL,NULL,NULL),(46,NULL,12,'2017-04-16 14:13:14',50.00,NULL,NULL,'USD',1,NULL,NULL,1,NULL,1,NULL,NULL,NULL),(47,NULL,12,'2017-04-16 14:13:14',50.00,NULL,NULL,'USD',1,NULL,NULL,1,NULL,1,NULL,NULL,NULL),(48,NULL,12,'2017-04-16 14:13:14',50.00,NULL,NULL,'USD',1,NULL,NULL,1,NULL,1,NULL,NULL,NULL),(49,NULL,12,'2017-04-16 14:13:14',50.00,NULL,NULL,'USD',1,NULL,NULL,1,NULL,1,NULL,NULL,NULL),(50,NULL,12,'2017-04-16 14:13:14',50.00,NULL,NULL,'USD',1,NULL,NULL,1,NULL,1,NULL,NULL,NULL),(51,NULL,12,'2017-04-16 14:13:14',50.00,NULL,NULL,'USD',1,NULL,NULL,1,NULL,1,NULL,NULL,NULL),(52,NULL,12,'2017-04-16 14:13:14',50.00,NULL,NULL,'USD',1,NULL,NULL,1,NULL,1,NULL,NULL,NULL),(53,NULL,12,'2017-04-16 14:13:14',50.00,NULL,NULL,'USD',1,NULL,NULL,1,NULL,1,NULL,NULL,NULL),(54,NULL,12,'2017-04-16 14:13:14',50.00,NULL,NULL,'USD',1,NULL,NULL,1,NULL,1,NULL,NULL,NULL),(55,NULL,12,'2017-04-16 14:13:14',50.00,NULL,NULL,'USD',1,NULL,NULL,1,NULL,1,NULL,NULL,NULL),(56,NULL,12,'2017-04-16 14:13:14',50.00,NULL,NULL,'USD',1,NULL,NULL,1,NULL,1,NULL,NULL,NULL),(57,NULL,12,'2017-04-16 14:13:14',50.00,NULL,NULL,'USD',1,NULL,NULL,1,NULL,1,NULL,NULL,NULL),(58,NULL,12,'2017-04-16 14:13:14',50.00,NULL,NULL,'USD',1,NULL,NULL,1,NULL,1,NULL,NULL,NULL),(59,NULL,12,'2017-04-16 14:13:14',50.00,NULL,NULL,'USD',1,NULL,NULL,1,NULL,1,NULL,NULL,NULL),(60,NULL,12,'2017-04-16 14:13:14',800.00,NULL,NULL,'USD',1,NULL,NULL,1,NULL,1,NULL,NULL,NULL),(61,NULL,12,'2017-04-16 14:13:14',800.00,NULL,NULL,'USD',1,NULL,NULL,1,NULL,1,NULL,NULL,NULL),(62,NULL,12,'2017-04-16 14:13:14',800.00,NULL,NULL,'USD',1,NULL,NULL,1,NULL,1,NULL,NULL,NULL),(63,NULL,12,'2017-04-16 14:13:14',800.00,NULL,NULL,'USD',1,NULL,NULL,1,NULL,1,NULL,NULL,NULL),(64,NULL,12,'2017-04-16 14:13:14',800.00,NULL,NULL,'USD',1,NULL,NULL,1,NULL,1,NULL,NULL,NULL),(65,NULL,12,'2017-04-16 14:13:14',800.00,NULL,NULL,'USD',1,NULL,NULL,1,NULL,1,NULL,NULL,NULL),(66,NULL,12,'2017-04-16 14:13:14',800.00,NULL,NULL,'USD',1,NULL,NULL,1,NULL,1,NULL,NULL,NULL),(67,NULL,12,'2017-04-16 14:13:14',800.00,NULL,NULL,'USD',1,NULL,NULL,1,NULL,1,NULL,NULL,NULL),(68,NULL,12,'2017-04-16 14:13:14',800.00,NULL,NULL,'USD',1,NULL,NULL,1,NULL,1,NULL,NULL,NULL),(69,NULL,12,'2017-04-16 14:13:14',800.00,NULL,NULL,'USD',1,NULL,NULL,1,NULL,1,NULL,NULL,NULL),(70,NULL,12,'2017-04-16 14:13:14',800.00,NULL,NULL,'USD',1,NULL,NULL,1,NULL,1,NULL,NULL,NULL),(71,NULL,12,'2017-04-16 14:13:14',800.00,NULL,NULL,'USD',1,NULL,NULL,1,NULL,1,NULL,NULL,NULL),(72,NULL,12,'2017-04-16 14:13:14',800.00,NULL,NULL,'USD',1,NULL,NULL,1,NULL,1,NULL,NULL,NULL),(73,NULL,12,'2017-04-16 14:13:14',800.00,NULL,NULL,'USD',1,NULL,NULL,1,NULL,1,NULL,NULL,NULL),(74,NULL,12,'2017-04-16 14:13:14',800.00,NULL,NULL,'USD',1,NULL,NULL,1,NULL,1,NULL,NULL,NULL),(75,NULL,12,'2017-04-16 14:13:14',800.00,NULL,NULL,'USD',1,NULL,NULL,1,NULL,1,NULL,NULL,NULL),(76,NULL,12,'2017-04-16 14:13:14',800.00,NULL,NULL,'USD',1,NULL,NULL,1,NULL,1,NULL,NULL,NULL),(77,NULL,12,'2017-04-16 14:13:14',800.00,NULL,NULL,'USD',1,NULL,NULL,1,NULL,1,NULL,NULL,NULL),(78,NULL,12,'2017-04-16 14:13:14',50.00,NULL,NULL,'USD',1,NULL,NULL,1,NULL,1,NULL,NULL,NULL),(79,NULL,12,'2017-04-16 14:13:14',50.00,NULL,NULL,'USD',1,NULL,NULL,1,NULL,1,NULL,NULL,NULL),(80,NULL,12,'2017-04-16 14:13:14',50.00,NULL,NULL,'USD',1,NULL,NULL,1,NULL,1,NULL,NULL,NULL),(81,NULL,12,'2017-04-16 14:13:14',50.00,NULL,NULL,'USD',1,NULL,NULL,1,NULL,1,NULL,NULL,NULL),(82,NULL,12,'2017-04-16 14:13:14',50.00,NULL,NULL,'USD',1,NULL,NULL,1,NULL,1,NULL,NULL,NULL),(83,NULL,12,'2017-04-16 14:13:14',50.00,NULL,NULL,'USD',1,NULL,NULL,1,NULL,1,NULL,NULL,NULL),(84,NULL,12,'2017-04-16 14:13:14',50.00,NULL,NULL,'USD',1,NULL,NULL,1,NULL,1,NULL,NULL,NULL),(85,NULL,12,'2017-04-16 14:13:14',50.00,NULL,NULL,'USD',1,NULL,NULL,1,NULL,1,NULL,NULL,NULL),(86,NULL,12,'2017-04-16 14:13:14',50.00,NULL,NULL,'USD',1,NULL,NULL,1,NULL,1,NULL,NULL,NULL),(87,NULL,12,'2017-04-16 14:13:14',50.00,NULL,NULL,'USD',1,NULL,NULL,1,NULL,1,NULL,NULL,NULL),(88,NULL,12,'2017-04-16 14:13:14',50.00,NULL,NULL,'USD',1,NULL,NULL,1,NULL,1,NULL,NULL,NULL),(89,NULL,12,'2017-04-16 14:13:14',50.00,NULL,NULL,'USD',1,NULL,NULL,1,NULL,1,NULL,NULL,NULL),(90,NULL,12,'2017-04-16 14:13:14',50.00,NULL,NULL,'USD',1,NULL,NULL,1,NULL,1,NULL,NULL,NULL),(91,NULL,12,'2017-04-16 14:13:14',50.00,NULL,NULL,'USD',1,NULL,NULL,1,NULL,1,NULL,NULL,NULL),(92,NULL,12,'2017-04-16 14:13:14',50.00,NULL,NULL,'USD',1,NULL,NULL,1,NULL,1,NULL,NULL,NULL),(93,NULL,12,'2017-04-16 14:13:14',50.00,NULL,NULL,'USD',1,NULL,NULL,1,NULL,1,NULL,NULL,NULL); /*!40000 ALTER TABLE `civicrm_financial_trxn` ENABLE KEYS */; UNLOCK TABLES; diff --git a/xml/schema/Financial/FinancialTrxn.xml b/xml/schema/Financial/FinancialTrxn.xml index 84deead46d..cab63a2707 100644 --- a/xml/schema/Financial/FinancialTrxn.xml +++ b/xml/schema/Financial/FinancialTrxn.xml @@ -237,9 +237,9 @@ 4.3 - card_type - financial_trxn_card_type - Card Type + card_type_id + financial_trxn_card_type_id + Card Type ID int unsigned FK to accept_creditcard option group values -- 2.25.1