diff --git a/.changes/unreleased/Feature-20231004-120857.yaml b/.changes/unreleased/Feature-20231004-120857.yaml index b3cff5e82..1d7e636b6 100644 --- a/.changes/unreleased/Feature-20231004-120857.yaml +++ b/.changes/unreleased/Feature-20231004-120857.yaml @@ -1,6 +1,6 @@ kind: Feature body: Allow closing motives to be identified as 'canceling the accompanying period' - + don't take canceled accompanying periods into account + + don't take canceled accompanying periods into account in exports time: 2023-10-04T12:08:57.586865276+02:00 custom: Issue: "146" diff --git a/src/Bundle/ChillMainBundle/Export/AccompanyingCourseExportHelper.php b/src/Bundle/ChillMainBundle/Export/AccompanyingCourseExportHelper.php index 174548822..cda726871 100644 --- a/src/Bundle/ChillMainBundle/Export/AccompanyingCourseExportHelper.php +++ b/src/Bundle/ChillMainBundle/Export/AccompanyingCourseExportHelper.php @@ -17,11 +17,11 @@ final readonly class AccompanyingCourseExportHelper { public static function addClosingMotiveExclusionClause(QueryBuilder $qb): QueryBuilder { - $qb->leftJoin('acp.closingMotive', 'cm') + $qb->leftJoin('acp.closingMotive', 'acpmotive') ->andWhere( $qb->expr()->orX( - $qb->expr()->eq('cm.isCanceledAccompanyingPeriod', 'false'), - $qb->expr()->isNull('acp.closingMotive') + $qb->expr()->eq('acpmotive.isCanceledAccompanyingPeriod', 'false'), + $qb->expr()->isNull('acpmotive.closingMotive') ) ); diff --git a/src/Bundle/ChillMainBundle/config/services/export.yaml b/src/Bundle/ChillMainBundle/config/services/export.yaml index 6bae6f9c0..1b58dbf71 100644 --- a/src/Bundle/ChillMainBundle/config/services/export.yaml +++ b/src/Bundle/ChillMainBundle/config/services/export.yaml @@ -53,4 +53,3 @@ services: tags: - { name: chill.export_formatter, alias: 'csv_pivoted_list' } - Chill\MainBundle\Export\AccompanyingCourseExportHelper: ~