fixes in global defaults

This commit is contained in:
Nabin Hait
2012-04-13 12:18:06 +05:30
parent d76146372e
commit 7fca9e617d
3 changed files with 8 additions and 8 deletions

View File

@@ -56,7 +56,7 @@ class DocType:
# update year start date and year end date from fiscal_year
ysd = webnotes.conn.sql("""select year_start_date from `tabFiscal Year`
where name=%s""", self.doc.fiscal_year)
where name=%s""", self.doc.current_fiscal_year)
ysd = ysd and ysd[0][0] or ''
from webnotes.utils import get_first_day, get_last_day
@@ -66,4 +66,4 @@ class DocType:
get_last_day(get_first_day(ysd,0,11)).strftime('%Y-%m-%d'))
def get_defaults(self):
return webnotes.conn.get_defaults()
return webnotes.conn.get_defaults()