Merge pull request #1401 from chandrikamohith/MIFOSX-2054

MIFOSX-2054 Condition added to check if meeting frequency is not atta…
This commit is contained in:
Vishwas Babu A J
2015-06-02 23:26:00 -07:00
@@ -309,6 +309,12 @@ public class DepositApplicationProcessWritePlatformServiceJpaRepositoryImpl impl
}
CalendarInstance parentCalendarInstance = this.calendarInstanceRepository.findByEntityIdAndEntityTypeIdAndCalendarTypeId(
groupId, entityType, CalendarType.COLLECTION.getValue());
if(parentCalendarInstance == null){
final String defaultUserMessage = "Meeting frequency is not attached to the Group/Center to which the client belongs to.";
throw new GeneralPlatformDomainRuleException(
"error.msg.meeting.frequency.not.attached.to.group.to.which.client.belongs.to",
defaultUserMessage, account.clientId());
}
calendarInstance = CalendarInstance.from(parentCalendarInstance.getCalendar(), account.getId(),
CalendarEntityType.SAVINGS.getValue());
}