Viewing transactions with multiple currencies

83 views
Skip to first unread message

Ken Mankoff

unread,
Apr 6, 2024, 10:34:08 AMApr 6
to Beancount
Hello,

I'd like to be able to see (in Fava) the total expenses (USD only) vs the total cost (USD, POINT, MILE) of a vacation I took, where some of the expenses were paid with points and miles.

How should I book these transactions?

For this transaction,

2024-01-01 price POINT 0.01 USD
2024-01-19 * "Hotel"
    Expenses:Travel:Lodging            
    Liabilities:CC               -68.30 USD
    Assets:Points             -40000 POINT

I've tried

1)    Assets:Points             -40000 POINT
2)    Assets:Points             -40000 POINT @ 0.01 USD
3)    Assets:Points             -40000 POINT {0.01 USD}

(2) and (3) always show up as USD, even if I select "At cost" or "Units" in Fava

(1) does what I want... but relies on the 'global' POINT -> USD conversion. I'm wondering if there is an explicit conversion method like (2) or (3) though, because if I have several point accounts, and am regularly spending points at different values with different merchants, I'd prefer to track conversion per-transaction than update a global value. The global value doesn't work if I have two transactions in the same day with different conversions.

Thanks,

   -k.

Timothy Jesionowski

unread,
Apr 6, 2024, 1:31:13 PMApr 6
to bean...@googlegroups.com
Maybe try:
Assets:Points -400 USD @@ 40000 POINT

I'm not sure what Fava will render this as, but if you care about the total cost in points more than the exchange rate then this is clearer in your ledger.


Sincerely,
Timothy Jesionowski


--
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/9495bfe9-a234-40ba-a4d1-77cb6479c485n%40googlegroups.com.

Ken Mankoff

unread,
Apr 6, 2024, 4:20:22 PMApr 6
to Beancount
That works. I had to change the account currency from POINT to POINT,USD. And for some reason a pad followed by a balance in POINT=0 failed, and I had to change the balance to USD. But Fava now lets me see things in USD or POINT. Thank you.

Ken Mankoff

unread,
Jun 22, 2024, 12:40:53 PM (7 days ago) Jun 22
to Beancount
Following up here a few months later... I thought this syntax worked, and it does let me (in Fava) view either the actual cost (POINT) or the effective cost (in USD). However, it doesn't respect the exchange rate suggested by the syntax here, it uses an historical PRICE set elswhere. I've opened an issue with Fava to try to understand this (https://github.com/beancount/fava/issues/1827), but repeated here,

I'd expect:

2024-06-21 * "Delta BOS>SEA"
Expenses:Travel:Air
Assets:Other:MiscPoints -363.48 USD @@ 24232 POINT

To cost me 363.48 USD, but it uses the historical POINT price of 0.01 USD, so it cost $242.32. However, for this one transaction I got a 50 % bonus on my points, which is why I could by something worth ~360 for only ~24000.

I can get the conversion correct for this transaction with "Assets:Other:MiscPoints  -363.48 USD {0.15 POINT}", but then Fava displays it all in USD, not in cost (POINT). It didn't actually cost me $363 USD, so I don't want that display...

On Saturday, April 6, 2024 at 10:31:13 AM UTC-7 timothy.n....@gmail.com wrote:

Chary Chary

unread,
Jun 22, 2024, 2:45:55 PM (7 days ago) Jun 22
to Beancount
I am not using fava, but the behaviour you described is consistent with  beanquery CONVERT function.

You can probably use implicit_prices plugin, it shall insert a new price entry, derived from your entry (however it will stay there until you specify a new one)

But I do not think you need here. You wrote that you have received a 50% bonus. But this means, your flight was cheaper, not that price of the points was higher. 

I also I am not sure I understand, why you track your points in USD, and not in POINTS

Assets:Other:MiscPoints -363.48 USD @@ 24232 POINT

All together, this is how I would do it

2024-01-01 price POINT 0.01 USD
2024-01-01 price MILES 0.01 USD


2024-06-21 * "Delta BOS>SEA"
  Expenses:Travel:Air       363.48 USD
  Expenses:Travel:Air:Bonus       ;This will calculate and book a negative cost, which will be equivalent to a bonus, received in USD
  Assets:Other:MiscPoints  - 24232 POINT @ 0.01 USD


Reply all
Reply to author
Forward
0 new messages