adamsaghy commented on code in PR #5314:
URL: https://github.com/apache/fineract/pull/5314#discussion_r2682951503
##########
fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/transactionprocessor/impl/AdvancedPaymentScheduleTransactionProcessor.java:
##########
@@ -626,6 +626,19 @@ private void
handleReamortizationWithEqualAmortizationInterestSplitHandlingType(
Money totalOverDuePrincipal = Money.zero(currency);
Money totalOverDueFee = Money.zero(currency);
+ Money totalOverDueInterest = Money.zero(currency);
+
+ if (previousInstallments.isEmpty()) {
+ loanTransaction.resetDerivedComponents();
+
loanTransaction.updateComponentsAndTotal(totalOverDuePrincipal,
totalOverDueInterest, Money.zero(currency),
+ Money.zero(currency));
+ if (loanTransaction.isNotReversed()) {
+ loanTransaction.reverse();
+ loanTransaction.manuallyAdjustedOrReversed();
+ }
+ return;
+ }
+
Review Comment:
However, there is 1 thought... if there is no any reamortizable amount,
maybe we should just throw a domain rule exception and explain, Reamortization
cannot be executed, hence no overdue amount.
--
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]