#ifndef SHOPSERVICE_H #define SHOPSERVICE_H #include #include #include #include "data/shop-data.h" #include "ishopitem.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); private: QDecDouble includeVat(QDecDouble price, Enums::VatType vatType); void loadSettings(); QSharedPointer m_gs; QDecDouble vatRate(Enums::VatType vatType); // Service interface public: virtual void save(QSharedPointer entity) override; virtual void update(QSharedPointer entity) override; }; #endif // SHOPSERVICE_H