Merge pull request #22410 from kennethsequeira/item_report_date

fix: add error prompt for wrong date range
This commit is contained in:
rohitwaghchaure 2020-06-24 10:49:21 +05:30 committed by GitHub
commit c4382abc03
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -9,6 +9,9 @@ from frappe.utils.nestedset import get_descendants_of
def execute(filters=None):
filters = frappe._dict(filters or {})
if filters.from_date > filters.to_date:
frappe.throw(_('From Date cannot be greater than To Date'))
columns = get_columns(filters)
data = get_data(filters)