From 859878c808679e6221df4a6f60c2d5ae7b132b0d Mon Sep 17 00:00:00 2001 From: zhou <123@> Date: Tue, 12 Aug 2025 14:34:58 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- yuthon_hr_attendance/models/yuthon_vacation_reports.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/yuthon_hr_attendance/models/yuthon_vacation_reports.py b/yuthon_hr_attendance/models/yuthon_vacation_reports.py index 1fff773d6..59ee720af 100644 --- a/yuthon_hr_attendance/models/yuthon_vacation_reports.py +++ b/yuthon_hr_attendance/models/yuthon_vacation_reports.py @@ -437,8 +437,9 @@ class YuthonVacationReports(models.Model): total_add += line_total elif line.update_type == 'reduce': total_reduce += line_total + total_add -= line_total done_working_overtime += line_total - record.working_overtime = total_add / 8 + record.working_overtime = max(total_add / 8, 0) record.done_working_overtime = done_working_overtime / 8 record.cop_leave = total_reduce / 8