From: Web Access Date: Tue, 16 Jun 2015 05:07:39 +0000 (+0530) Subject: Minor fixes for CRM-16636 X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=051924d7dd150873a726212198373a0d8b0d6feb;p=civicrm-core.git Minor fixes for CRM-16636 --- diff --git a/CRM/Report/Form/Member/ContributionDetail.php b/CRM/Report/Form/Member/ContributionDetail.php index 965da7783c..79ee62c845 100644 --- a/CRM/Report/Form/Member/ContributionDetail.php +++ b/CRM/Report/Form/Member/ContributionDetail.php @@ -612,11 +612,9 @@ class CRM_Report_Form_Member_ContributionDetail extends CRM_Report_Form { $select = "SELECT DISTINCT {$this->_aliases['civicrm_contribution']}.id"; - $group = "\nGROUP BY cc.currency"; - - $sql = "SELECT COUNT(cc.id) as count, SUM( cc.total_amount ) as amount, ROUND(AVG(cc.total_amount), 2) as avg, cc.currency as currency + $sql = "SELECT COUNT(cc.id) as count, SUM(cc.total_amount) as amount, ROUND(AVG(cc.total_amount), 2) as avg, cc.currency as currency FROM civicrm_contribution cc - WHERE cc.id IN ({$select} {$this->_from} {$this->_where}) {$group}"; + WHERE cc.id IN ({$select} {$this->_from} {$this->_where}) GROUP BY cc.currency"; $dao = CRM_Core_DAO::executeQuery($sql); $totalAmount = $average = array();