TYPE=TRIGGERS
triggers='CREATE DEFINER=`root`@`localhost` TRIGGER `mutasibkAdd` AFTER INSERT ON `tr_mutasibuku` FOR EACH ROW BEGIN\nupdate tm_customer set piutang=ifnull(piutang,0)-new.nilai where kodecust=new.kodecustasal;\nupdate tm_customer set piutang=ifnull(piutang,0)+new.nilai where kodecust=new.kodecusttujuan;\nupdate tr_jual_d set dimutasi=ifnull(dimutasi,0)+new.jml where nojual=new.nojual and itemjual=new.itemjual;\nEND' 'CREATE DEFINER=`root`@`localhost` TRIGGER `mutasibkUpdate` AFTER UPDATE ON `tr_mutasibuku` FOR EACH ROW BEGIN\nupdate tm_customer set piutang=ifnull(piutang,0)+old.nilai where kodecust=old.kodecustasal;\nupdate tm_customer set piutang=ifnull(piutang,0)-old.nilai where kodecust=old.kodecusttujuan;\nupdate tm_customer set piutang=ifnull(piutang,0)-new.nilai where kodecust=new.kodecustasal;\nupdate tm_customer set piutang=ifnull(piutang,0)+new.nilai where kodecust=new.kodecusttujuan;\nupdate tr_jual_d set dimutasi=ifnull(dimutasi,0)+new.jml where nojual=new.nojual and itemjual=new.itemjual;\nupdate tr_jual_d set dimutasi=ifnull(dimutasi,0)-old.jml where nojual=old.nojual and itemjual=old.itemjual;\nEND' 'CREATE DEFINER=`root`@`localhost` TRIGGER `mutasibkDel` AFTER DELETE ON `tr_mutasibuku` FOR EACH ROW BEGIN\nupdate tm_customer set piutang=ifnull(piutang,0)+old.nilai where kodecust=old.kodecustasal;\nupdate tm_customer set piutang=ifnull(piutang,0)-old.nilai where kodecust=old.kodecusttujuan;\nupdate tr_jual_d set dimutasi=ifnull(dimutasi,0)-old.jml where nojual=old.nojual and itemjual=old.itemjual;\nEND'
sql_modes=524288 524288 524288
definers='root@localhost' 'root@localhost' 'root@localhost'
