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

14 lines
390 B
MySQL
Raw Normal View History

2024-05-16 13:34:45 +00:00
DELIMITER $$
2024-08-20 08:06:10 +00:00
CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`travel_throwAwb`(vSelf INT)
2024-05-16 13:34:45 +00:00
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
2024-05-24 08:21:35 +00:00
CALL util.throw('A different AWB is found in the entries');
END IF;
2024-05-16 13:34:45 +00:00
END$$
DELIMITER ;