Merge pull request 'refs #6969 Error packaging' (!2124) from 6969-Error_packaging-buyUltimateFromInterval into test
gitea/salix/pipeline/head This commit looks good Details
gitea/salix/pipeline/pr-master This commit looks good Details

Reviewed-on: #2124
Reviewed-by: Javi Gallego <jgallego@verdnatura.es>
Reviewed-by: Carlos Satorres <carlossa@verdnatura.es>
This commit is contained in:
Ivan Mas 2024-03-06 11:54:44 +00:00
commit 19cba0e72a
1 changed files with 1 additions and 1 deletions

View File

@ -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,