#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); public: void saveVoucher(QSharedPointer entity); void updateVoucher(QSharedPointer entity); }; #endif // SHOPSERVICE_H