添加功能

This commit is contained in:
李鹏宇
2026-05-08 15:24:04 +08:00
parent 61ef6284fd
commit 840c5ca9d4
@@ -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