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)
|
: isMaster(false)
|
||||||
, pluginState(PLUGIN_STATE::NOT_INITIALIZED)
|
, pluginState(PLUGIN_STATE::NOT_INITIALIZED)
|
||||||
, eventReceiver(nullptr)
|
, eventReceiver(nullptr)
|
||||||
|
, latestAccountNumber(0)
|
||||||
{
|
{
|
||||||
this->setParent(parent);
|
this->setParent(parent);
|
||||||
|
|
||||||
@ -477,13 +478,13 @@ void ATBDeviceControllerPlugin::private_startAccount()
|
|||||||
|
|
||||||
qsort( backupedAccNumbers, nrOfVals, sizeof (uint16_t), Utils::compare );
|
qsort( backupedAccNumbers, nrOfVals, sizeof (uint16_t), Utils::compare );
|
||||||
|
|
||||||
uint16_t latestAccountNumber = backupedAccNumbers[nrOfVals-1];
|
this->latestAccountNumber = backupedAccNumbers[nrOfVals-1];
|
||||||
|
|
||||||
|
|
||||||
// DEBUG
|
// DEBUG
|
||||||
qCritical() << " latestAccountNumber = " << latestAccountNumber;
|
qCritical() << " latestAccountNumber = " << this->latestAccountNumber;
|
||||||
|
|
||||||
hw->log_selectVaultRecord(latestAccountNumber);
|
hw->log_selectVaultRecord(this->latestAccountNumber);
|
||||||
|
|
||||||
this->accountCheckCounter = 0;
|
this->accountCheckCounter = 0;
|
||||||
QTimer::singleShot(500, this, SLOT(private_checkAccountData()));
|
QTimer::singleShot(500, this, SLOT(private_checkAccountData()));
|
||||||
@ -527,6 +528,14 @@ void ATBDeviceControllerPlugin::private_getAccountData()
|
|||||||
|
|
||||||
QHash<QString, QVariant> accountData;
|
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));
|
accountData.insert("AccountingNumber", QString::number(retVR.AccountingNumber));
|
||||||
|
|
||||||
|
|
||||||
|
@ -130,6 +130,8 @@ private:
|
|||||||
// counts failed hw->log_chkIfVaultRecordAvailable()
|
// counts failed hw->log_chkIfVaultRecordAvailable()
|
||||||
int accountCheckCounter;
|
int accountCheckCounter;
|
||||||
|
|
||||||
|
uint16_t latestAccountNumber;
|
||||||
|
|
||||||
// counts faild hw->prn-getPrintResult()
|
// counts faild hw->prn-getPrintResult()
|
||||||
int printResultCheckCounter;
|
int printResultCheckCounter;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user