test #2958

Merged
sergiodt merged 5 commits from test into dev 2024-09-13 05:41:51 +00:00
2 changed files with 8 additions and 2 deletions
Showing only changes of commit 87182abf7e - 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
@ -55,6 +56,7 @@ BEGIN
itemFk, itemFk,
shelvingFk, shelvingFk,
visible, visible,
available,
grouping, grouping,
packing, packing,
packagingFk, packagingFk,
@ -62,6 +64,7 @@ BEGIN
SELECT vItemFk, SELECT vItemFk,
vShelvingFk, vShelvingFk,
vQuantity, vQuantity,
available,
IFNULL(vGrouping, b.grouping), IFNULL(vGrouping, b.grouping),
IFNULL(vPacking, b.packing), IFNULL(vPacking, b.packing),
IFNULL(vPackagingFk, b.packagingFk), IFNULL(vPackagingFk, b.packagingFk),

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;