Price¶
The Price object represents a value of an item in a specific currency according to specific tax value.
classDiagram
direction LR
class Price{
bool isZero
float grossValue
float netValue
float taxValue
string currency
string formatGross
string formatNet
string formatTaxValue
string formatTax
}
It is possible to render the gross value of the price by rendering the object directly.
Properties¶
Attribute name | Type | Description |
---|---|---|
isZero | bool |
Indicates if the price is zero. |
grossValue | float |
The gross value of the price rounded to two decimal places by default. |
netValue | float |
The net value of the price rounded to two decimal places by default. |
taxValue | float |
The tax value of the price rounded to two decimal places by default. It is calculated as follows: price.taxValue = price.grossValue - price.netValue |
currency | string |
The currency iso code of the price. |
tax | null|float |
The tax percentage value. |
formatGross | string |
Formatted value of the gross price. |
formatNet | string |
Formatted value of the net price. |
formatTaxValue | string |
Formatted value of the tax value. |
formatTax | string |
Formatted value of the tax percentage. |