fix: cashbox still being used elsewhere

This commit is contained in:
Taranto 2023-08-09 18:23:37 +01:00
parent 13d5860ccb
commit 53f74a1fc3
4 changed files with 8 additions and 20 deletions

View file

@ -27,11 +27,6 @@ function notifyCashboxRemoval (req, res, next) {
logger.info('** DEBUG ** - Cashbox removal - Cashbox reset is set to automatic. A cashbox batch WILL be created')
logger.info('** DEBUG ** - Cashbox removal - Creating new batch...')
return cashbox.createCashboxBatch(req.deviceId, machine.cashUnits.cashbox)
.then(() => {
logger.info(`** DEBUG ** - Cashbox removal - Finished creating the new cashbox batch`)
logger.info(`** DEBUG ** - Cashbox removal - Resetting the cashbox counter on device ${req.deviceId}`)
return setMachine({ deviceId: req.deviceId, action: 'emptyCashInBills' }, operatorId)
})
.then(() => {
logger.info(`** DEBUG ** - Cashbox removal - Process finished`)
return res.status(200).send({ status: 'OK' })