Closure to dayEnd
gitea/salix/pipeline/head This commit looks good
Details
gitea/salix/pipeline/head This commit looks good
Details
This commit is contained in:
parent
893cca52cc
commit
1acd5dc838
|
@ -23,7 +23,8 @@ module.exports = app => {
|
||||||
JOIN ticketState ts ON ts.ticketFk = t.id
|
JOIN ticketState ts ON ts.ticketFk = t.id
|
||||||
JOIN alertLevel al ON al.alertLevel = ts.alertLevel
|
JOIN alertLevel al ON al.alertLevel = ts.alertLevel
|
||||||
WHERE al.code = 'PACKED'
|
WHERE al.code = 'PACKED'
|
||||||
AND DATE(t.shipped) BETWEEN DATE_ADD(:to, INTERVAL -2 DAY) AND :to
|
AND DATE(t.shipped) BETWEEN DATE_ADD(:to, INTERVAL -2 DAY)
|
||||||
|
AND util.dayEnd(:to)
|
||||||
AND t.refFk IS NULL
|
AND t.refFk IS NULL
|
||||||
GROUP BY e.ticketFk`, {
|
GROUP BY e.ticketFk`, {
|
||||||
to: reqArgs.to
|
to: reqArgs.to
|
||||||
|
@ -39,7 +40,8 @@ module.exports = app => {
|
||||||
JOIN deliveryMethod dm ON dm.id = am.deliveryMethodFk
|
JOIN deliveryMethod dm ON dm.id = am.deliveryMethodFk
|
||||||
JOIN zone z ON z.id = t.zoneFk
|
JOIN zone z ON z.id = t.zoneFk
|
||||||
SET t.routeFk = NULL
|
SET t.routeFk = NULL
|
||||||
WHERE DATE(t.shipped) BETWEEN DATE_ADD(:to, INTERVAL -2 DAY) AND :to
|
WHERE DATE(t.shipped) BETWEEN DATE_ADD(:to, INTERVAL -2 DAY)
|
||||||
|
AND util.dayEnd(:to)
|
||||||
AND al.code NOT IN('DELIVERED','PACKED')
|
AND al.code NOT IN('DELIVERED','PACKED')
|
||||||
AND t.routeFk
|
AND t.routeFk
|
||||||
AND z.name LIKE '%MADRID%'`, {
|
AND z.name LIKE '%MADRID%'`, {
|
||||||
|
@ -108,7 +110,8 @@ module.exports = app => {
|
||||||
WHERE al.code = 'PACKED'
|
WHERE al.code = 'PACKED'
|
||||||
AND t.agencyModeFk IN(:agencyModeId)
|
AND t.agencyModeFk IN(:agencyModeId)
|
||||||
AND t.warehouseFk = :warehouseId
|
AND t.warehouseFk = :warehouseId
|
||||||
AND DATE(t.shipped) BETWEEN DATE_ADD(:to, INTERVAL -2 DAY) AND :to
|
AND DATE(t.shipped) BETWEEN DATE_ADD(:to, INTERVAL -2 DAY)
|
||||||
|
AND util.dayEnd(:to)
|
||||||
AND t.refFk IS NULL
|
AND t.refFk IS NULL
|
||||||
GROUP BY e.ticketFk`, {
|
GROUP BY e.ticketFk`, {
|
||||||
agencyModeId: agenciesId,
|
agencyModeId: agenciesId,
|
||||||
|
|
Loading…
Reference in New Issue