mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
Adjust query to also add households in the list that do not have an address
This commit is contained in:
parent
f7f8319749
commit
5629a0c124
@ -219,6 +219,8 @@ class ListHouseholdInPeriod implements ListInterface, GroupedExportInterface
|
|||||||
$qb
|
$qb
|
||||||
->leftJoin('household.addresses', 'addresses')
|
->leftJoin('household.addresses', 'addresses')
|
||||||
->andWhere(
|
->andWhere(
|
||||||
|
$qb->expr()->orX(
|
||||||
|
$qb->expr()->isNull('addresses'), // Include households without any address
|
||||||
$qb->expr()->andX(
|
$qb->expr()->andX(
|
||||||
$qb->expr()->lte('addresses.validFrom', ':calcDate'),
|
$qb->expr()->lte('addresses.validFrom', ':calcDate'),
|
||||||
$qb->expr()->orX(
|
$qb->expr()->orX(
|
||||||
@ -226,6 +228,7 @@ class ListHouseholdInPeriod implements ListInterface, GroupedExportInterface
|
|||||||
$qb->expr()->gt('addresses.validTo', ':calcDate')
|
$qb->expr()->gt('addresses.validTo', ':calcDate')
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
)
|
||||||
);
|
);
|
||||||
$this->addressHelper->addSelectClauses(
|
$this->addressHelper->addSelectClauses(
|
||||||
ExportAddressHelper::F_ALL,
|
ExportAddressHelper::F_ALL,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user