hledger/tests/balance
Michael Kainer 79ca4a767e cli: Add -% to compound balance commands
This commit introduces the commandline argument -%/--percent to show
percentages of the column's total instead of the absolute amounts for
each account in reports. The signs of the values are preserved.

This option is especially useful for the balance and incomestatement
commands.

If there are multiple commodities involved in a report hledger bails
with an error message. This can be avoided by using --cost. Also note
that if one uses -% with the balance command the chances are high that
all numbers are 0. This is due to the fact that by default balance sums
up to zero. If one wants to use -% in a meaningful way with balance one
has to add a query.

In order to keep the implementation as simple as possible --tree has no
influence over how the percentages are calculated, i.e., the percentages
always represent the fraction of the columns total. If one wants to know
the percentages relative to a parent account, one has to use a query to
narrow down the accounts.
2019-11-18 17:10:59 -08:00
..
87.test tests: make functional tests use "hledger" again 2015-07-12 12:29:53 -07:00
219.test cli: tabular reports no longer have a trailing blank line added 2018-01-23 12:47:56 -08:00
373-layout.test bal: clarify some todo tests, use shelltestrunner's format 3 2018-01-23 12:17:14 -08:00
balance-multicol.journal rename data/ to examples/ 2017-01-08 07:26:13 -08:00
balance.test journal: a new account sorting mechanism, and a bunch of sorting fixes 2018-09-22 21:45:07 -10:00
budget-sorting.test ;tests: flatten functional test files a bit 2019-07-08 08:28:03 +01:00
budget.test ;tests: flatten functional test files a bit 2019-07-08 08:28:03 +01:00
date2.test tests: make functional tests use "hledger" again 2015-07-12 12:29:53 -07:00
depth.test update functional tests for new monthly headings 2018-03-29 14:54:36 +01:00
flat.test tests: make functional tests use "hledger" again 2015-07-12 12:29:53 -07:00
format.test balance, lib: --format/StringFormat improvements 2015-08-19 20:53:51 -07:00
intervals.test update functional tests for new monthly headings 2018-03-29 14:54:36 +01:00
no-total-no-elide.test tests: make functional tests use "hledger" again 2015-07-12 12:29:53 -07:00
percent.test cli: Add -% to compound balance commands 2019-11-18 17:10:59 -08:00
precision.test tests: make functional tests use "hledger" again 2015-07-12 12:29:53 -07:00
pretty.test update functional tests for new monthly headings 2018-03-29 14:54:36 +01:00
sample.journal rename data/ to examples/ 2017-01-08 07:26:13 -08:00
sorting.test tests: fix balance/sorting.test with released shelltest 2018-09-22 21:58:00 -10:00
transpose.test cli: added --transpose to "balance" command 2019-01-24 15:06:35 -08:00