adamsaghy commented on code in PR #5314:
URL: https://github.com/apache/fineract/pull/5314#discussion_r2682274268
##########
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:
Can you please help me understand what this logic is for?
Also seems reused multiple times, we might wanna extract this into a method.
--
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]