Skip to content

Commit

Permalink
Merge pull request #2516 from frappe/version-14-hotfix
Browse files Browse the repository at this point in the history
chore: release v14
  • Loading branch information
ruchamahabal authored Dec 18, 2024
2 parents a7062f1 + 52bd24b commit dd76f23
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
8 changes: 5 additions & 3 deletions hrms/hr/doctype/expense_claim/expense_claim.json
Original file line number Diff line number Diff line change
Expand Up @@ -88,11 +88,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",
Expand Down Expand Up @@ -237,6 +237,8 @@
"label": "Accounting Details"
},
{
"fetch_from": "employee.company",
"fetch_if_empty": 1,
"fieldname": "company",
"fieldtype": "Link",
"in_standard_filter": 1,
Expand Down Expand Up @@ -383,7 +385,7 @@
"idx": 1,
"is_submittable": 1,
"links": [],
"modified": "2024-04-17 19:38:30.373122",
"modified": "2024-12-16 16:16:47.975814",
"modified_by": "Administrator",
"module": "HR",
"name": "Expense Claim",
Expand Down
7 changes: 4 additions & 3 deletions hrms/payroll/doctype/gratuity/gratuity.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,9 @@
{
"default": "0",
"fieldname": "current_work_experience",
"fieldtype": "Int",
"label": "Current Work Experience"
"fieldtype": "Float",
"label": "Current Work Experience",
"precision": "1"
},
{
"default": "0",
Expand Down Expand Up @@ -199,7 +200,7 @@
"index_web_pages_for_search": 1,
"is_submittable": 1,
"links": [],
"modified": "2024-03-15 02:50:10.282517",
"modified": "2024-12-11 08:46:04.751908",
"modified_by": "Administrator",
"module": "Payroll",
"name": "Gratuity",
Expand Down
5 changes: 1 addition & 4 deletions hrms/payroll/doctype/gratuity/gratuity.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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(
Expand Down

0 comments on commit dd76f23

Please sign in to comment.