feat: restricciones AWB para travel y entry refs #6960
gitea/salix/pipeline/pr-master This commit looks good Details
gitea/salix/pipeline/pr-test There was a failure building this commit Details

This commit is contained in:
Carlos Andrés 2024-03-05 17:30:29 +01:00
parent 292b77d57e
commit 66b7a3e8f5
4 changed files with 5 additions and 5 deletions

View File

@ -8,7 +8,7 @@ BEGIN
SET NEW.currencyFk = entry_getCurrency(NEW.currencyFk, NEW.supplierFk);
SET NEW.commission = entry_getCommission(NEW.travelFk, NEW.currencyFk,NEW.supplierFk);
IF NEW.travelFk IS NOT NULL AND NOT travel_hasUniqueAwb(NEW.travelFk) THEN
CALL util.throw('El travel no es correcto, en las entradas asociadas existe un AWB distinto');
CALL util.throw('The travel is incorrect, there is a different AWB in the associated entries');
END IF;
END$$
DELIMITER ;

View File

@ -12,7 +12,7 @@ BEGIN
IF NOT (NEW.travelFk <=> OLD.travelFk) THEN
IF NEW.travelFk IS NOT NULL AND NOT travel_hasUniqueAwb(NEW.travelFk) THEN
CALL util.throw('El travel no es correcto, en las entradas asociadas existe un AWB distinto');
CALL util.throw('The travel is incorrect, there is a different AWB in the associated entries');
END IF;
SELECT COUNT(*) > 0 INTO vIsVirtual

View File

@ -25,7 +25,7 @@ BEGIN
END IF;
IF (NOT(NEW.awbFk <=> OLD.awbFk)) AND NEW.awbFk IS NOT NULL AND NOT travel_hasUniqueAwb(NEW.id) THEN
CALL util.throw('El AWB no es correcto, en las entradas asociadas existe un AWB distinto');
CALL util.throw('The AWB is incorrect, there is a different AWB in the associated entries');
END IF;
END$$
DELIMITER ;

View File

@ -10,7 +10,7 @@ BEGIN
CALL travel_checkWarehouseIsFeedStock(NEW.warehouseInFk);
IF NEW.awbFk IS NOT NULL AND NOT travel_hasUniqueAwb(NEW.id) THEN
CALL util.throw('El AWB no es correcto, en las entradas asociadas existe un AWB distinto');
CALL util.throw('The AWB is incorrect, there is a different AWB in the associated entries');
END IF;
END$$
DELIMITER ;