alberto-art3ch commented on code in PR #4000:
URL: https://github.com/apache/fineract/pull/4000#discussion_r1699720940
##########
fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/data/LoanSummaryData.java:
##########
@@ -236,44 +223,23 @@ public static LoanSummaryData
withOnlyCurrencyData(CurrencyData currencyData) {
return LoanSummaryData.builder().currency(currencyData).build();
}
- private static BigDecimal
computeTotalAccruedDueInterestAmount(Collection<LoanSchedulePeriodData>
periods) {
- final LocalDate businessDate = DateUtils.getBusinessLocalDate();
- return periods.stream().filter(period ->
!period.getDownPaymentPeriod() && businessDate.isAfter(period.getDueDate()))
- .map(period ->
period.getTotalAccruedInterest()).reduce(BigDecimal.ZERO, BigDecimal::add);
- }
-
- private static BigDecimal
computeTotalInterestPaidDueAmount(Collection<LoanSchedulePeriodData> periods) {
- final LocalDate businessDate = DateUtils.getBusinessLocalDate();
+ private static BigDecimal
computeTotalUnpaidPayableDueInterestAmount(Collection<LoanSchedulePeriodData>
periods,
+ final LocalDate businessDate) {
return periods.stream().filter(period ->
!period.getDownPaymentPeriod() && businessDate.isAfter(period.getDueDate()))
Review Comment:
Done! Solved
--
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]