Linked Transactions, or "how to tell an invoice was paid"?

Derek Atkins warlord@MIT.EDU
27 Nov 2001 00:41:34 -0500


"Olaf Faaland" <ofaaland@home.com> writes:

> You may have already thought of this, but that the fact that a payment has
> been applied to an invoice does not mean the invoice's balance is
> necessarily 0.  Partial payments happen a lot.  Your query is still going to
> have to do a lookup of each linked payment and total them to determine the
> balance.  Or, you'll have to maintain a field in the invoice that keeps the
> payment status in some form - "paid/not paid", or "unpaid balance", or
> something.

Hmm, good point.  Note that if you do keep an 'invoice is paid off'
flag, then you only need to keep track of how much of the invoice
is paid off.

Similarly, once I add Customer support, then it really doesn't matter;
you apply payments from the Customer in a FIFO/LIFO/whatever to the
existing list of invoices and what really matters is not the
individual invoices but rather how much the Customer owes you.

The fact that there are N invoices in the e.g. 0-31 day period doesn't
matter; it's the sum of the outstanding balances that matter.

I'm not convinced that all of this logic needs to be or should be in
the Transaction or SplitLedger.

> -Olaf

-derek

-- 
       Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory
       Member, MIT Student Information Processing Board  (SIPB)
       URL: http://web.mit.edu/warlord/    PP-ASEL-IA     N1NWH
       warlord@MIT.EDU                        PGP key available