7299_testToMaster #2411
|
@ -1,5 +1,5 @@
|
||||||
DELIMITER $$
|
DELIMITER $$
|
||||||
CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`invoiceIn_checkBooked`(
|
CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`invoiceIn_checkIsBooked`(
|
||||||
vSelf INT
|
vSelf INT
|
||||||
)
|
)
|
||||||
BEGIN
|
BEGIN
|
|
@ -3,6 +3,6 @@ CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`invoiceInCorrection_b
|
||||||
BEFORE DELETE ON `invoiceInCorrection`
|
BEFORE DELETE ON `invoiceInCorrection`
|
||||||
FOR EACH ROW
|
FOR EACH ROW
|
||||||
BEGIN
|
BEGIN
|
||||||
CALL invoiceIn_checkBooked(OLD.correctingFk);
|
CALL invoiceIn_checkIsBooked(OLD.correctingFk);
|
||||||
END$$
|
END$$
|
||||||
DELIMITER ;
|
DELIMITER ;
|
||||||
|
|
|
@ -3,6 +3,6 @@ CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`invoiceInDueDay_befor
|
||||||
BEFORE DELETE ON `invoiceInDueDay`
|
BEFORE DELETE ON `invoiceInDueDay`
|
||||||
FOR EACH ROW
|
FOR EACH ROW
|
||||||
BEGIN
|
BEGIN
|
||||||
CALL invoiceIn_checkBooked(OLD.id);
|
CALL invoiceIn_checkIsBooked(OLD.id);
|
||||||
END$$
|
END$$
|
||||||
DELIMITER ;
|
DELIMITER ;
|
|
@ -5,7 +5,6 @@ CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`invoiceInDueDay_befor
|
||||||
BEGIN
|
BEGIN
|
||||||
DECLARE vIsNotified BOOLEAN;
|
DECLARE vIsNotified BOOLEAN;
|
||||||
|
|
||||||
CALL invoiceIn_checkBooked(OLD.invoiceInFk);
|
|
||||||
SET NEW.editorFk = account.myUser_getId();
|
SET NEW.editorFk = account.myUser_getId();
|
||||||
|
|
||||||
SELECT isNotified INTO vIsNotified
|
SELECT isNotified INTO vIsNotified
|
||||||
|
|
|
@ -5,6 +5,7 @@ CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`invoiceInDueDay_befor
|
||||||
BEGIN
|
BEGIN
|
||||||
DECLARE vIsNotified BOOLEAN;
|
DECLARE vIsNotified BOOLEAN;
|
||||||
|
|
||||||
|
CALL invoiceIn_checkBooked(OLD.invoiceInFk);
|
||||||
SET NEW.editorFk = account.myUser_getId();
|
SET NEW.editorFk = account.myUser_getId();
|
||||||
|
|
||||||
SELECT isNotified INTO vIsNotified
|
SELECT isNotified INTO vIsNotified
|
||||||
|
|
|
@ -3,6 +3,6 @@ CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`invoiceInIntrastat_be
|
||||||
BEFORE DELETE ON `invoiceInIntrastat`
|
BEFORE DELETE ON `invoiceInIntrastat`
|
||||||
FOR EACH ROW
|
FOR EACH ROW
|
||||||
BEGIN
|
BEGIN
|
||||||
CALL invoiceIn_checkBooked(OLD.invoiceInFk);
|
CALL invoiceIn_checkIsBooked(OLD.invoiceInFk);
|
||||||
END$$
|
END$$
|
||||||
DELIMITER ;
|
DELIMITER ;
|
||||||
|
|
|
@ -3,6 +3,6 @@ CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`invoiceInTax_beforeDe
|
||||||
BEFORE DELETE ON `invoiceInTax`
|
BEFORE DELETE ON `invoiceInTax`
|
||||||
FOR EACH ROW
|
FOR EACH ROW
|
||||||
BEGIN
|
BEGIN
|
||||||
CALL invoiceIn_checkBooked(OLD.invoiceInFk);
|
CALL invoiceIn_checkIsBooked(OLD.invoiceInFk);
|
||||||
END$$
|
END$$
|
||||||
DELIMITER ;
|
DELIMITER ;
|
||||||
|
|
|
@ -3,7 +3,7 @@ CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`invoiceInTax_beforeUp
|
||||||
BEFORE UPDATE ON `invoiceInTax`
|
BEFORE UPDATE ON `invoiceInTax`
|
||||||
FOR EACH ROW
|
FOR EACH ROW
|
||||||
BEGIN
|
BEGIN
|
||||||
CALL invoiceIn_checkBooked(OLD.invoiceInFk);
|
CALL invoiceIn_checkIsBooked(OLD.invoiceInFk);
|
||||||
|
|
||||||
IF NOT (NEW.invoiceInFk <=> OLD.invoiceInFk) THEN
|
IF NOT (NEW.invoiceInFk <=> OLD.invoiceInFk) THEN
|
||||||
CALL invoiceInTax_afterUpsert(NEW.invoiceInFk);
|
CALL invoiceInTax_afterUpsert(NEW.invoiceInFk);
|
||||||
|
|
|
@ -3,7 +3,7 @@ CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`invoiceIn_afterDelete
|
||||||
AFTER DELETE ON `invoiceIn`
|
AFTER DELETE ON `invoiceIn`
|
||||||
FOR EACH ROW
|
FOR EACH ROW
|
||||||
BEGIN
|
BEGIN
|
||||||
CALL invoiceIn_checkBooked(OLD.id);
|
CALL invoiceIn_checkIsBooked(OLD.id);
|
||||||
|
|
||||||
INSERT INTO invoiceInLog
|
INSERT INTO invoiceInLog
|
||||||
SET `action` = 'delete',
|
SET `action` = 'delete',
|
||||||
|
|
|
@ -3,6 +3,7 @@ CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`invoiceIn_afterUpdate
|
||||||
AFTER UPDATE ON `invoiceIn`
|
AFTER UPDATE ON `invoiceIn`
|
||||||
FOR EACH ROW
|
FOR EACH ROW
|
||||||
BEGIN
|
BEGIN
|
||||||
|
CALL invoiceIn_checkIsBooked(OLD.id);
|
||||||
|
|
||||||
IF NEW.issued != OLD.issued
|
IF NEW.issued != OLD.issued
|
||||||
OR NEW.currencyFk != OLD.currencyFk THEN
|
OR NEW.currencyFk != OLD.currencyFk THEN
|
||||||
|
|
Loading…
Reference in New Issue