Added support for VAT calculations.
This commit is contained in:
+126
-1
@@ -3,7 +3,18 @@
|
||||
|
||||
Voucher::Voucher(QObject *parent) : QObject(parent)
|
||||
{
|
||||
|
||||
m_vatRateHigh = 0;
|
||||
m_vatRateFirstLower = 0;
|
||||
m_vatRateSecondLower = 0;
|
||||
m_priceNoVat = 0;
|
||||
m_priceVatHigh = 0;
|
||||
m_priceVatFirstLower = 0;
|
||||
m_priceVatSecondLower = 0;
|
||||
m_priceWitouthVat = 0;
|
||||
m_totalPriceVatHigh = 0;
|
||||
m_totalPriceVatFirstLower = 0;
|
||||
m_totalPriceVatSecondLower = 0;
|
||||
m_totalPrice = 0;
|
||||
}
|
||||
|
||||
QString Voucher::name() const
|
||||
@@ -83,6 +94,120 @@ void Voucher::clearItems()
|
||||
{
|
||||
m_items.clear();
|
||||
}
|
||||
QDecDouble Voucher::vatRateHigh() const
|
||||
{
|
||||
return TO_DEC(m_vatRateHigh);
|
||||
}
|
||||
|
||||
void Voucher::setVatRateHigh(QDecDouble vatRateHigh)
|
||||
{
|
||||
m_vatRateHigh = FROM_DEC(vatRateHigh);
|
||||
}
|
||||
QDecDouble Voucher::vatRateFirstLower() const
|
||||
{
|
||||
return TO_DEC(m_vatRateFirstLower);
|
||||
}
|
||||
|
||||
void Voucher::setVatRateFirstLower(QDecDouble vatRateFirstLower)
|
||||
{
|
||||
m_vatRateFirstLower = FROM_DEC(vatRateFirstLower);
|
||||
}
|
||||
QDecDouble Voucher::vatRateSecondLower() const
|
||||
{
|
||||
return TO_DEC(m_vatRateSecondLower);
|
||||
}
|
||||
|
||||
void Voucher::setVatRateSecondLower(QDecDouble vatRateSecondLower)
|
||||
{
|
||||
m_vatRateSecondLower = FROM_DEC(vatRateSecondLower);
|
||||
}
|
||||
QDecDouble Voucher::priceVatHigh() const
|
||||
{
|
||||
return TO_DEC(m_priceVatHigh);
|
||||
}
|
||||
|
||||
void Voucher::setPriceVatHigh(QDecDouble priceVatHigh)
|
||||
{
|
||||
m_priceVatHigh = FROM_DEC(priceVatHigh);
|
||||
}
|
||||
QDecDouble Voucher::priceVatFirstLower() const
|
||||
{
|
||||
return TO_DEC(m_priceVatFirstLower);
|
||||
}
|
||||
|
||||
void Voucher::setPriceVatFirstLower(QDecDouble priceVatFirstLower)
|
||||
{
|
||||
m_priceVatFirstLower = FROM_DEC(priceVatFirstLower);
|
||||
}
|
||||
QDecDouble Voucher::priceVatSecondLower() const
|
||||
{
|
||||
return TO_DEC(m_priceVatSecondLower);
|
||||
}
|
||||
|
||||
void Voucher::setPriceVatSecondLower(QDecDouble priceVatSecondLower)
|
||||
{
|
||||
m_priceVatSecondLower = FROM_DEC(priceVatSecondLower);
|
||||
}
|
||||
QDecDouble Voucher::priceNoVat() const
|
||||
{
|
||||
return TO_DEC(m_priceNoVat);
|
||||
}
|
||||
|
||||
void Voucher::setPriceNoVat(QDecDouble priceNoVat)
|
||||
{
|
||||
m_priceNoVat = FROM_DEC(priceNoVat);
|
||||
}
|
||||
QDecDouble Voucher::priceWitouthVat() const
|
||||
{
|
||||
return TO_DEC(m_priceWitouthVat);
|
||||
}
|
||||
|
||||
void Voucher::setPriceWitouthVat(QDecDouble priceWitouthVat)
|
||||
{
|
||||
m_priceWitouthVat = FROM_DEC(priceWitouthVat);
|
||||
}
|
||||
QDecDouble Voucher::totalPriceVatHigh() const
|
||||
{
|
||||
return TO_DEC(m_totalPriceVatHigh);
|
||||
}
|
||||
|
||||
void Voucher::setTotalPriceVatHigh(QDecDouble totalPriceVatHigh)
|
||||
{
|
||||
m_totalPriceVatHigh = FROM_DEC(totalPriceVatHigh);
|
||||
}
|
||||
QDecDouble Voucher::totalPriceVatFirstLower() const
|
||||
{
|
||||
return TO_DEC(m_totalPriceVatFirstLower);
|
||||
}
|
||||
|
||||
void Voucher::setTotalPriceVatFirstLower(QDecDouble totalPriceVatFirstLower)
|
||||
{
|
||||
m_totalPriceVatFirstLower = FROM_DEC(totalPriceVatFirstLower);
|
||||
}
|
||||
QDecDouble Voucher::totalPriceVatSecondLower() const
|
||||
{
|
||||
return TO_DEC(m_totalPriceVatSecondLower);
|
||||
}
|
||||
|
||||
void Voucher::setTotalPriceVatSecondLower(QDecDouble totalPriceVatSecondLower)
|
||||
{
|
||||
m_totalPriceVatSecondLower = FROM_DEC(totalPriceVatSecondLower);
|
||||
}
|
||||
|
||||
QDecDouble Voucher::vatAmountHigh()
|
||||
{
|
||||
return m_totalPriceVatHigh - m_priceVatHigh;
|
||||
}
|
||||
|
||||
QDecDouble Voucher::vatAmountFirstLower()
|
||||
{
|
||||
return m_totalPriceVatFirstLower - m_priceVatFirstLower;
|
||||
}
|
||||
|
||||
QDecDouble Voucher::VatAmountSecondLower()
|
||||
{
|
||||
return m_totalPriceVatSecondLower - m_priceVatSecondLower;
|
||||
}
|
||||
|
||||
int Voucher::id() const
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user