From 1a19006702984f32b640a1a3adbca8135a4411fb Mon Sep 17 00:00:00 2001 From: Pradeep Nayak Date: Thu, 17 Nov 2016 14:51:43 +0530 Subject: [PATCH] CRM-19661, fixed query to add group by ---------------------------------------- * CRM-19661: Notice error on Event Income Report (Detail) https://issues.civicrm.org/jira/browse/CRM-19661 --- CRM/Report/Form/Event/Income.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/CRM/Report/Form/Event/Income.php b/CRM/Report/Form/Event/Income.php index 6dabed59ac..cf2745d989 100644 --- a/CRM/Report/Form/Event/Income.php +++ b/CRM/Report/Form/Event/Income.php @@ -108,7 +108,6 @@ class CRM_Report_Form_Event_Income extends CRM_Report_Form_Event { "civicrm_option_value.label as event_type", "civicrm_participant.fee_currency as currency", ); - $groupBy = CRM_Contact_BAO_Query::getGroupByFromSelectColumns($select); $sql = " SELECT " . implode(', ', $select) . ", @@ -122,7 +121,7 @@ class CRM_Report_Form_Event_Income extends CRM_Report_Form_Event { LEFT JOIN civicrm_participant ON ( civicrm_event.id = civicrm_participant.event_id {$activeParticipantClause} AND civicrm_participant.is_test = 0 ) - WHERE civicrm_event.id IN( {$eventID}) {$groupBy}"; + WHERE civicrm_event.id IN( {$eventID}) GROUP BY civicrm_event.id"; $eventDAO = CRM_Core_DAO::executeQuery($sql); $currency = array(); -- 2.25.1