How to: ledger running balance

How to: ledger running balance

Old forum URL:

superkuton posted on Monday, November 22, 2010

My accounting project requires a "running balance/" column. how do i implement it?


Thank you.

dlambert replied on Monday, November 22, 2010

It probably depends on how you're implementing the rest of your app.  I have a feeling that you'll receive better answers if you can share just a bit more context with your question.

superkuton replied on Tuesday, November 23, 2010

Thank you for the reply. I will try to explain my problem.

A sample ERO business object would have the following properties:







A ReadOnly Root List object will have all  the properties of the ERO, plus a running balance/total property.

How do I implement an ReadOnly Root List that shows the "running balance/total?"


Thank you.



JonStonecash replied on Tuesday, November 23, 2010

Assuming that the running balance is only available while the list is loaded (that is, it is not persisted to the database), I would load the transactions in ascending PostDate order (either thru a database query or using Linq OrderBy() extension method) and iterate through the list updating the running balance total property on each detail object.  Nothing magical, just code.


Jon Stonecash

Copyright (c) Marimer LLC