2024-01-15 11:31:03 +00:00
|
|
|
DELIMITER $$
|
|
|
|
CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`ticket_afterUpdate`
|
|
|
|
AFTER UPDATE ON `ticket`
|
|
|
|
FOR EACH ROW
|
|
|
|
BEGIN
|
|
|
|
IF NEW.routeFk <> OLD.routeFk THEN
|
2024-04-08 07:11:40 +00:00
|
|
|
UPDATE expedition
|
2024-01-15 11:31:03 +00:00
|
|
|
SET hasNewRoute = TRUE
|
|
|
|
WHERE ticketFk = NEW.id;
|
2024-05-07 06:00:26 +00:00
|
|
|
|
2024-06-05 11:42:21 +00:00
|
|
|
IF NEW.cmrFk THEN
|
|
|
|
CALL ticket_doCmr(NEW.id);
|
|
|
|
END IF;
|
2024-01-15 11:31:03 +00:00
|
|
|
END IF;
|
|
|
|
END$$
|
|
|
|
DELIMITER ;
|