Uploaded image for project: 'Apache Fineract'
  1. Apache Fineract
  2. FINERACT-754

Linked between savings transfer transaction broken when account goes into overdraft

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 1.3.0
    • Fix Version/s: 1.5.0
    • Component/s: Savings
    • Labels:

      Description

      // code code where bug is found
      
      else if (overdraftAmount.isNotEqualTo(transaction.getOverdraftAmount(getCurrency()))) {
      SavingsAccountTransaction accountTransaction = SavingsAccountTransaction.copyTransaction(transaction);
      transaction.reverse(); /// why reverse the transaction here if you could just update the details
      if (overdraftAmount.isGreaterThanZero()) {
      accountTransaction.updateOverdraftAmount(overdraftAmount.getAmount());
      }
      accountTransaction.updateRunningBalance(runningBalance);
      addTransaction(accountTransaction);
      isTransactionsModified = true;
      }
      

      I have replicated it on https://demo.openmf.org/#/viewsavingaccount/2589

      steps to replicate

      1.create a savings account using the same product with opening balance as 45,754 , activation date 31-01-2019
      2.manually posted interest on savings with transaction date as 31-01-2019
      3. make an account transfer to another client with amount 45,854 transaction date 28-02-2019.
      5. if you view the details you will see the transfer was made to another person will all details
      6. now make a deposit of 5 on 27-02-2018
      5. you will see the code above reverses the initial transfers and books it again (just a withdrawal )there by breaking the link of the transfer to another client.
      you can also view this from the journals

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                andrew.dzak andrewDzakpasu
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated: