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:
@@ -45,7 +45,7 @@
|
||||
- Contracts >= 39h: +25% from 39h to 43h, +50% beyond
|
||||
- CUSTOM contracts (weeklyHours ≠ 35 and ≠ 39, not INTERIM/FORFAIT): reference = actual contractual hours, no 25%/50% bonuses (1h overtime = 1h recovery), deficit doesn't impact balance
|
||||
- INTERIM: no overtime bonuses, no recovery time
|
||||
- Driver contracts: no overtime calculation
|
||||
- Driver contracts: RTT uses `dayHoursMinutes + nightHoursMinutes + workshopHoursMinutes` instead of morning/afternoon/evening time ranges
|
||||
- FORFAIT weekend/holiday bonus: each weekend or public holiday day worked gives bonus leave (full day if morning+afternoon, 0.5 if only one). Added to acquired days, no cap. PRESENCE mode only.
|
||||
|
||||
## Frais (MileageAllowance)
|
||||
|
||||
@@ -154,7 +154,7 @@ Documents complementaires:
|
||||
- jour/nuit/atelier par jour + indicateurs repas/dîner/nuitée
|
||||
- panier de nuit (PN): affiché par jour si (nightMinutes > dayMinutes) OU (nightMinutes >= 240, soit au moins 4h de travail entre 21h et 6h), et total hebdo dans la colonne Jour/Nuit sem.
|
||||
- totaux hebdo: jour, nuit, atelier, total, compteurs petit déj/déjeuner/dîner/nuitée
|
||||
- pas de calcul d'heures supplémentaires pour les conducteurs
|
||||
- les conducteurs utilisent `dayHoursMinutes + nightHoursMinutes + workshopHoursMinutes` pour le calcul RTT (au lieu des créneaux morning/afternoon/evening)
|
||||
- Le flag `isDriver` est sur `EmployeeContractPeriod` (un employé peut changer de statut chauffeur selon la période)
|
||||
- Exposé en API via un getter virtuel sur `Employee` (`employee:read`) qui résout depuis la période active
|
||||
|
||||
|
||||
@@ -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