This commit is contained in:
@@ -50,14 +50,14 @@ func (a *Absence) IsMultiDay() bool {
|
||||
}
|
||||
|
||||
func (a *Absence) GetWorktimeReal(u User, base WorktimeBase) time.Duration {
|
||||
if a.AbwesenheitTyp.WorkTime <= 1 {
|
||||
if a.AbwesenheitTyp.WorkTime <= 0 {
|
||||
return 0
|
||||
}
|
||||
switch base {
|
||||
case WorktimeBaseDay:
|
||||
return u.ArbeitszeitProTag()
|
||||
return u.ArbeitszeitProTagFrac(float32(a.AbwesenheitTyp.WorkTime) / 100)
|
||||
case WorktimeBaseWeek:
|
||||
return u.ArbeitszeitProWoche() / 5
|
||||
return u.ArbeitszeitProWocheFrac(0.2 * float32(a.AbwesenheitTyp.WorkTime) / 100)
|
||||
}
|
||||
return 0
|
||||
}
|
||||
@@ -66,7 +66,7 @@ func (a *Absence) GetPausetimeReal(u User, base WorktimeBase) time.Duration {
|
||||
}
|
||||
|
||||
func (a *Absence) GetOvertimeReal(u User, base WorktimeBase) time.Duration {
|
||||
if a.AbwesenheitTyp.WorkTime > 1 {
|
||||
if a.AbwesenheitTyp.WorkTime > 0 {
|
||||
return 0
|
||||
}
|
||||
switch base {
|
||||
|
||||
Reference in New Issue
Block a user