* psionl0 <gsch...@iinet.net.au> [2021-12-07 19:18]: > Ledger doesn't need to "know" the conversion rate when a transaction > contains multiple currencies. It just has to "assume" that whatever > the exchange rate is will balance the transaction (ie assume > nothing).
Your "assume nothing" is to assume something. I don't want ledger to make assumptions. I want ledger to enforce the balancing requirement. Personally I don't like that ledger allows implicit conversations since ledger assumes an exchange rate. Beancount, for example, requires an explicit exchange rate when there are only two postings / two commodities. Let's do: 2021-12-08 * Test Assets:A 10.00 EUR Assets:B -8.52 GBP If you know roughly the values of EUR and GBP, this transaction looks obviously correct to you. But this requires a lot of knowledge (i.e. assumptions about the world). Now: 2021-12-08 * Test Assets:A 1000 EUR ; let's say I forgot the . between the 00s Assets:B -8.52 GBP You'd probably agree that this isn't quite right, yet ledger will happily assume an (incorrect) exchange rate. Using explicit exchange rates makes ledger enforce the balancing requirement. If I had done: 2021-12-08 * Test Assets:A 1000 EUR @ 0.852 GBP Assets:B -8.52 GBP ledger would complain. You *WANT* ledger to complain. You don't want ledger to assume. > The reason why I question this is that ledger could also be used to > record items of stock in the same way that it records currencies. > Unfortunately, as it stands, I have to record the purchase or sale > of each item of stock individually which breaks up the bank > transaction and makes it more difficult to reconcile with my bank > statement. Using @ or @@ prevents ledger from displaying the > individual item totals in the balance report (they have all been > converted). Maybe you could give an example, so it's clearer. -- Martin Michlmayr https://www.cyrius.com/ -- --- 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 ledger-cli+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/ledger-cli/YbB7KSmzmRXC9OX7%40jirafa.cyrius.com.