Merge branch 'unicode' of github.com:webnotes/erpnext into unicode
diff --git a/erpnext/accounts/doctype/period_closing_voucher/period_closing_voucher.py b/erpnext/accounts/doctype/period_closing_voucher/period_closing_voucher.py
index 454c767..860fdd1 100644
--- a/erpnext/accounts/doctype/period_closing_voucher/period_closing_voucher.py
+++ b/erpnext/accounts/doctype/period_closing_voucher/period_closing_voucher.py
@@ -63,7 +63,7 @@
 
 
 	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 ''