You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

93 lines
1.3 KiB
C++

#include "voucheritem.h"
#include <define.h>
VoucherItem::VoucherItem(QObject *parent) : QObject(parent)
{
m_price = 0;
m_unitPrice = 0;
m_count = 0;
m_refId = 0;
m_vatType = Enums::HIGH;
}
int VoucherItem::id() const
{
return m_id;
}
void VoucherItem::setId(int id)
{
m_id = id;
}
QString VoucherItem::name() const
{
return m_name;
}
void VoucherItem::setName(const QString &name)
{
m_name = name;
}
int VoucherItem::count() const
{
return m_count;
}
void VoucherItem::setCount(int count)
{
m_count = count;
emit countChanged();
}
QDecDouble VoucherItem::unitPrice() const
{
return TO_DEC(m_unitPrice);
}
void VoucherItem::setUnitPrice(QDecDouble unitPrice)
{
m_unitPrice = FROM_DEC(unitPrice);
}
QDecDouble VoucherItem::price() const
{
return TO_DEC(m_price);
}
void VoucherItem::setPrice(QDecDouble price)
{
m_price = FROM_DEC(price);
}
int VoucherItem::refId() const
{
return m_refId;
}
void VoucherItem::setRefId(int refId)
{
m_refId = refId;
}
QString VoucherItem::itemPlugin() const
{
return m_itemPlugin;
}
void VoucherItem::setItemPlugin(const QString &itemPlugin)
{
m_itemPlugin = itemPlugin;
}
Enums::VatType VoucherItem::vatType() const
{
return m_vatType;
}
void VoucherItem::setVatType(const Enums::VatType &vatType)
{
m_vatType = vatType;
}