This commit is contained in:
parent
5340729ead
commit
c2e4e187d6
|
@ -70,7 +70,7 @@ BEGIN
|
||||||
FROM itemShelvingSale
|
FROM itemShelvingSale
|
||||||
WHERE saleFk = vSaleFk;
|
WHERE saleFk = vSaleFk;
|
||||||
|
|
||||||
IF vRemainingQuantity = 0 THEN
|
IF vRemainingQuantity = 0 AND NOT vIsItemShelvingSaleEmpty THEN
|
||||||
CALL saleTracking_new(
|
CALL saleTracking_new(
|
||||||
vSaleFk,
|
vSaleFk,
|
||||||
TRUE,
|
TRUE,
|
||||||
|
@ -89,7 +89,9 @@ BEGIN
|
||||||
COMMIT;
|
COMMIT;
|
||||||
|
|
||||||
IF vIsItemShelvingSaleEmpty AND vQuantity <> vReservedQuantity THEN
|
IF vIsItemShelvingSaleEmpty AND vQuantity <> vReservedQuantity THEN
|
||||||
CALL itemShelvingSale_reallocate(vItemShelvingFk, vQuantity);
|
INSERT INTO itemShelvingSaleReserv (saleFk)
|
||||||
|
SELECT vSaleFk;
|
||||||
|
CALL itemShelvingSale_reallocate(vItemShelvingFk, vItemFk);
|
||||||
END IF;
|
END IF;
|
||||||
END$$
|
END$$
|
||||||
DELIMITER ;
|
DELIMITER ;
|
Loading…
Reference in New Issue