Question about currency conversion

42 views
Skip to first unread message

victora...@gmail.com

unread,
Jul 20, 2016, 8:19:03 PM7/20/16
to Beancount
Hi there,

I live in Brazil and pay for many services in US Dollars using my Credit Card. For example:

2016-07-17 * "Apple" "iCloud 50GB"
  Expenses:Subscriptions                         0.99 USD
  Liabilities:CreditCard

In the end of every month I'll pay all my credit card expenses in Reais:

2016-07-18 * "Card payment"
  Liabilities:CreditCard                 91.84 USD @ 3.3 BRL
  Assets:Bank:Checking

Since the credit card company only determines the conversion rate between USD and BRL at the payment day, is there any way for Beancount to automatically convert my expenses using this conversion rate and show me how much the transactions costed in BRL on my reports?

Martin Blais

unread,
Jul 21, 2016, 8:56:50 PM7/21/16
to Beancount
Well the expenses occur *before* the payment, so it's difficult to have the exact same rate.
If you don't care to use the precise rate of your payment, and you have recent enough price directives in your files, you can use the following to get the report you want:

bean-query brlconvert.beancount "select account, convert(sum(position), 'BRL') where account ~ 'Expenses' group by 1"


Reply all
Reply to author
Forward
0 new messages