Compare commits

..

No commits in common. "b62b33d175d7b3bebf8c1dd844f5aa422b448e87" and "a707f9cbff08d105e158856d4f8ff110c43a2659" have entirely different histories.

1 changed files with 3 additions and 1 deletions

View File

@ -173,6 +173,8 @@ BEGIN
DELETE pb.*
FROM tmp.productionBuffer pb
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 (
SELECT pb.ticketFk, MAX(i.`size`) maxSize
FROM tmp.productionBuffer pb
@ -183,7 +185,7 @@ BEGIN
) sub ON sub.ticketFk = pb.ticketFk
JOIN productionConfig pc
WHERE pb.shipped <> util.VN_CURDATE()
OR pb.ubicacion IS NULL
OR (pb.ubicacion IS NULL AND a.isOwn)
OR (NOT s.isPreparable AND NOT s.isPrintable)
OR pb.collectionH IS NOT NULL
OR pb.collectionV IS NOT NULL