fix: refs #7781 leave early before any updates on the proc
gitea/salix/pipeline/pr-master This commit looks good
Details
gitea/salix/pipeline/pr-master This commit looks good
Details
This commit is contained in:
parent
09031822a6
commit
72bab95be1
|
@ -5,7 +5,7 @@ CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`expeditionPallet_bu
|
|||
vWorkerFk INT,
|
||||
OUT vPalletFk INT
|
||||
)
|
||||
BEGIN
|
||||
proc: BEGIN
|
||||
/**
|
||||
* Builds an expedition pallet.
|
||||
*
|
||||
|
@ -56,6 +56,17 @@ BEGIN
|
|||
FROM tExpedition
|
||||
WHERE palletFk;
|
||||
|
||||
IF vExpeditionWithPallet THEN
|
||||
UPDATE arcRead
|
||||
SET error = (
|
||||
SELECT GROUP_CONCAT(expeditionFk SEPARATOR ', ')
|
||||
FROM tExpedition
|
||||
WHERE palletFk
|
||||
)
|
||||
WHERE id = vArcId;
|
||||
LEAVE proc;
|
||||
END IF;
|
||||
|
||||
IF NOT vFreeExpeditionCount THEN
|
||||
CALL util.throw ('NO_FREE_EXPEDITIONS');
|
||||
END IF;
|
||||
|
@ -93,29 +104,19 @@ BEGIN
|
|||
FROM tExpedition
|
||||
WHERE palletFk IS NULL;
|
||||
|
||||
IF vExpeditionWithPallet THEN
|
||||
UPDATE arcRead
|
||||
SET error = (
|
||||
SELECT GROUP_CONCAT(expeditionFk SEPARATOR ', ')
|
||||
FROM tExpedition
|
||||
WHERE palletFk
|
||||
)
|
||||
WHERE id = vArcId;
|
||||
ELSE
|
||||
UPDATE arcRead SET error = NULL WHERE id = vArcId;
|
||||
UPDATE arcRead SET error = NULL WHERE id = vArcId;
|
||||
|
||||
SELECT printerFk INTO vPrinterFk FROM arcRead WHERE id = vArcId;
|
||||
SELECT printerFk INTO vPrinterFk FROM arcRead WHERE id = vArcId;
|
||||
|
||||
CALL report_print(
|
||||
'LabelPalletExpedition',
|
||||
vPrinterFk,
|
||||
account.myUser_getId(),
|
||||
JSON_OBJECT('palletFk', vPalletFk, 'userFk', account.myUser_getId()),
|
||||
'high'
|
||||
);
|
||||
CALL report_print(
|
||||
'LabelPalletExpedition',
|
||||
vPrinterFk,
|
||||
account.myUser_getId(),
|
||||
JSON_OBJECT('palletFk', vPalletFk, 'userFk', account.myUser_getId()),
|
||||
'high'
|
||||
);
|
||||
|
||||
UPDATE expeditionPallet SET isPrint = TRUE WHERE id = vPalletFk;
|
||||
END IF;
|
||||
UPDATE expeditionPallet SET isPrint = TRUE WHERE id = vPalletFk;
|
||||
|
||||
DROP TEMPORARY TABLE tExpedition;
|
||||
END$$
|
||||
|
|
Loading…
Reference in New Issue