cashInputFinished: return coins/notes/change
This commit is contained in:
parent
96db7be126
commit
d2a0491bba
@ -986,18 +986,32 @@ void ATBDeviceControllerPlugin::onCashPayStopedSuccess()
|
|||||||
// DEBUG
|
// DEBUG
|
||||||
qCritical() << "ATBDeviceControllerPlugin::onCashPayStopedSuccess()";
|
qCritical() << "ATBDeviceControllerPlugin::onCashPayStopedSuccess()";
|
||||||
|
|
||||||
|
// inserted amount
|
||||||
uint32_t amountInt = this->hw->getInsertedAmount();
|
uint32_t amountInt = this->hw->getInsertedAmount();
|
||||||
|
|
||||||
QString amountString = QString::number(amountInt);
|
QString amountString = QString::number(amountInt);
|
||||||
|
|
||||||
|
// inserted coins
|
||||||
|
uint32_t amountCoinsInt = CashUtils::getAmountOfInsertedCoins(this->hw);
|
||||||
|
QString amountCoinsString = QString::number(amountCoinsInt);
|
||||||
|
|
||||||
|
// inserted notes
|
||||||
|
uint32_t amountNotesInt = CashUtils::getAmountOfInsertedNotes(this->hw);
|
||||||
|
QString amountNotesString = QString::number(amountNotesInt);
|
||||||
|
|
||||||
|
// amount due to change
|
||||||
|
uint32_t amountDueToChangeInt = this->cashStartAmountInt - amountInt;
|
||||||
|
QString amountDueToChangeString = QString::number(amountDueToChangeInt);
|
||||||
|
|
||||||
|
|
||||||
|
// DEBUG
|
||||||
qCritical() << " insertedAmount (int) = " << amountInt;
|
qCritical() << " insertedAmount (int) = " << amountInt;
|
||||||
qCritical() << " insertedAmount = " << amountString;
|
qCritical() << " insertedAmount = " << amountString;
|
||||||
|
|
||||||
emit this->cashInputFinished(nsDeviceControllerInterface::RESULT_STATE::SUCCESS,
|
emit this->cashInputFinished(nsDeviceControllerInterface::RESULT_STATE::SUCCESS,
|
||||||
amountString,
|
amountString,
|
||||||
"", // coins
|
amountCoinsString, // coins
|
||||||
"", // notes
|
amountNotesString, // notes
|
||||||
"", // change
|
amountDueToChangeString, // proposed change
|
||||||
"",
|
"",
|
||||||
"");
|
"");
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user