From 238769e6b51b5decac6ab3bbf5747211e757982d Mon Sep 17 00:00:00 2001 From: Rucha Mahabal Date: Tue, 14 Mar 2023 10:51:35 +0530 Subject: [PATCH] fix: precision for newly allocated leaves --- erpnext/hr/doctype/leave_allocation/leave_allocation.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/erpnext/hr/doctype/leave_allocation/leave_allocation.py b/erpnext/hr/doctype/leave_allocation/leave_allocation.py index c5cf3b43a62..6f289b405f3 100755 --- a/erpnext/hr/doctype/leave_allocation/leave_allocation.py +++ b/erpnext/hr/doctype/leave_allocation/leave_allocation.py @@ -100,8 +100,8 @@ class LeaveAllocation(Document): self.validate_leave_days_and_dates() leaves_to_be_added = flt( - frappe.db.get_value("Leave Allocation", self.name, "new_leaves_allocated") - - self.get_existing_leave_count() + (self.new_leaves_allocated - self.get_existing_leave_count()), + self.precision("new_leaves_allocated"), ) args = {