2024-01-15 11:31:03 +00:00
|
|
|
DELIMITER $$
|
|
|
|
CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `stock`.`inbound_beforeInsert`
|
|
|
|
BEFORE INSERT ON `inbound`
|
|
|
|
FOR EACH ROW
|
|
|
|
BEGIN
|
|
|
|
SET NEW.isPicked = NEW.isPicked OR NEW.dated < util.VN_CURDATE();
|
2024-04-08 07:11:40 +00:00
|
|
|
|
|
|
|
CALL visible_log(
|
2024-01-15 11:31:03 +00:00
|
|
|
NEW.isPicked,
|
2024-04-08 07:11:40 +00:00
|
|
|
NEW.warehouseFk,
|
|
|
|
NEW.itemFk,
|
|
|
|
NEW.quantity
|
2024-01-15 11:31:03 +00:00
|
|
|
);
|
|
|
|
END$$
|
|
|
|
DELIMITER ;
|