salix/db/routines/vn/triggers/receipt_afterInsert.sql

7 lines
215 B
SQL

DELIMITER $$
CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`receipt_afterInsert`
AFTER INSERT ON `receipt`
FOR EACH ROW
CALL clientRisk_update(NEW.clientFk, NEW.companyFk, -NEW.amountPaid)$$
DELIMITER ;