hotFix(canBeInvoiced): no de vuelve error si hay mas de un ticket y uno esta a 0
gitea/salix/pipeline/head This commit looks good Details

This commit is contained in:
Alex Moreno 2023-08-01 11:11:29 +02:00
parent 976d8d2f91
commit 30c5e8d8cc
1 changed files with 1 additions and 1 deletions

View File

@ -67,7 +67,7 @@ module.exports = function(Self) {
throw new UserError(`This ticket is already invoiced`); throw new UserError(`This ticket is already invoiced`);
const priceZero = ticket.totalWithVat == 0; 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`); throw new UserError(`A ticket with an amount of zero can't be invoiced`);
}); });