Added dashboard to Shop plugin.
This commit is contained in:
@@ -350,3 +350,19 @@ void Voucher::setId(int id)
|
||||
{
|
||||
m_id = id;
|
||||
}
|
||||
|
||||
VoucherSum::VoucherSum()
|
||||
{
|
||||
m_totalPrice = 0;
|
||||
m_count = 0;
|
||||
}
|
||||
|
||||
QDecDouble VoucherSum::totalPrice() const
|
||||
{
|
||||
return TO_DEC(m_totalPrice);
|
||||
}
|
||||
|
||||
void VoucherSum::setTotalPrice(QDecDouble totalPrice)
|
||||
{
|
||||
m_totalPrice = FROM_DEC(totalPrice);
|
||||
}
|
||||
|
||||
@@ -210,4 +210,18 @@ private:
|
||||
|
||||
typedef QSharedPointer<Voucher> VoucherPtr;
|
||||
|
||||
#pragma db view object(Voucher)
|
||||
struct VoucherSum
|
||||
{
|
||||
VoucherSum();
|
||||
|
||||
QDecDouble totalPrice() const;
|
||||
void setTotalPrice(QDecDouble totalPrice);
|
||||
|
||||
#pragma db column("count(id)")
|
||||
int m_count;
|
||||
#pragma db column("sum(totalPrice)")
|
||||
int m_totalPrice;
|
||||
};
|
||||
|
||||
#endif // VOUCHER_H
|
||||
|
||||
Reference in New Issue
Block a user