53 lines
1.1 KiB
C++
53 lines
1.1 KiB
C++
#ifndef EETV4REQUEST_H
|
|
#define EETV4REQUEST_H
|
|
|
|
#include <QDateTime>
|
|
#include <QString>
|
|
#include <QStringList>
|
|
#include <QUuid>
|
|
|
|
#include "eetcpp_global.h"
|
|
|
|
class EETCPPSHARED_EXPORT EetV4Amount
|
|
{
|
|
public:
|
|
EetV4Amount() = default;
|
|
|
|
static bool fromString(const QString &value, EetV4Amount *amount, QString *error = nullptr);
|
|
|
|
qint64 cents() const;
|
|
QString toString() const;
|
|
|
|
private:
|
|
explicit EetV4Amount(qint64 cents);
|
|
|
|
qint64 m_cents{0};
|
|
};
|
|
|
|
class EETCPPSHARED_EXPORT EetV4SaleRequest
|
|
{
|
|
public:
|
|
QUuid messageUuid{QUuid::createUuid()};
|
|
QDateTime sentAt;
|
|
QDateTime saleAt;
|
|
bool firstSubmission{true};
|
|
bool verificationMode{false};
|
|
|
|
QString taxpayerEic;
|
|
QString authorizingTaxpayerEic;
|
|
bool multipleTaxpayerAuthorization{false};
|
|
qint32 unitId{0};
|
|
QString cashRegisterId;
|
|
QString receiptNumber;
|
|
EetV4Amount totalSale;
|
|
EetV4Amount intendedSettlement;
|
|
EetV4Amount settlement;
|
|
bool hasIntendedSettlement{false};
|
|
bool hasSettlement{false};
|
|
|
|
bool validate(QStringList *errors = nullptr) const;
|
|
static QString formatDateTime(const QDateTime &dateTime);
|
|
};
|
|
|
|
#endif // EETV4REQUEST_H
|