incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alan Bell <>
Subject Re: FIFO/LIFO accountancy
Date Wed, 03 Feb 2010 15:52:14 GMT

Metin Akat wrote:
> 4. Lets sell 6 apples to a customer, 5 dollars each. I won't go into
> much detail on why this is required by accountancy standards but if we
> use FIFO here, we must issue 2 transactions. One removing 5 apples at
> 2 dollars and another, removing 1 apple at 3 dollars. The profit is
> recorded in another account where it's 5x3 = 15 for the first
> transaction and 2x1=2 for the second transaction.
I am a bit puzzled by the need to do this. FIFO stock control is one
thing, and you could put dates on your batches of stock and have them
degrade over time if they are fresh produce, that would get you the
ability to control the sequence in which they are sold. Ultimately from
your description apples are apples, you are selling them all at $5. I
don't understand why you are crediting the warehouse at the cost price
I would put in a transaction like this:

{ "action": "CREDIT", "account" : "warehouse", "value": 30, "asset":"apples", "qty": 6}

so now your warehouse view would show a stock level of 4 apples and an
overall positive balance of $5, which you can sweep into another account

View raw message