diff --git a/db/routines/vn/procedures/ticket_doCmr.sql b/db/routines/vn/procedures/ticket_doCmr.sql index 40af388c7..2da8464b4 100644 --- a/db/routines/vn/procedures/ticket_doCmr.sql +++ b/db/routines/vn/procedures/ticket_doCmr.sql @@ -69,8 +69,8 @@ BEGIN IF (SELECT EXISTS(SELECT * FROM tTicket)) THEN UPDATE ticket - SET cmrFk = vCurrentCmrFk - WHERE id = LAST_INSERT_ID(); + SET cmrFk = LAST_INSERT_ID() + WHERE id = vSelf; END IF; END IF;