From 97ebed566b2aff5b3c3efba9583c99b28b240e2f Mon Sep 17 00:00:00 2001 From: younes Date: Mon, 17 Nov 2025 15:16:19 +0100 Subject: [PATCH] [FIX] attendances: FIX bug --- odex25_hr/attendances/models/hr_attendance_report.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/odex25_hr/attendances/models/hr_attendance_report.py b/odex25_hr/attendances/models/hr_attendance_report.py index 15c925ef7..cc6545069 100644 --- a/odex25_hr/attendances/models/hr_attendance_report.py +++ b/odex25_hr/attendances/models/hr_attendance_report.py @@ -342,8 +342,10 @@ class HrAttendanceReport(models.Model): lateness + early_exist + extra_break_duration + total_absent) - lateness_hours_by_hr else: get_total_hours = (total_absent - lateness_hours_by_hr) + #print("_____________________________________get_total_hours",total_absent,lateness_hours_by_hr) if get_total_hours < 0: get_total_hours = 0 + print("_____________________________________get_total_hours", get_total_hours) if attendance.employee_id.contract_id.state == 'program_directory': get_total_amount = attendance.employee_id.contract_id.total_allowance if emp_calendar.is_full_day: @@ -397,8 +399,7 @@ class HrAttendanceReport(models.Model): temp_dict["exist_hours"] = sum(item1["exist_hours"] for item1 in grp4) temp_dict["extra_break_duration"] = sum(item1["extra_break_duration"] for item1 in grp5) temp_dict["absent_days_by_hr"] = sum(item1["absent_days_by_hr"] for item1 in grp6) - temp_dict["total_hours"] = sum(item["total_hours"] for item in grp7) - ( - temp_dict["leave"] + temp_dict["mission_by_days"]) + temp_dict["total_hours"] = temp_dict["absent"] - temp_dict["absent_days_by_hr"] temp_dict["dummy_field"] = sum(item["dummy_field"] for item in grp13) temp_dict["total_amount"] = sum(item["total_amount"] for item in grp8) / len(list(grp9)) temp_dict["amount_per_hour"] = sum(item["amount_per_hour"] for item in grp10) / len(list(grp11))