feat: refs #7964 entry_beforeUpdate
gitea/salix/pipeline/pr-dev This commit looks good Details

This commit is contained in:
Robert Ferrús 2024-09-16 12:26:29 +02:00
parent 51cabd06a4
commit 7540526b9b
1 changed files with 4 additions and 1 deletions

View File

@ -71,7 +71,10 @@ BEGIN
SET NEW.currencyFk = entry_getCurrency(NEW.currencyFk, NEW.supplierFk);
END IF;
IF NOT (NEW.travelFk <=> OLD.travelFk) OR NOT (NEW.currencyFk <=> OLD.currencyFk) THEN
IF NOT (NEW.travelFk <=> OLD.travelFk)
OR NOT (NEW.currencyFk <=> OLD.currencyFk)
OR (NEW.supplierFk <=> OLD.supplierFk) THEN
SET NEW.commission = entry_getCommission(NEW.travelFk, NEW.currencyFk, NEW.supplierFk);
END IF;
END$$