On Sat, Mar 16, 2024 at 12:40 PM lipp f <[email protected]> wrote:
> this is my test file: > 2024-1-1 Opening Balances > assets:broker 1000 AAPL > assets:broker 1000 "CNR.TO" > assets:broker 1000 "BAYN.DE" > assets:broker 100 USD > assets:broker 100 CAD > assets:broker 100 EUR > Equity:Opening Balances -1000 AAPL > Equity:Opening Balances -1000 "CNR.TO" > Equity:Opening Balances -1000 "BAYN.DE" > Equity:Opening Balances -100 USD > Equity:Opening Balances -100 CAD > Equity:Opening Balances -100 EUR > P 2024-03-15 AAPL 172.62USD > P 2024-03-15 "CNR.TO" 174.28CAD > P 2024-03-15 "BAYN.DE" 26.24EUR > > and these are the results: > $ ledger -f test.j --args-only bal assets:broker --limit > 'commodity(lot_price(amount)) == "EUR"' > 100 EUR assets:broker > $ ledger -f test.j --args-only bal assets:broker --group-by > 'commodity(lot_price(amount))' > "BAYN.DE" > 1000 BAYN.DE assets:broker > > "CNR.TO" > 1000 CNR.TO assets:broker > > AAPL > 1000 AAPL assets:broker > > CAD > 100 CAD assets:broker > > EUR > 100 EUR assets:broker > > USD > 100 USD assets:broker > > not what was expected. > > IANAA but it seems to me that you are trying to do something in one set of books that just isn't normally done. AIUI when I set up my books (and still use this) a set of books was designated in one currency with all transactions in any other currency being done in the 'home' currency. (And yes I do at least some work in other currencies. Even large companies - - - ie multi-national ones do similar. Work is done in one currency and then when a report is pulled (closing at say 20240115 for arguments sake) all the ledgers are closed in the main ledger which is in one currency and all the other currencies are adjusted into that one currency. Is not that you can't have more than one currency in a set of books but then what you have is currency related 'messy'. So - - - in a microcosm you get to do what that multinational company does - - - use different account numbers for similar functions in each of the different currencies. Ja - - - its a pain - - - but your trying to stuff a dodecahedron into a sphere and wondering why the balloon is popping - - - but the ballon was never designed to hold the dodecahedron. In my books in account '1000' which is Cash bank drafts, bank notes, checks, coins, currency, money orders, postal notes and post-dated checks I have different account numbers (yes I use more than 4 digits and the newer system which uses 5 digits and is quite new I haven't adjusted to yet (GIFI courtesy of your tax bureaucracy) for each of the cash items. I do this so I can pull up the asset values in each currency BUT my books are still done in ONE currency. This kind of thing is NOT going to make your books easier but if you get audited it will make them easier to follow by whomever is doing that (which will likely make things easier for you at that point!!). HTH -- --- 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 on the web visit https://groups.google.com/d/msgid/ledger-cli/CAPpdf5-9kW9k8RDOri8VJ4FhqJ6FYqLsxTD11hoMb_XpytJp7g%40mail.gmail.com.
