Release 2.24 (#5097)

This commit is contained in:
Kevin Papst
2024-10-11 21:56:54 +02:00
committed by GitHub
parent 5fac6a642c
commit ff9bf163ee
32 changed files with 381 additions and 463 deletions

View File

@@ -102,6 +102,7 @@ final class WorkingTimeService
$stats = null;
$firstDay = $user->getWorkStartingDay();
$lastDay = $user->getLastWorkingDay();
$calculator = $this->getContractMode($user)->getCalculator($user);
foreach ($year->getMonths() as $month) {
@@ -119,7 +120,7 @@ final class WorkingTimeService
$dayDate = $day->getDay();
$result = new WorkingTime($user, $dayDate);
if ($firstDay === null || $firstDay <= $dayDate) {
if (($firstDay === null || $firstDay <= $dayDate) && ($lastDay === null || $lastDay >= $dayDate)) {
$result->setExpectedTime($calculator->getWorkHoursForDay($dayDate));
}