fix: do not validate cost center in cancelled gl entry

(cherry picked from commit 29cbddbc77)
This commit is contained in:
ljain112
2025-09-30 14:09:35 +05:30
committed by Mergify
parent a30c481ca1
commit 366bb8269c

View File

@@ -253,7 +253,7 @@ class GLEntry(Document):
)
def validate_cost_center(self):
if not self.cost_center:
if not self.cost_center or self.is_cancelled:
return
is_group, company = frappe.get_cached_value("Cost Center", self.cost_center, ["is_group", "company"])