Question : Ledger View for a Notes Database

Project: Updating current general ledger process

I am in the process of updating the current ledger process for a database. Currently when a user submits a transaction the process captures the current balance and then updates the new balance on the new form. It actually captures the current balance when the user composes the transaction form. The first issue is that if you have 2 people composing a form at the same time, the current balance is the same on both. I'm going to remove this and calculate the new ending balance when the transaction is submitted. I worry about a situation where multiple users submit a transaction at the same time.

Is it best to have it calculate the new ending balance when the transaction is submitted ?

Should the balance be calculated via a server agent calculating it ?

If this was in SQL I could create a query that calculated this ending balance.

Answer : Ledger View for a Notes Database

You might have the initial balance displayed if the users need to know what it is prior to submitting their entry.  If the users who compose these forms don't really care or don't need to know the balance before-hand, then why show it to them?  If they are just having to enter journal ledger entries, then perhaps they don't care what the beginning balance is.

I would suggest having a server-side agent to do all of the math.  That seems to me to be the best way to insure that all mathematical operations are handled by one entity - the server.  Then each ledger entry only needs to have one field on it, the value of the transaction.  Assuming that the database has a profile document, the balance could be stored on that and updated by the server agent.
Random Solutions  
 
programming4us programming4us