feat: refs #7880 modify hedera.order_confirmWithUser
gitea/salix/pipeline/pr-dev This commit looks good Details

This commit is contained in:
Ivan Mas 2024-09-22 08:12:59 +02:00
parent ada3fbe019
commit b6420b639c
1 changed files with 10 additions and 0 deletions

View File

@ -111,6 +111,16 @@ BEGIN
CALL util.throw('ORDER_EMPTY');
END IF;
-- Check if any product has a quantity of 0
SELECT COUNT(*) INTO vHasRows
FROM orderRow
WHERE orderFk = vSelf
AND amount = 0;
IF vHasRows THEN
CALL util.throw('Remove lines with quantity = 0 before confirming');
END IF;
-- Crea los tickets del pedido
OPEN vDates;
lDates: LOOP