[#SIRH-36] corriger calcule rtt contrat custom #27

Merged
tristan merged 16 commits from feature/SIRH-36-corriger-le-calcule-des-rtt-des-contrat-4h into develop 2026-06-11 08:36:57 +00:00
Showing only changes of commit 0ff055ec76 - Show all commits
@@ -636,6 +636,7 @@ final class DumpVerificationSnapshotCommand extends Command
base50Minutes: $detail->base50Minutes,
bonus50Minutes: $detail->bonus50Minutes,
totalMinutes: $detail->totalMinutes,
isFlatRecovery: $detail->isFlatRecovery,
);
continue;
@@ -672,6 +673,7 @@ final class DumpVerificationSnapshotCommand extends Command
base50Minutes: (int) round($detail->base50Minutes * $ratio),
bonus50Minutes: (int) round($detail->bonus50Minutes * $ratio),
totalMinutes: (int) round($detail->totalMinutes * $ratio),
isFlatRecovery: $detail->isFlatRecovery,
);
}
}
@@ -692,7 +694,7 @@ final class DumpVerificationSnapshotCommand extends Command
$cumulative25 = $carry->base25Minutes + $carry->bonus25Minutes;
foreach ($weeks as $i => $week) {
if ($week->totalMinutes >= 0) {
if ($week->totalMinutes >= 0 || $week->isFlatRecovery) {
$cumulative50 += $week->base50Minutes + $week->bonus50Minutes;
$cumulative25 += $week->base25Minutes + $week->bonus25Minutes;
@@ -714,6 +716,7 @@ final class DumpVerificationSnapshotCommand extends Command
base50Minutes: $from50 > 0 ? -$from50 : 0,
bonus50Minutes: 0,
totalMinutes: $week->totalMinutes,
isFlatRecovery: $week->isFlatRecovery,
);
}