fix : fix affichage employé sur les pages d'heures + ajout d'un filtre employé sur la liste + fix impression recap salaire
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:
@@ -187,16 +187,17 @@ final readonly class WorkHourWeeklySummaryProvider implements ProviderInterface
|
||||
continue;
|
||||
}
|
||||
|
||||
$weeklyDayMinutes = 0;
|
||||
$weeklyNightMinutes = 0;
|
||||
$weeklyWorkshopMinutes = 0;
|
||||
$weeklyTotalMinutes = 0;
|
||||
$weeklyPresenceCount = 0.0;
|
||||
$weeklyBreakfastCount = 0;
|
||||
$weeklyLunchCount = 0;
|
||||
$weeklyDinnerCount = 0;
|
||||
$weeklyOvernightCount = 0;
|
||||
$daily = [];
|
||||
$weeklyDayMinutes = 0;
|
||||
$weeklyNightMinutes = 0;
|
||||
$weeklyWorkshopMinutes = 0;
|
||||
$weeklyTotalMinutes = 0;
|
||||
$weeklyPresenceCount = 0.0;
|
||||
$weeklyNightBasketCount = 0;
|
||||
$weeklyBreakfastCount = 0;
|
||||
$weeklyLunchCount = 0;
|
||||
$weeklyDinnerCount = 0;
|
||||
$weeklyOvernightCount = 0;
|
||||
$daily = [];
|
||||
// Les contrats au suivi "présence" ne manipulent pas les heures, mais des demi-journées.
|
||||
$weekAnchorContract = $contractsByEmployeeDate[$employeeId][$anchorDateYmd]
|
||||
?? $contractsByEmployeeDate[$employeeId][$days[0]]
|
||||
@@ -208,8 +209,12 @@ final readonly class WorkHourWeeklySummaryProvider implements ProviderInterface
|
||||
?? $contractNaturesByEmployeeDate[$employeeId][$days[0]]
|
||||
?? ContractNature::CDI;
|
||||
$employeeContractsByDate = [];
|
||||
$hasContractForWeek = false;
|
||||
foreach ($days as $date) {
|
||||
$employeeContractsByDate[$date] = $contractsByEmployeeDate[$employeeId][$date] ?? null;
|
||||
if (null !== $employeeContractsByDate[$date]) {
|
||||
$hasContractForWeek = true;
|
||||
}
|
||||
}
|
||||
|
||||
foreach ($days as $date) {
|
||||
@@ -228,11 +233,12 @@ final readonly class WorkHourWeeklySummaryProvider implements ProviderInterface
|
||||
$dayMinutes = ($entry['dayHoursMinutes'] ?? 0);
|
||||
$nightMinutes = ($entry['nightHoursMinutes'] ?? 0);
|
||||
$workshopMinutes = ($entry['workshopHoursMinutes'] ?? 0);
|
||||
$totalMinutes = $dayMinutes + $nightMinutes + $workshopMinutes;
|
||||
$hasBreakfast = $entry['hasBreakfast'] ?? false;
|
||||
$hasLunch = $entry['hasLunch'] ?? false;
|
||||
$hasDinner = $entry['hasDinner'] ?? false;
|
||||
$hasOvernight = $entry['hasOvernight'] ?? false;
|
||||
$totalMinutes = $dayMinutes + $nightMinutes + $workshopMinutes + $creditedMinutes;
|
||||
$dayMinutes += $creditedMinutes;
|
||||
$hasBreakfast = $entry['hasBreakfast'] ?? false;
|
||||
$hasLunch = $entry['hasLunch'] ?? false;
|
||||
$hasDinner = $entry['hasDinner'] ?? false;
|
||||
$hasOvernight = $entry['hasOvernight'] ?? false;
|
||||
if ($hasBreakfast) {
|
||||
++$weeklyBreakfastCount;
|
||||
}
|
||||
@@ -265,6 +271,11 @@ final readonly class WorkHourWeeklySummaryProvider implements ProviderInterface
|
||||
$present = min(1.0, $morning + $afternoon + $creditedPresence);
|
||||
}
|
||||
|
||||
$hasNightBasket = $nightMinutes > $dayMinutes && $nightMinutes > 0;
|
||||
if ($hasNightBasket) {
|
||||
++$weeklyNightBasketCount;
|
||||
}
|
||||
|
||||
$weeklyDayMinutes += $dayMinutes;
|
||||
$weeklyNightMinutes += $nightMinutes;
|
||||
$weeklyWorkshopMinutes += $workshopMinutes;
|
||||
@@ -283,6 +294,7 @@ final readonly class WorkHourWeeklySummaryProvider implements ProviderInterface
|
||||
hasAbsence: $absenceByEmployeeDate[$employeeId][$date] ?? false,
|
||||
absenceLabel: $absenceLabelByEmployeeDate[$employeeId][$date] ?? null,
|
||||
absenceColor: $absenceColorByEmployeeDate[$employeeId][$date] ?? null,
|
||||
hasNightBasket: $hasNightBasket,
|
||||
hasBreakfast: $hasBreakfast,
|
||||
hasLunch: $hasLunch,
|
||||
hasDinner: $hasDinner,
|
||||
@@ -325,11 +337,13 @@ final readonly class WorkHourWeeklySummaryProvider implements ProviderInterface
|
||||
weeklyOvertime25Minutes: $weeklyOvertime25Minutes,
|
||||
weeklyOvertime50Minutes: $weeklyOvertime50Minutes,
|
||||
weeklyRecoveryMinutes: $weeklyRecoveryMinutes,
|
||||
weeklyNightBasketCount: $weeklyNightBasketCount,
|
||||
isDriver: $isDriver,
|
||||
weeklyBreakfastCount: $weeklyBreakfastCount,
|
||||
weeklyLunchCount: $weeklyLunchCount,
|
||||
weeklyDinnerCount: $weeklyDinnerCount,
|
||||
weeklyOvernightCount: $weeklyOvernightCount,
|
||||
hasContractForWeek: $hasContractForWeek,
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user