salix/db/routines/vn/triggers/travel_beforeInsert.sql

13 lines
313 B
MySQL
Raw Normal View History

DELIMITER $$
CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`travel_beforeInsert`
BEFORE INSERT ON `travel`
FOR EACH ROW
BEGIN
SET NEW.editorFk = account.myUser_getId();
CALL travel_checkDates(NEW.shipped, NEW.landed);
2024-01-25 16:33:54 +00:00
CALL travel_checkWarehouseIsFeedStock(NEW.warehouseInFk);
END$$
DELIMITER ;