~trufas/ledgeroni

2b5f5891a43f56b1c2c5e9f1ff826f57962137f4 — Rafael Castillo 1 year, 9 months ago 002c8ad
Don't include total in balance command when there's only one balance
1 files changed, 5 insertions(+), 4 deletions(-)

M ledgeroni/commands/balance.py
M ledgeroni/commands/balance.py => ledgeroni/commands/balance.py +5 -4
@@ 48,7 48,8 @@ def print_balance(ctx, filter_strs):
                           for c, a in aggregate.items())
        lvlstr += '  ' * level + Fore.BLUE + name + Style.RESET_ALL
        click.echo(lvlstr)
    click.echo('-' * 20)
    totalstr = '\n'.join(format_amount(c, a)
                         for c, a in total.items())
    click.echo(totalstr)
    if len(balances) > 1:
        click.echo('-' * 20)
        totalstr = '\n'.join(format_amount(c, a)
                             for c, a in total.items())
        click.echo(totalstr)