TYPE=TRIGGERS
triggers='CREATE DEFINER=`root`@`localhost` TRIGGER `DetJualRAdd` AFTER INSERT ON `tr_jualr_d` FOR EACH ROW BEGIN\n  DECLARE vtemp double;\nUPDATE tm_barang SET LimitVoucher = IFNULL(LimitVoucher,0) - IFNULL(new.Voucher,0) WHERE KodeBrg=new.KodeBrg; \n  \n  \nend' 'CREATE DEFINER=`root`@`localhost` TRIGGER `DetJualRUpdate` AFTER UPDATE ON `tr_jualr_d` FOR EACH ROW BEGIN\n DECLARE vtemp double;\nUPDATE tm_barang SET LimitVoucher = IFNULL(LimitVoucher,0) + IFNULL(old.Voucher,0) WHERE KodeBrg=old.KodeBrg;\nUPDATE tm_barang SET LimitVoucher = IFNULL(LimitVoucher,0) - IFNULL(new.Voucher,0) WHERE KodeBrg=new.KodeBrg;\n \n \n \n \nend' 'CREATE DEFINER=`root`@`localhost` TRIGGER `DetJualRDelete` AFTER DELETE ON `tr_jualr_d` FOR EACH ROW BEGIN\nUPDATE tm_barang SET LimitVoucher = IFNULL(LimitVoucher,0) + IFNULL(old.Voucher,0) WHERE KodeBrg=old.KodeBrg;\n \nUpdate tm_stockbrg set Stockakhir =  stockakhir+old.jml \n  where kodebrg=Old.kodebrg and kodeGd= Old.KodeGD;\nend'
sql_modes=524288 1344274432 524288
definers='root@localhost' 'root@localhost' 'root@localhost'
