7953-devToTest_2438 #2942

Merged
alexm merged 199 commits from 7953-devToTest_2438 into test 2024-09-10 07:22:31 +00:00
1 changed files with 8 additions and 7 deletions
Showing only changes of commit 0c4b9dcdae - Show all commits

View File

@ -6,9 +6,10 @@ BEGIN
* *
* @param tmp.buysToCheck(id as INT). * @param tmp.buysToCheck(id as INT).
*/ */
DECLARE hasVolumetricAgency INT; DECLARE vHasVolumetricAgency INT;
DECLARE vItemFk INT;
SELECT a.hasWeightVolumetric INTO hasVolumetricAgency SELECT a.hasWeightVolumetric, i.id INTO vHasVolumetricAgency, vItemFk
FROM entry e FROM entry e
JOIN travel t ON t.id = e.travelFk JOIN travel t ON t.id = e.travelFk
JOIN agencyMode a ON a.id = t.agencyModeFk JOIN agencyMode a ON a.id = t.agencyModeFk
@ -19,10 +20,10 @@ BEGIN
AND a.hasWeightVolumetric AND a.hasWeightVolumetric
LIMIT 1; LIMIT 1;
DROP TEMPORARY TABLE tmp.buysToCheck; DROP TEMPORARY TABLE tmp.buysToCheck;
IF hasVolumetricAgency THEN IF vHasVolumetricAgency THEN
CALL util.throw('Item lacks size/weight in purchase line at agency'); CALL util.throw(CONCAT('Missing size/weight in buy line at agency, item: ', vItemFk));
END IF; END IF;
END$$ END$$
DELIMITER ; DELIMITER ;