From 333a49824b5216e48ccd5b2be4f7f7f1fd2b61db Mon Sep 17 00:00:00 2001 From: Ana Rute Mendes Date: Tue, 7 May 2024 11:56:21 +0200 Subject: [PATCH] Fix percentage column in vacation summary Use the correct value for used hours --- model/facade/action/GetHolidaySummaryReportAction.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/model/facade/action/GetHolidaySummaryReportAction.php b/model/facade/action/GetHolidaySummaryReportAction.php index 98e8ed59e..15a309b79 100644 --- a/model/facade/action/GetHolidaySummaryReportAction.php +++ b/model/facade/action/GetHolidaySummaryReportAction.php @@ -94,7 +94,7 @@ protected function doExecute() 'usedHours' => round($usedHours, 2), 'pendingHours' => round($summary['pendingHours'][$this->user->getLogin()], 2), 'scheduledHours' => round($summary['scheduledHours'][$this->user->getLogin()] - $usedHours, 2), - 'percentage' => $summary['availableHours'][$this->user->getLogin()] ? round(($summary['usedHours'][$this->user->getLogin()] / $summary['availableHours'][$this->user->getLogin()]) * 100, 2) : 0, + 'percentage' => $summary['availableHours'][$this->user->getLogin()] ? round(($usedHours / $summary['availableHours'][$this->user->getLogin()]) * 100, 2) : 0, 'hoursDay' => $validJourney, 'holidays' => $leaves, ];