On 2009-10-24 09:14:36 -0700, clk (AT) tele2 (DOT) ch (Christoph Kaufmann) said:
Quote:
FMP 9: I have an address - order - line item - invoice database where
the line items get invoiced and get the invoice number as foreign key. I
can add line items to an order already invoiced, the next invoice will
take the new line items only.
Just trying to stress it's line items that get invoiced, not the order.
Though in most cases, there's only one invoice per order, an order
could get a new invoice for every line item.
Now I have to add down payments to the system. In some cases, the
customer has to pay one third of the sum when placing the order and one
third before the stuff ships (and the rest 30 days after that). |
What works really well is a Payments table. It is separate from the
line items, because a customer could well write a payment against more
than one item or invoice. Or for a partial payment.
When you create an order/invoice (which should be a scripted process)
you can pop up a dialog asking if a down payment has been received,
capture the amount & the check number, and then create a Payment record
against either an order, a series of items, or a single item.
Actually, though, if you keep a balance for each customer, a Payment
doesn't have to be against any particular invoice. You just total
everything they've ever ordered, everything they've ever paid, and what
they presently owe is the difference between the two. It's not really
significant when the payment is entered, either on creation of the
order, or later. Or even before, if a customer overpays and is carrying
a credit balance.
Ageing the due balance and generating statements for collecting same is
left as an exercise for the student.

--
Lynn Allen
--
www.semiotics.com
Member FBA
FM 10 Certified Developer