CRM-20585, changed query since to financial accoun holds deferred revenue now
authorPradeep Nayak <pradpnayak@gmail.com>
Sat, 20 May 2017 18:44:06 +0000 (00:14 +0530)
committerPradeep Nayak <pradpnayak@gmail.com>
Sat, 20 May 2017 18:44:49 +0000 (00:14 +0530)
----------------------------------------
* CRM-20585: Correct the from and to accounts for deferred revenue transactions
  https://issues.civicrm.org/jira/browse/CRM-20585

CRM/Report/Form/Contribute/DeferredRevenue.php

index 9447082bc8c53cbdce93cedb2f37bfc4d744c501..72f5a5e324748f36b9ab113dcdf5a587c711c81d 100644 (file)
@@ -302,7 +302,7 @@ class CRM_Report_Form_Contribute_DeferredRevenue extends CRM_Report_Form {
         ON entity_financial_trxn_item.entity_id = {$this->_aliases['civicrm_financial_item']}.id
         AND entity_financial_trxn_item.entity_table = 'civicrm_financial_item'
       INNER JOIN civicrm_financial_trxn {$this->_aliases['civicrm_financial_trxn_1']}
-        ON {$this->_aliases['civicrm_financial_trxn_1']}.from_financial_account_id = {$this->_aliases['civicrm_financial_account']}.id
+        ON {$this->_aliases['civicrm_financial_trxn_1']}.to_financial_account_id = {$this->_aliases['civicrm_financial_account']}.id
         AND {$this->_aliases['civicrm_financial_trxn_1']}.id =  entity_financial_trxn_item.financial_trxn_id 
       INNER JOIN civicrm_entity_financial_trxn financial_trxn_contribution
         ON financial_trxn_contribution.financial_trxn_id = {$this->_aliases['civicrm_financial_trxn_1']}.id