Merge pull request 'fix: refs #6964 visibleGreaterThanZero' (!3405) from 6964_itemsOLder into master
gitea/salix/pipeline/head This commit looks good Details

Reviewed-on: #3405
Reviewed-by: Carlos Andrés <carlosap@verdnatura.es>
This commit is contained in:
Sergio De la torre 2025-01-31 11:43:41 +00:00
commit 04a65bc1e0
1 changed files with 9 additions and 6 deletions

View File

@ -52,7 +52,9 @@ module.exports = Self => {
JOIN vn.shelving sh ON sh.id = is2.shelvingFk JOIN vn.shelving sh ON sh.id = is2.shelvingFk
LEFT JOIN vn.parking p ON p.id = sh.parkingFk LEFT JOIN vn.parking p ON p.id = sh.parkingFk
LEFT JOIN vn.sector s ON s.id = p.sectorFk LEFT JOIN vn.sector s ON s.id = p.sectorFk
WHERE sh.code = ? AND (? IS NULL OR is2.itemFk = ?) WHERE sh.code = ?
AND (? IS NULL OR is2.itemFk = ?)
AND is2.visible > 0
), ),
itemShelvings AS ( itemShelvings AS (
SELECT is2.itemFk, is2.created, sh.code, p.pickingOrder, p.code AS parkingFk SELECT is2.itemFk, is2.created, sh.code, p.pickingOrder, p.code AS parkingFk
@ -61,6 +63,7 @@ module.exports = Self => {
JOIN vn.shelving sh ON sh.id = is2.shelvingFk AND ai.code <> sh.code JOIN vn.shelving sh ON sh.id = is2.shelvingFk AND ai.code <> sh.code
JOIN vn.parking p ON p.id = sh.parkingFk JOIN vn.parking p ON p.id = sh.parkingFk
JOIN vn.sector s ON s.id = p.sectorFk JOIN vn.sector s ON s.id = p.sectorFk
WHERE is2.visible > 0
), ),
parkingDestiny AS ( parkingDestiny AS (
SELECT ? AS pickingOrder SELECT ? AS pickingOrder