# * --related flag with balance, register commands

# ** 1. With --related, balance will display related accounts
$ hledger -f sample.journal bal --related checking -N
                  $1  assets:bank:saving
                 $-1  income:gifts
                 $-1  income:salary
                  $1  liabilities:debts
>=

# ** 2. Also works for multi-period reports
$ hledger -f sample.journal bal --related checking -NY
Balance changes in 2008:

                    || 2008 
====================++======
 assets:bank:saving ||   $1 
 income:gifts       ||  $-1 
 income:salary      ||  $-1 
 liabilities:debts  ||   $1 
>=

# ** 3. for register, related postings will only display each posting once
<
P 2021-01-01 A  10 B

2021-01-01
  (a)    1 A
  (a)    2 A
  (b)    3 A

$ hledger -f- register a --related
2021-01-01                      (b)                            3 A           3 A
>=

# ** 4. related postings will display valued postings when requested
$ hledger -f- register a --related -V
2021-01-01                      (b)                           30 B          30 B
>=
