From a7ec7302162933fdaa0cd63f4272b90b0e539530 Mon Sep 17 00:00:00 2001 From: gerard Date: Tue, 24 Jul 2018 12:56:07 +0200 Subject: [PATCH] bug with barcodes solved --- services/loopback/common/methods/item/getSummary.js | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/services/loopback/common/methods/item/getSummary.js b/services/loopback/common/methods/item/getSummary.js index 9d64f50a1..a08e02a72 100644 --- a/services/loopback/common/methods/item/getSummary.js +++ b/services/loopback/common/methods/item/getSummary.js @@ -38,6 +38,7 @@ module.exports = Self => { } }, {relation: 'intrastat'}, + {relation: 'itemBarcode'}, {relation: 'expence'}, {relation: 'origin'}, {relation: 'taxes', @@ -85,14 +86,6 @@ module.exports = Self => { }; summary.niches = await Self.app.models.ItemNiche.find(filter); - // Barcodes - filter = { - where: { - itemFk: id - } - }; - summary.barcodes = await Self.app.models.ItemNiche.find(filter); - // Visible Avaible let query = ` CALL vn.getItemVisibleAvailable(?,curdate(),?,?)`;