refs #7191 check isBooked in entry_BeforeUpdate #2329

Merged
ivanm merged 9 commits from 7191-entry_BeforeUpdate-isBooked into dev 2024-05-03 12:59:13 +00:00
1 changed files with 3 additions and 2 deletions
Showing only changes of commit 30f6a9324d - Show all commits

View File

@ -11,9 +11,10 @@ BEGIN
IF NEW.isBooked = OLD.isBooked THEN
CALL entry_checkBooked(OLD.id);
ELSE
IF NEW.isBooked = 1 THEN
IF NEW.isBooked THEN
SELECT COUNT(*) INTO vTotalBuy
ivanm marked this conversation as resolved Outdated

No es te que mirar sempre que siga TRUE, es deu de mirar sempre que cambie de valor y el nou siga TRUE

No es te que mirar sempre que siga TRUE, es deu de mirar sempre que cambie de valor y el nou siga TRUE
FROM buy WHERE entryFk = NEW.id;
FROM buy
WHERE entryFk = NEW.id;
IF vTotalBuy = 0 THEN
ivanm marked this conversation as resolved Outdated

IF NOT vTotalBuy THEN

IF NOT vTotalBuy THEN
CALL util.throw('The entry cannot be marked as booked if it does not have lines');
ivanm marked this conversation as resolved Outdated

Acortar msg del throw, lo máximo que permite el procedimiento son 55 carácteres

Acortar msg del throw, lo máximo que permite el procedimiento son 55 carácteres
END IF;