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