fix: collection_new
gitea/salix/pipeline/head This commit looks good Details
gitea/salix/pipeline/pr-master There was a failure building this commit Details

This commit is contained in:
Carlos Andrés 2024-09-18 09:45:12 +02:00
parent 8f9a7802ab
commit ba6b6572c3
1 changed files with 13 additions and 15 deletions

View File

@ -173,6 +173,11 @@ BEGIN
-- Hay que excluir aquellos que no tengan la misma hora de preparacion, si procede
IF vHasUniqueCollectionTime THEN
DELETE pb
FROM tmp.productionBuffer pb
JOIN tmp.productionBuffer pb2 ON pb2.ticketFk = vFirstTicketFk
AND (pb.HH <> pb2.HH OR pb.mm <> pb2.mm);
END IF;
SELECT ticketFk INTO vFirstTicketFk
FROM tmp.productionBuffer
@ -186,13 +191,6 @@ BEGIN
ticketFk
LIMIT 1;
DELETE pb
FROM tmp.productionBuffer pb
JOIN tmp.productionBuffer pb2 ON pb2.ticketFk = vFirstTicketFk
AND (pb.HH <> pb2.HH OR pb.mm <> pb2.mm);
END IF;
OPEN vTickets;
l: LOOP
SET vDone = FALSE;