MIFOSX-2054 Condition added to check if meeting frequency is not attached to group/center.

This commit is contained in:
Chandrika
2015-06-01 17:16:01 -04:00
parent 8311a5d1fc
commit eb2d539937
@@ -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());
}