Equivelent of not command in Beancount / Fava

113 views
Skip to first unread message

Toby

unread,
Aug 25, 2021, 1:50:43 PM8/25/21
to Beancount
Hi
 Is there an equivalent command of 'not' in Beancount. hledger has not: function to filter accounts.
Ledger also has something similar. Does Fava (or Beancount) have something similar?
 
Also I am trying to use the commodity function but I am struggling to find a way to increase a price of a commodity. Is Beancount suitable for this ? 
 
Following is an example:-
 
2021-01-01 * "Purchase Apple 10 Apples for 1.50 USD "  
   Assets:Inventory:Apple   10 Apple @ 1.50 USD                        ;
   Assets:Cash
 
2021-01-01 * "Cash Transaction for the Apple"
  Expenses:Cash                  15.00
  Assets:Cash
 
 
Suppose I wanted to increase the price of the Apple. How would I go about doing so?
For example if I paid 5.00 USD for Fuel and wanted to factor that in to the inventory price.
 
Is it possible to do this on Beancount?

Thanks

Patrick Ruckstuhl

unread,
Aug 25, 2021, 1:59:23 PM8/25/21
to bean...@googlegroups.com

Hi,


to change the price you can do

2021-08-25 price Apple 1.75 USD


See https://beancount.github.io/docs/beancount_language_syntax.html#prices


There are also a lot price fetchers, see https://github.com/beancount/beanprice (or other custom fetchers)


The last thing to be aware, that beancount has both prices and costs. Prices can change, but cost stays the same once you purchased a commodity, this will allow you to calculate capital gains.

See https://beancount.github.io/docs/beancount_language_syntax.html#costs-and-prices


Regards,

Patrick

--
You received this message because you are subscribed to the Google Groups "Beancount" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beancount+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/beancount/29436d55-a2c1-4372-a64c-60ea75a7ea76n%40googlegroups.com.

Toby O

unread,
Aug 25, 2021, 3:13:35 PM8/25/21
to bean...@googlegroups.com
Hi Patrick,
Thanks. I don't know why I didn't think of that! It seems like a good way to price commodities.
Also thanks for the heads-up between price and cost. Good to know.

Do you happen to know any similar command as 'not' for Fava/Beancount to filter/limit accounts?




Reply all
Reply to author
Forward
0 new messages