Apologies -- I hit send too soon.
First, an additional data point: If I paste the contents of testequity.dat
at the top of testfile.dat and delete the !include directive:
--8<---------------cut here---------------start------------->8---
2005/01/03 Opening Balances
Assets:Current:Checking $-1,000.00
Liabilities:CredCard $1,000.00
(Virtualaccount) $1,000.00
Equity:Opening Balances $-1,000.00
2006/01/03 Gift shop
Expenses:Gifts $46.50
* Liabilities:CredCard
2006/01/03 Bike shop
Expenses:Misc $199.00
* Liabilities:CredCard
(testvirtual) $184.72
2006/01/04 Store
Expenses:Misc $49.95
* Liabilities:CredCard
--8<---------------cut here---------------end--------------->8---
then ledger still fails:
ledger -f testfile.dat bal -R
--8<---------------cut here---------------start------------->8---
While parsing file "testfile.dat", line 7:
While balancing transaction from "testfile.dat", lines 3-7:
> 2005/01/03 Opening Balances
> Assets:Current:Checking $-1,000.00
> Liabilities:CredCard $1,000.00
> (Virtualaccount) $1,000.00
> Equity:Opening Balances $-1,000.00
Unbalanced remainder is:
$-1,000.00
Amount to balance against:
$2,000.00
Error: Transaction does not balance
--8<---------------cut here---------------end--------------->8---
Second, I think my first analysis wasn't quite right -- the equity command
inserts the "Equity:Opening Balances $-1,000.00" line so that the
virtual account is included in the balancing, and then the balancing is
off because ledger commands *don't* include the virtual account in the
balancing.
--
John Rakestraw