If I have a ledger file like this:
"""
= /^Asset:Shares/
(Virtual Account) 1
2011/01/01 Opening Balances
Asset:Checking $100.00
Equity:Opening Balance
2011/01/01 Buying Shares
Asset:Shares 5 Units @@ $20
Asset:Checking
"""
Then my Virtual Account ends up containing 5 Units
$ ledger bal -f test.txt Virtual
5 Units Virtual Account
Is there any way to tell the automated transaction to pick up the
dollar side of the posting so that Virtual Account ends up containing
$20?
I know about the -X and -V command line options, but I don't just want
to alter the final display, I want the Virtual Account to actually
contain dollars.
One workaround I tried was replacing the automated rule with something
like this:
= /^Asset:Checking/&p/Buying Shares/
(Virtual Account) -1
but that doesn't seem to do anything. Have I got the syntax wrong? By
my reading of http://ledger-cli.org/3.0/doc/ledger.html#Value-expressions
that should match any posting to Asset:Checking with a description
containing "Buying Shares"
Thanks,
- Richard