mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
[collate addresses] block collating addresses to another address reference
where the address reference is already the best match
This commit is contained in:
parent
f34f8b1eaa
commit
ca2ba9d8e4
6
.changes/unreleased/Fixed-20230714-130035.yaml
Normal file
6
.changes/unreleased/Fixed-20230714-130035.yaml
Normal file
@ -0,0 +1,6 @@
|
||||
kind: Fixed
|
||||
body: '[collate addresses] block collating addresses to another address reference
|
||||
where the address reference is already the best match'
|
||||
time: 2023-07-14T13:00:35.117940845+02:00
|
||||
custom:
|
||||
Issue: ""
|
@ -62,9 +62,8 @@ final readonly class CollateAddressWithReferenceOrPostalCode implements CollateA
|
||||
JOIN chill_main_postal_code cmpc on cma.postcode_id = cmpc.id,
|
||||
chill_main_address_reference cmar JOIN chill_main_postal_code cmpc_reference ON cmar.postcode_id = cmpc_reference.id
|
||||
WHERE
|
||||
cma.addressreference_id != cmar.id
|
||||
-- only if cmpc is a reference (must be matched before executing this query)
|
||||
AND cma.postcode_id = cmar.postcode_id
|
||||
cma.postcode_id = cmar.postcode_id
|
||||
-- join cmpc to cma
|
||||
AND SIMILARITY(LOWER(cma.street), LOWER(cmar.street)) > 0.6 AND LOWER(cma.streetnumber) = LOWER(cmar.streetnumber)
|
||||
-- only addresses which match the address reference - let the user decide if the reference has changed
|
||||
|
Loading…
x
Reference in New Issue
Block a user