diff --git a/hrms/hr/doctype/employee_checkin/employee_checkin.py b/hrms/hr/doctype/employee_checkin/employee_checkin.py index c926ab0327..ed55b4d0ad 100644 --- a/hrms/hr/doctype/employee_checkin/employee_checkin.py +++ b/hrms/hr/doctype/employee_checkin/employee_checkin.py @@ -75,6 +75,7 @@ def validate_distance_from_shift_location(self): "shift_type": self.shift, "start_date": ["<=", self.time], "shift_location": ["is", "set"], + "docstatus": 1, }, or_filters=[["end_date", ">=", self.time], ["end_date", "is", "not set"]], pluck="shift_location", diff --git a/hrms/hr/doctype/shift_location/shift_location.js b/hrms/hr/doctype/shift_location/shift_location.js index 8978c25b17..3439f8d097 100644 --- a/hrms/hr/doctype/shift_location/shift_location.js +++ b/hrms/hr/doctype/shift_location/shift_location.js @@ -8,7 +8,7 @@ frappe.ui.form.on("Shift Location", { "allow_geolocation_tracking", ); - if (!allow_geolocation_tracking) { + if (!allow_geolocation_tracking) hide_field([ "checkin_radius", "fetch_geolocation", @@ -16,8 +16,6 @@ frappe.ui.form.on("Shift Location", { "longitude", "geolocation", ]); - return; - } }, fetch_geolocation: (frm) => {