diff --git a/lib/ledger.rb b/lib/ledger.rb index 8577eb85..33c8ec7f 100644 --- a/lib/ledger.rb +++ b/lib/ledger.rb @@ -65,7 +65,7 @@ module Ledger end def cleared - CSV.parse( `ledger -f #{@file} --exchange '#{CURRENCY}' --flat cleared Assets | grep Assets | awk '{ printf "%s %s;%s %s;%s\\n", $1, $2, $3, $4, $6 }'`, col_sep: ';' ) + CSV.parse( `ledger -f #{@file} --exchange '#{CURRENCY}' --flat cleared Assets Equity | awk '{ printf "%s %s;%s %s;%s\\n", $1, $2, $3, $4, $6 }' | grep -v ";$"`, col_sep: ';' ) .map do |row| { account: row[ 2 ], amount: { cleared: row[ 1 ],