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

Sums can be off in reports when not rounding #138

Open tanius opened 1 year ago

tanius commented 1 year ago

This is not urgent in any way since rounding works fine after #108, great for auditable reports. I just thought to add an issue for the record because it's weird when the sums are off.

To demonstrate this: in the report configuration screen, configure some kind of splitting so that a "Total" line is shown at the bottom of the report, and keep "Round entries" unchecked. The best to demonstrate this issue is using the "Default" template. Now in some cases you'll see that the "Total" sum is off by 1-2 minutes compared to the lines it is supposed to sum up. The easiest is to just sum up the last digits (single minutes) and see if they match the sum.

This behavior makes sense as the line sums and total shown is probably hiding some digits (seconds, milliseconds) instead of rounding. If all digits were shown, it would be easy to follow how the sums were calculated.

I don't have a good idea how this confusion could be solved. Options: