Specifying conversion rates in a query

17 views
Skip to first unread message

Kamal Marhubi

unread,
Apr 27, 2018, 9:34:20 PM4/27/18
to bean...@googlegroups.com
I'm preparing my taxes and have some conversions to make: my taxes are reported in CAD, but many expenses are in USD. These all currently have rates at the time the conversion was made, however for reporting my accountant wants me to use a single rate for the entire year.

The best I've come up with so far is to add a price directive with the desired rate and use that date in the CONVERT function in my query. Are there other things I could do?

Thanks,

-Kamal

Martin Blais

unread,
Apr 28, 2018, 12:32:05 AM4/28/18
to Beancount
Interesting case, which merits looking at it a bit more closely to make sure your solution works.
On the one hand, you need the rate at the time in order to balance your transaction.
On the other hand, when you're reporting, you could insert a column at a fixed rate like this.


--
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/CAK-ZPemUA3O48GQh3FU-SEjbNj_GgXpXrHpEh9BrJNJhcCO42Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Martin Michlmayr

unread,
Apr 28, 2018, 3:37:58 AM4/28/18
to bean...@googlegroups.com
* Kamal Marhubi <ka...@marhubi.com> [2018-04-28 01:34]:
> The best I've come up with so far is to add a price directive with the
> desired rate and use that date in the CONVERT function in my query. Are
> there other things I could do?

I don't think so (not 100% sure though), but I opened a request some
time ago to make this possible:

https://bitbucket.org/blais/beancount/issues/237/convert-should-accept-a-price-as-parameter
CONVERT() should accept a price as parameter

--
Martin Michlmayr
http://www.cyrius.com/
Reply all
Reply to author
Forward
0 new messages