alberto-art3ch commented on code in PR #3952:
URL: https://github.com/apache/fineract/pull/3952#discussion_r1664569780
##########
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:
We need to consider a couple of scenarios:
1. LP with DownPayment enabled and originally the LA with DownPayment
enabled, then LA disable DownPayment, and
2.LP with DownPayment enabled and originally the LA with DownPayment
disabled, then LA enable DownPayment
This is why we are validating If we have a change in the new value compared
with the old 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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]