devi-pathak2263 commented on code in PR #5696:
URL: https://github.com/apache/fineract/pull/5696#discussion_r3007683459
##########
fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanApprovedAmountWritePlatformServiceImpl.java:
##########
@@ -58,6 +59,12 @@ public CommandProcessingResult
modifyLoanApprovedAmount(final Long loanId, final
BigDecimal newApprovedAmount =
command.bigDecimalValueOfParameterNamed(LoanApiConstants.amountParameterName);
+ if (newApprovedAmount.compareTo(loan.getApprovedPrincipal()) == 0) {
Review Comment:
Thanks for the suggestion! I’ve refactored the duplicated validation into a
helper method and extracted the error message into a constant.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]