fix : correction des Heures et ajout d'une validation pour les chefs de site
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:
@@ -51,7 +51,7 @@ final readonly class EmployeeWriteProcessor implements ProcessorInterface
|
||||
|
||||
$today = new DateTimeImmutable('today');
|
||||
if ($isNew) {
|
||||
$this->ensureContractPeriodExists($data, $currentContract, $today);
|
||||
$this->ensureContractPeriodExists($data, $currentContract, new DateTimeImmutable('1970-01-01'));
|
||||
|
||||
return $result;
|
||||
}
|
||||
@@ -61,7 +61,7 @@ final readonly class EmployeeWriteProcessor implements ProcessorInterface
|
||||
}
|
||||
|
||||
$todayPeriod = $this->periodRepository->findOneCoveringDate($data, $today);
|
||||
if (null !== $todayPeriod && null === $todayPeriod->getEndDate() && $todayPeriod->getStartDate() === $today) {
|
||||
if (null !== $todayPeriod && null === $todayPeriod->getEndDate() && $todayPeriod->getStartDate()->format('Y-m-d') === $today->format('Y-m-d')) {
|
||||
$todayPeriod->setContract($currentContract);
|
||||
$this->entityManager->flush();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user