Format
in package
FinalYes
Number formats for XML: dot as decimal separator, no grouping, no exponent.
Table of Contents
Methods
- amount() : string
- Amounts always with exactly two decimals.
- percent() : string
- Percentages with at least two decimals.
- price() : string
- Prices keep their precision, but at least two decimals.
- quantity() : string
- Quantities without superfluous trailing zeros.
Methods
amount()
Amounts always with exactly two decimals.
public
static amount(Money $money) : string
Parameters
- $money : Money
Return values
stringpercent()
Percentages with at least two decimals.
public
static percent(BigDecimal $percent) : string
Parameters
- $percent : BigDecimal
Return values
stringprice()
Prices keep their precision, but at least two decimals.
public
static price(BigDecimal $price) : string
Parameters
- $price : BigDecimal
Return values
stringquantity()
Quantities without superfluous trailing zeros.
public
static quantity(BigDecimal $quantity) : string
Parameters
- $quantity : BigDecimal