7691-testToMaster #2703
|
@ -56,15 +56,12 @@ BEGIN
|
||||||
SELECT id INTO vItemShelvingFk
|
SELECT id INTO vItemShelvingFk
|
||||||
FROM itemShelving
|
FROM itemShelving
|
||||||
WHERE id = vItemShelvingFk
|
WHERE id = vItemShelvingFk
|
||||||
AND FALSE
|
|
||||||
FOR UPDATE;
|
FOR UPDATE;
|
||||||
|
|
||||||
UPDATE itemShelving
|
UPDATE itemShelving
|
||||||
SET visible = GREATEST(0, visible - vQuantity)
|
SET visible = GREATEST(0, visible - vQuantity)
|
||||||
WHERE id = vItemShelvingFk;
|
WHERE id = vItemShelvingFk;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
SELECT SUM(IF(isPicked, 0, quantity)), SUM(quantity)
|
SELECT SUM(IF(isPicked, 0, quantity)), SUM(quantity)
|
||||||
INTO vRemainingQuantity, vTotalQuantity
|
INTO vRemainingQuantity, vTotalQuantity
|
||||||
FROM itemShelvingSale
|
FROM itemShelvingSale
|
||||||
|
|
|
@ -6,7 +6,7 @@ BEGIN
|
||||||
|
|
||||||
UPDATE sale s
|
UPDATE sale s
|
||||||
JOIN operator o ON o.workerFk = account.myUser_getId()
|
JOIN operator o ON o.workerFk = account.myUser_getId()
|
||||||
SET s.isPicked = IF(o.isOnReservationMode, isPicked, TRUE)
|
SET s.isPicked = IF(o.isOnReservationMode, s.isPicked, TRUE)
|
||||||
WHERE id = NEW.saleFk;
|
WHERE id = NEW.saleFk;
|
||||||
END$$
|
END$$
|
||||||
DELIMITER ;
|
DELIMITER ;
|
Loading…
Reference in New Issue