summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortv <tv@nomic.retiolum>2013-11-15 11:27:52 +0100
committertv <tv@nomic.retiolum>2013-11-15 11:27:52 +0100
commit317ddcfd91dd351d4a957793bf7b7fc2da7a8969 (patch)
tree63349120c928eba61b98b2aef5df6b19ef963870
parent15030e13242fa464619c63c54294043d69a3ba0f (diff)
ledger balance: drop 0-accounts
-rwxr-xr-xledger/lib/balance5
1 files changed, 4 insertions, 1 deletions
diff --git a/ledger/lib/balance b/ledger/lib/balance
index c9a1fd87..deb50d15 100755
--- a/ledger/lib/balance
+++ b/ledger/lib/balance
@@ -67,9 +67,12 @@ function display_accounts() {
for (name in accounts) {
for (u in accounts[name]) {
+ balance = accounts[name][u]
+ if (balance == 0) {
+ continue
+ }
fmt = "NAME BALANCE UNIT\n"
- balance = accounts[name][u]
if (colorize) {
sub("BALANCE", "[" (balance < 0 ? 31 : 32) "m&", fmt)