|
|
|
#include "accservice.h"
|
|
|
|
#include <define.h>
|
|
|
|
|
|
|
|
QX_REGISTER_CPP_SERVICE(AccService)
|
|
|
|
|
|
|
|
namespace qx {
|
|
|
|
template<> void register_class(QxClass<AccService>& t) {
|
|
|
|
t.setName("AccService");
|
|
|
|
t.id(&AccService::m_id, "id");
|
|
|
|
t.data(&AccService::m_accServiceName, "accServiceName");
|
|
|
|
t.data(&AccService::m_accServiceCode, "accServiceCode");
|
|
|
|
t.data(&AccService::m_price, "price");
|
|
|
|
t.data(&AccService::m_active, "active");
|
|
|
|
t.data(&AccService::m_salePossible, "salePossible");
|
|
|
|
t.data(&AccService::m_serviceType, "serviceType");
|
|
|
|
t.data(&AccService::m_vatType, "vatType");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
AccService::AccService(QObject *parent)
|
|
|
|
:QObject(parent)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
long AccService::id() const
|
|
|
|
{
|
|
|
|
return m_id;
|
|
|
|
}
|
|
|
|
|
|
|
|
void AccService::setId(long id)
|
|
|
|
{
|
|
|
|
m_id = id;
|
|
|
|
}
|
|
|
|
|
|
|
|
QDecDouble AccService::price() const
|
|
|
|
{
|
|
|
|
return QDecDouble((double)m_price / DEC_MULTIPLE);
|
|
|
|
}
|
|
|
|
|
|
|
|
void AccService::setPrice(QDecDouble price)
|
|
|
|
{
|
|
|
|
m_price = price.toDouble() * DEC_MULTIPLE;
|
|
|
|
}
|
|
|
|
bool AccService::active() const
|
|
|
|
{
|
|
|
|
return m_active;
|
|
|
|
}
|
|
|
|
|
|
|
|
void AccService::setActive(bool active)
|
|
|
|
{
|
|
|
|
m_active = active;
|
|
|
|
}
|
|
|
|
bool AccService::salePossible() const
|
|
|
|
{
|
|
|
|
return m_salePossible;
|
|
|
|
}
|
|
|
|
|
|
|
|
void AccService::setSalePossible(bool salePossible)
|
|
|
|
{
|
|
|
|
m_salePossible = salePossible;
|
|
|
|
}
|
|
|
|
AccService::ServiceType AccService::serviceType() const
|
|
|
|
{
|
|
|
|
return m_serviceType;
|
|
|
|
}
|
|
|
|
|
|
|
|
void AccService::setServiceType(const AccService::ServiceType &serviceType)
|
|
|
|
{
|
|
|
|
m_serviceType = serviceType;
|
|
|
|
}
|
|
|
|
|
|
|
|
QString AccService::accServiceName() const
|
|
|
|
{
|
|
|
|
return m_accServiceName;
|
|
|
|
}
|
|
|
|
|
|
|
|
void AccService::setAccServiceName(const QString &accServiceName)
|
|
|
|
{
|
|
|
|
m_accServiceName = accServiceName;
|
|
|
|
}
|
|
|
|
QString AccService::accServiceCode() const
|
|
|
|
{
|
|
|
|
return m_accServiceCode;
|
|
|
|
}
|
|
|
|
|
|
|
|
void AccService::setAccServiceCode(const QString &accServiceCode)
|
|
|
|
{
|
|
|
|
m_accServiceCode = accServiceCode;
|
|
|
|
}
|
|
|
|
Enums::VatType AccService::vatType() const
|
|
|
|
{
|
|
|
|
return m_vatType;
|
|
|
|
}
|
|
|
|
|
|
|
|
void AccService::setVatType(const Enums::VatType &VatType)
|
|
|
|
{
|
|
|
|
m_vatType = VatType;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|