refs #6964 feat:hasItemOlder
gitea/salix/pipeline/pr-dev This commit looks good Details

This commit is contained in:
Sergio De la torre 2024-03-28 07:15:30 +01:00
parent 9240732c00
commit 7634d82d8b
1 changed files with 1 additions and 2 deletions

View File

@ -46,10 +46,9 @@ module.exports = Self => {
SELECT COUNT(ish.id) countItemOlder
FROM vn.itemShelving ish
JOIN (
SELECT ish.itemFk, created,shelvingFk, p.code
SELECT ish.itemFk, created,shelvingFk
FROM vn.itemShelving ish
JOIN vn.shelving s ON ish.shelvingFk = s.code
LEFT JOIN vn.parking p ON p.id = s.parkingFk
WHERE ish.shelvingFk = ?
)sub ON sub.itemFK = ish.itemFk
JOIN vn.shelving s ON s.code = ish.shelvingFk