diff --git a/.changes/unreleased/Fixed-20240613-135945.yaml b/.changes/unreleased/Fixed-20240613-135945.yaml deleted file mode 100644 index 38028a735..000000000 --- a/.changes/unreleased/Fixed-20240613-135945.yaml +++ /dev/null @@ -1,5 +0,0 @@ -kind: Fixed -body: Take into account the acp closing date in the acp works date filter -time: 2024-06-13T13:59:45.561891547+02:00 -custom: - Issue: "271" diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/SocialWorkFilters/AccompanyingPeriodWorkEndDateBetweenDateFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/SocialWorkFilters/AccompanyingPeriodWorkEndDateBetweenDateFilter.php index 38ca39320..92258ccf9 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/SocialWorkFilters/AccompanyingPeriodWorkEndDateBetweenDateFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/SocialWorkFilters/AccompanyingPeriodWorkEndDateBetweenDateFilter.php @@ -86,11 +86,11 @@ final readonly class AccompanyingPeriodWorkEndDateBetweenDateFilter implements F }; $end = match ($data['keep_null']) { true => $qb->expr()->orX( - $qb->expr()->gt('COALESCE(acp.closingDate, acpw.endDate)', ':'.$as), + $qb->expr()->gt('acpw.endDate', ':'.$as), $qb->expr()->isNull('acpw.endDate') ), false => $qb->expr()->andX( - $qb->expr()->gt('COALESCE(acp.closingDate, acpw.endDate)', ':'.$as), + $qb->expr()->gt('acpw.endDate', ':'.$as), $qb->expr()->isNotNull('acpw.endDate') ), default => throw new \LogicException('This value is not supported'),