refs #7191 check isBooked in entry_BeforeUpdate #2329
|
@ -15,8 +15,8 @@ BEGIN
|
||||||
SELECT COUNT(*) INTO vTotalBuy
|
SELECT COUNT(*) INTO vTotalBuy
|
||||||
FROM buy
|
FROM buy
|
||||||
WHERE entryFk = NEW.id;
|
WHERE entryFk = NEW.id;
|
||||||
IF vTotalBuy = 0 THEN
|
IF NOT vTotalBuy THEN
|
||||||
CALL util.throw('The entry cannot be marked as booked if it does not have lines');
|
CALL util.throw('Entry must have lines to be marked booked');
|
||||||
END IF;
|
END IF;
|
||||||
END IF;
|
END IF;
|
||||||
END IF;
|
END IF;
|
||||||
|
|
Loading…
Reference in New Issue