diff --git a/.github/helper/install.sh b/.github/helper/install.sh index a735fd0801..38816dfde2 100644 --- a/.github/helper/install.sh +++ b/.github/helper/install.sh @@ -6,7 +6,7 @@ cd ~ || exit sudo apt update sudo apt remove mysql-server mysql-client -sudo apt install libcups2-dev redis-server mariadb-client-10.6 +sudo apt install libcups2-dev redis-server mariadb-client pip install frappe-bench diff --git a/hrms/hr/doctype/expense_claim/expense_claim.json b/hrms/hr/doctype/expense_claim/expense_claim.json index 82e23ee728..02186e86e3 100644 --- a/hrms/hr/doctype/expense_claim/expense_claim.json +++ b/hrms/hr/doctype/expense_claim/expense_claim.json @@ -89,11 +89,11 @@ }, { "fetch_from": "employee.department", + "fetch_if_empty": 1, "fieldname": "department", "fieldtype": "Link", "label": "Department", - "options": "Department", - "read_only": 1 + "options": "Department" }, { "fieldname": "column_break_5", @@ -214,6 +214,7 @@ }, { "fetch_from": "employee.company", + "fetch_if_empty": 1, "fieldname": "company", "fieldtype": "Link", "in_standard_filter": 1, @@ -221,7 +222,6 @@ "oldfieldname": "company", "oldfieldtype": "Link", "options": "Company", - "read_only": 1, "reqd": 1 }, { @@ -390,7 +390,7 @@ "idx": 1, "is_submittable": 1, "links": [], - "modified": "2024-10-09 14:16:06.715586", + "modified": "2024-12-16 16:16:47.975814", "modified_by": "Administrator", "module": "HR", "name": "Expense Claim", diff --git a/hrms/payroll/doctype/gratuity/gratuity.json b/hrms/payroll/doctype/gratuity/gratuity.json index eb6bd941eb..9fdc123978 100644 --- a/hrms/payroll/doctype/gratuity/gratuity.json +++ b/hrms/payroll/doctype/gratuity/gratuity.json @@ -60,7 +60,8 @@ "default": "0", "fieldname": "current_work_experience", "fieldtype": "Float", - "label": "Current Work Experience" + "label": "Current Work Experience", + "precision": "1" }, { "default": "0", @@ -199,7 +200,7 @@ "index_web_pages_for_search": 1, "is_submittable": 1, "links": [], - "modified": "2024-10-25 15:33:11.549493", + "modified": "2024-12-11 08:46:04.751908", "modified_by": "Administrator", "module": "Payroll", "name": "Gratuity", diff --git a/hrms/payroll/doctype/gratuity/gratuity.py b/hrms/payroll/doctype/gratuity/gratuity.py index ea7d80db31..de25701a0d 100644 --- a/hrms/payroll/doctype/gratuity/gratuity.py +++ b/hrms/payroll/doctype/gratuity/gratuity.py @@ -1,9 +1,6 @@ # Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt - -from math import floor - import frappe from frappe import _, bold from frappe.query_builder.functions import Sum @@ -159,7 +156,7 @@ def get_work_experience(self) -> float: if rule.method == "Round off Work Experience": work_experience = round(work_experience) else: - work_experience = floor(work_experience) + work_experience = flt(work_experience, self.precision("current_work_experience")) if work_experience < rule.minimum_year_for_gratuity: frappe.throw(