jansorg / tom-ui

Qt5-based user interface for the tom time tracker
https://www.tomtime.dev
GNU General Public License v3.0
8 stars 2 forks source link

Fix the confusion about rounding of time entries and sub-totals in reports #108

Closed tanius closed 2 years ago

tanius commented 5 years ago

I went to "Reports → Create project report …" and used the following configuration:

Now the summary table at the top will show a different result than the (manually calculated) sum of all the sub-project sums that are shown in the timelog. This is because the summary table will be calculated from the sub-project sums after rounding, but the timelog template style shows the sub-project sums before rounding.

Proposed solution: also use the rounded sums in the "Total" rows of all the timelog tables. Due to the rounding, they will now differ from the sum of timelog entries in these tables. So it seems good to include a note in that "Total" row's last column saying "(rounded to ±5 min)" for rounding up or down or "(rounded to next 5 min)" for rounding up.

(Also, I just found that rounding is rather per day per sub-project, not just per sub-project. So the note should say something like "(with per-day sub-totals rounded to ±5 min)" resp. "(with per-day sub-totals rounded to next 5 min)".

jansorg commented 5 years ago

@tanius The timelog templates are a bit neglected. I need to clean this up a bit and make use of all the settings.

jansorg commented 3 years ago

Fixed for the next update. Column "Duration" will follow the rounding settings. There's also a new setting to hide the column "end date" to make rounding less confusing for the reader of a report, i.e. start date + rounded duration.

tanius commented 2 years ago

Column duration will follow the rounding settings.

Thanks, that's a good solution. I think it would be perfect when also making the following change:

The value of the "Total" row in time reports, shown in blue and indicating the sub-total on the lowest splitting level, should always be the sum of the duration values in the table it sums up, without additional rounding applied. That's different from what I proposed in the initial post above, but I think it's better because it is what users intuitively expect a "Total" value to be. The idea is to provide everything in the report that is necessary for a viewer (such as an auditor) to follow all the calculations done.

(Additional argument: If additional rounding would be applied to the sub-totals, it is no longer clear how to calculate the grand total: sum of sub-totals, or sum of time entries? Because the two methods would now yield different results.)

Fixed for the next update.

Thanks! Can we get a new release maybe? I just found this issue again and it would help to have a new version that solves it :)

tanius commented 2 years ago

The value of the "Total" row in time reports, shown in blue and indicating the sub-total on the lowest splitting level, should always be the sum of the duration values in the table it sums up, without additional rounding applied.

This behavior is now implemented in tom-ui 0.12 according to my tests. With rounding of time entries enabled, aggregate values always sum up these rounded values. That makes it possible to follow the sum calculations on time reports and arrive at the same results, which is great for audits and so on.

Closing with thanks!