feat: refs #7704 Fixes
gitea/salix/pipeline/pr-dev There was a failure building this commit Details

This commit is contained in:
Guillermo Bonet 2024-07-11 09:00:07 +02:00
parent 02bcfd9be3
commit 61a746c2d8
2 changed files with 3 additions and 3 deletions

View File

@ -56,8 +56,8 @@ BEGIN
CALL util.throw ('ORDER_ROW_UNAVAILABLE');
END IF;
SELECT quantity
FROM vn.itemMinimalQuantity
SELECT quantity INTO vMinQuantity
FROM vn.itemMinimumQuantity
WHERE itemFk = vItem
AND (
util.VN_CURDATE() BETWEEN `started` AND `ended`

View File

@ -103,7 +103,7 @@ module.exports = Self => {
stmt = new ParameterizedSQL(`
WITH minQuantity AS (
SELECT itemFk, quantity, warehouseFk
FROM vn.itemMinimalQuantity
FROM vn.itemMinimumQuantity
WHERE (util.VN_CURDATE() BETWEEN started AND ended
OR (util.VN_CURDATE() >= started AND ended IS NULL))
GROUP BY itemFk, warehouseFk