Added pay voucher feature. Added dialog with paied vouchers. Added
support for printing receipts on POS printer.
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
#ifndef RECEIPTGENERATOR_H
|
||||
#define RECEIPTGENERATOR_H
|
||||
|
||||
#include "data/voucher.h"
|
||||
#include "settings/shopsettings.h"
|
||||
|
||||
class ReceiptGenerator
|
||||
{
|
||||
public:
|
||||
ReceiptGenerator();
|
||||
|
||||
void setVoucher(const QSharedPointer<Voucher> &voucher);
|
||||
|
||||
void setSettings(const ShopSettingsPtr &settings);
|
||||
|
||||
void save();
|
||||
void print();
|
||||
|
||||
QString outputFile() const;
|
||||
void setOutputFile(const QString &outputFile);
|
||||
|
||||
private:
|
||||
static const QString DIACRITIC;
|
||||
static const QString NON_DIACRITIC;
|
||||
|
||||
QSharedPointer<Voucher> m_voucher;
|
||||
ShopSettingsPtr m_settings;
|
||||
|
||||
QString m_outputFile;
|
||||
|
||||
QByteArray generate();
|
||||
QByteArray prepareString(const QString &str);
|
||||
};
|
||||
|
||||
#endif // RECEIPTGENERATOR_H
|
||||
Reference in New Issue
Block a user