fix: extra returning on query

This commit is contained in:
Taranto 2023-08-09 18:51:51 +01:00
parent 53f74a1fc3
commit 635bcb9d0e

View file

@ -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