Let's assume you have some kind of points which can be converted to
USD at 0.75 cents or converted to air miles 1:1.

If we do:

2010-01-01 open Assets:Test
2010-01-01 open Expenses:Whatever

2018-03-20 * "Use MR for purchase"
  Expenses:Whatever                     42.30 USD
  Assets:Test               -5641 MR @@ 42.30 USD

2018-03-21 * "Convert MR to miles"
  Expenses:Whatever                    1 KRISFLYER
  Assets:Test                 -1 MR @@ 1 KRISFLYER

everything is fine.

However, let's be masochistic and track these MR points at a cost of
0.075 cents:

option "inferred_tolerance_default" "USD:0.01"

2010-01-01 open Assets:Test
2010-01-01 open Equity:Opening-Balance
2010-01-01 open Expenses:Whatever
2010-01-01 open Assets:Krisflyer

2018-03-20 * "MR is treated as a commodity"
  Assets:Test               10000 MR {0.0075 USD}
  Equity:Opening-Balance

2018-03-20 * "Use MR for purchase"
  Assets:Test                  -5641 MR {0.0075 USD}
  Expenses:Whatever                      42.31 USD

2018-03-21 * "Convert MR to KrisFlyer"
  Assets:Test                -100 MR {0.0075 USD} @ 1 KRISFLYER
  Assets:Krisflyer

Now:

bean-report d5 balances -e Assets:Krisflyer
Assets:Krisflyer        0.7500 USD

Why is this USD and not 100 KRISFYLER?  Is there any way to convert
something with cost USD to some other commodity or do you always have
to convert to the cost commodity (i.e. USD here)?

It sort of makes sense because how else can the gain be calculated?
But ledger happily creates 100 KRISFYLER in the example above and
somehow this ought to be possible but I don't know how.

Maybe my transactions are not right because of my ledger-mindset
(i.e. I'm confusing costs and prices all the time) but how would
I do this?

-- 
Martin Michlmayr
http://www.cyrius.com/

-- 
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 [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beancount/20180321182838.lkm26fpp3fnihuz7%40jirafa.cyrius.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to