adamsaghy commented on code in PR #3952: URL: https://github.com/apache/fineract/pull/3952#discussion_r1665309175
########## 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: But then you need to check whether the provided `enableDownPayment` is different than the one is already set on the loan, not on the loan product. The following situation will have no effect and the down payment remains disabled at the end. LP: enable down payment is TRUE Submit loan: enable down payment is FALSE Update loan: enabled down payment is TRUE -> Down payment remains disabled hence we are comparing the newly provided value with the LP value. -- 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