From 4504c173fb62c3e6355018d666bd7e92d4652032 Mon Sep 17 00:00:00 2001 From: Simon Michael Date: Thu, 25 Nov 2021 11:46:04 -1000 Subject: [PATCH] ;cln: clarify #1698 test --- hledger/test/balancesheet.test | 40 +++++++++++++++------------------- 1 file changed, 17 insertions(+), 23 deletions(-) diff --git a/hledger/test/balancesheet.test b/hledger/test/balancesheet.test index c96a6fde9..f8705ef72 100644 --- a/hledger/test/balancesheet.test +++ b/hledger/test/balancesheet.test @@ -328,37 +328,31 @@ $ hledger -f - balancesheet --tree --output-format=csv --drop 1 "total" "Net:","$1" -# 14. When declaring account types, we want boring parents to include their -# interesting children, including their historical postings. (#1698) +# 14. In compound reports like balancesheet, parent accounts might not have +# the appropriate type for a subreport, but in tree reports they should be +# displayed anyway, and with the right inclusive amounts and starting +# balances. (#1698) < -account assets:foobar:reserve ; type: Cash -account assets:foobar:current ; type: Cash -account assets:receivable:anon ; type: Asset +account assets:cash ; type: Cash -2018-12-06 - assets:foobar:current 1 A - expenses:example +account assets:checking ; type: Asset +; ^ disables auto-detection of Asset type, "assets" will not be considered an Asset -2019-01-04 - assets:foobar:current 1 A - expenses:example +2019-12-01 + (assets:cash) 3 -$ hledger -f - balancesheet --tree --no-elide --begin 2019-01-01 -Balance Sheet 2019-01-04 +2020-01-01 + (assets:cash) 2 - || 2019-01-04 +$ hledger -f - bs -N -t --no-elide -b 2020 +Balance Sheet 2020-01-01 + + || 2020-01-01 =============++============ Assets || -------------++------------ - assets || 2 A - foobar || 2 A - current || 2 A --------------++------------ - || 2 A + assets || 5 + cash || 5 =============++============ Liabilities || -------------++------------ --------------++------------ - || -=============++============ - Net: || 2 A