CmdChart: renderSubTotal wasn't actually conditional

This commit is contained in:
Paul Beckingham 2016-05-21 16:30:43 -05:00
parent 198902821c
commit 1aed409832

View file

@ -323,7 +323,8 @@ static std::string renderSubTotal (
time_t total_work) time_t total_work)
{ {
std::stringstream out; std::stringstream out;
if (rules.getBoolean ("reports." + type + ".total"))
{
int indent = (rules.getBoolean ("reports." + type + ".month") ? 4 : 0) + int indent = (rules.getBoolean ("reports." + type + ".month") ? 4 : 0) +
(rules.getBoolean ("reports." + type + ".week") ? 4 : 0) + (rules.getBoolean ("reports." + type + ".week") ? 4 : 0) +
(rules.getBoolean ("reports." + type + ".day") ? 3 : 0) + (rules.getBoolean ("reports." + type + ".day") ? 3 : 0) +
@ -343,6 +344,7 @@ static std::string renderSubTotal (
<< ':' << ':'
<< std::setw (2) << std::setfill ('0') << minutes << std::setw (2) << std::setfill ('0') << minutes
<< '\n'; << '\n';
}
return out.str (); return out.str ();
} }