-X EUR will produce a total at the current exchange rate, rather than
the historic exchange rate due to "Commodities revalued":
| 12760:tbm@jirafa: ~] ledger -f a.ledger reg -X EUR expenses:
| 2011-01-01 A Expenses:Whatever -11.50 EUR -11.50 EUR
| 2011-02-01 Commodities revalued <Revalued> -1.00 EUR -12.50 EUR
| 2011-02-01 B Expenses:Whatever -12.50 EUR -25.00 EUR
| 2011-03-01 Commodities revalued <Revalued> -2.00 EUR -27.00 EUR
| 2011-03-01 C Expenses:Whatever -13.50 EUR -40.50 EUR
-X EUR -O will not show the "Revalued" transacations but they are still
there if you look at the total.
| 12761:tbm@jirafa: ~] ledger -f a.ledger reg -X EUR -O expenses:
| 2011-01-01 A Expenses:Whatever -11.50 EUR -11.50 EUR
| 2011-02-01 B Expenses:Whatever -12.50 EUR -25.00 EUR
| 2011-03-01 C Expenses:Whatever -13.50 EUR -40.50 EUR
I'm looking to ledger to tell me that the total is 37.50 EUR (11.50 +
12.50 + 13.50). Is this possible?
Is this the old "-X implies -V" problem we discussed before?
ledger file:
D 1000.00 EUR
P 2011-01-01 GBP 1.15 EUR
P 2011-02-01 GBP 1.25 EUR
P 2011-03-01 GBP 1.35 EUR
2011-01-01 * A
Assets:Cash 10.00 GBP
Expenses:Whatever
2011-02-01 * B
Assets:Cash 10.00 GBP
Expenses:Whatever
2011-03-01 * C
Assets:Cash 10.00 GBP
Expenses:Whatever
--
Martin Michlmayr
http://www.cyrius.com/
> I'm working on my tax return and I have to convert foreign currency
> income/expenses transacations at the rate on the date of the
> transacation.
You can use -e DATE to report up to a given date, with valuation done as of
that date.
Or you can use --now DATE to valuate anything as if DATE was today.
John
Right, but neither of those do what I want. What I need is a list of
transactions with the valuation of the date of the transaction (and
without any later revaluation). I think this is a pretty common use
pattern so it would be nice if ledger would support it.
Just to clarify what I'm looking for. Right now, I get this:
| 12761:tbm@jirafa: ~] ledger -f a.ledger reg -X EUR -O expenses:
| 2011-01-01 A Expenses:Whatever -11.50 EUR -11.50 EUR
| 2011-02-01 B Expenses:Whatever -12.50 EUR -25.00 EUR
| 2011-03-01 C Expenses:Whatever -13.50 EUR -40.50 EUR
The individual amounts are correct:
10.00 GBP at 1.15 on 2011-01-01 is 11.50 EUR
10.00 GBP at 1.25 on 2011-02-01 is 12.50 EUR
10.00 GBP at 1.35 on 2011-03-01 is 13.50 EUR
However, the total includes a revaluation. What I'm looking for are
the historical prices on the day of the transaction, and sum those
up, i.e.:
| 2011-01-01 A Expenses:Whatever -11.50 EUR -11.50 EUR
| 2011-02-01 B Expenses:Whatever -12.50 EUR -24.00 EUR
| 2011-03-01 C Expenses:Whatever -13.50 EUR -37.50 EUR
I believe the underlying problem here is that -X implies -V. I've
tried to argue in the past that -X should be decoupled from -V
and this example seems like a good reason why.
> Right, but neither of those do what I want. What I need is a list of
> transactions with the valuation of the date of the transaction (and
> without any later revaluation). I think this is a pretty common use
> pattern so it would be nice if ledger would support it.
Ah, this is in the schedule to be done soon, just, need, time...
John