Account: set accountData "NumberOfCoinVariants"
This commit is contained in:
parent
7c3bc484af
commit
b39bbcfad5
@ -211,7 +211,13 @@ void ATBDeviceControllerPlugin::private_getAccountData()
|
|||||||
|
|
||||||
accountData.insert("AccountingNumber", QString::number(retVR.AccountingNumber));
|
accountData.insert("AccountingNumber", QString::number(retVR.AccountingNumber));
|
||||||
|
|
||||||
for (uint i = 0; i < sizeof(retVR.coinsInVault); ++i) {
|
int numberOfCoinVariants = sizeof(retVR.coinsInVault);
|
||||||
|
|
||||||
|
// limit numberOfCoinVariants:
|
||||||
|
if (numberOfCoinVariants > 16) { numberOfCoinVariants = 16; }
|
||||||
|
|
||||||
|
accountData.insert("NumberOfCoinVariants", numberOfCoinVariants);
|
||||||
|
for (int i = 0; i < numberOfCoinVariants; ++i) {
|
||||||
accountData.insert("COIN_" + QString::number(i) + "_Quantity", retVR.coinsInVault[i]);
|
accountData.insert("COIN_" + QString::number(i) + "_Quantity", retVR.coinsInVault[i]);
|
||||||
accountData.insert("COIN_" + QString::number(i) + "_Value", retVR.coinDenomination[i]);
|
accountData.insert("COIN_" + QString::number(i) + "_Value", retVR.coinDenomination[i]);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user