FINERACT-1971: Downpayment repayment undo (#3512)

[FINERACT-1971] Downpayment repayment undo
This commit is contained in:
taskain7
2023-10-16 14:11:06 +02:00
committed by GitHub
parent 4bb9c40cdc
commit 389a1f15b2
2 changed files with 390 additions and 2 deletions
@@ -116,7 +116,7 @@ public class AdvancedPaymentScheduleTransactionProcessor extends AbstractLoanRep
final ChangedTransactionDetail changedTransactionDetail = new ChangedTransactionDetail();
for (final LoanTransaction loanTransaction : transactionsPostDisbursement) {
if (loanTransaction.getId() == null) {
processLatestTransaction(loanTransaction, currency, installments, charges, null);
processLatestTransaction(loanTransaction, currency, installments, charges, Money.zero(currency));
loanTransaction.adjustInterestComponent(currency);
} else {
/**
@@ -127,7 +127,7 @@ public class AdvancedPaymentScheduleTransactionProcessor extends AbstractLoanRep
// Reset derived component of new loan transaction and
// re-process transaction
processLatestTransaction(newLoanTransaction, currency, installments, charges, null);
processLatestTransaction(newLoanTransaction, currency, installments, charges, Money.zero(currency));
newLoanTransaction.adjustInterestComponent(currency);
/**
* Check if the transaction amounts have changed. If so, reverse the original transaction and update