USE `sakti`;
DROP TRIGGER IF EXISTS `sakti_header_after_update`;
SET @OLDTMP_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_ENGINE_SUBSTITUTION';
DELIMITER //
CREATE TRIGGER `sakti_header_after_update` AFTER UPDATE ON `sakti_header` FOR EACH ROW BEGIN
	IF NEW.FLAG_ADK = 2 THEN
		UPDATE sakti_bast_realisasi SET STATUS = 2 WHERE ID = OLD.BAST_REALISASI;
	END IF;
END//
DELIMITER ;
