This commit is contained in:
parent
33a4061058
commit
20836d734c
|
@ -13,6 +13,7 @@ BEGIN
|
|||
*/
|
||||
DECLARE vHasRows BOOL;
|
||||
DECLARE vDone BOOL;
|
||||
DECLARE vHas0Amount BOOL;
|
||||
DECLARE vWarehouseFk INT;
|
||||
DECLARE vShipment DATE;
|
||||
DECLARE vShipmentDayEnd DATETIME;
|
||||
|
@ -97,6 +98,20 @@ BEGIN
|
|||
SELECT employeeFk INTO vUserFk FROM orderConfig;
|
||||
END IF;
|
||||
|
||||
CALL orderRow_updateOverstocking(vSelf);
|
||||
|
||||
-- Check if any product has a quantity of 0
|
||||
SELECT EXISTS (
|
||||
SELECT id
|
||||
FROM orderRow
|
||||
WHERE orderFk = vSelf
|
||||
AND amount = 0
|
||||
) INTO vHas0Amount;
|
||||
|
||||
IF vHas0Amount THEN
|
||||
CALL util.throw('Remove lines with quantity = 0 before confirming');
|
||||
END IF;
|
||||
|
||||
START TRANSACTION;
|
||||
|
||||
CALL order_checkEditable(vSelf);
|
||||
|
|
Loading…
Reference in New Issue