public class BroadleafCurrencyUtils
extends java.lang.Object
BroadleafCurrency}| Modifier and Type | Field and Description |
|---|---|
static java.math.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 java.util.Currency |
getCurrency(BroadleafCurrency currency) |
static java.util.Currency |
getCurrency(Money money) |
static Money |
getMoney(java.math.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 java.math.MathContext ROUND_FLOOR_MATH_CONTEXT
public static Money getMoney(java.math.BigDecimal amount, BroadleafCurrency currency)
public static Money getMoney(BroadleafCurrency currency)
public static java.util.Currency getCurrency(Money money)
public static java.util.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 © 2018. All Rights Reserved.