This commit is contained in:
parent
02bcfd9be3
commit
61a746c2d8
|
@ -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`
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue