Hi, When recording expenses in a foreign currency, I want to see how much I had spent in my base currency (USD) as of the date of the transaction. If I record the price at which I want the foreign currency valued and use `--historical --exchange USD`, it gets what I want for the most part. However, credit cards have their own rate and I would like to have the ledger reflect that, but I can't seem to figure out how to do so correctly.
Consider: P 2025-01-01 00:00:00 USD 150.00 JPY 2025-01-01 Should be 10.00 USD Assets:Cash -1500 JPY Expenses:Food 1500 JPY 2025-01-01 Credit Cards Use One-Off Exchange Rate Liabilities:Credit -11.00 USD Expenses:Food 1500 JPY @@ 11.00 USD 2025-01-01 Should still be 10.00 USD Assets:Cash -1500 JPY Expenses:Food 1500 JPY $ ledger --file /tmp/test.ledger --price-db /dev/null register Food --exchange USD --historical 2025-01-01 Should be 10.00 USD Expenses:Food 11.00 USD 11.00 USD 2025-01-01 Credit Cards Use One-Off Exchange Rate Expenses:Food 11.00 USD 22.00 USD 2025-01-01 Should still be 10.00 USD Expenses:Food 11.00 USD 33.00 USD If I set the posting cost as above, it creates a pricedb entry that affects the cash purchases. If I use a virtual posting cost using (@@), the pricedb entry doesn't get created, but `--historical --exchange USD` seems to ignore the explicit posting cost, so all 3 postings get valued at 10.00 USD. Is this intended behavior? If so, how can I have it show the Cash transactions as 10.00 USD and the Credit transaction as 11.00 USD? Thanks, Henry -- --- You received this message because you are subscribed to the Google Groups "Ledger" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion visit https://groups.google.com/d/msgid/ledger-cli/CACTkciO%3DM0_O6a8M8ggQqYmHhSzwBM2QDECFCrVTBMaophoZ6g%40mail.gmail.com.
