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