adamsaghy commented on code in PR #4207:
URL: https://github.com/apache/fineract/pull/4207#discussion_r1875953301
##########
fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanWritePlatformServiceJpaRepositoryImpl.java:
##########
@@ -3260,7 +3275,41 @@ public CommandProcessingResult chargeOff(JsonCommand
command) {
final List<Long> existingTransactionIds =
loan.findExistingTransactionIds();
final List<Long> existingReversedTransactionIds =
loan.findExistingReversedTransactionIds();
- LoanTransaction chargeOffTransaction = LoanTransaction.chargeOff(loan,
transactionDate, txnExternalId);
+ if
(LoanChargeOffBehaviour.ZERO_INTEREST.equals(loan.getLoanProductRelatedDetail().getChargeOffBehaviour()))
{
+ final List<LoanRepaymentScheduleInstallment>
repaymentScheduleInstallments = loan.getRepaymentScheduleInstallments();
+
+ if (loan.isInterestRecalculationEnabled()) {
Review Comment:
I dont think we need this. We are about to reproduce loan transactions in
the line 3319 already. I think charge-off behaviour can easily be moved into
the `AdvancedPaymentScheduleTransactionProcessor` and only handle there the
changes. This way when reverse-replay situations occurs, Fineract will handle
properly the recalculation of Charge-off and updating the repayment schedule.
--
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]