ref #5914 tests fixed
gitea/salix/pipeline/head This commit looks good Details

This commit is contained in:
Jorge Penadés 2023-09-21 16:08:55 +02:00
parent ac4aea7d38
commit 82f14e62ad
4 changed files with 3 additions and 4 deletions

View File

@ -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
});

View File

@ -51,7 +51,7 @@ module.exports = Self => {
myOptions
);
if (tx && !options) await tx.commit();
if (tx) await tx.commit();
return refundsTicket[0];
} catch (e) {

View File

@ -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;

View File

@ -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]);