[#SIRH] Récap salaire: scinder la colonne Heures payés en 25% / 50%

En-tête fusionné "Heures payés" (colspan=2) avec deux sous-colonnes 25% et
50% sous-jacentes. paid25Hours=base25Minutes, paid50Hours=base50Minutes
(bases seules, total inchangé vs l'ancienne colonne unique). buildRttPaymentMap
renvoie ['m25','m50'] par employé. Tableau passé à 20 colonnes (colspan ajustés).
PDF généré et validé sur données prod (A4 paysage, largeurs ~228mm).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-06-01 23:34:59 +02:00
parent 1486b770b1
commit c1ff46933a
4 changed files with 21 additions and 10 deletions
+12 -5
View File
@@ -174,6 +174,9 @@ class SalaryRecapPrintProvider implements ProviderInterface
/**
* @return array<int, int>
*/
/**
* @return array<int, array{m25: int, m50: int}>
*/
private function buildRttPaymentMap(array $rttPayments): array
{
$map = [];
@@ -182,7 +185,9 @@ class SalaryRecapPrintProvider implements ProviderInterface
if (!$employeeId) {
continue;
}
$map[$employeeId] = ($map[$employeeId] ?? 0) + $payment->getBase25Minutes() + $payment->getBase50Minutes();
$map[$employeeId] ??= ['m25' => 0, 'm50' => 0];
$map[$employeeId]['m25'] += $payment->getBase25Minutes();
$map[$employeeId]['m50'] += $payment->getBase50Minutes();
}
return $map;
@@ -295,7 +300,7 @@ class SalaryRecapPrintProvider implements ProviderInterface
$driverMap[$employeeId] ?? [],
$workHourMap[$employeeId] ?? [],
$absenceMap[$employeeId] ?? [],
$rttPaymentMap[$employeeId] ?? 0,
$rttPaymentMap[$employeeId] ?? ['m25' => 0, 'm50' => 0],
$bonusMap[$employeeId] ?? 0.0,
$mileageMap[$employeeId] ?? 0.0,
$observationMap[$employeeId] ?? '',
@@ -328,7 +333,7 @@ class SalaryRecapPrintProvider implements ProviderInterface
array $driverByDate,
array $workHoursByDate,
array $absences,
int $rttPaidMinutes,
array $rttPaid,
float $bonusAmount,
float $mileageKm,
string $observation,
@@ -455,7 +460,8 @@ class SalaryRecapPrintProvider implements ProviderInterface
$maladie = $this->countAbsencesByCode($absences, ['M', 'AT']);
$nightHours = round($nightMinutesTotal / 60, 2);
$paidHours = round($rttPaidMinutes / 60, 2);
$paid25Hours = round(($rttPaid['m25'] ?? 0) / 60, 2);
$paid50Hours = round(($rttPaid['m50'] ?? 0) / 60, 2);
$sundayHours = round($sundayMinutesTotal / 60, 2);
$holidayHours = round($holidayMinutesTotal / 60, 2);
@@ -467,7 +473,8 @@ class SalaryRecapPrintProvider implements ProviderInterface
'mileageKm' => $mileageKm,
'nightHours' => $nightHours,
'nightBasketCount' => $nightBasketCount,
'paidHours' => $paidHours,
'paid25Hours' => $paid25Hours,
'paid50Hours' => $paid50Hours,
'sundayHours' => $sundayHours,
'holidayHours' => $holidayHours,
'bonusAmount' => $bonusAmount,