FINERACT-1724 - Fraud set error when status is 100 or 200.
This commit is contained in:
+4
@@ -2521,6 +2521,10 @@ public class LoanWritePlatformServiceJpaRepositoryImpl implements LoanWritePlatf
|
||||
Loan loan = this.loanAssembler.assembleFrom(loanId);
|
||||
final Map<String, Object> changes = new LinkedHashMap<>();
|
||||
|
||||
if (loan.isApproved() || loan.isSubmittedAndPendingApproval()) {
|
||||
throw new GeneralPlatformDomainRuleException("error.msg.loan.mark.as.fraud.not.allowed",
|
||||
"Loan Id: " + loanId + " mark as fraud is not allowed as loan status is not active", loan.getStatus().getCode());
|
||||
}
|
||||
final boolean fraud = command.booleanPrimitiveValueOfParameterNamed(LoanApiConstants.FRAUD_ATTRIBUTE_NAME);
|
||||
if (loan.isFraud() != fraud) {
|
||||
loan.markAsFraud(fraud);
|
||||
|
||||
Reference in New Issue
Block a user