CRM-21677 - more report clean up
authoryashodha <yashodha@cividesk.com>
Mon, 29 Oct 2018 08:51:32 +0000 (14:21 +0530)
committeryashodha <yashodha@cividesk.com>
Mon, 29 Oct 2018 08:51:32 +0000 (14:21 +0530)
CRM/Report/Form/Contribute/Summary.php

index 2fb301915cff78d5e53cfb506477a4e7c0b38bdc..6ebe56ab8072b8cff26b4cc8ed2ac02ffa4288f5 100644 (file)
@@ -525,15 +525,7 @@ class CRM_Report_Form_Contribute_Summary extends CRM_Report_Form {
           AND {$this->_aliases['civicrm_batch']}.entity_table = 'civicrm_financial_trxn')";
     }
 
-    // for credit card type
-    if ($this->isTableSelected('civicrm_financial_trxn')) {
-      $this->_from .= "
-        LEFT JOIN civicrm_entity_financial_trxn eftcc
-          ON ({$this->_aliases['civicrm_contribution']}.id = eftcc.entity_id AND
-            eftcc.entity_table = 'civicrm_contribution')
-        LEFT JOIN civicrm_financial_trxn {$this->_aliases['civicrm_financial_trxn']}
-          ON {$this->_aliases['civicrm_financial_trxn']}.id = eftcc.financial_trxn_id";
-    }
+    $this->addFinancialTrxnFromClause();
   }
 
   /**