refs #6915 test_master24_8 #2067

Merged
alexm merged 561 commits from test_master24_8 into master 2024-02-22 07:31:34 +00:00
1 changed files with 3 additions and 3 deletions
Showing only changes of commit 2db7b608ad - Show all commits

View File

@ -3,11 +3,11 @@ CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`awbInvoiceIn_afterDel
AFTER DELETE ON `awbInvoiceIn` AFTER DELETE ON `awbInvoiceIn`
FOR EACH ROW FOR EACH ROW
BEGIN BEGIN
IF (SELECT COUNT(*) FROM invoiceInTax where invoiceInFk = OLD.invoiceInFk) = 0 IF (NOT(SELECT COUNT(*) FROM invoiceInTax where invoiceInFk = OLD.invoiceInFk))
AND AND
(SELECT COUNT(*) FROM invoiceInDueDay where invoiceInFk = OLD.invoiceInFk) = 0 (NOT(SELECT COUNT(*) FROM invoiceInDueDay where invoiceInFk = OLD.invoiceInFk))
AND AND
(SELECT isBooked FROM invoiceIn WHERE id = OLD.invoiceInFk) = 0 (NOT(SELECT isBooked FROM invoiceIn WHERE id = OLD.invoiceInFk) )
THEN THEN
DELETE FROM invoiceIn WHERE id = OLD.invoiceInFk; DELETE FROM invoiceIn WHERE id = OLD.invoiceInFk;
END IF; END IF;