fix: refs #7779 ticket_splitItemPackingType
gitea/salix/pipeline/head This commit looks good Details

This commit is contained in:
Guillermo Bonet 2024-11-13 09:35:06 +01:00
parent d06be8b5b6
commit 1086981b53
1 changed files with 2 additions and 8 deletions

View File

@ -14,7 +14,7 @@ proc:BEGIN
*/
DECLARE vDone INT DEFAULT FALSE;
DECLARE vHasItemPackingType BOOL;
DECLARE vItemPackingTypeFk INT;
DECLARE vItemPackingTypeFk VARCHAR(1) DEFAULT 'H';
DECLARE vNewTicketFk INT;
DECLARE vItemPackingTypes CURSOR FOR
@ -36,14 +36,10 @@ proc:BEGIN
) ENGINE=MEMORY
SELECT vSelf ticketFk, vOriginalItemPackingTypeFk itemPackingTypeFk;
IF NOT vHasItemPackingType THEN
LEAVE proc;
END IF;
CREATE OR REPLACE TEMPORARY TABLE tSalesToMove (
ticketFk INT,
saleFk INT,
itemPackingTypeFk INT
itemPackingTypeFk VARCHAR(1)
) ENGINE=MEMORY;
INSERT INTO tSalesToMove (saleFk, itemPackingTypeFk)
@ -55,7 +51,6 @@ proc:BEGIN
AND i.itemPackingTypeFk <> vOriginalItemPackingTypeFk;
OPEN vItemPackingTypes;
l: LOOP
SET vDone = FALSE;
FETCH vItemPackingTypes INTO vItemPackingTypeFk;
@ -71,7 +66,6 @@ proc:BEGIN
WHERE itemPackingTypeFk = vItemPackingTypeFk;
END LOOP;
CLOSE vItemPackingTypes;
UPDATE sale s