fix : calcule des RTT pour les chauffeurs
Some checks failed
Auto Tag Develop / tag (push) Has been cancelled
Some checks failed
Auto Tag Develop / tag (push) Has been cancelled
This commit is contained in:
@@ -252,6 +252,20 @@ final readonly class RttRecoveryComputationService
|
||||
|
||||
private function computeMetrics(WorkHour $workHour): WorkMetrics
|
||||
{
|
||||
$driverDay = $workHour->getDayHoursMinutes() ?? 0;
|
||||
$driverNight = $workHour->getNightHoursMinutes() ?? 0;
|
||||
$driverWorkshop = $workHour->getWorkshopHoursMinutes() ?? 0;
|
||||
|
||||
if ($driverDay > 0 || $driverNight > 0 || $driverWorkshop > 0) {
|
||||
$totalMinutes = $driverDay + $driverNight + $driverWorkshop;
|
||||
|
||||
return new WorkMetrics(
|
||||
dayMinutes: $driverDay + $driverWorkshop,
|
||||
nightMinutes: $driverNight,
|
||||
totalMinutes: $totalMinutes,
|
||||
);
|
||||
}
|
||||
|
||||
$ranges = [
|
||||
[$workHour->getMorningFrom(), $workHour->getMorningTo()],
|
||||
[$workHour->getAfternoonFrom(), $workHour->getAfternoonTo()],
|
||||
|
||||
Reference in New Issue
Block a user