2024-01-15 11:31:03 +00:00
|
|
|
DELIMITER $$
|
2024-01-25 16:33:54 +00:00
|
|
|
CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn2008`.`movement_label_afterUpdate`
|
2024-01-15 11:31:03 +00:00
|
|
|
AFTER UPDATE ON `movement_label`
|
|
|
|
FOR EACH ROW
|
|
|
|
IF NEW.stem >= (SELECT Cantidad FROM Movimientos WHERE Id_Movimiento = NEW.Id_Movimiento) THEN
|
|
|
|
UPDATE Movimientos SET OK = 1 WHERE Id_Movimiento = NEW.Id_Movimiento;
|
|
|
|
END IF$$
|
|
|
|
DELIMITER ;
|