diff --git a/modules/ticket/back/models/sale.js b/modules/ticket/back/models/sale.js index f6ed9c5b5..34668f4ab 100644 --- a/modules/ticket/back/models/sale.js +++ b/modules/ticket/back/models/sale.js @@ -120,7 +120,14 @@ module.exports = Self => { [quantityAdded], ctx.options); - await models.Sale.rawSql(`CALL vn.ticketCalculatePurge()`, null, ctx.options); + await models.Sale.rawSql(` + DROP TEMPORARY TABLE IF EXISTS + tmp.ticketCalculateItem, + tmp.ticketComponentPrice, + tmp.ticketComponent, + tmp.ticketLot, + tmp.zoneGetShipped; + `, null, ctx.options); if (!saleGrouping?.newPrice || saleGrouping.newPrice > instance.price) throw new UserError('The price of the item changed');