Merge pull request #4277 from expsa/dev_odex25_hr

Dev odex25 hr
This commit is contained in:
kchyounes19 2025-08-21 08:29:46 +01:00 committed by GitHub
commit ef6afdbc34
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 4 deletions

View File

@ -246,7 +246,7 @@ class HrAttendanceReport(models.Model):
'absent': actual_absent_hours + missing_punch_hours + break_hours + early_exit_hours + lateness_hours ,
'mission_by_days': total_mission,
'absent_days_by_hr': 0.0,
'total_hours': missed_hours + missing_punch_hours,
'total_hours': missed_hours,
'dummy_field': missed_hours,
'actual_absent_hours': actual_absent_hours,
'total_permission_hours':total_permission_hours,
@ -362,7 +362,7 @@ class HrAttendanceReport(models.Model):
'dummy_field': get_total_hours,
'total_amount': get_total_amount,
'amount_per_hour': get_amount_per_hour,
'total_deduction': (get_total_hours + missing_punch_hours)* get_amount_per_hour,
'total_deduction': (get_total_hours)* get_amount_per_hour,
'additional_hours': additional_hours,
'actual_absent_hours':actual_absent_hours,
'total_permission_hours':total_permission_hours,
@ -397,7 +397,7 @@ class HrAttendanceReport(models.Model):
############# re chick total_deduction
temp_dict["total_deduction"] = temp_dict["absent"]*temp_dict["amount_per_hour"]
temp_dict["total_deduction"] = temp_dict["total_hours"]*temp_dict["amount_per_hour"]
#temp_dict["total_deduction"] = sum(item["total_deduction"] for item in grp12)
temp_dict["additional_hours"] = sum(item["additional_hours"] for item in grp15)
result.append(temp_dict)

View File

@ -31,7 +31,7 @@ class HrAttendanceReportLine(models.Model):
def onchange_absent_days_by_hr(self):
for item in self:
if item.absent == 0:
item.dummy_field = item.delay + item.exists + item.extra_break_duration + item.absent
item.dummy_field = item.delay + item.exist_hours + item.extra_break_duration + item.absent
hours = item.dummy_field - item.absent_days_by_hr
if hours < 0:
hours = 0