feat: previas con sitema de reservas refs #6861 #2176
|
@ -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;
|
||||
|
||||
|
||||
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 ;
|
Loading…
Reference in New Issue
itemShelvingSaleReserve