mirror of
https://github.com/GothenburgBitFactory/timewarrior.git
synced 2025-07-07 20:06:39 +02:00
CmdReportDay: Do not report negative remaining time
This commit is contained in:
parent
4ae48f4f14
commit
42074afc8f
1 changed files with 7 additions and 4 deletions
|
@ -283,10 +283,13 @@ static void renderSummary (
|
||||||
auto total_remaining = total_available - total_worked;
|
auto total_remaining = total_available - total_worked;
|
||||||
|
|
||||||
std::cout << indent << "Tracked "
|
std::cout << indent << "Tracked "
|
||||||
<< std::setw (13) << std::setfill (' ') << Duration (total_worked).formatHours () << '\n'
|
<< std::setw (13) << std::setfill (' ') << Duration (total_worked).formatHours () << '\n';
|
||||||
<< indent << "Remaining "
|
|
||||||
<< std::setw (13) << std::setfill (' ') << Duration (total_remaining).formatHours () << '\n'
|
if (total_remaining >= 0)
|
||||||
<< indent << "Total "
|
std::cout << indent << "Remaining "
|
||||||
|
<< std::setw (13) << std::setfill (' ') << Duration (total_remaining).formatHours () << '\n';
|
||||||
|
|
||||||
|
std::cout << indent << "Total "
|
||||||
<< std::setw (13) << std::setfill (' ') << Duration (total_available).formatHours () << '\n'
|
<< std::setw (13) << std::setfill (' ') << Duration (total_available).formatHours () << '\n'
|
||||||
<< '\n';
|
<< '\n';
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue