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 BEGIN
DECLARE vIsEuro BOOL; DECLARE vIsEuro BOOL;
SELECT if(`code` = 'EUR', TRUE, FALSE) INTO vIsEuro SELECT `code` = 'EUR' INTO vIsEuro
FROM currency FROM currency
WHERE id = NEW.currencyFk; WHERE id = NEW.currencyFk;

View File

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