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


-- Dumping structure for trigger inventory.material_request_detil_before_insert
DROP TRIGGER IF EXISTS `material_request_detil_before_insert`;
SET @OLDTMP_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_ENGINE_SUBSTITUTION';
DELIMITER //
CREATE TRIGGER `material_request_detil_before_insert` BEFORE INSERT ON `material_request_detil` FOR EACH ROW BEGIN
	IF NEW.JML_RUMUS < 0 THEN
		SET NEW.JML_RUMUS = 0;
	END IF;
END//
DELIMITER ;
