period closing voucher issue fixed

This commit is contained in:
Nabin Hait 2012-09-12 16:14:23 +05:30
parent 8fdaa4dd66
commit 5337ce8d02

View File

@ -63,7 +63,7 @@ class DocType:
def validate_posting_date(self):
yr = sql("select start_date, end_date from `tabPeriod` where period_name = '%s'" % (self.doc.fiscal_year))
yr = sql("select start_date, end_date from `tabPeriod` where fiscal_year = '%s' and period_type = 'Year'" % (self.doc.fiscal_year))
self.year_start_date = yr and yr[0][0] or ''
self.year_end_date = yr and yr[0][1] or ''