Article Details
Id:10152
Product:finPOWER Connect
Type:FIX
Version:1.05.07
Opened:12/06/2012
Closed:12/06/2012
Released:15/06/2012
Job: J009802

Account Balance; using Account.GetBalance as at a date may return the incorrect value

Using the finPOWER Connect Business Layer function "finAccount.GetBalance" as at a date may return the incorrect value.

There was an inconsistency in GetBalance when using the Transaction collection to get the balance verses when querying the database directly.
 
When querying the database directly, reversed transactions were included. So, if a transaction is dated on or prior to the date as at, but is reversed after, one side of the reversal is included in the balance.
 
Querying the database directly occurs when the Account Transactions have not been previously touched and the forceTransactionsToLoad parameter is false.

As a workaround you may either call finAccount.TransactionLoad, which forces Transactions to be loaded, or set the forceTransactionsToLoad parameter of GetBalance to True.