Previously, this code:
SavingsTrxnDetailEntity savedTrxn = trxn;
trxn = trxn.getAccountPayment().getAmount().isGreaterThanZero() ? getLastTrxnForPayment(trxn
.getAccountPayment()) : getLastTrxnForAdjustedPayment(trxn.getAccountPayment());
if (!savedTrxn.getAccountTrxnId().equals(trxn.getAccountTrxnId())) {
initialBalance = false;
}
processed the initial transaction to cater for deposits, withdrawals and adjustments. Because it didn't cater for interest postings it returns a null causing a NPE. The fix ignores this code if the 'initial' transaction is an interest posting.
Need to walk through with Udai that this fix is reasonable in the fuller savings calculations process.