@@ -259,10 +259,10 @@ class OvertimeApprovals(models.Model):
|
||||
if actual_start < base_start:
|
||||
total_overtime_seconds += (base_start - actual_start).total_seconds()
|
||||
if actual_end > base_end:
|
||||
total_overtime_seconds += (actual_end - base_end).total_seconds()
|
||||
real_overtime_start = max(base_end, actual_start)
|
||||
total_overtime_seconds += (actual_end - real_overtime_start).total_seconds()
|
||||
else:
|
||||
total_overtime_seconds = (actual_end - actual_start).total_seconds()
|
||||
|
||||
original_hours = total_overtime_seconds / 3600
|
||||
# 加班起步一小时
|
||||
if original_hours < 1.0:
|
||||
|
||||
Reference in New Issue
Block a user