FINERACT-2326: Fix duplicate reverse replay of ‘Accrual Activity’ during reprocessing

This commit is contained in:
Adam Saghy
2025-11-13 18:15:18 +01:00
parent 1b3217be39
commit da1f310d43
4 changed files with 67 additions and 2 deletions
@@ -1191,7 +1191,7 @@ public class AdvancedPaymentScheduleTransactionProcessor extends AbstractLoanRep
boolean alreadyProcessed = changedTransactionDetail.getTransactionChanges().stream().map(TransactionChangeData::getNewTransaction)
.anyMatch(lt -> !lt.equals(newTransaction) && lt.getTransactionDate().equals(oldTransaction.getTransactionDate()));
boolean amountMatch = LoanTransaction.transactionAmountsMatch(currency, oldTransaction, newTransaction);
if (!alreadyProcessed && amountMatch) {
if ((!alreadyProcessed && amountMatch) || newTransaction.isAccrualActivity()) {
if (!oldTransaction.getTypeOf().isWaiveCharges()) { // WAIVE_CHARGES is not reprocessed
oldTransaction
.updateLoanTransactionToRepaymentScheduleMappings(newTransaction.getLoanTransactionToRepaymentScheduleMappings());