refs #7191 message modification
gitea/salix/pipeline/pr-dev This commit looks good Details

This commit is contained in:
Ivan Mas 2024-04-30 14:37:06 +02:00
parent a33cbb0a7c
commit 3167bdcdd0
1 changed files with 3 additions and 3 deletions

View File

@ -15,8 +15,8 @@ BEGIN
SELECT COUNT(*) INTO vTotalBuy
FROM buy
WHERE entryFk = NEW.id;
IF vTotalBuy = 0 THEN
CALL util.throw('The entry cannot be marked as booked if it does not have lines');
IF NOT vTotalBuy THEN
CALL util.throw('Entry must have lines to be marked booked');
END IF;
END IF;
END IF;
@ -26,7 +26,7 @@ BEGIN
IF NOT (NEW.travelFk <=> OLD.travelFk) THEN
IF NEW.travelFk IS NOT NULL AND NOT travel_hasUniqueAwb(NEW.travelFk) THEN
CALL util.throw('The travel is incorrect, there is a different AWB in the associated entries');
CALL util.throw('The travel is incorrect, there is a different AWB in the associated entries');
END IF;
SELECT COUNT(*) > 0 INTO vIsVirtual