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 = {