fix : prise en compte de la balance des congés
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:
@@ -193,6 +193,13 @@ final readonly class EmployeeLeaveSummaryProvider implements ProviderInterface
|
||||
$leavePolicy['countOnlyCp'],
|
||||
$leavePolicy['splitSaturdays']
|
||||
);
|
||||
|
||||
// Bootstrap support: if the opening balance has pre-filled taken days
|
||||
// (e.g. manual data entry for production bootstrap), add them as an offset.
|
||||
if (null !== $openingBalance) {
|
||||
$takenDays += $openingBalance->getTakenDays();
|
||||
$takenSaturdays += $openingBalance->getTakenSaturdays();
|
||||
}
|
||||
if (LeaveRuleCode::CDI_CDD_NON_FORFAIT->value === $leavePolicy['ruleCode']) {
|
||||
$availableAcquired = max(0.0, $carryDays);
|
||||
$takenFromAcquired = min($availableAcquired, $takenDays);
|
||||
|
||||
Reference in New Issue
Block a user