Changer: skip polling, if amount due to change is 0
This commit is contained in:
parent
bdb0f9911b
commit
b058b6aee0
@ -1109,6 +1109,20 @@ void ATBDeviceControllerPlugin::onCashChangerState()
|
|||||||
}
|
}
|
||||||
QString amountCoinsChangedString = QString::number(amountCoinsChangedInt);
|
QString amountCoinsChangedString = QString::number(amountCoinsChangedInt);
|
||||||
|
|
||||||
|
// if we do not need to give change:
|
||||||
|
if (amountCoinsChangedInt == 0) {
|
||||||
|
emit this->cashPaymentFinished(nsDeviceControllerInterface::RESULT_STATE::SUCCESS,
|
||||||
|
amountString,
|
||||||
|
amountCoinsString, // coins
|
||||||
|
amountNotesString, // notes
|
||||||
|
amountCoinsChangedString, // change
|
||||||
|
"",
|
||||||
|
"");
|
||||||
|
changerStateRequestCounter = 0;
|
||||||
|
lastChangerResult = 0;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// get changer state ------------------------------------------------
|
// get changer state ------------------------------------------------
|
||||||
// Note: 'returnedAmount'-parameter is missleading here!
|
// Note: 'returnedAmount'-parameter is missleading here!
|
||||||
|
Loading…
Reference in New Issue
Block a user