TYPE=TRIGGERS
triggers='CREATE DEFINER=`root`@`localhost` TRIGGER `DetREtJualRAdd` AFTER INSERT ON `tr_retjualr_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_jualR_d set diretur = ifnull(diretur,0) + new.Jml where nojualR = new.nojual and TransRetail=new.Transjual and ItemJual=new.ItemJual;\nend' 'CREATE DEFINER=`root`@`localhost` TRIGGER `DetREtJualRUpdate` AFTER UPDATE ON `tr_retjualr_d` FOR EACH ROW BEGIN\n  Update tm_StockBrg set stockakhir = ifnull(stockakhir,0) - (old.jml-new.jml) where kodebrg=new.kodebrg and kodeGd= new.KodeGD;\n  update tr_jualR_d set diretur = ifnull(diretur,0) - (new.jml-old.jml) where nojualR=new.nojual and TransRetail=new.Transjual and ItemJual=new.ItemJual;\nend' 'CREATE DEFINER=`root`@`localhost` TRIGGER `DetREtJualRDelete` AFTER DELETE ON `tr_retjualr_d` FOR EACH ROW BEGIN\n  Update tm_StockBrg set stockakhir = ifnull(stockakhir,0) - old.jml \n  where kodebrg=Old.kodebrg and kodeGd= Old.KodeGD;\n  update tr_jualR_d set diretur = ifnull(diretur,0) - Old.Jml\n  where nojualR=Old.nojual and TransRetail=Old.Transjual and ItemJual=Old.ItemJual;\nend'
sql_modes=524288 524288 524288
definers='root@localhost' 'root@localhost' 'root@localhost'
