fix: collection_new
gitea/salix/pipeline/pr-master This commit looks good
Details
gitea/salix/pipeline/pr-master This commit looks good
Details
This commit is contained in:
parent
d5f18b9187
commit
4f9b6030e8
|
@ -200,14 +200,6 @@ BEGIN
|
||||||
OR pb.hasPlantTray;
|
OR pb.hasPlantTray;
|
||||||
END IF;
|
END IF;
|
||||||
|
|
||||||
-- 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
|
SELECT ticketFk INTO vFirstTicketFk
|
||||||
FROM tmp.productionBuffer
|
FROM tmp.productionBuffer
|
||||||
ORDER BY HH,
|
ORDER BY HH,
|
||||||
|
@ -220,6 +212,14 @@ BEGIN
|
||||||
ticketFk
|
ticketFk
|
||||||
LIMIT 1;
|
LIMIT 1;
|
||||||
|
|
||||||
|
-- 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;
|
||||||
|
|
||||||
SET vTicketFk = vFirstTicketFk;
|
SET vTicketFk = vFirstTicketFk;
|
||||||
SET @lines = 0;
|
SET @lines = 0;
|
||||||
SET @volume = 0;
|
SET @volume = 0;
|
||||||
|
|
Loading…
Reference in New Issue