diff --git a/db/routines/vn/procedures/travel_throwAWBError.sql b/db/routines/vn/procedures/travel_throwAwb.sql similarity index 67% rename from db/routines/vn/procedures/travel_throwAWBError.sql rename to db/routines/vn/procedures/travel_throwAwb.sql index e01be5335..3123ecbf3 100644 --- a/db/routines/vn/procedures/travel_throwAWBError.sql +++ b/db/routines/vn/procedures/travel_throwAwb.sql @@ -1,5 +1,5 @@ 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 /** * Throws an error if travel does not have a logical AWB @@ -8,7 +8,7 @@ BEGIN * @param vSelf The travel id */ 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$$ DELIMITER ; \ No newline at end of file diff --git a/db/routines/vn/triggers/entry_beforeInsert.sql b/db/routines/vn/triggers/entry_beforeInsert.sql index 6855033cb..17831f1b8 100644 --- a/db/routines/vn/triggers/entry_beforeInsert.sql +++ b/db/routines/vn/triggers/entry_beforeInsert.sql @@ -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 THEN - CALL travel_throwAWBError(NEW.travelFk); + CALL travel_throwAwb(NEW.travelFk); END IF; END$$ DELIMITER ; diff --git a/db/routines/vn/triggers/entry_beforeUpdate.sql b/db/routines/vn/triggers/entry_beforeUpdate.sql index 1ef49f158..e99eb087d 100644 --- a/db/routines/vn/triggers/entry_beforeUpdate.sql +++ b/db/routines/vn/triggers/entry_beforeUpdate.sql @@ -26,7 +26,7 @@ BEGIN IF NOT (NEW.travelFk <=> OLD.travelFk) THEN IF NEW.travelFk IS NOT NULL THEN - CALL travel_throwAWBError(NEW.travelFk); + CALL travel_throwAwb(NEW.travelFk); END IF; SELECT COUNT(*) > 0 INTO vIsVirtual diff --git a/db/routines/vn/triggers/travel_beforeInsert.sql b/db/routines/vn/triggers/travel_beforeInsert.sql index f95dee1ee..e54a5d08b 100644 --- a/db/routines/vn/triggers/travel_beforeInsert.sql +++ b/db/routines/vn/triggers/travel_beforeInsert.sql @@ -10,7 +10,7 @@ BEGIN CALL travel_checkWarehouseIsFeedStock(NEW.warehouseInFk); IF NEW.awbFk IS NOT NULL THEN - CALL travel_throwAWBError (NEW.id); + CALL travel_throwAwb(NEW.id); END IF; END$$ DELIMITER ; diff --git a/db/routines/vn/triggers/travel_beforeUpdate.sql b/db/routines/vn/triggers/travel_beforeUpdate.sql index d5b3e4727..5e64ad5b3 100644 --- a/db/routines/vn/triggers/travel_beforeUpdate.sql +++ b/db/routines/vn/triggers/travel_beforeUpdate.sql @@ -34,7 +34,7 @@ BEGIN END IF; 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$$ DELIMITER ;