From f0ee8920508790f27720f81addf727b402fde948 Mon Sep 17 00:00:00 2001 From: Keith Woodlock Date: Tue, 11 Jun 2013 13:44:40 +0100 Subject: [PATCH] MIFOSX-411: fix interest period determination for annual posting periods. --- .../portfolio/savings/data/SavingsAccountDataValidator.java | 2 +- .../portfolio/savings/domain/SavingsAccount.java | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) 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; }