(dev/core#479) Contribution Summary report throw DB error with custom data and soft...
authoryashodha <yashodha@cividesk.com>
Fri, 26 Oct 2018 06:18:35 +0000 (11:48 +0530)
committeryashodha <yashodha@cividesk.com>
Fri, 26 Oct 2018 06:18:35 +0000 (11:48 +0530)
CRM/Report/Form/Contribute/Summary.php

index 2ef86cd5ceb26d690b3ba9a87fa97c446e22e0d2..2fb301915cff78d5e53cfb506477a4e7c0b38bdc 100644 (file)
@@ -648,6 +648,7 @@ ROUND(AVG({$this->_aliases['civicrm_contribution']}.total_amount), 2) as civicrm
 
     if ($softCredit) {
       $this->from();
+      $this->customDataFrom();
       $select = "
 COUNT({$this->_aliases['civicrm_contribution_soft']}.amount )        as civicrm_contribution_soft_soft_amount_count,
 SUM({$this->_aliases['civicrm_contribution_soft']}.amount )          as civicrm_contribution_soft_soft_amount_sum,
@@ -769,6 +770,7 @@ ROUND(AVG({$this->_aliases['civicrm_contribution_soft']}.amount), 2) as civicrm_
     $softCredit = (!empty($this->_params['fields']['soft_amount']) && !empty($this->_params['fields']['total_amount'])) ? TRUE : FALSE;
     if ($softCredit) {
       $this->from('contribution');
+      $this->customDataFrom();
       $contriSQL = "{$this->_select} {$this->_from} {$this->_where} {$this->_groupBy} {$this->_having} {$this->_orderBy} {$this->_limit}";
       $contriDAO = CRM_Core_DAO::executeQuery($contriSQL);
       $contriFields = array(