cli: Make sure full account name is used (possibly including dropping)
for csv output. (#1566)
This commit is contained in:
parent
c827cbcc3e
commit
5a322c1908
@ -476,7 +476,7 @@ multiBalanceReportAsCsv opts@ReportOpts{average_, row_total_}
|
|||||||
++ ["total" | row_total_]
|
++ ["total" | row_total_]
|
||||||
++ ["average" | average_]
|
++ ["average" | average_]
|
||||||
) :
|
) :
|
||||||
[displayName a :
|
[accountNameDrop (drop_ opts) (displayFull a) :
|
||||||
map (wbToText . showMixedAmountB (balanceOpts False opts))
|
map (wbToText . showMixedAmountB (balanceOpts False opts))
|
||||||
(amts
|
(amts
|
||||||
++ [rowtot | row_total_]
|
++ [rowtot | row_total_]
|
||||||
|
|||||||
@ -41,3 +41,13 @@ $ hledger -f - balance --tree --no-total --drop 1
|
|||||||
1 q
|
1 q
|
||||||
1 ...
|
1 ...
|
||||||
>=
|
>=
|
||||||
|
|
||||||
|
# 4. Drop works with csv output in tree mode
|
||||||
|
$ hledger -f - balance --tree --no-total --output-format=csv --drop 1
|
||||||
|
"account","balance"
|
||||||
|
"k","1"
|
||||||
|
"i:p","1"
|
||||||
|
"j","2"
|
||||||
|
"j:q","1"
|
||||||
|
"...","1"
|
||||||
|
>=
|
||||||
|
|||||||
@ -305,3 +305,25 @@ Balance Sheet 2020-03-25
|
|||||||
||
|
||
|
||||||
=============++============
|
=============++============
|
||||||
Net: || $1
|
Net: || $1
|
||||||
|
|
||||||
|
# 12. Check csv output (for tree mode) (#1566)
|
||||||
|
$ hledger -f - balancesheet --tree --output-format=csv
|
||||||
|
"Balance Sheet 2020-03-25",""
|
||||||
|
"Account","2020-03-25"
|
||||||
|
"Assets",""
|
||||||
|
"assets:a","$1"
|
||||||
|
"total","$1"
|
||||||
|
"Liabilities",""
|
||||||
|
"total"
|
||||||
|
"Net:","$1"
|
||||||
|
|
||||||
|
# 13. Check csv output (for tree mode) with dropping
|
||||||
|
$ hledger -f - balancesheet --tree --output-format=csv --drop 1
|
||||||
|
"Balance Sheet 2020-03-25",""
|
||||||
|
"Account","2020-03-25"
|
||||||
|
"Assets",""
|
||||||
|
"a","$1"
|
||||||
|
"total","$1"
|
||||||
|
"Liabilities",""
|
||||||
|
"total"
|
||||||
|
"Net:","$1"
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user