[minor] [fix] validate fiscal year in trial balance

This commit is contained in:
Rushabh Mehta 2016-01-11 11:59:08 +05:30
parent 5facb60bbe
commit 7be0b47778

View File

@ -16,6 +16,8 @@ def execute(filters=None):
return columns, data
def validate_filters(filters):
if not filters.fiscal_year:
frappe.throw(_("Fiscal Year {0} is required"))
filters.year_start_date, filters.year_end_date = frappe.db.get_value("Fiscal Year", filters.fiscal_year,
["year_start_date", "year_end_date"])
filters.year_start_date = getdate(filters.year_start_date)