fix: refs #8268 refs#8268 itemShelvingAdd #3509

Open
sergiodt wants to merge 1 commits from 8268_itemShelvingAdd into master
1 changed files with 5 additions and 4 deletions

View File

@ -25,7 +25,7 @@ BEGIN
DECLARE vBuyFk INT;
DECLARE vShelvingFk INT;
SELECT id INTO vBuyFk
SELECT id INTO vBuyFk
FROM buy WHERE id = vBarcode;
SELECT id INTO vShelvingFk
@ -55,7 +55,8 @@ BEGIN
available = available + vQuantity
WHERE shelvingFk = vShelvingFk
AND itemFk = vItemFk
AND packing = vPacking;
AND packing = vPacking
LIMIT 1;
Review

perque un limit , quin es el problema si hi ha varios registres?
perque si fos un problema la solucio es una clau unique

perque un limit , quin es el problema si hi ha varios registres? perque si fos un problema la solucio es una clau unique
ELSE
@ -76,6 +77,6 @@ BEGIN
id
FROM buy b
WHERE id = vBuyFk;
END IF;
END IF;
END$$
DELIMITER ;
DELIMITER ;