test #3179
|
@ -146,8 +146,6 @@ BEGIN
|
||||||
DELETE pb
|
DELETE pb
|
||||||
FROM tmp.productionBuffer pb
|
FROM tmp.productionBuffer pb
|
||||||
JOIN state s ON s.id = pb.state
|
JOIN state s ON s.id = pb.state
|
||||||
JOIN agencyMode am ON am.id = pb.agencyModeFk
|
|
||||||
JOIN agency a ON a.id = am.agencyFk
|
|
||||||
LEFT JOIN (
|
LEFT JOIN (
|
||||||
SELECT pb.ticketFk, MAX(i.`size`) maxSize
|
SELECT pb.ticketFk, MAX(i.`size`) maxSize
|
||||||
FROM tmp.productionBuffer pb
|
FROM tmp.productionBuffer pb
|
||||||
|
@ -158,7 +156,7 @@ BEGIN
|
||||||
) sub ON sub.ticketFk = pb.ticketFk
|
) sub ON sub.ticketFk = pb.ticketFk
|
||||||
JOIN productionConfig pc
|
JOIN productionConfig pc
|
||||||
WHERE pb.shipped <> util.VN_CURDATE()
|
WHERE pb.shipped <> util.VN_CURDATE()
|
||||||
OR (pb.ubicacion IS NULL AND a.isOwn)
|
OR pb.ubicacion IS NULL
|
||||||
OR (NOT s.isPreparable AND NOT s.isPrintable)
|
OR (NOT s.isPreparable AND NOT s.isPrintable)
|
||||||
OR pb.collectionH IS NOT NULL
|
OR pb.collectionH IS NOT NULL
|
||||||
OR pb.collectionV IS NOT NULL
|
OR pb.collectionV IS NOT NULL
|
||||||
|
|
Loading…
Reference in New Issue