diff --git a/yuthon_hr_attendance/models/yuthon_vacation_reports.py b/yuthon_hr_attendance/models/yuthon_vacation_reports.py index 234bc56a7..1654bac7f 100644 --- a/yuthon_hr_attendance/models/yuthon_vacation_reports.py +++ b/yuthon_hr_attendance/models/yuthon_vacation_reports.py @@ -400,7 +400,7 @@ class YuthonVacationReports(models.Model): # 2. 剩余部分扣减本年补休剩余(this_year1) if remaining_overtime_deduct > 0 and rec.this_year1 > 0: - deduct_from_current1 = min(rec.this_year1, remaining_overtime_deduct) + deduct_from_current1 = remaining_overtime_deduct rec.this_year1 -= deduct_from_current1 rec.used_this_year1 += deduct_from_current1 # 累加到本年已休 remaining_overtime_deduct -= deduct_from_current1 @@ -1706,7 +1706,7 @@ class YuthonVacationReports(models.Model): if other_line.holiday_type and other_line.holiday_type.name == '调休': adjust_holiday_days += other_line.lines or 0 - record.working_overtime = max(total_add / 8, 0) + adjust_holiday_days + record.working_overtime = (total_add / 8) + adjust_holiday_days record.done_working_overtime = total_add1 / 8 record.statutory_leave = legal_total/8 record.cop_leave = total_add2 / 8