Implemented EET batch send.

closes #275
This commit is contained in:
2017-02-23 22:50:01 +01:00
parent 954f655363
commit 402535c40c
13 changed files with 324 additions and 16 deletions
+13
View File
@@ -217,6 +217,13 @@ bool ShopService::isEetOnline()
return EetSender::m_online;
}
bool ShopService::isEetEnabled()
{
SettingsService srvSettings("SHOP");
ShopSettingsPtr settings = srvSettings.loadSettings<ShopSettings>();
return settings->eetActive();
}
void ShopService::moveItems(QList<VoucherItemPtr> items, VoucherPtr source, VoucherPtr target)
{
Transaction tx;
@@ -259,6 +266,12 @@ QList<VoucherPtr> ShopService::paiedVouchers()
return all(QString("status = %1").arg(QString::number(Voucher::PAID)));
}
QList<VoucherPtr> ShopService::vouchersForEet()
{
return all(QString("status = %1 AND eetStatus <> %2 AND eetStatus <> %3")
.arg(QString::number(Voucher::PAID), QString::number(Voucher::EET_SENT), QString::number(Voucher::EET_NOT_ENTERING)));
}
QList<ShopItemPtr> ShopService::allSellableItems()
{
QList<QSharedPointer<ShopItem> > items;