removed and refactored virtual and real worktime

This commit is contained in:
2025-12-12 06:31:03 +01:00
parent f73c2b1a96
commit 1ccc19b85c
12 changed files with 79 additions and 84 deletions

View File

@@ -46,11 +46,11 @@ func fillKurzarbeit(r *http.Request, w http.ResponseWriter) {
if !day.IsKurzArbeit() || !day.IsWorkDay() {
continue
}
if day.GetWorktimeReal(user, models.WorktimeBaseDay) >= day.GetWorktimeVirtual(user, models.WorktimeBaseDay) {
if day.GetWorktime(user, models.WorktimeBaseDay, false) >= day.GetWorktime(user, models.WorktimeBaseDay, true) {
continue
}
worktimeKurzarbeit := day.GetWorktimeVirtual(user, models.WorktimeBaseDay) - day.GetWorktimeReal(user, models.WorktimeBaseDay)
worktimeKurzarbeit := day.GetWorktime(user, models.WorktimeBaseDay, true) - day.GetWorktime(user, models.WorktimeBaseDay, false)
if wDay, ok := day.(*models.WorkDay); !ok || len(wDay.Bookings) == 0 {
continue