refactor: refs #7936 remove schema
gitea/salix/pipeline/pr-dev This commit looks good Details

This commit is contained in:
Jorge Penadés 2024-12-09 14:03:45 +01:00
parent 7c2c56ed9a
commit f69dfbd5aa
2 changed files with 6 additions and 6 deletions

View File

@ -5,7 +5,7 @@ CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`invoiceIn_afterUpdate`
BEGIN
DECLARE vIsEuro BOOL;
SELECT if(`code` = 'EUR', TRUE, FALSE) INTO vIsEuro
SELECT `code` = 'EUR' INTO vIsEuro
FROM currency
WHERE id = NEW.currencyFk;

View File

@ -2,13 +2,13 @@
DROP TRIGGER IF EXISTS invoiceIn_beforeUpdate;
UPDATE vn.invoiceIn
UPDATE invoiceIn
SET cplusRectificationTypeFk = NULL
WHERE cplusRectificationTypeFk = 1;
DELETE IGNORE FROM vn.cplusRectificationType WHERE id = 1;
DELETE IGNORE FROM cplusRectificationType WHERE id = 1;
UPDATE vn.cplusRectificationType
UPDATE cplusRectificationType
SET id = 1
WHERE id = 3;
@ -25,7 +25,7 @@ BEGIN
SET NEW.editorFk = account.myUser_getId();
IF (SELECT COUNT(*) FROM vn.invoiceIn
IF (SELECT COUNT(*) FROM invoiceIn
WHERE supplierRef = NEW.supplierRef
AND supplierFk = NEW.supplierFk
AND YEAR(issued) = YEAR(NEW.issued)
@ -37,7 +37,7 @@ BEGIN
IF NEW.supplierFk != OLD.supplierFk THEN
CALL supplier_checkIsActive(NEW.supplierFk);
SELECT withholdingSageFk INTO vWithholdingSageFk
FROM vn.supplier
FROM supplier
WHERE id = NEW.supplierFk;
SET NEW.withholdingSageFk = vWithholdingSageFk;
END IF;