FINERACT-1901-NPE-Reject-Loan-Api-Business-Event
This commit is contained in:
committed by
Adam Saghy
parent
77da04fa7d
commit
670e0d55a3
+3
-3
@@ -2166,9 +2166,6 @@ public class Loan extends AbstractAuditableWithUTCDateTimeCustom {
|
||||
|
||||
final LoanStatus statusEnum = loanLifecycleStateMachine.dryTransition(LoanEvent.LOAN_REJECTED, this);
|
||||
if (!statusEnum.hasStateOf(LoanStatus.fromInt(this.loanStatus))) {
|
||||
loanLifecycleStateMachine.transition(LoanEvent.LOAN_REJECTED, this);
|
||||
actualChanges.put(PARAM_STATUS, LoanEnumerations.status(this.loanStatus));
|
||||
|
||||
final LocalDate rejectedOn = command.localDateValueOfParameterNamed(REJECTED_ON_DATE);
|
||||
|
||||
final Locale locale = new Locale(command.locale());
|
||||
@@ -2179,6 +2176,9 @@ public class Loan extends AbstractAuditableWithUTCDateTimeCustom {
|
||||
this.closedOnDate = rejectedOn;
|
||||
this.closedBy = currentUser;
|
||||
|
||||
loanLifecycleStateMachine.transition(LoanEvent.LOAN_REJECTED, this);
|
||||
actualChanges.put(PARAM_STATUS, LoanEnumerations.status(this.loanStatus));
|
||||
|
||||
actualChanges.put(LOCALE, command.locale());
|
||||
actualChanges.put(DATE_FORMAT, command.dateFormat());
|
||||
actualChanges.put(REJECTED_ON_DATE, rejectedOn.format(fmt));
|
||||
|
||||
Reference in New Issue
Block a user