From 08ba1acc3cf3825455b8559ce3597a03b27b90ff Mon Sep 17 00:00:00 2001 From: pablone Date: Mon, 15 Jul 2024 13:35:24 +0200 Subject: [PATCH] fix: refs #6403 fix delivery observation --- back/methods/mrw-config/createShipment.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/back/methods/mrw-config/createShipment.js b/back/methods/mrw-config/createShipment.js index ab25113dc..900e1fc0f 100644 --- a/back/methods/mrw-config/createShipment.js +++ b/back/methods/mrw-config/createShipment.js @@ -63,8 +63,7 @@ module.exports = Self => { JOIN client c ON t.clientFk = c.id JOIN address a ON t.addressFk = a.id LEFT JOIN addressObservation oa ON oa.addressFk = a.id - LEFT JOIN observationType ot ON ot.id = oa.observationTypeFk - AND ot.code = 'delivery' + AND oa.observationTypeFk IN (SELECT id FROM observationType ot WHERE ot.code = 'delivery') JOIN province p ON a.provinceFk = p.id JOIN country co ON co.id = p.countryFk JOIN mrwConfig mc