List of amounts will be sumed up when only it is needed. The reason is that the amount in the list can be changed at anytime.
Definition at line 115 of file amount.h.
typedef std::map<TaxIdVs, TaxAmount*> OSB_LIB::BaseAmount::Taxes |
typedef Taxes::const_iterator OSB_LIB::BaseAmount::TaxesCI |
typedef Taxes::iterator OSB_LIB::BaseAmount::TaxesI |
OSB_LIB::BaseAmount::BaseAmount | ( | const ChargeTraits & | ct, | |
const Date & | dt = Date() | |||
) | [inline] |
virtual OSB_LIB::BaseAmount::~BaseAmount | ( | ) | [pure virtual] |
d'tor.
OSB_LIB::BaseAmount::BaseAmount | ( | const BaseAmount & | rhs | ) |
c'tor III.
virtual bool OSB_LIB::BaseAmount::accumulateTaxes | ( | ) | [pure virtual] |
Accumulate all the tax amount.
Implemented in OSB_LIB::Amount, and OSB_LIB::Subtotal.
void OSB_LIB::BaseAmount::addTax | ( | const TaxAmount & | bta | ) |
Add a new tax element to the Taxes (copy argument).
void OSB_LIB::BaseAmount::deleteTaxes | ( | ) |
Delete all elements from the Taxes.
void OSB_LIB::BaseAmount::gross | ( | MoneyList & | ml | ) | const |
Returns gross amounts (rounded amount + tax) by currency.
void OSB_LIB::BaseAmount::net | ( | MoneyList & | ml | ) | const |
Returns net amounts (rounded amount without tax) by currency.
BaseAmount& OSB_LIB::BaseAmount::operator= | ( | const BaseAmount & | rhs | ) |
c'tor IV.
virtual void OSB_LIB::BaseAmount::precise | ( | MoneyList & | ml | ) | const [pure virtual] |
virtual Date OSB_LIB::BaseAmount::refDate | ( | ) | const [inline, virtual] |
Returns the reference date.
Reimplemented in OSB_LIB::Subtotal.
Definition at line 163 of file amount.h.
References refDate_.
Referenced by OSB_LIB::Subtotal::dateByType().
virtual void OSB_LIB::BaseAmount::rounded | ( | MoneyList & | ml | ) | const [pure virtual] |
void OSB_LIB::BaseAmount::setTaxesReady | ( | bool | flag = true |
) | [inline] |
virtual void OSB_LIB::BaseAmount::setTraits | ( | const ChargeTraits & | ct, | |
const Date & | dt = Date() | |||
) | [virtual] |
Set charge traits.
ct | Charge traits to use. | |
dt | Reference date to use. |
Reimplemented in OSB_LIB::Subtotal.
Referenced by OSB_LIB::Subtotal::setTraits().
Returns the amount of given tax id.
TaxesI OSB_LIB::BaseAmount::taxesBegin | ( | ) | [inline] |
TaxesCI OSB_LIB::BaseAmount::taxesBegin | ( | ) | const [inline] |
TaxesI OSB_LIB::BaseAmount::taxesEnd | ( | ) | [inline] |
TaxesCI OSB_LIB::BaseAmount::taxesEnd | ( | ) | const [inline] |
virtual bool OSB_LIB::BaseAmount::taxesReady | ( | ) | const [inline, virtual] |
Returns taxesReady_. See taxesReady_ definition below.
Reimplemented in OSB_LIB::Subtotal.
Definition at line 159 of file amount.h.
References taxesReady_.
Referenced by OSB_LIB::Amount::accumulateTaxes().
void OSB_LIB::BaseAmount::totalTax | ( | MoneyList & | ml | ) | const |
Returns tax totals by currency if taxesReady_ is true else it returns 0.
virtual ChargeTraits OSB_LIB::BaseAmount::traits | ( | ) | const [inline, virtual] |
Returns the charge traits.
Reimplemented in OSB_LIB::Subtotal.
Definition at line 161 of file amount.h.
References traits_.
Referenced by OSB_LIB::Subtotal::traitsByType().
virtual std::ostream& OSB_LIB::BaseAmount::write | ( | std::ostream & | o | ) | const [pure virtual] |
Implemented in OSB_LIB::Amount, and OSB_LIB::Subtotal.
Date OSB_LIB::BaseAmount::refDate_ [private] |
Taxes OSB_LIB::BaseAmount::taxes_ [private] |
Taxes.
Definition at line 208 of file amount.h.
Referenced by taxesBegin(), taxesEnd(), and taxesFind().
bool OSB_LIB::BaseAmount::taxesReady_ [private] |
Indicates if taxes have been calculated at the amount or subtotal.
For subtotals, this means that the taxes were applied to the subtotal itself, rather than accumulated from its list of amounts.
Definition at line 206 of file amount.h.
Referenced by setTaxesReady(), and taxesReady().
ChargeTraits OSB_LIB::BaseAmount::traits_ [private] |