calendarOptions = this.loanReadPlatformService.retrieveCalendars(groupId);
newLoanAccount = newLoanAccount == null ? loanAccountGroupData : LoanAccountData.populateGroupDefaults(newLoanAccount,
loanAccountGroupData);
if (productId != null) {
Map<Long, Integer> memberLoanCycle = new HashMap<>();
Collection<ClientData> members = loanAccountGroupData.groupData().clientMembers();
for (ClientData clientData : members) {
Integer loanCounter = this.loanReadPlatformService.retriveLoanCounter(clientData.id(), productId);
memberLoanCycle.put(clientData.id(), loanCounter);
}
newLoanAccount = LoanAccountData.associateMemberVariations(newLoanAccount, memberLoanCycle);