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


##########
fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/service/LoanScheduleAssembler.java:
##########
@@ -1446,4 +1464,21 @@ public Pair<Loan, Map<String, Object>> 
assembleLoanApproval(AppUser currentUser,
 
         return Pair.of(loan, actualChanges);
     }
+
+    private boolean validateDownPaymentAttribute(final boolean 
isDownPaymentEnabledInLoanProduct, final JsonElement element) {
+        boolean isDownPaymentEnabled = isDownPaymentEnabledInLoanProduct;
+        if (!isDownPaymentEnabledInLoanProduct) {
+            if 
(this.fromApiJsonHelper.parameterExists(LoanProductConstants.ENABLE_DOWN_PAYMENT,
 element)) {

Review Comment:
   This is wrong. We should only throw exception if the the down payment is 
disabled on the loan product (which is correctly checked) and when user tries 
to set down payment to be enabled during loan submission (this is the wrongly 
checked part)! If user provide enableDownPayment=false then nothing should 
happen: No violation!



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