Move retrieval of configuration up

Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
This commit is contained in:
Thomas Lauf 2022-12-24 15:43:56 +01:00
parent 86117c44e4
commit 8d14f8b5f6

View file

@ -94,6 +94,7 @@ int CmdSummary (
const auto show_ids = cli.getComplementaryHint ("ids", rules.getBoolean ("reports.summary.ids"));
const auto show_tags = cli.getComplementaryHint ("tags", rules.getBoolean ("reports.summary.tags", true));
const auto show_annotations = cli.getComplementaryHint ("annotations", rules.getBoolean ("reports.summary.annotations"));
const auto show_holidays = cli.getComplementaryHint ("holidays", rules.getBoolean ("reports.summary.holidays"));
const auto tags_col_offset = show_ids ? 1 : 0;
const auto annotation_col_offset = tags_col_offset + (show_tags ? 1 : 0);
@ -225,8 +226,6 @@ int CmdSummary (
table.set (table.addRow (), total_col_index, " ", Color ("underline"));
table.set (table.addRow (), total_col_index, Duration (grand_total).formatHours ());
const auto show_holidays = cli.getComplementaryHint ("holidays", rules.getBoolean ("reports.summary.holidays"));
std::cout << '\n'
<< table.render ()
<< (show_holidays ? renderHolidays (createHolidayMap (rules, filter)) : "")