Creating Balanced Transactions on the Client

I have an accounting application where I must post only complete and balanced transactions, so at least two records are involved and quite often more. For example, a deposit to the bank in payment of an invoice involves the bank side plus the accounts receivable side. A cheque paying more than one invoice involves one to the bank plus one for every invoice paid. I need to accumulate all the records in the transaction on the client side and make sure they balance before posting anything.

There are probably many ways of doing this, but we'll consider only one: Master/Detail grids. Even then this is such a long example we've had to break it into several sub-topics.

Let's start with a clear idea of where we want to finish, so first have a look at The Finished Product

Now that you know what we want to build, let's start with the HTML.

The jqGrids are certainly important, but all the heavy lifting is in the Routines called from the grids.



  Last Updated: 2/22/2009 | © Tony's jqGrid - a jQuery Plugin, 2010