From fbba2e3feacda3e822a6ea35a7148b054dc29736 Mon Sep 17 00:00:00 2001 From: jgallego Date: Mon, 30 Sep 2024 15:52:18 +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();