Customer purchased an items in different dates(eg: 12/7/2009 , 14/7/2009 ,22/7/2009 ,30/7/2009 ) (Cost may vary eg: 400,500,100 etc...)
If he pays 500 Rs/- then from the total amount of 1000 Rs/-[(ie) 400+500+100]. The 1st invoice amount's balance should be zero. And 2nd invoice amount's balance should be 400 [(ie) 500-100]
I think I have understood your question, what you have to do is create a database of customers and another database of invoices, for each invoice there will be a customer ID and when any of the invoice is paid you can change its status to paid and then while totaling you can just include the invoices where the status is not paid.
Bookmarks