Bug 1204

Summary: --empty option does not work
Product: Ledger Reporter: Owen Heisler <owenh000>
Component: reportAssignee: John Wiegley <johnw>
Status: UNCONFIRMED ---    
Severity: normal CC: owenh000
Priority: P5    
Version: 3.1.1   
Hardware: PC   
OS: Linux   

Description Owen Heisler 2017-03-16 16:44:17 UTC
The `--empty` option has no effect on the output of the `balance` command. I expect the `--empty` option to cause the `balance` report to display all accounts that have been declared with the `account` command, even if they are zero balance or are parent accounts.

Here is an example journal.

account Assets
account Expenses
account Expenses:Clothing
account Expenses:Food
account Income

2017-03-15 Employer
    Income             $-100
    Assets              $100

2017-03-15 Restaurant
    Assets              $-20
    Expenses:Food        $20

Ledger shows the same balance report with or without `--empty`:

$ ledger --no-total --empty balance
                 $80  Assets
                 $20  Expenses:Food
               $-100  Income

$ ledger --version | head -n1
Ledger 3.1.1-20160111, the command-line accounting tool

This is the expected output:

$ ledger --no-total --empty balance # EXAMPLE
                 $80  Assets
                 $20  Expenses
                   0    Clothing
                 $20    Food
               $-100  Income

Thank you!