diff --git a/modules/ticket/back/methods/sale-tracking/listSaleTracking.js b/modules/ticket/back/methods/sale-tracking/listSaleTracking.js index c0d63ef62..653703596 100644 --- a/modules/ticket/back/methods/sale-tracking/listSaleTracking.js +++ b/modules/ticket/back/methods/sale-tracking/listSaleTracking.js @@ -48,24 +48,6 @@ module.exports = Self => { const trackings = await Self.rawStmt(stmt, myOptions); - const salesFilter = { - include: [ - { - relation: 'item' - } - ], - where: {ticketFk: filter.where.ticketFk} - }; - - const sales = await Self.app.models.Sale.find(salesFilter, myOptions); - - for (const tracking of trackings) { - for (const sale of sales) { - if (tracking.itemFk == sale.itemFk) - tracking.item = sale.item(); - } - } - return trackings; }; };