feat : ajout de l'export récap congés et RTT
This commit is contained in:
@@ -126,7 +126,7 @@ final readonly class EmployeeLeaveSummaryProvider implements ProviderInterface
|
||||
* previousYearRemainingDays: float
|
||||
* }
|
||||
*/
|
||||
private function computeYearSummary(Employee $employee, int $targetYear): ?array
|
||||
public function computeYearSummary(Employee $employee, int $targetYear): ?array
|
||||
{
|
||||
$firstYear = $this->resolveFirstComputationYear($employee);
|
||||
if ($targetYear < $firstYear) {
|
||||
@@ -286,6 +286,16 @@ final readonly class EmployeeLeaveSummaryProvider implements ProviderInterface
|
||||
return $targetSummary;
|
||||
}
|
||||
|
||||
public function resolveLeaveYearForToday(Employee $employee): int
|
||||
{
|
||||
$today = new DateTimeImmutable('today');
|
||||
if (ContractType::FORFAIT === $employee->getContract()?->getType()) {
|
||||
return (int) $today->format('Y');
|
||||
}
|
||||
|
||||
return $this->resolveCurrentLeaveYear($today);
|
||||
}
|
||||
|
||||
private function resolveEffectivePeriodStart(
|
||||
Employee $employee,
|
||||
DateTimeImmutable $from,
|
||||
|
||||
Reference in New Issue
Block a user