Added sales to people. Print button on Camp wizard is now functional. Added item grids below Camp main grid.

This commit is contained in:
2017-06-08 14:24:33 +02:00
parent e5b33fa973
commit cc6111d09f
15 changed files with 497 additions and 238 deletions
+22
View File
@@ -6,6 +6,8 @@ AddressItem::AddressItem(QObject *parent) : QObject(parent)
m_id = 0;
m_price = 0;
m_owner = false;
m_sale = 0;
m_totalPrice = 0;
}
int AddressItem::id() const
@@ -97,3 +99,23 @@ void AddressItem::setOwner(bool owner)
{
m_owner = owner;
}
QDecDouble AddressItem::totalPrice() const
{
return TO_DEC(m_totalPrice);
}
void AddressItem::setTotalPrice(QDecDouble totalPrice)
{
m_totalPrice = FROM_DEC(totalPrice);
}
QDecDouble AddressItem::sale() const
{
return TO_DEC(m_sale);
}
void AddressItem::setSale(QDecDouble sale)
{
m_sale = FROM_DEC(sale);
}
+10
View File
@@ -20,6 +20,8 @@ class AddressItem : public QObject
Q_PROPERTY(QString lastName READ lastName WRITE setLastName)
Q_PROPERTY(QString address READ address WRITE setAddress)
Q_PROPERTY(QDecDouble price READ price WRITE setPrice)
Q_PROPERTY(QDecDouble sale READ sale WRITE setSale)
Q_PROPERTY(QDecDouble totalPrice READ totalPrice WRITE setTotalPrice)
Q_PROPERTY(bool owner READ owner WRITE setOwner)
public:
@@ -52,6 +54,12 @@ public:
bool owner() const;
void setOwner(bool owner);
QDecDouble totalPrice() const;
void setTotalPrice(QDecDouble totalPrice);
QDecDouble sale() const;
void setSale(QDecDouble sale);
private:
friend class odb::access;
#pragma db id auto
@@ -61,6 +69,8 @@ private:
QString m_address;
AddressbookDataPtr m_adbItem;
int m_price;
int m_totalPrice;
int m_sale;
#pragma db not_null
QWeakPointer<CampData> m_campData;
PersonPricePtr m_personPrice;
+1
View File
@@ -20,6 +20,7 @@ class ServiceItem : public QObject
Q_PROPERTY(QString code READ code WRITE setCode)
Q_PROPERTY(QString description READ description WRITE setDescription)
Q_PROPERTY(QDecDouble price READ price WRITE setPrice)
Q_PROPERTY(QDecDouble fullPrice READ fullPrice WRITE setFullPrice)
Q_PROPERTY(QDecDouble sale READ sale WRITE setSale)
Q_PROPERTY(QDecDouble totalPrice READ totalPrice WRITE setTotalPrice)
Q_PROPERTY(AccService::ServiceType type READ type WRITE setType)