andrewDzakpasu created FINERACT-754:
---------------------------------------
Summary: Linked between savings transfer transaction broken when
account goes into overdraft
Key: FINERACT-754
URL: https://issues.apache.org/jira/browse/FINERACT-754
Project: Apache Fineract
Issue Type: Bug
Affects Versions: 1.3.0
Reporter: andrewDzakpasu
{code:java}
// 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;
}
{code}
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
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)