From 4cd7c79225e94622d534938bc7829776c0b121ea Mon Sep 17 00:00:00 2001 From: Chandrika Date: Mon, 5 Jan 2015 13:54:38 -0500 Subject: [PATCH] MIFOSX-1776 Sync repayment dates with meeting dates for Group Loan application --- .../loanschedule/service/LoanScheduleAssembler.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/mifosng-provider/src/main/java/org/mifosplatform/portfolio/loanaccount/loanschedule/service/LoanScheduleAssembler.java b/mifosng-provider/src/main/java/org/mifosplatform/portfolio/loanaccount/loanschedule/service/LoanScheduleAssembler.java index d877706dc..ec65a7a2d 100644 --- a/mifosng-provider/src/main/java/org/mifosplatform/portfolio/loanaccount/loanschedule/service/LoanScheduleAssembler.java +++ b/mifosng-provider/src/main/java/org/mifosplatform/portfolio/loanaccount/loanschedule/service/LoanScheduleAssembler.java @@ -176,12 +176,12 @@ public class LoanScheduleAssembler { final AccountType loanType = AccountType.fromName(loanTypeStr); /* - * If it is JLG loan then make sure loan frequency is same as + * If it is JLG loan/Group Loan then make sure loan frequency is same as * Group/Center meeting frequency or multiple of it. TODO: Check should * be either same frequency or loan freq is multiple of center/group * meeting freq multiples */ - if (loanType.isJLGAccount() && calendarId != null) { + if ((loanType.isJLGAccount() || loanType.isGroupAccount()) && calendarId != null) { calendar = this.calendarRepository.findOne(calendarId); if (calendar == null) { throw new CalendarNotFoundException(calendarId); } final PeriodFrequencyType meetingPeriodFrequency = CalendarUtils.getMeetingPeriodFrequencyType(calendar.getRecurrence()); @@ -199,10 +199,10 @@ public class LoanScheduleAssembler { } /* - * If it is JLG loan synched with a meeting, then make sure first + * If it is JLG loan/Group Loan synched with a meeting, then make sure first * repayment falls on meeting date */ - if (loanType.isJLGAccount() && calendar != null) { + if ((loanType.isJLGAccount() || loanType.isGroupAccount()) && calendar != null) { validateRepaymentsStartDateWithMeetingDates(calculatedRepaymentsStartingFromDate, calendar); /* * If disbursement is synced on meeting, make sure disbursement date