hotfix: ticket 135539 Unroute tickets
gitea/salix/pipeline/pr-master This commit looks good Details

This commit is contained in:
Guillermo Bonet 2024-05-17 11:56:04 +02:00
parent a99554c773
commit 968effc936
1 changed files with 2 additions and 4 deletions

View File

@ -138,12 +138,10 @@ module.exports = Self => {
JOIN alertLevel al ON al.id = ts.alertLevel JOIN alertLevel al ON al.id = ts.alertLevel
JOIN agencyMode am ON am.id = t.agencyModeFk JOIN agencyMode am ON am.id = t.agencyModeFk
JOIN deliveryMethod dm ON dm.id = am.deliveryMethodFk JOIN deliveryMethod dm ON dm.id = am.deliveryMethodFk
JOIN zone z ON z.id = t.zoneFk
SET t.routeFk = NULL SET t.routeFk = NULL
WHERE DATE(t.shipped) BETWEEN ? - INTERVAL 2 DAY AND util.dayEnd(?) WHERE DATE(t.shipped) BETWEEN ? - INTERVAL 2 DAY AND util.dayEnd(?)
AND al.code NOT IN('DELIVERED','PACKED') AND al.code NOT IN ('DELIVERED', 'PACKED')
AND t.routeFk AND t.routeFk`, [toDate, toDate], {userId: ctx.req.accessToken.userId});
AND z.name LIKE '%MADRID%'`, [toDate, toDate], {userId: ctx.req.accessToken.userId});
return { return {
message: 'Success' message: 'Success'