8093-devToTest_2442_3 #3100

Merged
alexm merged 284 commits from 8093-devToTest_2442_3 into test 2024-10-15 06:51:43 +00:00
1 changed files with 31 additions and 31 deletions
Showing only changes of commit 6685ade299 - Show all commits

View File

@ -52,13 +52,13 @@ BEGIN
FROM vn.sale s FROM vn.sale s
JOIN vn.ticket t ON t.id = s.ticketFk JOIN vn.ticket t ON t.id = s.ticketFk
LEFT JOIN vn.itemShelvingSale iss ON iss.saleFk = s.id LEFT JOIN vn.itemShelvingSale iss ON iss.saleFk = s.id
WHERE t.shipped BETWEEN CURDATE() AND CURDATE() + INTERVAL vDaysInForward DAY WHERE t.shipped >= CURDATE() + INTERVAL vDaysInForward DAY
AND iss.saleFk IS NULL AND iss.saleFk IS NULL
AND t.warehouseFk = vWarehouseFk AND t.warehouseFk = vWarehouseFk
GROUP BY s.itemFk GROUP BY s.itemFk
) )
SELECT i.id itemFk, SELECT i.id itemFk,
CAST(sd.quantity AS INT) advanceable, LEAST(CAST(sd.quantity AS INT), sk.stock) advanceable,
i.longName, i.longName,
i.subName, i.subName,
i.tag5, i.tag5,