From 7634d82d8b0f090776e54a62136a5fa75fd81898 Mon Sep 17 00:00:00 2001 From: sergiodt Date: Thu, 28 Mar 2024 07:15:30 +0100 Subject: [PATCH] refs #6964 feat:hasItemOlder --- modules/item/back/methods/item-shelving/hasItemOlder.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/modules/item/back/methods/item-shelving/hasItemOlder.js b/modules/item/back/methods/item-shelving/hasItemOlder.js index 9502cee67..ee4cdc829 100644 --- a/modules/item/back/methods/item-shelving/hasItemOlder.js +++ b/modules/item/back/methods/item-shelving/hasItemOlder.js @@ -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