Skip to content

Commit

Permalink
Fix percentage column in vacation summary
Browse files Browse the repository at this point in the history
Use the correct value for used hours
  • Loading branch information
anarute committed May 7, 2024
1 parent 415f7fa commit 333a498
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion model/facade/action/GetHolidaySummaryReportAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -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,
];
Expand Down

0 comments on commit 333a498

Please sign in to comment.