Skip to content

Commit

Permalink
FINERACT-1971: Downpayment repayment undo (apache#3512)
Browse files Browse the repository at this point in the history
[FINERACT-1971] Downpayment repayment undo
  • Loading branch information
taskain7 authored Oct 16, 2023
1 parent 4bb9c40 commit 389a1f1
Show file tree
Hide file tree
Showing 2 changed files with 390 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ public ChangedTransactionDetail reprocessLoanTransactions(LocalDate disbursement
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 {
/**
Expand All @@ -127,7 +127,7 @@ public ChangedTransactionDetail reprocessLoanTransactions(LocalDate disbursement

// 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
Expand Down
Loading

0 comments on commit 389a1f1

Please sign in to comment.