mariiaKraievska commented on code in PR #6109:
URL: https://github.com/apache/fineract/pull/6109#discussion_r3552358740
##########
fineract-working-capital-loan/src/main/java/org/apache/fineract/portfolio/workingcapitalloan/service/WorkingCapitalLoanBreachScheduleServiceImpl.java:
##########
@@ -306,35 +306,65 @@ public void recalculatePeriodsForPauses(final
WorkingCapitalLoan loan) {
}
@Override
- public void reEvaluateAfterEnable(final WorkingCapitalLoan loan, final
LocalDate enableDate) {
- final Optional<WorkingCapitalBreach> breachOpt = getBreachConfig(loan);
- if (breachOpt.isEmpty()) {
+ public void reprocessBreachSchedule(final WorkingCapitalLoan loan) {
+ final LocalDate businessDate = DateUtils.getBusinessLocalDate();
+ generateNextPeriodIfNeeded(loan, businessDate);
+ List<WorkingCapitalLoanBreachSchedule> breachPeriods =
resetAllPeriodsForReprocessing(loan.getId());
+
+ final List<TransactionDateAndAmountHolder>
transactionDateAndAmountHolderList = transactionRepository
+ .fetchTransactionDateAndAmount(loan.getId(),
LoanTransactionType.getRepaymentLikeTransactionTypes());
Review Comment:
Same question for breach: reprocess uses transactionAmount here, but
incremental updates in WorkingCapitalLoanWritePlatformServiceImpl still use
principalPortion (line 778, line 1031). Would aligning on transactionAmount
everywhere make sense?
--
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]