}
this.loanAccountDomainService.recalculateAccruals(loan);
CommandProcessingResult result = null;
if (possibleClosingTransaction != null) {
result = new CommandProcessingResultBuilder() //
.withCommandId(command.commandId()) //
.withEntityId(possibleClosingTransaction.getId()) //
.withOfficeId(loan.getOfficeId()) //
.withClientId(loan.getClientId()) //
.withGroupId(loan.getGroupId()) //
.withLoanId(loanId) //
.with(changes) //
.build();
} else {
result = new CommandProcessingResultBuilder() //
.withCommandId(command.commandId()) //
.withEntityId(loanId) //
.withOfficeId(loan.getOfficeId()) //
.withClientId(loan.getClientId()) //
.withGroupId(loan.getGroupId()) //