mirror of
https://github.com/simonmichael/hledger.git
synced 2024-11-08 07:09:28 +03:00
5c09553481
Related to #563, when rendering a transaction, we reserve two more chars of width so that amounts remain aligned when there are posting flags. Affects hledger-ui's transaction screen, print, hledger-rewrite etc.
50 lines
956 B
Plaintext
50 lines
956 B
Plaintext
# a commodity may contain/end with numbers, if double quoted
|
|
# 1. without quotes, fail. XXX parse error should be clearer here
|
|
hledger -f- print
|
|
<<<
|
|
2010-04-05 x
|
|
a 10 DE0002635307
|
|
b
|
|
>>>2 /unexpected/
|
|
>>>= 1
|
|
# 2. with quotes, ok; quotes appear in print output
|
|
hledger -f- print --explicit
|
|
<<<
|
|
2010-04-05 x
|
|
a 10 "DE 0002 635307"
|
|
b
|
|
>>>
|
|
2010/04/05 x
|
|
a 10 "DE 0002 635307"
|
|
b -10 "DE 0002 635307"
|
|
|
|
>>>=0
|
|
|
|
# 3. and in other reports too, I guess
|
|
hledger -f- balance
|
|
<<<
|
|
2010-04-05 x
|
|
a 10 "DE0002635307"
|
|
b
|
|
>>>
|
|
10 "DE0002635307" a
|
|
-10 "DE0002635307" b
|
|
--------------------
|
|
0
|
|
>>>=0
|
|
|
|
# 4. autobalance with prices, using short form of --explicit this time
|
|
hledger -f- print -x
|
|
<<<
|
|
2016/1/1
|
|
saving-card $-105
|
|
snacks 95 EUR @@ $100
|
|
Equity:Unbalanced
|
|
>>>
|
|
2016/01/01
|
|
saving-card $-105
|
|
snacks 95 EUR @@ $100
|
|
Equity:Unbalanced $5
|
|
|
|
>>>=0
|