adamsaghy commented on code in PR #3952:
URL: https://github.com/apache/fineract/pull/3952#discussion_r1666013474


##########
fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/service/LoanScheduleAssembler.java:
##########
@@ -1379,6 +1383,22 @@ public void updateLoanApplicationAttributes(JsonCommand 
command, Loan loan, Map<
             changes.put(LoanProductConstants.IS_EQUAL_AMORTIZATION_PARAM, 
newValue);
             loanProductRelatedDetail.setEqualAmortization(newValue);
         }
+
+        final boolean isDownPaymentEnabled = loanScheduleValidator
+                
.validateDownPaymentAttribute(loan.loanProduct().getLoanProductRelatedDetail().isEnableDownPayment(),
 command.parsedJson());
+        // If the value is different, new value compared with the previous 
value
+        if (isDownPaymentEnabled != 
loanProductRelatedDetail.isEnableDownPayment()) {
+            changes.put(LoanProductConstants.ENABLE_DOWN_PAYMENT, 
isDownPaymentEnabled);
+            
loanProductRelatedDetail.setEnableDownPayment(isDownPaymentEnabled);
+            
loanProductRelatedDetail.setEnableAutoRepaymentForDownPayment(isDownPaymentEnabled);

Review Comment:
   Just because down payment was enabled, it does not mean auto repayment for 
down payment should be enabled as well. It should be set based on what was 
configured on the loan product



-- 
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

Reply via email to