Spaces:
Runtime error
Runtime error
[Fix] Wrong afternoon_shift
Browse files- hr_utils/entities.py +0 -6
hr_utils/entities.py
CHANGED
@@ -79,8 +79,6 @@ class WorkingTime(object):
|
|
79 |
return 0
|
80 |
if self.checkin > self.MORNING_OUT:
|
81 |
return 0
|
82 |
-
if self.checkin > self.AFTERNOON_OUT:
|
83 |
-
return 0
|
84 |
if self.checkout < self.MORNING_IN:
|
85 |
return 0
|
86 |
late_checkin_penalty = self.get_late_checkin(time=self.checkin,
|
@@ -97,14 +95,10 @@ class WorkingTime(object):
|
|
97 |
return 0
|
98 |
if self.checkin > self.AFTERNOON_OUT:
|
99 |
return 0
|
100 |
-
if self.checkin < self.AFTERNOON_OUT:
|
101 |
-
return 0
|
102 |
late_checkin_penalty = self.get_late_checkin(time=self.checkin,
|
103 |
mode='afternoon_in')
|
104 |
early_checkout_penalty = self.get_early_checkout(time=self.checkout,
|
105 |
mode='afternoon_out')
|
106 |
-
print(late_checkin_penalty)
|
107 |
-
print(early_checkout_penalty)
|
108 |
return (self.AFTERNOON_OUT - self.AFTERNOON_IN
|
109 |
).seconds // 60 - late_checkin_penalty - early_checkout_penalty
|
110 |
|
|
|
79 |
return 0
|
80 |
if self.checkin > self.MORNING_OUT:
|
81 |
return 0
|
|
|
|
|
82 |
if self.checkout < self.MORNING_IN:
|
83 |
return 0
|
84 |
late_checkin_penalty = self.get_late_checkin(time=self.checkin,
|
|
|
95 |
return 0
|
96 |
if self.checkin > self.AFTERNOON_OUT:
|
97 |
return 0
|
|
|
|
|
98 |
late_checkin_penalty = self.get_late_checkin(time=self.checkin,
|
99 |
mode='afternoon_in')
|
100 |
early_checkout_penalty = self.get_early_checkout(time=self.checkout,
|
101 |
mode='afternoon_out')
|
|
|
|
|
102 |
return (self.AFTERNOON_OUT - self.AFTERNOON_IN
|
103 |
).seconds // 60 - late_checkin_penalty - early_checkout_penalty
|
104 |
|