From 7be0b477780a959d7c35c3b26764d6de5ddeeea0 Mon Sep 17 00:00:00 2001 From: Rushabh Mehta Date: Mon, 11 Jan 2016 11:59:08 +0530 Subject: [PATCH] [minor] [fix] validate fiscal year in trial balance --- erpnext/accounts/report/trial_balance/trial_balance.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/erpnext/accounts/report/trial_balance/trial_balance.py b/erpnext/accounts/report/trial_balance/trial_balance.py index 13e87432b3c..f0524c03028 100644 --- a/erpnext/accounts/report/trial_balance/trial_balance.py +++ b/erpnext/accounts/report/trial_balance/trial_balance.py @@ -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)