adamsaghy commented on code in PR #5245:
URL: https://github.com/apache/fineract/pull/5245#discussion_r2672269335
##########
fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/domain/ProgressiveLoanScheduleGenerator.java:
##########
@@ -243,10 +246,14 @@ public Money getPeriodInterestTillDate(@NotNull
LoanRepaymentScheduleInstallment
Loan loan = installment.getLoan();
LoanRepaymentScheduleTransactionProcessor transactionProcessor =
loanTransactionProcessingService
.getTransactionProcessor(loan.getTransactionProcessingStrategyCode());
+ final LoanTransaction reAgeTransaction = loan.findReAgeTransaction();
+ final LoanReAgeParameter loanReAgeParameter = reAgeTransaction != null
? reAgeTransaction.getLoanReAgeParameter() : null;
+
if (!(transactionProcessor instanceof
AdvancedPaymentScheduleTransactionProcessor processor)) {
throw new IllegalStateException("Expected an
AdvancedPaymentScheduleTransactionProcessor");
}
- if (installment.isAdditional() || installment.isDownPayment() ||
installment.isReAged()) {
+ if (installment.isAdditional() || installment.isDownPayment() ||
(installment.isReAged() && loanReAgeParameter != null
Review Comment:
//TODO: Remove `installment.isReAged()` once EQUAL AMORTIZATION is
implemented
##########
fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanAccrualsProcessingServiceImpl.java:
##########
@@ -468,7 +470,11 @@ private List<LoanRepaymentScheduleInstallment>
getInstallmentsToAccrue(@NonNull
private void addInterestAccrual(@NonNull final Loan loan, @NonNull final
LocalDate tillDate,
final LoanScheduleGenerator scheduleGenerator, @NonNull final
LoanRepaymentScheduleInstallment installment,
@NonNull final AccrualPeriodsData accrualPeriods) {
- if (installment.isAdditional() || installment.isReAged()) {
+ final LoanTransaction reAgeTransaction = loan.findReAgeTransaction();
+ final LoanReAgeParameter loanReAgeParameter = reAgeTransaction != null
? reAgeTransaction.getLoanReAgeParameter() : null;
+
+ if (installment.isAdditional() || (installment.isReAged() &&
loanReAgeParameter != null
Review Comment:
//TODO: Remove `installment.isReAged()` once EQUAL AMORTIZATION is
implemented
--
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]