fix: ticket_splitItemPackingType
gitea/salix/pipeline/pr-master There was a failure building this commit Details

This commit is contained in:
Carlos Andrés 2024-09-19 12:09:36 +02:00
parent 26a078504f
commit e8a203efc7
1 changed files with 8 additions and 7 deletions

View File

@ -30,6 +30,12 @@ proc: BEGIN
WHERE t.id = vSelf
AND i.itemPackingTypeFk = vOriginalItemPackingTypeFk;
CREATE OR REPLACE TEMPORARY TABLE tmp.ticketIPT(
ticketFk INT,
itemPackingTypeFk VARCHAR(1)
) ENGINE=MEMORY
SELECT vSelf, vOriginalItemPackingTypeFk;
IF NOT vHasItemPackingType THEN
LEAVE proc;
END IF;
@ -73,15 +79,10 @@ proc: BEGIN
SET s.ticketFk = stm.ticketFk
WHERE stm.ticketFk;
CREATE OR REPLACE TEMPORARY TABLE tmp.ticketIPT(
ticketFk INT,
itemPackingTypeFk VARCHAR(1)
) ENGINE=MEMORY
INSERT INTO tmp.ticketIPT
SELECT ticketFk, itemPackingTypeFk
FROM tSalesToMove
GROUP BY ticketFk
UNION
SELECT vSelf, vOriginalItemPackingTypeFk;
GROUP BY ticketFk;
DROP TEMPORARY TABLE tSalesToMove;
END$$