diff --git a/mifosng-provider/src/main/java/org/mifosplatform/portfolio/savings/data/SavingsAccountDataValidator.java b/mifosng-provider/src/main/java/org/mifosplatform/portfolio/savings/data/SavingsAccountDataValidator.java index 4841a1d6c..6ebc77d60 100644 --- a/mifosng-provider/src/main/java/org/mifosplatform/portfolio/savings/data/SavingsAccountDataValidator.java +++ b/mifosng-provider/src/main/java/org/mifosplatform/portfolio/savings/data/SavingsAccountDataValidator.java @@ -183,7 +183,7 @@ public class SavingsAccountDataValidator { if (this.fromApiJsonHelper.parameterExists(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) { MonthDay monthDayOfAnnualFee = fromApiJsonHelper.extractMonthDayNamed(annualFeeOnMonthDayParamName, element); diff --git a/mifosng-provider/src/main/java/org/mifosplatform/portfolio/savings/domain/SavingsAccount.java b/mifosng-provider/src/main/java/org/mifosplatform/portfolio/savings/domain/SavingsAccount.java index ec8d1cf10..b5ae0460f 100644 --- a/mifosng-provider/src/main/java/org/mifosplatform/portfolio/savings/domain/SavingsAccount.java +++ b/mifosng-provider/src/main/java/org/mifosplatform/portfolio/savings/domain/SavingsAccount.java @@ -621,7 +621,7 @@ public class SavingsAccount extends AbstractPersistable { break; case ANNUAL: periodEndDate = periodStartDate.monthOfYear().withMaximumValue(); - periodEndDate = periodStartDate.dayOfMonth().withMaximumValue(); + periodEndDate = periodEndDate.dayOfMonth().withMaximumValue(); break; } @@ -680,11 +680,11 @@ public class SavingsAccount extends AbstractPersistable { break; case ANNUAL: periodEndDate = periodStartDate.monthOfYear().withMaximumValue(); - periodEndDate = periodStartDate.dayOfMonth().withMaximumValue(); + periodEndDate = periodEndDate.dayOfMonth().withMaximumValue(); break; case NO_COMPOUNDING_SIMPLE_INTEREST: periodEndDate = periodStartDate.monthOfYear().withMaximumValue(); - periodEndDate = periodStartDate.dayOfMonth().withMaximumValue(); + periodEndDate = periodEndDate.dayOfMonth().withMaximumValue(); break; }