Merge pull request 'refs #7431 feat: itemPlacementSupplyStockGetTargetList' (!2488) from 7431_itemPlacements into dev
gitea/salix/pipeline/head There was a failure building this commit Details

Reviewed-on: #2488
Reviewed-by: Javi Gallego <jgallego@verdnatura.es>
Reviewed-by: Alex Moreno <alexm@verdnatura.es>
This commit is contained in:
Alex Moreno 2024-05-21 07:53:05 +00:00
commit e1ab0d3051
1 changed files with 4 additions and 3 deletions

View File

@ -18,11 +18,12 @@ BEGIN
JOIN vn.parking p ON p.id = sh.parkingFk
JOIN vn.sector sc ON sc.id = p.sectorFk
JOIN vn.warehouse w ON w.id = sc.warehouseFk
WHERE sc.id = vSectorFk
AND ish.visible > 0
WHERE ish.visible > 0
AND ish.itemFk = vItemFk
GROUP BY ish.id
ORDER BY sh.priority DESC,
ORDER BY
(sc.id = vSectorFk) DESC,
sh.priority DESC,
ish.created,
p.pickingOrder;
END$$