On Friday, February 19, 2016 at 1:26:31 PM UTC-5, John Wiegley wrote:
>
> >>>>> Michael Ploujnikov <[email protected] <javascript:>> writes: 
>
> > I also agree that it would be really nice to be able to get a collapsed 
> flat 
> > account listing. Someone else opened a bug about it two years ago: 
>
> You'd need --flat --empty to show accounts in the balance report with no 
> postings in them. 
>

Using --flat and --empty on thierry's file results in no output. Probably 
because accounts Expenses:House and Expenses:Travel don't exist.

The only way I was able to get the expected results is if I created the 
accounts by initializing their balance to zero with:

2008/01/01 XYZ
    Expenses:House                             $0.00
    Expenses:Travel                            $0.00
    Equity

 Then I can finally get the desired expenses summary:

ledger -f /tmp/test --flat --depth 2 balance Expenses
             $140.00  Expenses:House
             $280.38  Expenses:Travel
--------------------
             $420.38



> Also, C++Ledger has had an "accounts" command for a very long time: 
>
>     ledger accounts 
>
> Printing out the name of every account (as if by --flat, so not 
> hierarchically), whether it contains postings are not. 
>
> -- 
> John Wiegley                  GPG fingerprint = 4710 CF98 AF9B 327B B80F 
> http://newartisans.com                          60E1 46C4 BD1A 7AC1 4BA2 
>

-- 

--- 
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].
For more options, visit https://groups.google.com/d/optout.

Reply via email to