#ifndef SHOPSERVICE_H #define SHOPSERVICE_H #include #include #include #include "data/shop-data.h" #include "shopitem.h" class ShopService : public Service { public: ShopService(); QSharedPointer createVoucher(); void addShopItem(QSharedPointer voucher, QSharedPointer item, int count); void calculate(QSharedPointer voucher); void calculateItem(QSharedPointer item); void loadItems(QSharedPointer voucher); void pay(QSharedPointer voucher); QList > savedVouchers(); QList > tempVouchers(); QList > paiedVouchers(); QList > allSellableItems(); private: QDecDouble includeVat(QDecDouble price, Enums::VatType vatType); void loadSettings(); QSharedPointer m_gs; QDecDouble vatRate(Enums::VatType vatType); public: void saveVoucher(QSharedPointer entity); void updateVoucher(QSharedPointer entity); }; #endif // SHOPSERVICE_H