feat: previas con sitema de reservas refs #6861 #2176

Merged
carlosap merged 64 commits from 6861-Pasar-modo-trabajo-de-previa-a-reservas into dev 2024-06-25 11:21:03 +00:00
1 changed files with 4 additions and 2 deletions
Showing only changes of commit c2e4e187d6 - Show all commits

View File

@ -70,7 +70,7 @@ BEGIN
FROM itemShelvingSale
WHERE saleFk = vSaleFk;
IF vRemainingQuantity = 0 THEN
IF vRemainingQuantity = 0 AND NOT vIsItemShelvingSaleEmpty THEN
CALL saleTracking_new(
vSaleFk,
TRUE,
@ -89,7 +89,9 @@ BEGIN
COMMIT;

itemShelvingSaleReserve

itemShelvingSaleReserve
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$$
DELIMITER ;