Merge branch 'issue271_account_acp_closing_date' into 'master'

#271 Account for acp closing date inn action filters (export)

See merge request Chill-Projet/chill-bundles!707
This commit is contained in:
2024-07-05 13:42:06 +00:00
2 changed files with 7 additions and 2 deletions

View File

@@ -86,11 +86,11 @@ final readonly class AccompanyingPeriodWorkEndDateBetweenDateFilter implements F
};
$end = match ($data['keep_null']) {
true => $qb->expr()->orX(
$qb->expr()->gt('acpw.endDate', ':'.$as),
$qb->expr()->gt('COALESCE(acp.closingDate, acpw.endDate)', ':'.$as),
$qb->expr()->isNull('acpw.endDate')
),
false => $qb->expr()->andX(
$qb->expr()->gt('acpw.endDate', ':'.$as),
$qb->expr()->gt('COALESCE(acp.closingDate, acpw.endDate)', ':'.$as),
$qb->expr()->isNotNull('acpw.endDate')
),
default => throw new \LogicException('This value is not supported'),