mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
collate address: force the country to be the same when comparing postal codes
This commit is contained in:
parent
b0fcffea2d
commit
643d8f99be
@ -34,11 +34,11 @@ final readonly class CollateAddressWithReferenceOrPostalCode implements CollateA
|
||||
WHERE
|
||||
-- use only postal code which are reference
|
||||
cmpc_reference.id != cmpc.id AND cmpc_reference.origin = 0
|
||||
-- only where the reference is null or the cmpc is created manually
|
||||
--AND cma.addressreference_id IS NULL
|
||||
-- only where cmpc is created manually
|
||||
AND cmpc.origin != 0
|
||||
-- only when postal code match
|
||||
AND TRIM(REPLACE(LOWER(cmpc.code), ' ', '')) = LOWER(cmpc_reference.code)
|
||||
AND cmpc.country_id = cmpc_reference.country_id
|
||||
AND cma.id > :since_id -- to set the first id
|
||||
) sq
|
||||
WHERE ranked = 1)
|
||||
|
Loading…
x
Reference in New Issue
Block a user