CRM-9394
authoryashodha <yashodha.chaku@webaccess.co.in>
Tue, 12 Mar 2013 14:32:34 +0000 (20:02 +0530)
committeryashodha <yashodha.chaku@webaccess.co.in>
Tue, 12 Mar 2013 14:32:34 +0000 (20:02 +0530)
CRM/Report/Form/Event/Income.php

index e7c31416f0e84db2c4b02ede7ff1dac54b6e12d7..2928e246f25a7fdaf61dd5d1060280119b4cb44b 100644 (file)
@@ -103,6 +103,7 @@ class CRM_Report_Form_Event_Income extends CRM_Report_Form_Event {
                     civicrm_event.start_date            as start_date,
                     civicrm_event.end_date              as end_date,
                     civicrm_option_value.label          as event_type,
+                    civicrm_participant.fee_currency    as currency,
                     SUM(civicrm_participant.fee_amount) as total,
                     COUNT(civicrm_participant.id)       as participant
 
@@ -117,6 +118,7 @@ class CRM_Report_Form_Event_Income extends CRM_Report_Form_Event {
 
             GROUP BY   civicrm_event.id
             ";
+
     $eventDAO = CRM_Core_DAO::executeQuery($sql);
 
     while ($eventDAO->fetch()) {
@@ -125,7 +127,7 @@ class CRM_Report_Form_Event_Income extends CRM_Report_Form_Event {
       $eventSummary[$eventDAO->event_id]['Start Date'] = CRM_Utils_Date::customFormat($eventDAO->start_date);
       $eventSummary[$eventDAO->event_id]['End Date'] = CRM_Utils_Date::customFormat($eventDAO->end_date);
       $eventSummary[$eventDAO->event_id]['Event Type'] = $eventDAO->event_type;
-      $eventSummary[$eventDAO->event_id]['Event Income'] = CRM_Utils_Money::format($eventDAO->total);
+      $eventSummary[$eventDAO->event_id]['Event Income'] = CRM_Utils_Money::format($eventDAO->total, $eventDAO->currency);
       $eventSummary[$eventDAO->event_id]['Registered Participant'] = "{$eventDAO->participant} ({$activeparticipnatStutusLabel})";
     }
     $this->assign_by_ref('summary', $eventSummary);