public class BroadleafCurrencyUtils extends Object
BroadleafCurrency}
Modifier and Type | Field and Description |
---|---|
static MathContext |
ROUND_FLOOR_MATH_CONTEXT |
Constructor and Description |
---|
BroadleafCurrencyUtils() |
Modifier and Type | Method and Description |
---|---|
static int |
calculateRemainder(Money totalAmount,
int quantity)
Returns the remainder amount if the passed in totalAmount was divided by the
quantity taking into account the normal unit of the currency (e.g.
|
static Currency |
getCurrency(BroadleafCurrency currency) |
static Currency |
getCurrency(Money money) |
static Money |
getMoney(BigDecimal amount,
BroadleafCurrency currency) |
static Money |
getMoney(BroadleafCurrency currency) |
static Money |
getUnitAmount(BroadleafCurrency blCurrency)
Returns the unit amount (e.g.
|
static Money |
getUnitAmount(Money difference)
Returns the unit amount (e.g.
|
public static final MathContext ROUND_FLOOR_MATH_CONTEXT
public static Money getMoney(BigDecimal amount, BroadleafCurrency currency)
public static Money getMoney(BroadleafCurrency currency)
public static Currency getCurrency(BroadleafCurrency currency)
public static Money getUnitAmount(Money difference)
currency
- public static Money getUnitAmount(BroadleafCurrency blCurrency)
currency
- public static int calculateRemainder(Money totalAmount, int quantity)
currency
- Copyright © 2014. All rights reserved.