diff --git a/yuthon_hr_attendance/models/hr_attendance.py b/yuthon_hr_attendance/models/hr_attendance.py index dd73ac2b6..e385c0fc2 100644 --- a/yuthon_hr_attendance/models/hr_attendance.py +++ b/yuthon_hr_attendance/models/hr_attendance.py @@ -676,7 +676,7 @@ class HrAttendance(models.Model): next_day = current_date + timedelta(days=1) start_datetime = datetime.combine(current_date, datetime.min.time()) - timedelta(hours=8) check_out_end = self.float_to_datetime(current_date, template.check_out_end) - if template.day2 == '次日': + if template.check_out_end < template.check_out_start: check_out_end = self.float_to_datetime(next_day, template.check_out_end) domain = [ ('employee_id', '=', employee_id.id),