FINERACT-2107: Merchant issued refund linked to related interest refund

- on reversal reverse interest refund aswell
This commit is contained in:
adam.magyari
2024-10-30 13:16:29 +01:00
committed by Adam Saghy
parent b053c90009
commit 745dc80886
4 changed files with 103 additions and 1 deletions
@@ -868,6 +868,10 @@ public class LoanAccountDomainServiceJpa implements LoanAccountDomainService {
if (shouldCreateInterestRefundTransaction) {
interestRefundTransaction = createInterestRefundLoanTransaction(loan, transactionDate, transactionAmount);
if (interestRefundTransaction != null) {
interestRefundTransaction.getLoanTransactionRelations().add(LoanTransactionRelation
.linkToTransaction(interestRefundTransaction, refundTransaction, LoanTransactionRelationTypeEnum.RELATED));
}
}
final LoanRepaymentScheduleTransactionProcessor loanRepaymentScheduleTransactionProcessor = transactionProcessorFactory