master #2957

Merged
sergiodt merged 4 commits from master into test 2024-09-13 05:39:46 +00:00
2 changed files with 7 additions and 3 deletions
Showing only changes of commit 99761c97e8 - Show all commits

View File

@ -46,7 +46,8 @@ BEGIN
AND buyFk = vBuyFk) THEN AND buyFk = vBuyFk) THEN
UPDATE itemShelving UPDATE itemShelving
SET visible = visible + vQuantity SET visible = visible + vQuantity,
available = available + vQuantity
WHERE shelvingFk COLLATE utf8_unicode_ci = vShelvingFk AND itemFk = vItemFk AND packing = vPacking; WHERE shelvingFk COLLATE utf8_unicode_ci = vShelvingFk AND itemFk = vItemFk AND packing = vPacking;
ELSE ELSE
@ -68,6 +69,6 @@ BEGIN
id id
FROM buy b FROM buy b
WHERE id = vBuyFk; WHERE id = vBuyFk;
END IF; END IF;
END$$ END$$
DELIMITER ; DELIMITER ;

View File

@ -160,7 +160,10 @@ w1: WHILE vQuantity >= vPacking DO
UPDATE sale SET quantity = quantity - vPacking WHERE id = vSaleFk; UPDATE sale SET quantity = quantity - vPacking WHERE id = vSaleFk;
UPDATE itemShelving SET visible = visible - vPacking WHERE id = vItemShelvingFk; UPDATE itemShelving
SET visible = visible - vPacking,
available = available - vPacking
WHERE id = vItemShelvingFk;
SET vNewSaleFk = NULL; SET vNewSaleFk = NULL;