assets and equities

This commit is contained in:
Gwenhael Le Moine 2014-10-20 12:41:56 +02:00
parent f28972bd0c
commit 896da4c328

View file

@ -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 ],