From e64eb45aaa40711e934266f79a1b0a55a2965b42 Mon Sep 17 00:00:00 2001 From: ljain112 Date: Fri, 7 Feb 2025 18:30:26 +0530 Subject: [PATCH] fix: do not validate party against Receivable and Payable account for cancelled gl entries --- erpnext/accounts/doctype/gl_entry/gl_entry.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/accounts/doctype/gl_entry/gl_entry.py b/erpnext/accounts/doctype/gl_entry/gl_entry.py index 7e4b3f29b1..7df23e102c 100644 --- a/erpnext/accounts/doctype/gl_entry/gl_entry.py +++ b/erpnext/accounts/doctype/gl_entry/gl_entry.py @@ -129,7 +129,7 @@ class GLEntry(Document): if not self.get(k): frappe.throw(_("{0} is required").format(_(self.meta.get_label(k)))) - if not (self.party_type and self.party): + if not self.is_cancelled and not (self.party_type and self.party): account_type = frappe.get_cached_value("Account", self.account, "account_type") if account_type == "Receivable": frappe.throw( -- GitLab