7806_devToTest_2332 #2801

Merged
alexm merged 126 commits from 7806_devToTest_2330 into test 2024-07-30 06:14:09 +00:00
1 changed files with 10 additions and 7 deletions
Showing only changes of commit 24c85608eb - Show all commits

View File

@ -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