adamsaghy commented on code in PR #3952: URL: https://github.com/apache/fineract/pull/3952#discussion_r1666012945
########## fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/service/LoanScheduleAssembler.java: ########## @@ -1379,6 +1382,21 @@ public void updateLoanApplicationAttributes(JsonCommand command, Loan loan, Map< changes.put(LoanProductConstants.IS_EQUAL_AMORTIZATION_PARAM, newValue); loanProductRelatedDetail.setEqualAmortization(newValue); } + + final boolean isDownPaymentEnabled = validateDownPaymentAttribute( + loan.loanProduct().getLoanProductRelatedDetail().isEnableDownPayment(), command.parsedJson()); + if (isDownPaymentEnabled != loanProductRelatedDetail.isEnableDownPayment()) { + changes.put(LoanProductConstants.ENABLE_DOWN_PAYMENT, isDownPaymentEnabled); + loanProductRelatedDetail.setEnableDownPayment(isDownPaymentEnabled); Review Comment: You are checking the loan product configuration, but what you should check is only the configuration on loan. This method is covering the update loan application part, we already have something configured on the loan, thats the only thing that should be checked! If on the loan product it was enabled down payment, but it was disabled when the loan was submitted and now when the loan is got updated, we want to enable again, you should not check what was set on the loan product, but check whether on the loan level what was set and now during the update if we wanna change it and enable again, then we can set from the loan product the down payment configurations on the loan level again. -- 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: commits-unsubscr...@fineract.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org