Ok,
related question. How do I calculate the outstanding balance on an part-paid, unprocessed order that has items on backorder that need to be paid for in advance ?
I actually have two very different customers for whom these apply, but for quite different reasons.
I have a part-payment recorded and posted (perhaps a deposit or a laybuy) on said unprocessed order. The payment can be cash or credit card.
If I'm on snapshot #1, I figure (with help from the POS plugin) that the amount outstanding can probably be calculated as:
- Code: Select all
( Lines.Sum(l => l.LineValueIncTax) ) - ( Payments.Where(p => p.AuthorisationStatus == Authorised || p.AuthorisationStatus == NoAuthorisationNeeded ).Sum(p => p.AmountPaid) )
But what if I'm on a later snapshot?
Does this same logic still work and/or is there another method that I'm missing?