refs #6969 Error packaging #2124
|
@ -39,11 +39,11 @@ BEGIN
|
||||||
WHERE t.landed BETWEEN vStarted AND vEnded
|
WHERE t.landed BETWEEN vStarted AND vEnded
|
||||||
AND (vWarehouseFk IS NULL OR t.warehouseInFk = vWarehouseFk)
|
AND (vWarehouseFk IS NULL OR t.warehouseInFk = vWarehouseFk)
|
||||||
AND b.price2 > 0
|
AND b.price2 > 0
|
||||||
AND b.quantity > 0
|
|
||||||
ORDER BY NOT b.isIgnored DESC, t.landed DESC, b.id DESC
|
ORDER BY NOT b.isIgnored DESC, t.landed DESC, b.id DESC
|
||||||
LIMIT 10000000000000000000) sub
|
LIMIT 10000000000000000000) sub
|
||||||
GROUP BY itemFk, warehouseFk;
|
GROUP BY itemFk, warehouseFk;
|
||||||
|
|
||||||
|
|
||||||
INSERT IGNORE INTO tmp.buyUltimateFromInterval(itemFk, warehouseFk, buyFk, landed, isIgnored)
|
INSERT IGNORE INTO tmp.buyUltimateFromInterval(itemFk, warehouseFk, buyFk, landed, isIgnored)
|
||||||
SELECT
|
SELECT
|
||||||
b.itemFk,
|
b.itemFk,
|
||||||
|
|
Loading…
Reference in New Issue