Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

non-vanilla: Help program a billing statement

edited November 2011 in Vanilla 2.0 - 2.8
Hi,

this is a non-vanilla related question. Since I know many of guys are experienced developers, I hope I can get help on my issue.

The problem: I need to understand the algorithm for developing a billing statement.

Background: currently developing a webapp, and users should be able to see their current balance for any period at any point in time. It is quite simple: for a selected date period in one column in the statement they see sums for services rendered to them, and in the second column they see the money they paid to us. Below that they see subtotals and the actual balance for the period, such as for example " - $100", which means the user owes us a hundred. Looks simple, BUT....

Before the output for the selected period I must indicate the balance for the start of the period. So that at the start of the period the balance was say -2200. So at the very bottom of the report I must output the local -100 and the outstanding -2200, totaling -2300 that the client owes us.

The question: what is the generic algorithm for developing such a module?


I tried to google, yet no result. My idea would be that every event must save current balance as a separate independent datum.

Please help me out. Thanks.
Sign In or Register to comment.