TYPE=TRIGGERS
triggers='CREATE DEFINER=`root`@`localhost` TRIGGER `trRetBeliAdd` AFTER INSERT ON `tr_retbeli_m` FOR EACH ROW BEGIN\n  Update tm_Supplier set Hutang =  ifnull(hutang,0) - new.nilai * new.exrate \n  where kodesupp = new.kodesupp;\n  Update tr_beli_m set sisa =  ifnull(sisa,0) - new.nilai * new.exrate \n  where TransBeli = new.TransBeli and NoBeli=New.NoBeli;\nend' 'CREATE DEFINER=`root`@`localhost` TRIGGER `trRetBeliUpdate` AFTER UPDATE ON `tr_retbeli_m` FOR EACH ROW BEGIN\n  Update tm_Supplier set Hutang =  ifnull(hutang,0) +  old.nilai *  Old.exrate \n  where kodesupp = old.kodesupp;\n  \n  Update tm_Supplier set Hutang =  ifnull(hutang,0) -  new.nilai *  new.exrate \n  where kodesupp = new.kodesupp;\n  Update tr_beli_m set sisa =  ifnull(sisa,0) - new.nilai * new.exrate \n  where TransBeli = new.TransBeli and NoBeli=New.NoBeli;\n  Update tr_beli_m set sisa =  ifnull(sisa,0) + old.nilai * old.exrate \n  where TransBeli = old.TransBeli and NoBeli=old.NoBeli;\nend' 'CREATE DEFINER=`root`@`localhost` TRIGGER `trRetBeliDelete` AFTER DELETE ON `tr_retbeli_m` FOR EACH ROW BEGIN\n  Update tm_Supplier set Hutang =  ifnull(hutang,0) + (Old.nilai * Old.exrate) \n  where kodesupp = Old.kodesupp;\n  Update tr_beli_m set sisa =  ifnull(sisa,0) + old.nilai * old.exrate \n  where TransBeli = old.TransBeli and NoBeli=old.NoBeli;\nend'
sql_modes=524288 524288 524288
definers='root@localhost' 'root@localhost' 'root@localhost'
