Build system changed to Cmake, ORM changed to QxORM, Qt6 compatibility.
This commit is contained in:
+58
-9
@@ -1,6 +1,47 @@
|
||||
#include <data/addressbookdata.h>
|
||||
#include "voucher.h"
|
||||
#include <define.h>
|
||||
|
||||
QX_REGISTER_CPP_SHOP(Voucher)
|
||||
|
||||
namespace qx {
|
||||
template<> void register_class(QxClass<Voucher>& t) {
|
||||
t.setName("Voucher");
|
||||
t.id(&Voucher::m_id, "id");
|
||||
t.data(&Voucher::m_numSer, "numSer");
|
||||
t.data(&Voucher::m_payDateTime, "payDateTime");
|
||||
t.data(&Voucher::m_name, "name");
|
||||
t.data(&Voucher::m_description, "description");
|
||||
t.data(&Voucher::m_vatRateHigh, "vatRateHigh");
|
||||
t.data(&Voucher::m_vatRateFirstLower, "vatRateFirstLower");
|
||||
t.data(&Voucher::m_vatRateSecondLower, "vatRateSecondLower");
|
||||
t.data(&Voucher::m_priceNoVat, "priceNoVat");
|
||||
t.data(&Voucher::m_priceVatHigh, "priceVatHigh");
|
||||
t.data(&Voucher::m_priceVatFirstLower, "priceVatFirstLower");
|
||||
t.data(&Voucher::m_priceVatSecondLower, "priceVatSecondLower");
|
||||
t.data(&Voucher::m_priceWitouthVat, "priceWitouthVat");
|
||||
t.data(&Voucher::m_totalPriceVatHigh, "totalPriceVatHigh");
|
||||
t.data(&Voucher::m_totalPriceVatFirstLower, "totalPriceVatFirstLower");
|
||||
t.data(&Voucher::m_totalPriceVatSecondLower, "totalPriceVatSecondLower");
|
||||
t.data(&Voucher::m_totalPrice, "totalPrice");
|
||||
t.data(&Voucher::m_status, "status");
|
||||
t.data(&Voucher::m_eetStatus, "eetStatus");
|
||||
t.data(&Voucher::m_eetSendDateTime, "eetSendDateTime");
|
||||
t.data(&Voucher::m_eetPkp, "eetPkp");
|
||||
t.data(&Voucher::m_eetBkp, "eetBkp");
|
||||
t.data(&Voucher::m_eetFik, "eetFik");
|
||||
t.data(&Voucher::m_saveDateTime, "saveDateTime");
|
||||
t.data(&Voucher::m_createdBy, "createdBy");
|
||||
t.data(&Voucher::m_created, "created");
|
||||
t.data(&Voucher::m_updatedBy, "updatedBy");
|
||||
t.data(&Voucher::m_updated, "updated");
|
||||
|
||||
t.relationOneToMany(&Voucher::m_items, "voucher", "voucher");
|
||||
t.relationManyToOne(&Voucher::m_season, "season");
|
||||
t.relationManyToOne(&Voucher::m_contact, "contact");
|
||||
}
|
||||
}
|
||||
|
||||
Voucher::Voucher(QObject *parent) : QObject(parent)
|
||||
{
|
||||
m_id = 0;
|
||||
@@ -17,6 +58,7 @@ Voucher::Voucher(QObject *parent) : QObject(parent)
|
||||
m_totalPriceVatSecondLower = 0;
|
||||
m_totalPrice = 0;
|
||||
m_eetStatus = EET_FOR_SEND;
|
||||
m_status = NEW;
|
||||
}
|
||||
|
||||
QString Voucher::name() const
|
||||
@@ -341,20 +383,28 @@ void Voucher::setUpdated(const QDateTime &updated)
|
||||
m_updated = updated;
|
||||
}
|
||||
|
||||
int Voucher::id() const
|
||||
long Voucher::id() const
|
||||
{
|
||||
return m_id;
|
||||
}
|
||||
|
||||
void Voucher::setId(int id)
|
||||
void Voucher::setId(long id)
|
||||
{
|
||||
m_id = id;
|
||||
}
|
||||
|
||||
VoucherSum::VoucherSum()
|
||||
{
|
||||
m_totalPrice = 0;
|
||||
m_count = 0;
|
||||
QStringList Voucher::eagerLoad() {
|
||||
return { "season", "contact" };
|
||||
}
|
||||
|
||||
QX_REGISTER_CPP_SHOP(VoucherSum)
|
||||
|
||||
namespace qx {
|
||||
template<> void register_class(QxClass<VoucherSum>& t) {
|
||||
t.setName("VoucherSum");
|
||||
t.data(&VoucherSum::m_count, "count");
|
||||
t.data(&VoucherSum::m_totalPrice, "totalPrice");
|
||||
}
|
||||
}
|
||||
|
||||
QDecDouble VoucherSum::totalPrice() const
|
||||
@@ -362,7 +412,6 @@ QDecDouble VoucherSum::totalPrice() const
|
||||
return TO_DEC(m_totalPrice);
|
||||
}
|
||||
|
||||
void VoucherSum::setTotalPrice(QDecDouble totalPrice)
|
||||
{
|
||||
m_totalPrice = FROM_DEC(totalPrice);
|
||||
int VoucherSum::count() const {
|
||||
return m_count;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user