2011-01-19 22:00:42 +03:00
|
|
|
# amount layout tests, using default vertical layout
|
|
|
|
# 1. print
|
2012-10-21 22:23:23 +04:00
|
|
|
hledgerdev -f - print
|
2010-07-12 02:51:36 +04:00
|
|
|
<<<
|
|
|
|
2010/1/1
|
2012-12-06 04:28:23 +04:00
|
|
|
a EUR 1 ; a euro
|
|
|
|
b USD 1 ; a dollar
|
|
|
|
c ; a euro and a dollar
|
2010-07-12 02:51:36 +04:00
|
|
|
>>>
|
2011-01-19 21:55:16 +03:00
|
|
|
2010/01/01
|
2012-12-06 04:28:23 +04:00
|
|
|
a EUR 1 ; a euro
|
|
|
|
b USD 1 ; a dollar
|
2012-05-15 05:49:05 +04:00
|
|
|
EUR -1
|
2012-12-06 04:28:23 +04:00
|
|
|
c USD -1 ; a euro and a dollar
|
2010-07-12 02:51:36 +04:00
|
|
|
|
2011-03-12 23:55:49 +03:00
|
|
|
>>>=0
|
|
|
|
|
2011-01-19 22:00:42 +03:00
|
|
|
# 2. register
|
2012-10-21 22:23:23 +04:00
|
|
|
hledgerdev -f - register
|
2010-07-12 02:51:36 +04:00
|
|
|
<<<
|
|
|
|
2010/1/1
|
2012-12-06 04:28:23 +04:00
|
|
|
a EUR 1 ; a euro
|
|
|
|
b USD 1 ; a dollar
|
|
|
|
c ; a euro and a dollar
|
2010-07-12 02:51:36 +04:00
|
|
|
>>>
|
2013-04-13 01:56:41 +04:00
|
|
|
2010/01/01 a EUR 1 EUR 1
|
2010-07-12 02:51:36 +04:00
|
|
|
EUR 1
|
2013-04-13 01:56:41 +04:00
|
|
|
b USD 1 USD 1
|
|
|
|
EUR -1
|
|
|
|
c USD -1 0
|
2011-03-12 23:55:49 +03:00
|
|
|
>>>=0
|
|
|
|
|
2011-01-19 22:00:42 +03:00
|
|
|
# 3. balance
|
2012-10-21 22:23:23 +04:00
|
|
|
hledgerdev -f - balance
|
2010-07-12 02:51:36 +04:00
|
|
|
<<<
|
|
|
|
2010/1/1
|
2012-12-06 04:28:23 +04:00
|
|
|
a EUR 1 ; a euro
|
|
|
|
b USD 1 ; a dollar
|
|
|
|
c ; a euro and a dollar
|
2010-07-12 02:51:36 +04:00
|
|
|
>>>
|
|
|
|
EUR 1 a
|
|
|
|
USD 1 b
|
2011-06-21 01:33:26 +04:00
|
|
|
EUR -1
|
2010-07-12 02:51:36 +04:00
|
|
|
USD -1 c
|
|
|
|
--------------------
|
2011-04-22 17:50:05 +04:00
|
|
|
0
|
2011-03-12 23:55:49 +03:00
|
|
|
>>>=0
|
|
|
|
|
2014-05-07 08:00:49 +04:00
|
|
|
# 4. a zero amount is always displayed as just "0", regardless of any commodity/decimal places/price (like ledger)
|
|
|
|
#
|
|
|
|
hledgerdev -f- print --empty
|
|
|
|
<<<
|
|
|
|
2010/3/1 x
|
|
|
|
a $0.00 @ 3EUR
|
|
|
|
b
|
|
|
|
>>>
|
|
|
|
2010/03/01 x
|
|
|
|
a 0
|
|
|
|
b 0
|
|
|
|
|
|
|
|
>>>=0
|
|
|
|
|
|
|
|
# 5. mixed amounts with prices
|
2011-01-19 22:00:42 +03:00
|
|
|
# XXX
|
2012-10-21 22:23:23 +04:00
|
|
|
# hledgerdev -f - print
|
2011-01-19 22:00:42 +03:00
|
|
|
# <<<
|
|
|
|
# 2010/1/1
|
|
|
|
# a EUR 1 @ USD 1.1 ; a euro
|
2012-12-06 04:28:23 +04:00
|
|
|
# b USD 1 ; a dollar
|
|
|
|
# c ; a euro and a dollar
|
2011-01-19 22:00:42 +03:00
|
|
|
# >>>
|
|
|
|
# 2010/01/01
|
2012-12-06 04:28:23 +04:00
|
|
|
# a EUR 1 @ USD 1.1 ; a euro
|
|
|
|
# b USD 1 ; a dollar
|
2011-01-19 22:00:42 +03:00
|
|
|
# EUR -1 @ USD 1.1
|
2012-12-06 04:28:23 +04:00
|
|
|
# c USD -1 ; a euro and a dollar
|
2011-01-19 22:00:42 +03:00
|
|
|
#
|
|
|
|
##
|
|
|
|
# 2010/01/01
|
2012-12-06 04:28:23 +04:00
|
|
|
# a EUR 1 @ USD 1.1 ; a euro
|
|
|
|
# b USD 1.0 ; a dollar
|
|
|
|
# c USD -2.1 ; a euro and a dollar
|
2011-01-19 22:00:42 +03:00
|
|
|
#
|
2011-03-12 23:55:49 +03:00
|
|
|
#>>>=0
|
|
|
|
#
|
2011-01-19 22:00:42 +03:00
|
|
|
# #
|
2012-10-21 22:23:23 +04:00
|
|
|
# hledgerdev -f - register
|
2011-01-19 22:00:42 +03:00
|
|
|
# <<<
|
|
|
|
# 2010/1/1
|
|
|
|
# a EUR 1 @ USD 1.1 ; a euro
|
2012-12-06 04:28:23 +04:00
|
|
|
# b USD 1 ; a dollar
|
|
|
|
# c ; a euro and a dollar
|
2011-01-19 22:00:42 +03:00
|
|
|
# >>>
|
|
|
|
# 2010/01/01 a EUR 1 EUR 1
|
|
|
|
# EUR 1
|
|
|
|
# b USD 1.0 USD 1.0
|
|
|
|
# EUR 1
|
|
|
|
# c USD -2.1 USD -1.1
|
2011-03-12 23:55:49 +03:00
|
|
|
#>>>=0
|
|
|
|
#
|
2011-01-19 22:00:42 +03:00
|
|
|
# #
|
2012-10-21 22:23:23 +04:00
|
|
|
# hledgerdev -f - balance
|
2011-01-19 22:00:42 +03:00
|
|
|
# <<<
|
|
|
|
# 2010/1/1
|
|
|
|
# a EUR 1 @ USD 1.1 ; a euro
|
2012-12-06 04:28:23 +04:00
|
|
|
# b USD 1 ; a dollar
|
|
|
|
# c ; a euro and a dollar
|
2011-01-19 22:00:42 +03:00
|
|
|
# >>>
|
|
|
|
# EUR 1 a
|
|
|
|
# USD 1.0 b
|
|
|
|
# USD -2.1 c
|
|
|
|
# --------------------
|
|
|
|
# EUR 1
|
|
|
|
# USD -1.1
|