mirror of
https://github.com/gwenhael-le-moine/ledgerrb.git
synced 2025-02-11 08:48:11 +01:00
percentage and amounts as numbers
This commit is contained in:
parent
b6b1f30ccf
commit
39c77c4333
1 changed files with 3 additions and 3 deletions
|
@ -85,9 +85,9 @@ module Ledger
|
||||||
ary = line.split
|
ary = line.split
|
||||||
|
|
||||||
{ currency: ary[1],
|
{ currency: ary[1],
|
||||||
amount: ary[0],
|
amount: ary[0].to_f,
|
||||||
budget: ary[2],
|
budget: ary[2].to_f,
|
||||||
percentage: ary.last( 2 ).first,
|
percentage: ary.last( 2 ).first.gsub( /%/, '' ).to_f,
|
||||||
account: ary.last }
|
account: ary.last }
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Reference in a new issue