From ddd6c799dc2e1f949757562e3930ff6e116ec653 Mon Sep 17 00:00:00 2001 From: Javier Segarra Date: Mon, 15 Jul 2024 17:32:14 +0000 Subject: [PATCH 1/2] feat(salix): #7648 Add field for endpoint as buyLabel report --- modules/entry/back/methods/entry/getBuys.js | 35 ++++++++++++++++----- 1 file changed, 28 insertions(+), 7 deletions(-) diff --git a/modules/entry/back/methods/entry/getBuys.js b/modules/entry/back/methods/entry/getBuys.js index 0cb71653e..6635c8038 100644 --- a/modules/entry/back/methods/entry/getBuys.js +++ b/modules/entry/back/methods/entry/getBuys.js @@ -51,6 +51,7 @@ module.exports = Self => { 'stickers', 'packing', 'grouping', + 'packing', 'groupingMode', 'quantity', 'packagingFk', @@ -59,7 +60,8 @@ module.exports = Self => { 'price2', 'price3', 'printedStickers', - 'entryFk' + 'entryFk', + ], include: [{ relation: 'entry', @@ -80,7 +82,9 @@ module.exports = Self => { fields: [ 'id', 'typeFk', + 'stems', 'name', + 'category', 'subName', 'size', 'minPrice', @@ -96,14 +100,31 @@ module.exports = Self => { 'value9', 'tag10', 'value10', - 'groupingMode' + 'groupingMode', + 'inkFk', + 'originFk', + 'producerFk' ], - include: { - relation: 'itemType', - scope: { - fields: ['code', 'description'] + include: [ + { + relation: 'itemType', + scope: { + fields: ['code', 'description'] + } + }, + { + relation: 'origin', + scope: { + fields: ['code'] + } + }, + { + relation: 'producer', + scope: { + fields: ['name'] + } } - } + ] } }] }; From a0be2edc415ecda3e6101e0c7d598c6a19f70359 Mon Sep 17 00:00:00 2001 From: Javier Segarra Date: Mon, 15 Jul 2024 17:33:21 +0000 Subject: [PATCH 2/2] feat(salix): #7648 remove white line --- modules/entry/back/methods/entry/getBuys.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/modules/entry/back/methods/entry/getBuys.js b/modules/entry/back/methods/entry/getBuys.js index 6635c8038..b6809c8c5 100644 --- a/modules/entry/back/methods/entry/getBuys.js +++ b/modules/entry/back/methods/entry/getBuys.js @@ -60,8 +60,7 @@ module.exports = Self => { 'price2', 'price3', 'printedStickers', - 'entryFk', - + 'entryFk' ], include: [{ relation: 'entry',