Re: Why does reposting an invoice affect COGS ?
Bob Gustafson <[email protected]> Sat, 13 May 2006 09:41:29 -0500
| Newsgroups | gmane.comp.web.sql-ledger.user |
|---|---|
| Message-ID | <[email protected]> |
Without looking through the code, I would guess that there is no stack or queue explicitly in the code. Whatever items are being manipulated are sorted by date. If FIFO is desired, the oldest items are removed. If LIFO, then the newest items. FIFO and LIFO are simple rules which may not fit all cases. If you are talking about multiple purchases of the same company's securities (stock market purchases), you can handle each purchase as a separate lot. For tax purposes, it may be convenient to chose one lot or the other when selling stock in the company. If the sales transaction results in a loss, you may wish to chose a newer lot so as to make the transaction a short-term loss. etc. etc. On Thu, 2006-05-11 at 11:49 +1200, Barry Clearwater wrote: <snip> > Dieter (and others) have said that the stock in and out is handled in a > FIFO method. To me, FIFO means a stack. Where exactly is this stack, > how big is it and which table holds its data? > > There *must* be a solution to this, though I think Ed's over simplifying > it in his pseudo-code below here. > <snip> > LOL > Barry