From 4525a0b900018d05d62b41eb369b8023c9db1947 Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Tue, 30 Jul 2013 11:19:20 +0530 Subject: [PATCH] [fix] [minor] null value issue --- 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 1d0ec8e72a..60c37a40a2 100644 --- a/accounts/doctype/gl_entry/gl_entry.py +++ b/accounts/doctype/gl_entry/gl_entry.py @@ -151,7 +151,7 @@ class DocType: balance = webnotes.conn.sql("""select sum(debit) - sum(credit) from `tabGL Entry` where account = %s and ifnull(is_cancelled, 'No') = 'No'""", self.doc.account) balance = account["debit_or_credit"] == "Debit" and \ - balance[0][0] or -1*balance[0][0] + flt(balance[0][0]) or -1*flt(balance[0][0]) if flt(balance) < 0: msgprint(_("Negative balance is not allowed for account ") + self.doc.account,