Merge pull request #952 from ubavic/fix/backport_cashbox_wizard_fix

fix: backport #898 to the release
This commit is contained in:
Rafael Taranto 2021-11-29 09:52:28 +00:00 committed by GitHub
commit bdc9ac9e8e

View file

@ -26,9 +26,14 @@ const Wizard = ({ machine, cashoutSettings, locale, onClose, save, error }) => {
const isLastStep = step === LAST_STEP
const onContinue = it => {
const cashbox = config?.wasCashboxEmptied === 'YES' ? 0 : machine?.cashbox
if (isLastStep) {
const wasCashboxEmptied = [
config?.wasCashboxEmptied,
it?.wasCashboxEmptied
].includes('YES')
const cashbox = wasCashboxEmptied ? 0 : machine?.cashbox
const { cassette1, cassette2, cassette3, cassette4 } = R.map(parseInt, it)
save(
machine.id,