ruchiD commented on code in PR #3610:
URL: https://github.com/apache/fineract/pull/3610#discussion_r1410286448
##########
fineract-provider/src/main/java/org/apache/fineract/portfolio/delinquency/service/DelinquencyWritePlatformServiceImpl.java:
##########
@@ -441,20 +450,29 @@ public int compare(DelinquencyRange o1, DelinquencyRange
o2) {
private void applyDelinquencyDetailsForLoanInstallments(final Loan loan,
final DelinquencyBucket delinquencyBucket,
final Map<Long, CollectionData> installmentsCollectionData) {
+ boolean isDelinquencyRangeChangedForAnyOfInstallment = false;
for (LoanRepaymentScheduleInstallment installment :
loan.getRepaymentScheduleInstallments()) {
if (installmentsCollectionData.containsKey(installment.getId())) {
- setInstallmentDelinquencyDetails(loan, installment,
delinquencyBucket, installmentsCollectionData.get(installment.getId()));
+ boolean isDelinquencySetForInstallment =
setInstallmentDelinquencyDetails(loan, installment, delinquencyBucket,
+ installmentsCollectionData.get(installment.getId()));
+ isDelinquencyRangeChangedForAnyOfInstallment =
isDelinquencyRangeChangedForAnyOfInstallment
+ || isDelinquencySetForInstallment;
}
}
// remove tags for non existing installments that got deleted due to
re-schedule
removeDelinquencyTagsForNonExistingInstallments(loan.getId());
Review Comment:
These installments are non existing for the loan. Reschedule/Disbursal flow
creates new installments for loan and deletes previous ones for loan, but tags
for old non existing installments exits and needs to be cleaned up. No need to
raise event.
--
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]