fix: weekbased calculation pdf report

with this change the time calculations for pdf reports should be better
line with the reports send as "week_report"
This commit is contained in:
2026-02-12 16:46:57 +01:00
parent 8911165c4b
commit 46218f9bca
18 changed files with 365 additions and 178 deletions

View File

@@ -100,7 +100,7 @@ func getBookings(w http.ResponseWriter, r *http.Request) {
}
aggregatedOvertime += day.GetOvertime(user, models.WorktimeBaseDay, true)
}
if reportedOvertime, err := user.GetReportedOvertime(); err == nil {
if reportedOvertime, err := user.GetReportedOvertime(time.Now()); err == nil {
user.Overtime = (reportedOvertime + aggregatedOvertime).Round(time.Minute)
} else {
log.Println("Cannot calculate overtime: ", err)