mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-20 14:43:49 +00:00
DX: rename CountHousehold => CountHouseholdInPeriod.php + add test
This commit is contained in:
@@ -26,7 +26,7 @@ use Doctrine\ORM\Query;
|
||||
use Symfony\Component\DependencyInjection\ParameterBag\ParameterBagInterface;
|
||||
use Symfony\Component\Form\FormBuilderInterface;
|
||||
|
||||
class CountHousehold implements ExportInterface, GroupedExportInterface
|
||||
class CountHouseholdInPeriod implements ExportInterface, GroupedExportInterface
|
||||
{
|
||||
private const TR_PREFIX = 'export.export.nb_household_with_course.';
|
||||
private readonly bool $filterStatsByCenters;
|
||||
@@ -120,6 +120,7 @@ class CountHousehold implements ExportInterface, GroupedExportInterface
|
||||
->join('person.accompanyingPeriodParticipations', 'acppart')
|
||||
->join('acppart.accompanyingPeriod', 'acp')
|
||||
->andWhere('acppart.startDate != acppart.endDate OR acppart.endDate IS NULL')
|
||||
->andWhere('hmember.startDate <= :count_household_at_date AND (hmember.endDate IS NULL OR hmember.endDate > :count_household_at_date)')
|
||||
->setParameter('count_household_at_date', $this->rollingDateConverter->convert($data['calc_date']));
|
||||
|
||||
$qb
|
||||
@@ -135,7 +136,6 @@ class CountHousehold implements ExportInterface, GroupedExportInterface
|
||||
'
|
||||
)
|
||||
)
|
||||
->andWhere('hmember.startDate <= :count_household_at_date AND (hmember.endDate IS NULL OR hmember.endDate > :count_household_at_date)')
|
||||
->setParameter('authorized_centers', $centers);
|
||||
}
|
||||
|
Reference in New Issue
Block a user