2024-01-15 11:31:03 +00:00
|
|
|
DELIMITER $$
|
2024-08-20 08:06:10 +00:00
|
|
|
CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`travel_checkPackaging`(vSelf INT)
|
2024-01-15 11:31:03 +00:00
|
|
|
BEGIN
|
|
|
|
DECLARE vDone BOOL;
|
|
|
|
DECLARE vEntryFk INT;
|
|
|
|
|
|
|
|
DECLARE cTravelEntries CURSOR FOR
|
|
|
|
SELECT id
|
|
|
|
FROM entry
|
|
|
|
WHERE entry.travelFk = vSelf;
|
|
|
|
|
|
|
|
DECLARE CONTINUE HANDLER FOR NOT FOUND
|
|
|
|
SET vDone = TRUE;
|
|
|
|
|
|
|
|
OPEN cTravelEntries;
|
|
|
|
|
|
|
|
l: LOOP
|
|
|
|
SET vDone = FALSE;
|
|
|
|
FETCH cTravelEntries INTO vEntryFk;
|
|
|
|
|
|
|
|
IF vDone THEN
|
|
|
|
LEAVE l;
|
|
|
|
END IF;
|
|
|
|
|
|
|
|
CALL entry_checkPackaging(vEntryFk);
|
|
|
|
END LOOP;
|
|
|
|
|
|
|
|
CLOSE cTravelEntries;
|
|
|
|
END$$
|
|
|
|
DELIMITER ;
|