Added insert date to voucher items and save date to vouchers. Additional voucher descriptions (name, contact...) are now copied from saved vouchers when load items.
closes #286
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
#include <QDecDouble.hh>
|
||||
#include <odb/core.hxx>
|
||||
#include <QSharedPointer>
|
||||
#include <QDateTime>
|
||||
|
||||
#include <enums.h>
|
||||
|
||||
@@ -16,6 +17,7 @@ class VoucherItem : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
Q_PROPERTY(QDateTime insertDate READ insertDate WRITE setInsertDate)
|
||||
Q_PROPERTY(QString name READ name WRITE setName)
|
||||
Q_PROPERTY(int count READ count WRITE setCount NOTIFY countChanged)
|
||||
Q_PROPERTY(QDecDouble unitPrice READ unitPrice WRITE setUnitPrice)
|
||||
@@ -62,6 +64,9 @@ public:
|
||||
QWeakPointer<Voucher> voucher() const;
|
||||
void setVoucher(const QWeakPointer<Voucher> &voucher);
|
||||
|
||||
QDateTime insertDate() const;
|
||||
void setInsertDate(const QDateTime &insertDate);
|
||||
|
||||
signals:
|
||||
void countChanged(int oldCount);
|
||||
|
||||
@@ -76,6 +81,7 @@ private:
|
||||
int m_priceWitouthVat;
|
||||
int m_price;
|
||||
int m_refId;
|
||||
QDateTime m_insertDate;
|
||||
QString m_itemPlugin;
|
||||
Enums::VatType m_vatType;
|
||||
#pragma db not_null
|
||||
|
||||
Reference in New Issue
Block a user