>>>>> "VP" == Vladimir Parfinenko <
vladimir....@gmail.com> writes:
VP> My ledger file looks like this:
VP> 2024-10-10 foo
VP> expenses ; :bar:
VP> assets:first -5 USD
VP> assets:second -3 USD
VP> assets:third -10 EUR
VP> And I expect that `balance %bar` would be 8 USD and 10 EUR. However, only
VP> the USD posting was tagged by ledger and balance shows only 8 USD. Is it a
VP> bug or a feature?
This sounds like a bug to me. You are tagging a posting with an associated
balance. My guess is that oafter this line:
https://github.com/ledger/ledger/blob/johnw%2Fhashes/src/xact.cc#L149
We will need to duplicate the null_post’s metadata. Otherwise, only the first
commodity in the balance_t structure that we are balancing against will be
associated with the full metadata (such as your tag), while the balancing
postings created for all of the other commodity will be without any metadata
(and other details, it would seem).
Thank you for finding this!
John