[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: COGS incorrect when invoices are reposted



On Fri, 2006-09-22 at 08:25 -0500, John Hasler wrote:

> But if correcting entries have been made the summaries will be correct.  I
> don't think erroneous invoices should be hidden, though perhaps they should
> be marked with a link the correcting entry (I'm not sure how I'd do that).
Add a recursive foreign key to the invoice table.
Rebooked parts records (I assume there is one in the schema) link to the
original record it was booked out on via -
 - link from line item to invoice
 -> to invoice via recursive link
 -> and back to the same-numbered line item.

A redundant link ,might also be designed in to store a direct link from
one line-item back to its original directly, again via a recursive
foreign key.

Either way, to implement any of these sorts of function enhancements,
you are going to have to make changes in the schema.