diff --git a/modules/invoiceOut/back/models/invoice-out.js b/modules/invoiceOut/back/models/invoice-out.js index ca77c856f..34b4dc798 100644 --- a/modules/invoiceOut/back/models/invoice-out.js +++ b/modules/invoiceOut/back/models/invoice-out.js @@ -44,6 +44,7 @@ module.exports = Self => { Self.makePdf = async function(id, options) { const fields = ['id', 'hasPdf', 'ref']; const invoiceOut = await Self.findById(id, {fields}, options); + console.log('Recoge invoiceOut?'); const invoiceReport = new print.Report('invoice', { reference: invoiceOut.ref }); diff --git a/modules/ticket/back/methods/sale/refund.js b/modules/ticket/back/methods/sale/refund.js index ba7d71253..5d8297a4e 100644 --- a/modules/ticket/back/methods/sale/refund.js +++ b/modules/ticket/back/methods/sale/refund.js @@ -51,7 +51,7 @@ module.exports = Self => { myOptions ); - if (tx && !options) await tx.commit(); + if (tx) await tx.commit(); return refundsTicket[0]; } catch (e) { diff --git a/modules/ticket/back/methods/ticket/invoiceTickets.js b/modules/ticket/back/methods/ticket/invoiceTickets.js index e65c14e9a..fa3ee93af 100644 --- a/modules/ticket/back/methods/ticket/invoiceTickets.js +++ b/modules/ticket/back/methods/ticket/invoiceTickets.js @@ -79,7 +79,7 @@ module.exports = function(Self) { } if (tx) { for (const invoiceId of invoicesIds) - await models.InvoiceOut.makePdfAndNotify(ctx, invoiceId, null, myOptions); + await models.InvoiceOut.makePdfAndNotify(ctx, invoiceId, null); } return invoicesIds; diff --git a/print/templates/reports/invoice/invoice.js b/print/templates/reports/invoice/invoice.js index 4424c8ea3..b26472b08 100755 --- a/print/templates/reports/invoice/invoice.js +++ b/print/templates/reports/invoice/invoice.js @@ -6,9 +6,7 @@ module.exports = { name: 'invoice', mixins: [vnReport], async serverPrefetch() { - console.log(this.reference); this.invoice = await this.findOneFromDef('invoice', [this.reference]); - console.log(this.invoice); this.checkMainEntity(this.invoice); this.client = await this.findOneFromDef('client', [this.reference]);