public List<LoanTransaction> reverseExistingTransactionsTillLastDisbursal(LocalDate actualDisbursementDate){
  final List<LoanTransaction> reversedTransactions=new ArrayList<>();
  for (  final LoanTransaction transaction : this.loanTransactions) {
    if ((actualDisbursementDate.equals(transaction.getTransactionDate()) || actualDisbursementDate.isBefore(transaction.getTransactionDate())) && transaction.isAllowTypeTransactionAtTheTimeOfLastUndo()) {
      reversedTransactions.add(transaction);
      transaction.reverse();
    }
  }
  return reversedTransactions;
}

public List < LoanTransaction > reverseExistingTransactionsTillLastDisbursal ( LocalDate actualDisbursementDate ) { final List < LoanTransaction > reversedTransactions = new ArrayList < > ( ) ; for ( final LoanTransaction transaction : this . loanTransactions ) { if ( ( actualDisbursementDate . equals ( transaction . getTransactionDate ( ) ) || actualDisbursementDate . isBefore ( transaction . getTransactionDate ( ) ) ) && transaction . isAllowTypeTransactionAtTheTimeOfLastUndo ( ) ) { reversedTransactions . add ( transaction ) ; transaction . reverse ( ) ; } } return reversedTransactions ; }
reverse only disbursement , accruals , and repayments at disbursal transactions
