feat itemShelvingSale refs #6861
gitea/salix/pipeline/pr-dev This commit looks good Details

This commit is contained in:
Sergio De la torre 2024-06-13 14:21:59 +02:00
parent 5340729ead
commit c2e4e187d6
1 changed files with 4 additions and 2 deletions

View File

@ -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 ;