Implemented "EET switch to offline" feature.

This commit is contained in:
2017-02-21 22:15:43 +01:00
parent ec16d90fa4
commit 954f655363
3 changed files with 29 additions and 4 deletions
+13
View File
@@ -12,6 +12,7 @@
#include <QList>
#include <QSharedPointer>
#include <QSortFilterProxyModel>
#include <QMessageBox>
#include "shop-odb.hxx"
@@ -327,7 +328,19 @@ void ShopForm::on_payButton_clicked()
if (!eetRet)
{
QString errMsg = tr("EET communication error.\n");
if (!eetMsg.isEmpty())
{
errMsg += tr("Message from portal: ") + eetMsg + "\n";
}
errMsg += tr("Switch to offline?");
if (srv.isEetOnline() && QMessageBox::question(this, tr("EET error"), errMsg) == QMessageBox::Yes)
{
srv.setEetOnline(false);
}
}
ReceiptGenerator generator;