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(),?,?)`;