fix(travel): refs #8408 trigger restriction for wrong availabled value
gitea/salix/pipeline/pr-dev There was a failure building this commit Details

Refs: #8408
This commit is contained in:
Pako Natek 2025-01-29 12:12:23 +01:00
parent 0de9c3c172
commit 4e2a6d275a
2 changed files with 8 additions and 0 deletions

View File

@ -16,5 +16,9 @@ BEGIN
IF NEW.awbFk IS NOT NULL THEN
CALL travel_throwAwb(NEW.id);
END IF;
IF NEW.availabled < NEW.landed THEN
CALL util.throw('The travel availabled cannot be earlier than landed');
END IF;
END$$
DELIMITER ;

View File

@ -40,5 +40,9 @@ BEGIN
IF (NOT(NEW.awbFk <=> OLD.awbFk)) AND NEW.awbFk IS NOT NULL THEN
CALL travel_throwAwb(NEW.id);
END IF;
IF NEW.availabled < NEW.landed THEN
CALL util.throw('The travel availabled cannot be earlier than landed');
END IF;
END$$
DELIMITER ;