From 001c3ec2ace757f911ec495cfbbe6412ed29e9a1 Mon Sep 17 00:00:00 2001 From: Pau Navarro Date: Thu, 24 Nov 2022 12:06:13 +0100 Subject: [PATCH] requested changes --- modules/route/back/methods/route/getTickets.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/modules/route/back/methods/route/getTickets.js b/modules/route/back/methods/route/getTickets.js index a72868120..708644c1a 100644 --- a/modules/route/back/methods/route/getTickets.js +++ b/modules/route/back/methods/route/getTickets.js @@ -56,10 +56,9 @@ module.exports = Self => { LEFT JOIN ticketState ts ON ts.ticketFk = t.id LEFT JOIN state st ON st.id = ts.stateFk LEFT JOIN warehouse wh ON wh.id = t.warehouseFk + LEFT JOIN observationType ot ON ot.code = 'delivery' LEFT JOIN ticketObservation tob ON tob.ticketFk = t.id - AND tob.observationTypeFk = (SELECT ot2.id from vn.observationType ot2 WHERE ot2.code = 'delivery') - LEFT JOIN observationType ot ON tob.observationTypeFk = ot.id - AND ot.code = 'delivery' + AND tob.observationTypeFk = ot.id LEFT JOIN address a ON a.id = t.addressFk LEFT JOIN agencyMode am ON am.id = t.agencyModeFk LEFT JOIN account.user u ON u.id = r.workerFk