fix: refs #7834 expeditionScan_Put
gitea/salix/pipeline/pr-master This commit looks good Details

This commit is contained in:
Guillermo Bonet 2024-08-05 12:26:16 +02:00
parent df672a22eb
commit 967443b427
1 changed files with 8 additions and 5 deletions

View File

@ -1,11 +1,14 @@
DELIMITER $$
CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`expeditionScan_Put`(vPalletFk INT, vExpeditionFk INT)
CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`expeditionScan_Put`(
vPalletFk INT,
vExpeditionFk INT
)
BEGIN
REPLACE vn.expeditionScan(expeditionFk, palletFk)
IF (SELECT TRUE FROM expedition WHERE id = vExpeditionFk LIMIT 1) THEN
REPLACE expeditionScan(expeditionFk, palletFk)
VALUES(vExpeditionFk, vPalletFk);
SELECT LAST_INSERT_ID() INTO vPalletFk;
END IF;
END$$
DELIMITER ;