Merge branch 'master' into test
gitea/salix/pipeline/head This commit looks good Details

This commit is contained in:
Guillermo Bonet 2024-05-21 11:44:26 +02:00
commit 6e06891937
1 changed files with 3 additions and 0 deletions

View File

@ -138,9 +138,12 @@ module.exports = Self => {
JOIN alertLevel al ON al.id = ts.alertLevel
JOIN agencyMode am ON am.id = t.agencyModeFk
JOIN deliveryMethod dm ON dm.id = am.deliveryMethodFk
LEFT JOIN ticketObservation tob ON tob.ticketFk = t.id
SET t.routeFk = NULL
WHERE DATE(t.shipped) BETWEEN ? - INTERVAL 2 DAY AND util.dayEnd(?)
AND al.code NOT IN ('DELIVERED', 'PACKED')
AND NOT t.packages
AND tob.id IS NULL
AND t.routeFk`, [toDate, toDate], {userId: ctx.req.accessToken.userId});
return {