You may not have meant it exactly this way, but it appears you are suggesting that the payments apply "in order" against the oldest outstanding invoices. In fact, the customer needs to select how any credits (regardless of how they are stored in the database) are applied against invoices. Also, the creation of credit invoices is quite common, so I wouldn't call that odd. And there are complexities here:
Payment of $1000
Inv. #1 - $500 - $400 applied
Inv. #2 - $500 - $600 applied
So the entire $1000 is applied, but there is a underpayment on one invoice and an overpayment on another. They have a $0 balance overall, but you still have to determine and address the situation. There is nothing left to apply on the payment, but there is a $100 credit invoice that can be applied to wipe out the under payment on invoice 1. The balance still remains at zero, but now all invoices are marked with a zero balance.
Thanks for your reply.
>Hi Russell
>
>I have seen such odd principles being used in another application but I would like to disagree. I have not read the full thread so I may be repeating but I think this is not the right way to go about. What is credit is the payment and that is the document / record that should be showing the balance and the remaining of the payment is what has to be applied to another invoice.
>
>Invoice #1 1000/-
>Payment #1 1250/- (adjust 1000/- against Invoice #1)
>Invoice #2 1750/- (now allow the system to display the Payment #1 1250-1000 = 250/- and adjust against Invoice #2)
>Payment #2 1000/- (adjust 1000/- against Invoice #2)
>Payment #3 500/- (adjust 500/- fully against Invoice #2)
>so on...
>
>Hope it helps. I would suggest you think of these as documents, like paper documents they cannot change beyond what they are.