If macro EET is not defined EET functions will be hidden.
This commit is contained in:
+16
-3
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user