USE `inventory`;
-- --------------------------------------------------------
-- Versi server:                 8.0.11 - MySQL Community Server - GPL
-- OS Server:                    Win64
-- HeidiSQL Versi:               9.2.0.4947
-- --------------------------------------------------------


-- Dumping structure for trigger inventory.batal_final_penerimaan_barang_after_insert
DROP TRIGGER IF EXISTS `batal_final_penerimaan_barang_after_insert`;
SET @OLDTMP_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_ENGINE_SUBSTITUTION';
DELIMITER //
CREATE TRIGGER `batal_final_penerimaan_barang_after_insert` AFTER INSERT ON `batal_final_penerimaan_barang` FOR EACH ROW BEGIN
	UPDATE penerimaan_barang
	SET STATUS = 1
	WHERE ID = NEW.PENERIMAAN AND STATUS = 2;
END//
DELIMITER ;
