salix/db/routines/vn/triggers/buy_afterInsert.sql

15 lines
302 B
MySQL
Raw Normal View History

DELIMITER $$
CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`buy_afterInsert`
AFTER INSERT ON `buy`
FOR EACH ROW
trig: BEGIN
IF @isModeInventory OR @isTriggerDisabled THEN
LEAVE trig;
END IF;
CALL stock.log_add('buy', NEW.id, NULL);
CALL buy_afterUpsert(NEW.id);
END$$
DELIMITER ;