From 635bcb9d0e3a28418202503b9369c57d7497579a Mon Sep 17 00:00:00 2001 From: Taranto Date: Wed, 9 Aug 2023 18:51:51 +0100 Subject: [PATCH] fix: extra returning on query --- lib/cashbox-batches.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/cashbox-batches.js b/lib/cashbox-batches.js index b993a786..2775c23d 100644 --- a/lib/cashbox-batches.js +++ b/lib/cashbox-batches.js @@ -6,7 +6,7 @@ const camelize = require('./utils') function createCashboxBatch (deviceId, cashboxCount) { if (_.isEqual(0, cashboxCount)) throw new Error('Cash box is empty. Cash box batch could not be created.') - const sql = `INSERT INTO cash_unit_operation (id, device_id, created, operation_type) VALUES ($1, $2, now(), 'cash-box-empty') RETURNING *` + const sql = `INSERT INTO cash_unit_operation (id, device_id, created, operation_type) VALUES ($1, $2, now(), 'cash-box-empty')` const sql2 = ` UPDATE bills SET cashbox_batch_id=$1 FROM cash_in_txs