From a38dd72d028744f99c344b7fbe336059aea1791e Mon Sep 17 00:00:00 2001 From: Rohan Katkar Date: Tue, 19 Aug 2014 21:41:44 +0530 Subject: [PATCH] Fix for CRM-15136 --- CRM/Report/Form/Event/Income.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CRM/Report/Form/Event/Income.php b/CRM/Report/Form/Event/Income.php index 0f6323c053..b22e4d8726 100644 --- a/CRM/Report/Form/Event/Income.php +++ b/CRM/Report/Form/Event/Income.php @@ -187,7 +187,6 @@ class CRM_Report_Form_Event_Income extends CRM_Report_Form_Event { $roleRows[$roleDAO->event_id][$participantRole[$roleId]]['total'] += $roleDAO->participant; $roleRows[$roleDAO->event_id][$participantRole[$roleId]]['amount'] += $roleDAO->amount; } - $roleRows[$roleDAO->event_id][$participantRole[$roleId]]['amount'] = CRM_Utils_Money::format($roleRows[$roleDAO->event_id][$participantRole[$roleId]]['amount'], $currency[$roleDAO->event_id]); } foreach ($roleRows as $eventId => $roleInfo) { @@ -195,6 +194,9 @@ class CRM_Report_Form_Event_Income extends CRM_Report_Form_Event { if (isset($roleInfo[$roleName])) { $roleRows[$eventId][$roleName]['round'] = round(($roleRows[$eventId][$roleName]['total'] / $count[$eventId]) * 100, 2); } + if (!empty($roleRows[$eventId][$roleName])) { + $roleRows[$eventId][$roleName]['amount'] = CRM_Utils_Money::format($roleRows[$eventId][$roleName]['amount'], $currency[$eventId]); + } } } -- 2.25.1