From b288c734376c09e25c97c53b3aaef6d55c932415 Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Wed, 10 Apr 2024 13:21:24 +0530 Subject: [PATCH] fix: ignore dimension validation for cancelled entries (cherry picked from commit 971c867f292802f14a7635d5ebbae45a60ec868d) --- erpnext/accounts/doctype/gl_entry/gl_entry.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/erpnext/accounts/doctype/gl_entry/gl_entry.py b/erpnext/accounts/doctype/gl_entry/gl_entry.py index 17a97a05529..91b18b10887 100644 --- a/erpnext/accounts/doctype/gl_entry/gl_entry.py +++ b/erpnext/accounts/doctype/gl_entry/gl_entry.py @@ -179,6 +179,7 @@ class GLEntry(Document): and self.company == dimension.company and dimension.mandatory_for_pl and not dimension.disabled + and not self.is_cancelled ): if not self.get(dimension.fieldname): frappe.throw( @@ -192,6 +193,7 @@ class GLEntry(Document): and self.company == dimension.company and dimension.mandatory_for_bs and not dimension.disabled + and not self.is_cancelled ): if not self.get(dimension.fieldname): frappe.throw(