Account: check account number and read again ...
if wrong account is provided by DC.
This commit is contained in:
parent
a87a4e6c14
commit
232deb9245
@ -27,6 +27,7 @@ ATBDeviceControllerPlugin::ATBDeviceControllerPlugin(QObject *parent)
|
||||
: isMaster(false)
|
||||
, pluginState(PLUGIN_STATE::NOT_INITIALIZED)
|
||||
, eventReceiver(nullptr)
|
||||
, latestAccountNumber(0)
|
||||
{
|
||||
this->setParent(parent);
|
||||
|
||||
@ -477,13 +478,13 @@ void ATBDeviceControllerPlugin::private_startAccount()
|
||||
|
||||
qsort( backupedAccNumbers, nrOfVals, sizeof (uint16_t), Utils::compare );
|
||||
|
||||
uint16_t latestAccountNumber = backupedAccNumbers[nrOfVals-1];
|
||||
this->latestAccountNumber = backupedAccNumbers[nrOfVals-1];
|
||||
|
||||
|
||||
// DEBUG
|
||||
qCritical() << " latestAccountNumber = " << latestAccountNumber;
|
||||
qCritical() << " latestAccountNumber = " << this->latestAccountNumber;
|
||||
|
||||
hw->log_selectVaultRecord(latestAccountNumber);
|
||||
hw->log_selectVaultRecord(this->latestAccountNumber);
|
||||
|
||||
this->accountCheckCounter = 0;
|
||||
QTimer::singleShot(500, this, SLOT(private_checkAccountData()));
|
||||
@ -527,6 +528,14 @@ void ATBDeviceControllerPlugin::private_getAccountData()
|
||||
|
||||
QHash<QString, QVariant> accountData;
|
||||
|
||||
if (this->latestAccountNumber != retVR.AccountingNumber) {
|
||||
// this is the wrong account! -> read again
|
||||
hw->log_selectVaultRecord(this->latestAccountNumber);
|
||||
|
||||
QTimer::singleShot(500, this, SLOT(private_checkAccountData()));
|
||||
return;
|
||||
}
|
||||
|
||||
accountData.insert("AccountingNumber", QString::number(retVR.AccountingNumber));
|
||||
|
||||
|
||||
|
@ -130,6 +130,8 @@ private:
|
||||
// counts failed hw->log_chkIfVaultRecordAvailable()
|
||||
int accountCheckCounter;
|
||||
|
||||
uint16_t latestAccountNumber;
|
||||
|
||||
// counts faild hw->prn-getPrintResult()
|
||||
int printResultCheckCounter;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user