TYPE=TRIGGERS
triggers='CREATE DEFINER=`root`@`localhost` TRIGGER `DetREtJualAdd` AFTER INSERT ON `tr_retjual_d` FOR EACH ROW BEGIN\n  Update tm_StockBrg set stockakhir = ifnull(stockakhir,0) + new.jml where kodebrg=new.kodebrg and kodeGd= new.KodeGD;\n  update tr_jual_d set diretur = ifnull(diretur,0) + new.Jml  where nojual = new.nojual and TransJual=new.Transjual and ItemJual=new.ItemJual;\nend' 'CREATE DEFINER=`root`@`localhost` TRIGGER `DetREtJualUpdate` AFTER UPDATE ON `tr_retjual_d` FOR EACH ROW BEGIN\n  Update tm_StockBrg set stockakhir = ifnull(stockakhir,0) - Old.jml where kodebrg=Old.kodebrg and kodeGd= Old.KodeGD;\n  Update tm_StockBrg set stockakhir = ifnull(stockakhir,0) + New.jml where kodebrg=New.kodebrg and kodeGd= New.KodeGD;\n  update tr_jual_d set diretur = ifnull(diretur,0) -Old.Jml  where nojual = Old.nojual and TransJual=Old.Transjual and ItemJual=Old.ItemJual;\n  update tr_jual_d set diretur = ifnull(diretur,0) +New.Jml  where nojual = New.nojual and TransJual=New.Transjual and ItemJual=New.ItemJual;\nend' 'CREATE DEFINER=`root`@`localhost` TRIGGER `DetREtJualDelete` AFTER DELETE ON `tr_retjual_d` FOR EACH ROW BEGIN\nUpdate tm_StockBrg set stockakhir = ifnull(stockakhir,0) - Old.jml where kodebrg=Old.kodebrg and kodeGd= Old.KodeGD;\nupdate tr_jual_d set diretur = ifnull(diretur,0) - Old.Jml  where nojual = Old.nojual and TransJual=Old.Transjual and ItemJual=Old.ItemJual;\nend'
sql_modes=524288 524288 524288
definers='root@localhost' 'root@localhost' 'root@localhost'
