From cd4918736a85193b46c85f65860d2c42927c4d8a Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Thu, 9 Aug 2012 16:24:20 +0530 Subject: [PATCH 1/2] error fixed in account browser --- erpnext/accounts/page/accounts_browser/accounts_browser.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/erpnext/accounts/page/accounts_browser/accounts_browser.py b/erpnext/accounts/page/accounts_browser/accounts_browser.py index 18c7c7681b6..56b79d1c2c4 100644 --- a/erpnext/accounts/page/accounts_browser/accounts_browser.py +++ b/erpnext/accounts/page/accounts_browser/accounts_browser.py @@ -35,7 +35,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 From 6810979dabe127f3660fcf2be882d7f867d75770 Mon Sep 17 00:00:00 2001 From: Anand Doshi Date: Fri, 10 Aug 2012 12:38:48 +0530 Subject: [PATCH 2/2] Company Form: do not hide 'Default Settings' section break for a new company, as it contains a mandatory field 'Default Currency' --- erpnext/setup/doctype/company/company.txt | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/erpnext/setup/doctype/company/company.txt b/erpnext/setup/doctype/company/company.txt index 17bd61b6e33..f625ac5d054 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-03-27 14:36:19', + 'creation': '2012-05-15 12:15:00', 'docstatus': 0, - 'modified': '2012-03-27 14:36:19', + 'modified': '2012-08-10 12:15:45', 'modified_by': u'Administrator', 'owner': u'Administrator' }, @@ -23,7 +23,7 @@ 'section_style': u'Tabbed', 'server_code_error': u' ', 'show_in_menu': 0, - 'version': 96 + 'version': 1 }, # These values are common for all DocField @@ -125,7 +125,6 @@ # DocField { - 'depends_on': u'eval:!doc.__islocal', 'doctype': u'DocField', 'fieldname': u'default_settings', 'fieldtype': u'Section Break',