fix: update available refresh procedure to correctly handle date comparisons
gitea/salix/pipeline/pr-test There was a failure building this commit
Details
gitea/salix/pipeline/pr-test There was a failure building this commit
Details
This commit is contained in:
parent
7ec29d1972
commit
00fd11e50c
|
@ -92,8 +92,7 @@ proc: BEGIN
|
|||
SELECT i.itemFk, IFNULL(i.availabled, i.landed), i.quantity
|
||||
FROM vn.itemEntryIn i
|
||||
JOIN itemRange ir ON ir.itemFk = i.itemFk
|
||||
WHERE IFNULL(i.availabled, i.landed) >= vStartDate
|
||||
AND IFNULL(i.availabled, i.landed) <= vAvailabled
|
||||
WHERE IFNULL(i.availabled, CAST(i.landed AS DATETIME)) >= vAvailabled
|
||||
AND (ir.ended IS NULL OR IFNULL(i.availabled, i.landed) <= ir.ended)
|
||||
AND i.warehouseInFk = vWarehouse
|
||||
UNION ALL
|
||||
|
|
Loading…
Reference in New Issue