From c260917e20a8a87b65a13823625e4245918609e2 Mon Sep 17 00:00:00 2001 From: joan Date: Fri, 18 Feb 2022 08:49:31 +0100 Subject: [PATCH] fix(closure): removed transaction --- print/methods/closure/closure.js | 4 ---- 1 file changed, 4 deletions(-) diff --git a/print/methods/closure/closure.js b/print/methods/closure/closure.js index 8cce8237c..2b58205e3 100644 --- a/print/methods/closure/closure.js +++ b/print/methods/closure/closure.js @@ -12,8 +12,6 @@ module.exports = { const failedtickets = []; for (const ticket of tickets) { try { - await db.rawSql('START TRANSACTION'); - await db.rawSql(`CALL vn.ticket_closeByTicket(?)`, [ticket.id]); const invoiceOut = await db.findOne(` @@ -91,9 +89,7 @@ module.exports = { const email = new Email('delivery-note-link', args); await email.send(); } - await db.rawSql('COMMIT'); } catch (error) { - await db.rawSql('ROLLBACK'); // Domain not found if (error.responseCode == 450) return invalidEmail(ticket);