refs #7217 create travel_throwAWBError #2465

Merged
ivanm merged 8 commits from 7217-Unify_errorMessageAWB into dev 2024-05-27 10:34:30 +00:00
5 changed files with 6 additions and 6 deletions
Showing only changes of commit 4bf36f2655 - Show all commits

View File

@ -1,5 +1,5 @@
DELIMITER $$ DELIMITER $$
CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`travel_throwAWBError`(vSelf INT) CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`travel_throwAwb`(vSelf INT)
BEGIN BEGIN
/** /**
* Throws an error if travel does not have a logical AWB * Throws an error if travel does not have a logical AWB
@ -8,7 +8,7 @@ BEGIN
* @param vSelf The travel id * @param vSelf The travel id
*/ */
IF NOT travel_hasUniqueAwb(vSelf) THEN IF NOT travel_hasUniqueAwb(vSelf) THEN
CALL util.throw('The AWB is incorrect, there is a different AWB in the associated entries'); CALL util.throw('The AWB is wrong; a different AWB is in the entries');
END IF; END IF;
END$$ END$$
DELIMITER ; DELIMITER ;

View File

@ -8,7 +8,7 @@ BEGIN
SET NEW.currencyFk = entry_getCurrency(NEW.currencyFk, NEW.supplierFk); SET NEW.currencyFk = entry_getCurrency(NEW.currencyFk, NEW.supplierFk);
SET NEW.commission = entry_getCommission(NEW.travelFk, NEW.currencyFk,NEW.supplierFk); SET NEW.commission = entry_getCommission(NEW.travelFk, NEW.currencyFk,NEW.supplierFk);
IF NEW.travelFk IS NOT NULL THEN IF NEW.travelFk IS NOT NULL THEN
CALL travel_throwAWBError(NEW.travelFk); CALL travel_throwAwb(NEW.travelFk);
END IF; END IF;
END$$ END$$
DELIMITER ; DELIMITER ;

View File

@ -26,7 +26,7 @@ BEGIN
IF NOT (NEW.travelFk <=> OLD.travelFk) THEN IF NOT (NEW.travelFk <=> OLD.travelFk) THEN
IF NEW.travelFk IS NOT NULL THEN IF NEW.travelFk IS NOT NULL THEN
CALL travel_throwAWBError(NEW.travelFk); CALL travel_throwAwb(NEW.travelFk);
END IF; END IF;
SELECT COUNT(*) > 0 INTO vIsVirtual SELECT COUNT(*) > 0 INTO vIsVirtual

View File

@ -10,7 +10,7 @@ BEGIN
CALL travel_checkWarehouseIsFeedStock(NEW.warehouseInFk); CALL travel_checkWarehouseIsFeedStock(NEW.warehouseInFk);
IF NEW.awbFk IS NOT NULL THEN IF NEW.awbFk IS NOT NULL THEN
CALL travel_throwAWBError (NEW.id); CALL travel_throwAwb(NEW.id);
END IF; END IF;
END$$ END$$
DELIMITER ; DELIMITER ;

View File

@ -34,7 +34,7 @@ BEGIN
END IF; END IF;
IF (NOT(NEW.awbFk <=> OLD.awbFk)) AND NEW.awbFk IS NOT NULL THEN IF (NOT(NEW.awbFk <=> OLD.awbFk)) AND NEW.awbFk IS NOT NULL THEN
CALL travel_throwAWBError(NEW.id); CALL travel_throwAwb(NEW.id);
END IF; END IF;
END$$ END$$
DELIMITER ; DELIMITER ;