From d5693291f033303d9c1156c09c676a9a30bfe5c6 Mon Sep 17 00:00:00 2001 From: pablone Date: Thu, 28 Nov 2024 09:24:02 +0100 Subject: [PATCH] refactor: refs #8004 simplify SQL query by removing redundant aliases --- modules/item/back/methods/item/filter.js | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/modules/item/back/methods/item/filter.js b/modules/item/back/methods/item/filter.js index 54dd975a4..a7fde1e6c 100644 --- a/modules/item/back/methods/item/filter.js +++ b/modules/item/back/methods/item/filter.js @@ -178,17 +178,18 @@ module.exports = Self => { i.isFloramondo, i.recycledPlastic, i.nonRecycledPlastic, - pr.name AS producer, - it.name AS typeName, - it.workerFk AS buyerFk, - u.name AS userName, - ori.code AS origin, - ic.name AS category, + pr.name producer, + it.name typeName, + it.workerFk buyerFk, + u.name userName, + ori.code origin, + ic.name category, i.intrastatFk, - intr.description AS intrastat, + intr.description intrastat, b.grouping, b.packing, - lb.landing AS landed + lb.landing landed, + it.name typeName FROM item i LEFT JOIN itemType it ON it.id = i.typeFk LEFT JOIN itemCategory ic ON ic.id = it.categoryFk