Appropriate method to work Inventories

71 views
Skip to first unread message

Toby

unread,
Sep 13, 2021, 5:37:53 AM9/13/21
to Beancount
Hi,
I am trying to use Beancount to track inventories and I am a little confused on how to do this correctly. I understand that there is costs and pricing and that @@ is used to denote price (which can change) and {{}} which the cost and can't change.

Let me explain here :-

2021-01-01 * "Purchase Some Supplies"
    Assets:Inventory:Banana                10 PCS  {{30 USD}}
    Assets:Inventory:Apple                   2 PCS     {{50 USD}}
    Assets:inventory:Orange                3 PCS      {{20 USD}}
    Assets:Cash                                     100.00 USD
 
Or :-

2021-01-01 * "Purchase Some Supplies"
    Assets:Inventory:Banana                10 PCS  @@ 30 USD
    Assets:Inventory:Apple                   2 PCS   @@ 50 USD
    Assets:inventory:Orange                3 PCS    @@ 20 USD
    Assets:Cash                                     100.00 USD
 

I often get weird output when working with commodities (they are always getting revalued) and the numbers don't add up. I have tried multiple things such as :-

2021-01-01 * "Purchase Some Supplies"
    Assets:Inventory:Banana                30 USD  {{10 PCS}}
    Assets:Inventory:Apple                   50 USD {{2 PCS}}
    Assets:inventory:Orange                20 USD  {{3 PCS }}
    Assets:Cash                                     100.00 USD


The above seems to fix the valuation problem (commodities don't get revalued) but its a little complicated. Is there any guides on how to work with commodities?

Thanks

redst...@gmail.com

unread,
Sep 13, 2021, 11:21:58 PM9/13/21
to Beancount
Yes, there's extensive documentation:


I suggest reading and understanding those, and avoiding the @@ and {{ notations, at least at the beginning. Use @ and {} instead.

If you have specific problems, send us an output of your query, what you expect, and what you get.

Hope that helps!

Simon Michael

unread,
Sep 18, 2021, 7:45:04 PM9/18/21
to bean...@googlegroups.com
On 9/12/21 11:37 PM, Toby wrote:
> The above seems to fix the valuation problem (commodities don't get
> revalued) but its a little complicated. Is there any guides on how to
> work with commodities?

You might also be interested in this recent how-to, showing inventory
tracking without @/{} :

https://hledger.org/inventory.html

Reply all
Reply to author
Forward
0 new messages