From 8b60dbacfa056cef5c1c16e52564962325dd7b6e Mon Sep 17 00:00:00 2001 From: joan Date: Wed, 16 Feb 2022 09:53:38 +0100 Subject: [PATCH] fix(report): Check ticket property first --- print/templates/reports/invoice/invoice.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/print/templates/reports/invoice/invoice.js b/print/templates/reports/invoice/invoice.js index bd85a812c..c5abfad7e 100755 --- a/print/templates/reports/invoice/invoice.js +++ b/print/templates/reports/invoice/invoice.js @@ -27,7 +27,8 @@ module.exports = { for (let sale of sales) { const ticket = map.get(sale.ticketFk); - ticket.sales.push(sale); + + if (ticket) ticket.sales.push(sale); } this.tickets = tickets;