diff --git a/db/routines/vn/triggers/ticket_afterUpdate.sql b/db/routines/vn/triggers/ticket_afterUpdate.sql index 0ce13e0a5..1c0a8be67 100644 --- a/db/routines/vn/triggers/ticket_afterUpdate.sql +++ b/db/routines/vn/triggers/ticket_afterUpdate.sql @@ -8,7 +8,9 @@ BEGIN SET hasNewRoute = TRUE WHERE ticketFk = NEW.id; - CALL ticket_doCmr(NEW.id); + IF NEW.cmrFk THEN + CALL ticket_doCmr(NEW.id); + END IF; END IF; END$$ DELIMITER ;