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