fix: precision for newly allocated leaves

This commit is contained in:
Rucha Mahabal
2023-03-14 10:51:35 +05:30
parent 91cad9e985
commit 238769e6b5

View File

@@ -100,8 +100,8 @@ class LeaveAllocation(Document):
self.validate_leave_days_and_dates() self.validate_leave_days_and_dates()
leaves_to_be_added = flt( leaves_to_be_added = flt(
frappe.db.get_value("Leave Allocation", self.name, "new_leaves_allocated") (self.new_leaves_allocated - self.get_existing_leave_count()),
- self.get_existing_leave_count() self.precision("new_leaves_allocated"),
) )
args = { args = {