mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-31 18:59:08 +00:00
Merge pull request #49800 from frappe/mergify/bp/version-15-hotfix/pr-49799
fix: do not validate cost center in cancelled gl entry (backport #49799)
This commit is contained in:
@@ -253,7 +253,7 @@ class GLEntry(Document):
|
|||||||
)
|
)
|
||||||
|
|
||||||
def validate_cost_center(self):
|
def validate_cost_center(self):
|
||||||
if not self.cost_center:
|
if not self.cost_center or self.is_cancelled:
|
||||||
return
|
return
|
||||||
|
|
||||||
is_group, company = frappe.get_cached_value("Cost Center", self.cost_center, ["is_group", "company"])
|
is_group, company = frappe.get_cached_value("Cost Center", self.cost_center, ["is_group", "company"])
|
||||||
|
|||||||
Reference in New Issue
Block a user