Listing of what each field in the Balances section of both an Account record and a Matter record is calculated from.
Reviewing Account Balances on the Matter Record

Realtime Balance - Shows the SUM of 'Retainer Balance' & 'Trust Balance' MINUS the 'A/R Balance' and MINUS the SUM of 'Unbilled Fees' & 'Unbilled Expenses'
A/R Balance - Shows any 'Billed to Date Balance' MINUS the SUM of the 'Total Payments' and/or 'Write-offs' to Date and any remaining 'Credit Balance'
Credit Balance - Shows the SUM of ALL Payment WHERE Payment Type equals Credit
Retainer Balance - Shows the SUM of ALL Fund Account Entries WHERE FundAccountType equals Retainer
Trust Balance - Shows the SUM of ALL Fund Account Entries WHERE FundAccountType equals Trust
Collections Balance - Shows the SUM of ALL Fund Account Entries WHERE FundAccountType equals Collection