MIFOSX-411: fix interest period determination for annual posting periods.
This commit is contained in:
+1
-1
@@ -183,7 +183,7 @@ public class SavingsAccountDataValidator {
|
|||||||
|
|
||||||
if (this.fromApiJsonHelper.parameterExists(annualFeeAmountParamName, element)) {
|
if (this.fromApiJsonHelper.parameterExists(annualFeeAmountParamName, element)) {
|
||||||
final BigDecimal annualFeeAmount = fromApiJsonHelper.extractBigDecimalWithLocaleNamed(annualFeeAmountParamName, element);
|
final BigDecimal annualFeeAmount = fromApiJsonHelper.extractBigDecimalWithLocaleNamed(annualFeeAmountParamName, element);
|
||||||
baseDataValidator.reset().parameter(annualFeeAmountParamName).value(annualFeeAmount).notNull().positiveAmount();
|
baseDataValidator.reset().parameter(annualFeeAmountParamName).value(annualFeeAmount).positiveAmount();
|
||||||
|
|
||||||
if (annualFeeAmount != null) {
|
if (annualFeeAmount != null) {
|
||||||
MonthDay monthDayOfAnnualFee = fromApiJsonHelper.extractMonthDayNamed(annualFeeOnMonthDayParamName, element);
|
MonthDay monthDayOfAnnualFee = fromApiJsonHelper.extractMonthDayNamed(annualFeeOnMonthDayParamName, element);
|
||||||
|
|||||||
+3
-3
@@ -621,7 +621,7 @@ public class SavingsAccount extends AbstractPersistable<Long> {
|
|||||||
break;
|
break;
|
||||||
case ANNUAL:
|
case ANNUAL:
|
||||||
periodEndDate = periodStartDate.monthOfYear().withMaximumValue();
|
periodEndDate = periodStartDate.monthOfYear().withMaximumValue();
|
||||||
periodEndDate = periodStartDate.dayOfMonth().withMaximumValue();
|
periodEndDate = periodEndDate.dayOfMonth().withMaximumValue();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -680,11 +680,11 @@ public class SavingsAccount extends AbstractPersistable<Long> {
|
|||||||
break;
|
break;
|
||||||
case ANNUAL:
|
case ANNUAL:
|
||||||
periodEndDate = periodStartDate.monthOfYear().withMaximumValue();
|
periodEndDate = periodStartDate.monthOfYear().withMaximumValue();
|
||||||
periodEndDate = periodStartDate.dayOfMonth().withMaximumValue();
|
periodEndDate = periodEndDate.dayOfMonth().withMaximumValue();
|
||||||
break;
|
break;
|
||||||
case NO_COMPOUNDING_SIMPLE_INTEREST:
|
case NO_COMPOUNDING_SIMPLE_INTEREST:
|
||||||
periodEndDate = periodStartDate.monthOfYear().withMaximumValue();
|
periodEndDate = periodStartDate.monthOfYear().withMaximumValue();
|
||||||
periodEndDate = periodStartDate.dayOfMonth().withMaximumValue();
|
periodEndDate = periodEndDate.dayOfMonth().withMaximumValue();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user