diff --git a/src/Bundle/ChillMainBundle/Export/AccompanyingCourseExportHelper.php b/src/Bundle/ChillMainBundle/Export/AccompanyingCourseExportHelper.php new file mode 100644 index 000000000..dae4ce254 --- /dev/null +++ b/src/Bundle/ChillMainBundle/Export/AccompanyingCourseExportHelper.php @@ -0,0 +1,22 @@ +leftJoin('acp.closingMotive', 'cm') + ->andWhere( + $qb->expr()->orX( + $qb->expr()->eq('cm.isCanceledAccompanyingPeriod', 'false'), + $qb->expr()->isNull('acp.closingMotive') + ) + ); + + return $qb; + } + +} diff --git a/src/Bundle/ChillMainBundle/config/services.yaml b/src/Bundle/ChillMainBundle/config/services.yaml index 5976cb8b0..501a894e6 100644 --- a/src/Bundle/ChillMainBundle/config/services.yaml +++ b/src/Bundle/ChillMainBundle/config/services.yaml @@ -125,3 +125,7 @@ services: Chill\MainBundle\Service\EntityInfo\ViewEntityInfoManager: arguments: $vienEntityInfoProviders: !tagged_iterator chill_main.entity_info_provider + + Chill\MainBundle\Export\AccompanyingCourseExportHelper: + autoconfigure: true + autowire: true