Total cost: {{}} or @@?

64 views
Skip to first unread message

man...@gmail.com

unread,
Oct 8, 2017, 8:19:21 AM10/8/17
to Beancount
The Cheat Sheet says total cost syntax is {{nn CUR}}, but the Language Syntax Document says it is "@@ nn CUR".

Is one incorrect? Is one preferred?

  -k.

Martin Blais

unread,
Oct 8, 2017, 11:44:48 AM10/8/17
to Beancount
Two remarks:

- {{ }} is outdated. One should use the newer syntax, e.g. {# 3000.00 USD} instead. Note that a combination of per-unit and total amounts is possible, e.g. {72.34 # 9.95 USD} would (num_units * 72.34 + 9.95).

- {} is for cost basis. @ (and @@) is for price. These are different things. {} attaches the per-unit cost to what's deposited in the account. @ doesn't. More in the docs.






--
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+unsubscribe@googlegroups.com.
To post to this group, send email to bean...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/beancount/77e6c1f8-6bc2-4597-880c-34693719d68c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages