# * amount layout tests, using default vertical layout
# ** 1. print
<
2010/1/1
    a  EUR 1  ; a euro
    b  USD 1  ; a dollar
    c         ; a euro and a dollar
$ hledger -f - print --explicit
2010-01-01
    a           EUR 1  ; a euro
    b           USD 1  ; a dollar
    c          EUR -1  ; a euro and a dollar
    c          USD -1  ; a euro and a dollar

>= 0

# ** 2. register
<
2010/1/1
    a  EUR 1  ; a euro
    b  USD 1  ; a dollar
    c         ; a euro and a dollar
$ hledger -f - register
2010-01-01                      a                            EUR 1         EUR 1
                                b                            USD 1         EUR 1
                                                                           USD 1
                                c                           EUR -1              
                                                            USD -1             0

# ** 3. balance
<
2010/1/1
    a  EUR 1  ; a euro
    b  USD 1  ; a dollar
    c         ; a euro and a dollar
$ hledger -f - balance -N
               EUR 1  a
               USD 1  b
              EUR -1
              USD -1  c

# ** 4. a single-commodity zero amount's commodity/decimal places/price is preserved, when possible
<
2010/3/1 x
  a  $0.00 @ 3EUR
  b
$ hledger -f- print --explicit --empty
2010-03-01 x
    a    $0.00 @ 3EUR
    b            0EUR

>= 0

# ** 5.
# When preserving a zero amount's commodity, we should also preserve
# the amount style, such as where to place the symbol.
# https://github.com/simonmichael/hledger/issues/230
<
D 1000,00€

1/1
      a:b         0

1/2
      a:1      4000,58
      a:D     -1000,58
      e       -3000
$ hledger -f- balance --tree -N
            3000,00€  a
            4000,58€    1
           -1000,58€    D
           -3000,00€  e


# ** 5. mixed amounts with prices
# XXX
# hledger -f - print
# <<<
# 2010/1/1
#     a  EUR 1 @ USD 1.1 ; a euro
#     b  USD 1  ; a dollar
#     c         ; a euro and a dollar
# >>>
# 2010-01-01
#     a  EUR 1 @ USD 1.1  ; a euro
#     b         USD 1  ; a dollar
#        EUR -1 @ USD 1.1                       
#     c            USD -1  ; a euro and a dollar
#
##
# 2010-01-01
#     a  EUR 1 @ USD 1.1  ; a euro
#     b       USD 1.0  ; a dollar
#     c      USD -2.1  ; a euro and a dollar
#
#>>>=0
#
# #
# hledger -f - register
# <<<
# 2010/1/1
#     a  EUR 1 @ USD 1.1 ; a euro
#     b  USD 1  ; a dollar
#     c         ; a euro and a dollar
# >>>
# 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
#>>>=0
#
# #
# hledger -f - balance
# <<<
# 2010/1/1
#     a  EUR 1 @ USD 1.1 ; a euro
#     b  USD 1  ; a dollar
#     c         ; a euro and a dollar
# >>>
#                EUR 1  a
#              USD 1.0  b
#             USD -2.1  c
# --------------------
#                EUR 1
#             USD -1.1
