As a consequence of fixing #457, two rewrite tests fail, because extra
quotes appear in the output of the commands being tested.
These quotes appear in comments which reflect the command which was
run in order to produce the output. Instead of
; generated-posting: = assets:bank and amt:<0
we now get
; generated-posting: = assets:bank and "amt:<0"
Given that the quotes around `amt:<0` are necessary for the command to
work properly, these quotes should really be there in the expected
output.
Hence this commit modifies the expected output of the tests, by adding
in the quotes. This makes the tests pass once more.
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.
Invalid transactions generated from CSV will now be rejected.
I updated some csv tests to avoid this, except for 21, which
probably needs more cleanup.
-V (and -X) now respects a report end date set with -e/-p/date: when
choosing the valuation date, similar to hledger 1.14 and Ledger.
This means that -V/-X aren't exactly like either --value=end or
--value=now. The "Effect of --value on reports" doc has been extended
accordingly, and much of it has been reworded and made more accurate.
Compound balance reports showing ending balances (eg balancesheet),
now show the ending date (single column) or range of ending
dates (multi column) in their title. ,, (double comma) is used
rather than - (hyphen) to suggest a sequence of discrete dates
rather than a continuous span.