Skip to content
Permalink
Browse files
Set mandatory createdOn for command
  • Loading branch information
crain committed Aug 31, 2017
1 parent 3e4985a commit aaaac7b0a429cfc9d36790d828b665e5ca7542fe
Showing 1 changed file with 4 additions and 0 deletions.
@@ -17,6 +17,7 @@

import com.google.common.collect.Sets;
import io.mifos.core.api.util.NotFoundException;
import io.mifos.core.lang.DateConverter;
import io.mifos.core.lang.ServiceException;
import io.mifos.individuallending.api.v1.domain.product.AccountDesignators;
import io.mifos.individuallending.api.v1.domain.workflow.Action;
@@ -34,6 +35,8 @@
import org.springframework.stereotype.Service;

import java.math.BigDecimal;
import java.time.Clock;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
@@ -88,6 +91,7 @@ public void processRepayment(final String productIdentifier, final String caseId
final Command repaymentCommand = new Command();
repaymentCommand.setOneTimeAccountAssignments(this.getAccountAssignments(tellerAccount));
repaymentCommand.setPaymentSize(paymentSize);
repaymentCommand.setCreatedOn(DateConverter.toIsoString(LocalDateTime.now(Clock.systemUTC())));

portfolioManager.executeCaseCommand(productIdentifier, caseIdentifier, Action.ACCEPT_PAYMENT.name(),
repaymentCommand);

0 comments on commit aaaac7b

Please sign in to comment.