FINERACT-1971 Repayment schedule period - Incorrect values after charge with huge amount
This commit is contained in:
committed by
Adam Saghy
parent
d9414a6e7e
commit
22f7972f60
+5
-1
@@ -269,9 +269,13 @@ public final class MathUtil {
|
||||
|
||||
/** @return sum the values considering null values */
|
||||
public static BigDecimal add(BigDecimal... amounts) {
|
||||
return add(MoneyHelper.getMathContext(), amounts);
|
||||
}
|
||||
|
||||
public static BigDecimal add(MathContext mc, BigDecimal... amounts) {
|
||||
BigDecimal result = null;
|
||||
for (BigDecimal amount : amounts) {
|
||||
result = add(result, amount, MoneyHelper.getMathContext());
|
||||
result = add(result, amount, mc);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
+1
-1
@@ -33,7 +33,7 @@ public class MoneyHelper {
|
||||
|
||||
private static RoundingMode roundingMode = null;
|
||||
private static MathContext mathContext;
|
||||
private static final int PRECISION = 12;
|
||||
public static final int PRECISION = 19;
|
||||
|
||||
private static ConfigurationDomainService staticConfigurationDomainService;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user