From 329920389d27259ccf1a7ac4c4a0a3550d18ff6c Mon Sep 17 00:00:00 2001 From: jgallego Date: Mon, 30 Sep 2024 15:49:46 +0200 Subject: [PATCH] fix: option Error --- .../invoiceOut/back/methods/invoiceOut/invoiceClient.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/invoiceOut/back/methods/invoiceOut/invoiceClient.js b/modules/invoiceOut/back/methods/invoiceOut/invoiceClient.js index bf7e7d3cb..2fad1afd8 100644 --- a/modules/invoiceOut/back/methods/invoiceOut/invoiceClient.js +++ b/modules/invoiceOut/back/methods/invoiceOut/invoiceClient.js @@ -64,7 +64,7 @@ module.exports = Self => { try { const client = await models.Client.findById(args.clientId, { fields: ['id', 'hasToInvoiceByAddress'] - }, options); + }, myOptions); if (client.hasToInvoiceByAddress) { await Self.rawSql('CALL ticketToInvoiceByAddress(?, ?, ?, ?)', [ @@ -72,13 +72,13 @@ module.exports = Self => { args.maxShipped, args.addressId, args.companyFk - ], options); + ], myOptions); } else { await Self.rawSql('CALL invoiceFromClient(?, ?, ?)', [ args.maxShipped, client.id, args.companyFk - ], options); + ], myOptions); } const invoiceId = await models.Ticket.makeInvoice( @@ -87,7 +87,7 @@ module.exports = Self => { args.companyFk, args.invoiceDate, null, - options + myOptions ); if (tx) await tx.commit();