This commit is contained in:
Gwenhael Le Moine 2014-10-20 12:53:02 +02:00
parent 0c25ceec42
commit c3e2ed0b60

View file

@ -65,6 +65,7 @@ module Ledger
end
def cleared
# TODO: refactor : replace awk and grep by Ruby and use run
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 ],