From 0352f9b8270de20684bb70700f85d40e4289a056 Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Sat, 5 Oct 2013 15:38:43 +0530 Subject: [PATCH] [fix] [minor] gl entry cancellation --- accounts/doctype/gl_entry/gl_entry.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/accounts/doctype/gl_entry/gl_entry.py b/accounts/doctype/gl_entry/gl_entry.py index db6de44f095..0c11198be95 100644 --- a/accounts/doctype/gl_entry/gl_entry.py +++ b/accounts/doctype/gl_entry/gl_entry.py @@ -107,7 +107,7 @@ class DocType: _(" does not belong to the company") + ": " + self.doc.company) def check_negative_balance(account, adv_adj=False): - if not adv_adj: + if not adv_adj and account: account_details = webnotes.conn.get_value("Account", account, ["allow_negative_balance", "debit_or_credit"], as_dict=True) if not account_details["allow_negative_balance"]: