fix: collection_new
This commit is contained in:
parent
8f9a7802ab
commit
ba6b6572c3
|
@ -173,6 +173,11 @@ BEGIN
|
||||||
|
|
||||||
-- Hay que excluir aquellos que no tengan la misma hora de preparacion, si procede
|
-- Hay que excluir aquellos que no tengan la misma hora de preparacion, si procede
|
||||||
IF vHasUniqueCollectionTime THEN
|
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
|
SELECT ticketFk INTO vFirstTicketFk
|
||||||
FROM tmp.productionBuffer
|
FROM tmp.productionBuffer
|
||||||
|
@ -186,13 +191,6 @@ BEGIN
|
||||||
ticketFk
|
ticketFk
|
||||||
LIMIT 1;
|
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;
|
OPEN vTickets;
|
||||||
l: LOOP
|
l: LOOP
|
||||||
SET vDone = FALSE;
|
SET vDone = FALSE;
|
||||||
|
|
Loading…
Reference in New Issue