From 3c48be9e603d28cef50ce500c3bb7e0f026e399b Mon Sep 17 00:00:00 2001 From: nabinhait Date: Wed, 22 Jun 2011 12:46:10 +0530 Subject: [PATCH] fixed indentation error --- accounts/doctype/fiscal_year/fiscal_year.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/accounts/doctype/fiscal_year/fiscal_year.py b/accounts/doctype/fiscal_year/fiscal_year.py index fe0f2058b23..7db63b2754b 100644 --- a/accounts/doctype/fiscal_year/fiscal_year.py +++ b/accounts/doctype/fiscal_year/fiscal_year.py @@ -22,6 +22,9 @@ class DocType: self.doc, self.doclist = d,dl def repost(self): + if not self.doc.company: + msgprint("Please select company", raise_exception=1) + if not in_transaction: sql("start transaction") @@ -100,9 +103,7 @@ class DocType: def post_entries(self): sql("LOCK TABLE `tabGL Entry` WRITE") # post each gl entry (batch or complete) - gle = sql("select name, account, debit, credit, is_opening, posting_date from `tabGL Entry` where fiscal_year=%s and ifnull(is_cancelled,'No')='No' and company=%s - - ", (self.doc.name, self.doc.company)) + gle = sql("select name, account, debit, credit, is_opening, posting_date from `tabGL Entry` where fiscal_year=%s and ifnull(is_cancelled,'No')='No' and company=%s", (self.doc.name, self.doc.company)) account_details = {} cnt = 0