Use 0.5 for half-days instead of 0.25.
This commit is contained in:
parent
697d08d5e3
commit
5077bef37c
|
@ -291,10 +291,10 @@ class HRHoliday(models.Model):
|
||||||
if cont_start_date <= temp_date:
|
if cont_start_date <= temp_date:
|
||||||
if self.get_hours(weekday, contract.working_hours.attendance_ids) > 0.0:
|
if self.get_hours(weekday, contract.working_hours.attendance_ids) > 0.0:
|
||||||
if temp_date == date_from and self.leave_selection =='half_day':
|
if temp_date == date_from and self.leave_selection =='half_day':
|
||||||
res += 0.25
|
res += 0.5
|
||||||
break
|
break
|
||||||
if temp_date == date_to and self.leave_selection_date_to =='half_day':
|
if temp_date == date_to and self.leave_selection_date_to =='half_day':
|
||||||
res += 0.25
|
res += 0.5
|
||||||
break
|
break
|
||||||
res += 1
|
res += 1
|
||||||
else:
|
else:
|
||||||
|
@ -303,10 +303,10 @@ class HRHoliday(models.Model):
|
||||||
if cont_start_date <= temp_date and cont_end_date >= temp_date:
|
if cont_start_date <= temp_date and cont_end_date >= temp_date:
|
||||||
if self.get_hours(weekday, contract.working_hours.attendance_ids) > 0.0:
|
if self.get_hours(weekday, contract.working_hours.attendance_ids) > 0.0:
|
||||||
if temp_date == date_from and self.leave_selection =='half_day':
|
if temp_date == date_from and self.leave_selection =='half_day':
|
||||||
res += 0.25
|
res += 0.5
|
||||||
break
|
break
|
||||||
if temp_date == date_to and self.leave_selection_date_to =='half_day':
|
if temp_date == date_to and self.leave_selection_date_to =='half_day':
|
||||||
res += 0.25
|
res += 0.5
|
||||||
break
|
break
|
||||||
res += 1
|
res += 1
|
||||||
temp_date += timedelta(days=1)
|
temp_date += timedelta(days=1)
|
||||||
|
|
Loading…
Reference in New Issue