Merge pull request 'fix: refs #6403 fix delivery observation' (!2733) from 6403-fix-delivery-observation into master
gitea/salix/pipeline/pr-test This commit looks good Details
gitea/salix/pipeline/head This commit looks good Details

Reviewed-on: #2733
Reviewed-by: Carlos Andrés <carlosap@verdnatura.es>
This commit is contained in:
Pablo Natek 2024-07-15 11:37:52 +00:00
commit 71153d0f37
1 changed files with 1 additions and 2 deletions

View File

@ -63,8 +63,7 @@ module.exports = Self => {
JOIN client c ON t.clientFk = c.id JOIN client c ON t.clientFk = c.id
JOIN address a ON t.addressFk = a.id JOIN address a ON t.addressFk = a.id
LEFT JOIN addressObservation oa ON oa.addressFk = a.id LEFT JOIN addressObservation oa ON oa.addressFk = a.id
LEFT JOIN observationType ot ON ot.id = oa.observationTypeFk AND oa.observationTypeFk IN (SELECT id FROM observationType ot WHERE ot.code = 'delivery')
AND ot.code = 'delivery'
JOIN province p ON a.provinceFk = p.id JOIN province p ON a.provinceFk = p.id
JOIN country co ON co.id = p.countryFk JOIN country co ON co.id = p.countryFk
JOIN mrwConfig mc JOIN mrwConfig mc