From 464b3e278afdeba02c321c9a030bd5c7ecdc9c4f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20S=C3=A1?= Date: Wed, 22 Dec 2021 11:20:43 +0000 Subject: [PATCH] refactor: rename 'Cashbox' to 'Cash box' in the batches module --- lib/cashbox-batches.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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