From 30c5e8d8ccd638e57e85f35f55de8f16fe7c1103 Mon Sep 17 00:00:00 2001 From: alexm Date: Tue, 1 Aug 2023 11:11:29 +0200 Subject: [PATCH] hotFix(canBeInvoiced): no de vuelve error si hay mas de un ticket y uno esta a 0 --- modules/ticket/back/methods/ticket/canBeInvoiced.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/ticket/back/methods/ticket/canBeInvoiced.js b/modules/ticket/back/methods/ticket/canBeInvoiced.js index 0f6cb476b..348f02348 100644 --- a/modules/ticket/back/methods/ticket/canBeInvoiced.js +++ b/modules/ticket/back/methods/ticket/canBeInvoiced.js @@ -67,7 +67,7 @@ module.exports = function(Self) { throw new UserError(`This ticket is already invoiced`); const priceZero = ticket.totalWithVat == 0; - if (priceZero) + if (ticketsIds.length == 1 && priceZero) throw new UserError(`A ticket with an amount of zero can't be invoiced`); });