From 051924d7dd150873a726212198373a0d8b0d6feb Mon Sep 17 00:00:00 2001 From: Web Access Date: Tue, 16 Jun 2015 10:37:39 +0530 Subject: [PATCH] Minor fixes for CRM-16636 --- CRM/Report/Form/Member/ContributionDetail.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) 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(); -- 2.25.1