josehernandezfintecheandomx commented on code in PR #2550:
URL: https://github.com/apache/fineract/pull/2550#discussion_r958408045
##########
fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanReadPlatformServiceImpl.java:
##########
@@ -1689,18 +1689,20 @@ public LoanTermVariationsData mapRow(final ResultSet
rs, @SuppressWarnings("unus
return new LoanTermVariationsData(id,
LoanEnumerations.loanVariationType(LoanTermVariationType.EMI_AMOUNT),
variationApplicableFrom, decimalValue, dateValue,
isSpecificToInstallment);
}
-
}
@Override
public Collection<LoanScheduleDelinquencyData>
retrieveScheduleDelinquencyData(LocalDate businessLocalDate) {
LoanScheduleDelinquencyMapper mapper = new
LoanScheduleDelinquencyMapper(DateUtils.getBusinessLocalDate());
final StringBuilder sqlBuilder = new StringBuilder(400);
sqlBuilder.append("select ").append(mapper.schema())
+ // Just get the overdued installments
.append(" where loan.loan_status_id=:active and ls.duedate <=
:businessLocalDate and ")
- .append(" mpl.delinquency_bucket_id is not null "); // Jusr
the Loan Product linked to delinquency
- // bucket
- sqlBuilder.append(" order by loan.id, ls.duedate ");
+ // Just get the unpaid installments using the
completed_derived flag
+ .append(" ls.completed_derived = false and ")
+ // Just the Loan Product linked to delinquency bucket
+ .append(" mpl.delinquency_bucket_id is not null ");
+ sqlBuilder.append(" group by ls.loan_id, loan.product_id order by
ls.loan_id, loan.product_id ");
Review Comment:
Removed
--
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]