This commit is contained in:
jiangyong 2025-03-10 00:21:41 +08:00
parent 7322a3ab90
commit d29c37250a
1 changed files with 4 additions and 2 deletions

View File

@ -188,8 +188,10 @@ func (s *StaffSalary) getRealWorkDay(month string) float64 {
}
//其他按工作时长结算
duration := float64(checkin.EndTime-checkin.StartTime) / cast.ToFloat64(corp.GetConfig().WorkerHouer)
realWorkdays += goutil.If(duration > 1, 1, duration)
if checkin.EndTime > 0 && checkin.StartTime > 0 {
duration := float64(checkin.EndTime-checkin.StartTime) / cast.ToFloat64(corp.GetConfig().WorkerHouer)
realWorkdays += goutil.If(duration > 1, 1, duration)
}
}
return realWorkdays
}