Merge pull request #15282 from rohitwaghchaure/budget_should_check_on_submit_document

[Minor] Don't validate on cancelled budgets
diff --git a/erpnext/accounts/doctype/budget/budget.py b/erpnext/accounts/doctype/budget/budget.py
index d025583..da3f142 100644
--- a/erpnext/accounts/doctype/budget/budget.py
+++ b/erpnext/accounts/doctype/budget/budget.py
@@ -33,7 +33,7 @@
 			select
 				b.name, ba.account from `tabBudget` b, `tabBudget Account` ba
 			where
-				ba.parent = b.name and b.company = %s and %s=%s and
+				ba.parent = b.name and b.docstatus < 2 and b.company = %s and %s=%s and
 				b.fiscal_year=%s and b.name != %sand ba.account in (%s) """
 				% ('%s', budget_against_field, '%s', '%s', '%s', ','.join(['%s'] * len(accounts))),
 			(self.company, budget_against, self.fiscal_year, self.name) + tuple(accounts), as_dict=1)