If macro EET is not defined EET functions will be hidden.

This commit is contained in:
2023-06-02 15:04:53 +02:00
parent 8b132c6c51
commit 93eb98c10a
8 changed files with 105 additions and 8 deletions
+16 -3
View File
@@ -437,9 +437,7 @@ QList<IShopItemPtr> ShopService::allSellableItems(const QString& category/* = ""
VoucherSum ShopService::unpaidSummary()
{
VoucherSum sum; //= db->query_value<VoucherSum>("status = " + query::_ref((int)Voucher::NOT_PAID));
return sum;
return summary("status = " + QString::number(Voucher::NOT_PAID));
}
VoucherSum ShopService::unsendEET()
@@ -551,3 +549,18 @@ void ShopService::update(VoucherPtr entity, qx::QxSession* pSession) {
}
}
VoucherSum ShopService::salesSummary(QDate date) {
return summary("payDateTime >= '" + date.toString("yyyy-MM-dd") + "'");
}
VoucherSum ShopService::summary(const QString& where) {
auto sums = all(where);
VoucherSum sum(sums.count(), 0);
for (const auto& item : sums) {
sum.addPrice(item->totalPrice());
}
return sum;
}