Skip to content

Commit

Permalink
fix: do not validate party against Receivable and Payable account for…
Browse files Browse the repository at this point in the history
… cancelled gl entries

(cherry picked from commit 0809e00)
  • Loading branch information
ljain112 authored and mergify[bot] committed Feb 11, 2025
1 parent ebce6be commit 6d777cd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion erpnext/accounts/doctype/gl_entry/gl_entry.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ def check_mandatory(self):
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(
Expand Down

0 comments on commit 6d777cd

Please sign in to comment.