7837-testToMaster_2432 #2834
|
@ -8,13 +8,16 @@ BEGIN
|
||||||
SET NEW.editorFk = account.myUser_getId();
|
SET NEW.editorFk = account.myUser_getId();
|
||||||
|
|
||||||
IF NOT (NEW.routeFk <=> OLD.routeFk) THEN
|
IF NOT (NEW.routeFk <=> OLD.routeFk) THEN
|
||||||
INSERT IGNORE INTO `vn`.`routeRecalc` (`routeFk`)
|
IF NEW.isSigned THEN
|
||||||
SELECT r.id
|
CALL util.throw('A signed ticket cannot be rerouted');
|
||||||
FROM vn.route r
|
END IF;
|
||||||
WHERE r.isOk = FALSE
|
INSERT IGNORE INTO routeRecalc(routeFk)
|
||||||
AND r.id IN (OLD.routeFk,NEW.routeFk)
|
SELECT id
|
||||||
AND r.created >= util.VN_CURDATE()
|
FROM `route`
|
||||||
GROUP BY r.id;
|
WHERE NOT isOk
|
||||||
|
AND id IN (OLD.routeFk, NEW.routeFk)
|
||||||
|
AND created >= util.VN_CURDATE()
|
||||||
|
GROUP BY id;
|
||||||
END IF;
|
END IF;
|
||||||
|
|
||||||
IF NOT (DATE(NEW.shipped) <=> DATE(OLD.shipped)) THEN
|
IF NOT (DATE(NEW.shipped) <=> DATE(OLD.shipped)) THEN
|
||||||
|
|
Loading…
Reference in New Issue