2024-01-15 11:31:03 +00:00
|
|
|
DELIMITER $$
|
|
|
|
CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`invoiceInTax_beforeUpdate`
|
|
|
|
BEFORE UPDATE ON `invoiceInTax`
|
|
|
|
FOR EACH ROW
|
|
|
|
BEGIN
|
2024-04-16 06:44:50 +00:00
|
|
|
CALL invoiceIn_checkBooked(OLD.invoiceInFk);
|
2024-04-04 13:04:23 +00:00
|
|
|
|
2024-01-15 11:31:03 +00:00
|
|
|
IF NOT (NEW.invoiceInFk <=> OLD.invoiceInFk) THEN
|
|
|
|
CALL invoiceInTax_afterUpsert(NEW.invoiceInFk);
|
|
|
|
END IF;
|
|
|
|
|
|
|
|
SET NEW.editorFk = account.myUser_getId();
|
|
|
|
END$$
|
|
|
|
DELIMITER ;
|