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'); CALL util.throw ('ORDER_ROW_UNAVAILABLE');
END IF; END IF;
SELECT quantity SELECT quantity INTO vMinQuantity
FROM vn.itemMinimalQuantity FROM vn.itemMinimumQuantity
WHERE itemFk = vItem WHERE itemFk = vItem
AND ( AND (
util.VN_CURDATE() BETWEEN `started` AND `ended` util.VN_CURDATE() BETWEEN `started` AND `ended`

View File

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