Fixed: [export][ACP by geographical unit] Fix the comparison of end date

There was a bug: the comparison of end date was "lower than" the given date, instead of "greater than".
This commit is contained in:
Julien Fastré 2023-01-09 14:52:52 +01:00
parent bbd2599e7e
commit 99455ca685
Signed by: julienfastre
GPG Key ID: BDE2190974723FCB

View File

@ -70,11 +70,11 @@ class GeographicalUnitStatFilter implements FilterInterface
LEFT JOIN acp_geog_filter_address.geographicalUnits acp_geog_filter_units LEFT JOIN acp_geog_filter_address.geographicalUnits acp_geog_filter_units
WHERE WHERE
(acp_geog_filter_location_history.startDate <= :acp_geog_filter_date AND ( (acp_geog_filter_location_history.startDate <= :acp_geog_filter_date AND (
acp_geog_filter_location_history.endDate IS NULL OR acp_geog_filter_location_history.endDate < :acp_geog_filter_date acp_geog_filter_location_history.endDate IS NULL OR acp_geog_filter_location_history.endDate > :acp_geog_filter_date
)) ))
AND AND
(acp_geog_filter_address_person_location.validFrom < :acp_geog_filter_date AND ( (acp_geog_filter_address_person_location.validFrom < :acp_geog_filter_date AND (
acp_geog_filter_address_person_location.validTo IS NULL OR acp_geog_filter_address_person_location.validTo < :acp_geog_filter_date acp_geog_filter_address_person_location.validTo IS NULL OR acp_geog_filter_address_person_location.validTo > :acp_geog_filter_date
)) ))
AND acp_geog_filter_units IN (:acp_geog_filter_units) AND acp_geog_filter_units IN (:acp_geog_filter_units)
AND acp_geog_filter_location_history.period = acp.id AND acp_geog_filter_location_history.period = acp.id