mirror of
https://github.com/frappe/erpnext.git
synced 2026-10-29 22:57:42 +00:00
fix(accounts): round cost center allocation percentage total
(cherry picked from commit 8b894280cd)
This commit is contained in:
@@ -62,7 +62,7 @@ class CostCenterAllocation(Document):
|
||||
def validate_total_allocation_percentage(self):
|
||||
total_percentage = sum([flt(d.percentage) for d in self.get("allocation_percentages", [])])
|
||||
|
||||
if total_percentage != 100:
|
||||
if flt(total_percentage, self.precision("percentage", "allocation_percentages")) != 100:
|
||||
frappe.throw(_("Total percentage against cost centers should be 100"), WrongPercentageAllocation)
|
||||
|
||||
def validate_from_date_based_on_existing_gle(self):
|
||||
|
||||
Reference in New Issue
Block a user