feat(leave) : detect forfait mid-year entry exercise
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -786,6 +786,20 @@ final readonly class EmployeeLeaveSummaryProvider implements ProviderInterface
|
||||
return $repoDaysYear * $businessDaysPeriod / $businessDaysYear;
|
||||
}
|
||||
|
||||
/**
|
||||
* Vrai si la phase FORFAIT démarre en cours de l'année civile consultée
|
||||
* (donc avec une période partielle), faux pour une année pleine ou un démarrage le 1er janvier.
|
||||
*/
|
||||
private function isForfaitEntryYear(ContractPhase $phase, int $year): bool
|
||||
{
|
||||
if (ContractType::FORFAIT !== $phase->contractType) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return (int) $phase->startDate->format('Y') === $year
|
||||
&& '01-01' !== $phase->startDate->format('m-d');
|
||||
}
|
||||
|
||||
/**
|
||||
* @param null|array<string, string> $publicHolidays pre-built map (built if null)
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user