diff --git a/erpnext/accounts/page/accounts_browser/accounts_browser.py b/erpnext/accounts/page/accounts_browser/accounts_browser.py index 37ba6264685..f2c0d9ca790 100644 --- a/erpnext/accounts/page/accounts_browser/accounts_browser.py +++ b/erpnext/accounts/page/accounts_browser/accounts_browser.py @@ -36,7 +36,8 @@ def get_children(): currency = webnotes.conn.sql("select default_currency from `tabCompany` where name = %s", company)[0][0] for each in acc: bal = webnotes.conn.sql("select balance from `tabAccount Balance` \ - where account = %s and period = %s", (each.get('value'), get_defaults('fiscal_year')))[0][0] + where account = %s and period = %s", (each.get('value'), get_defaults('fiscal_year'))) + bal = bal and bal[0][0] or 0 each['balance'] = currency + ' ' + cstr(bal) return acc diff --git a/erpnext/setup/doctype/company/company.txt b/erpnext/setup/doctype/company/company.txt index 3437fafdbc0..1502ed420e6 100644 --- a/erpnext/setup/doctype/company/company.txt +++ b/erpnext/setup/doctype/company/company.txt @@ -3,9 +3,9 @@ # These values are common in all dictionaries { - 'creation': '2012-07-03 13:30:55', + 'creation': '2012-05-15 12:15:00', 'docstatus': 0, - 'modified': '2012-07-11 14:43:55', + 'modified': '2012-08-10 12:15:45', 'modified_by': u'Administrator', 'owner': u'Administrator' }, @@ -133,7 +133,6 @@ # DocField { - 'depends_on': u'eval:!doc.__islocal', 'doctype': u'DocField', 'fieldname': u'default_settings', 'fieldtype': u'Section Break',