I was confused when using 'areg ACCT QUERY'. Now, the title will show
" (matching query)" as a hint when a QUERY is specified,
except when it is a date restriction (which is common and not confusing)
or a depth restriction (which is ignored).
When there are only few, short strs and width is large, then the div
operation in itemspercol would return zero, triggering and error in
chunksOf.
This fix makes numcols have always at least as many entries as strs,
filling one line.
Eg, where previously -p 'monthly from 1/15' or -M -b 1/15 would always
adjust the report start date to 1/1,
unless you used the special -p 'every 15th day of month from 1/15' form,
now the start date will not be adjusted. (It is still adjusted if
the report date is not specified explicitly, eg inferred from the journal).
This keeps behaviour consistent between report periods and periodic transactions.
'in' period expressions, like 'in 2023-01', are a grey area; they
do specify a start date (2023-01-01), although they look a bit implicit.
So previously, -p 'weekly in 2023-01' would adjust the start date to
the preceding monday (2022-12-26), but now it will start exactly on
2023-01-01 (a sunday, which also causes ugly verbose column headings).
To ensure monday based weeks and simple report headings here,
you would have to explicitly specific a start date that is a monday,
eg -p 'weekly from 2022-12-26 to 2023-02'.
The HTML formatter outputs a HTML snippet containing a table with a
header row and one data row per report item. The header row names
match those for the CSV output formatter. Multiple commodities in
a report item are listed together in the same cell separated by
commas, again matching the CSV formatter.
A future extension could be to explore using multiple rows for
multiple commodities, with HTML row spanning.
Fixes#1996.
Signed-off-by: Jonathan Dowland <jon@dow.land>