feat: refs #7663 return created invoice ids
gitea/salix/pipeline/pr-dev This commit looks good Details

This commit is contained in:
Jorge Penadés 2024-09-03 17:33:44 +02:00
parent a07582faa4
commit 9797d5e219
1 changed files with 3 additions and 2 deletions

View File

@ -74,9 +74,10 @@ module.exports = Self => {
taxArea == 'WORLD' && client.hasDailyInvoice;
if (tx) await tx.commit();
if (isInvoiceable) await Self.invoiceTicketsAndPdf(ctx, [ticketId]);
let invoiceIds = [];
if (isInvoiceable) invoiceIds = [...await Self.invoiceTicketsAndPdf(ctx, [ticketId])];
return isInvoiceable;
return invoiceIds;
} catch (e) {
if (tx) await tx.rollback();
throw e;