|
|
|
@ -7,6 +7,7 @@
|
|
|
|
|
|
|
|
|
|
#include <eetcpp.h>
|
|
|
|
|
#include <QEventLoop>
|
|
|
|
|
#include <seasonservice.h>
|
|
|
|
|
|
|
|
|
|
ShopService::ShopService()
|
|
|
|
|
{
|
|
|
|
@ -101,11 +102,7 @@ void ShopService::pay(VoucherPtr voucher)
|
|
|
|
|
Transaction tx;
|
|
|
|
|
NumberSeriesService srvNs;
|
|
|
|
|
|
|
|
|
|
NumberSeriesPtr numSer = srvNs.nextForPlugin("SHOP");
|
|
|
|
|
QString numSerStr;
|
|
|
|
|
numSerStr.sprintf("%s%05d", numSer->prefix().toStdString().c_str(), numSer->lastNumber());
|
|
|
|
|
|
|
|
|
|
voucher->setNumSer(numSerStr);
|
|
|
|
|
voucher->setNumSer(srvNs.nextStrForPlugin("SHOP"));
|
|
|
|
|
voucher->setStatus(Voucher::PAID);
|
|
|
|
|
voucher->setEetStatus(Voucher::EET_FOR_SEND);
|
|
|
|
|
voucher->setPayDateTime(QDateTime::currentDateTime());
|
|
|
|
@ -345,6 +342,10 @@ QDecDouble ShopService::vatRate(Enums::VatType vatType)
|
|
|
|
|
|
|
|
|
|
void ShopService::saveVoucher(VoucherPtr entity)
|
|
|
|
|
{
|
|
|
|
|
SeasonService seasonSrv;
|
|
|
|
|
SeasonPtr season = seasonSrv.active();
|
|
|
|
|
entity->setSeason(season);
|
|
|
|
|
|
|
|
|
|
Transaction tr;
|
|
|
|
|
odb::database *db = Context::instance().db();
|
|
|
|
|
|
|
|
|
|