diff --git a/lib/cashbox-batches.js b/lib/cashbox-batches.js index dfc9d2a6..3375158e 100644 --- a/lib/cashbox-batches.js +++ b/lib/cashbox-batches.js @@ -4,7 +4,7 @@ const _ = require('lodash/fp') const uuid = require('uuid') function createCashboxBatch (deviceId, cashboxCount) { - if (_.isEqual(0, cashboxCount)) throw new Error('Cashbox is empty. Cashbox batch could not be created.') + if (_.isEqual(0, cashboxCount)) throw new Error('Cash box is empty. Cash box batch could not be created.') const sql = `INSERT INTO cashbox_batches (id, device_id, created, operation_type) VALUES ($1, $2, now(), 'cash-box-empty') RETURNING *` const sql2 = ` UPDATE bills SET cashbox_batch_id=$1 @@ -24,7 +24,7 @@ function updateMachineWithBatch (machineContext, oldCashboxCount) { const isCassetteAmountWithinRange = _.inRange(constants.CASH_OUT_MINIMUM_AMOUNT_OF_CASSETTES, constants.CASH_OUT_MAXIMUM_AMOUNT_OF_CASSETTES + 1, _.size(machineContext.cassettes)) if (!isValidContext && !isCassetteAmountWithinRange) throw new Error('Insufficient info to create a new cashbox batch') - if (_.isEqual(0, oldCashboxCount)) throw new Error('Cashbox is empty. Cashbox batch could not be created.') + if (_.isEqual(0, oldCashboxCount)) throw new Error('Cash box is empty. Cash box batch could not be created.') return db.tx(t => { const deviceId = machineContext.deviceId