From aa2f9985cdde35ec901b5fa76d5d83f0e7434f24 Mon Sep 17 00:00:00 2001 From: Javier Segarra Date: Wed, 20 Nov 2024 14:07:35 +0100 Subject: [PATCH] feat: refs #7134 change index --- modules/supplier/back/methods/supplier/receipts.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/supplier/back/methods/supplier/receipts.js b/modules/supplier/back/methods/supplier/receipts.js index dce9c31d4..474cd256f 100644 --- a/modules/supplier/back/methods/supplier/receipts.js +++ b/modules/supplier/back/methods/supplier/receipts.js @@ -66,7 +66,7 @@ module.exports = Self => { stmts.push(`DROP TEMPORARY TABLE tmp.supplierStatement`); const sql = ParameterizedSQL.join(stmts, ';'); const results = await conn.executeStmt(sql); - const resultsIndex = stmts.length - 1; + const resultsIndex = stmts.length - 2; const result = results[resultsIndex]; return result; };