salix/db/routines/vn/procedures/travel_throwAWBError.sql

14 lines
439 B
MySQL
Raw Normal View History

2024-05-16 13:34:45 +00:00
DELIMITER $$
CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`travel_throwAWBError`(vSelf INT)
BEGIN
/**
* Throws an error if travel does not have a logical AWB
* or there are several AWBs associated with the same DUA
*
* @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');
END IF;
END$$
DELIMITER ;