diff --git a/hrms/hr/doctype/employee_checkin/employee_checkin.py b/hrms/hr/doctype/employee_checkin/employee_checkin.py index 3b1993ebd1..0ba4a9e814 100644 --- a/hrms/hr/doctype/employee_checkin/employee_checkin.py +++ b/hrms/hr/doctype/employee_checkin/employee_checkin.py @@ -241,8 +241,9 @@ def calculate_working_hours(logs, check_in_out_type, working_hours_calc_type): if last_out_log_index or last_out_log_index == 0 else None ) + in_time = getattr(first_in_log, "time", None) + out_time = getattr(last_out_log, "time", None) if first_in_log and last_out_log: - in_time, out_time = first_in_log.time, last_out_log.time total_hours = time_diff_in_hours(in_time, out_time) elif working_hours_calc_type == "Every Valid Check-in and Check-out": in_log = out_log = None diff --git a/hrms/payroll/doctype/salary_slip/salary_slip.py b/hrms/payroll/doctype/salary_slip/salary_slip.py index c26b9a9d01..8e992220eb 100644 --- a/hrms/payroll/doctype/salary_slip/salary_slip.py +++ b/hrms/payroll/doctype/salary_slip/salary_slip.py @@ -20,6 +20,7 @@ flt, formatdate, get_first_day, + get_last_day, get_link_to_form, getdate, money_in_words, @@ -73,6 +74,8 @@ def __init__(self, *args, **kwargs): "rounded": rounded, "date": date, "getdate": getdate, + "get_first_day": get_first_day, + "get_last_day": get_last_day, "ceil": ceil, "floor": floor, } @@ -2158,6 +2161,8 @@ def eval_tax_slab_condition(condition, eval_globals=None, eval_locals=None): "round": round, "date": date, "getdate": getdate, + "get_first_day": get_first_day, + "get_last_day": get_last_day, } try: