Actualizar db/routines/vn/procedures/item_getSimilar.sql
gitea/salix/pipeline/head This commit looks good Details

This commit is contained in:
Carlos Andrés 2024-10-03 15:19:57 +00:00
parent 197517dfcc
commit c683925403
1 changed files with 4 additions and 4 deletions

View File

@ -44,10 +44,10 @@ BEGIN
stock AS (
SELECT ish.itemFk,
SUM(ish.visible) stock
FROM itemShelving ish
JOIN shelving sh ON sh.`code` = ish.shelvingFk
JOIN parking p ON p.id = sh.parkingFk
JOIN sector s ON s.id = p.sectorFk
FROM vn.itemShelving ish
JOIN vn.shelving sh ON sh.`code` = ish.shelvingFk
JOIN vn.parking p ON p.id = sh.parkingFk
JOIN vn.sector s ON s.id = p.sectorFk
WHERE s.warehouseFk = vWarehouseFk
GROUP BY ish.itemFk
),