mirror of
https://github.com/frappe/erpnext.git
synced 2026-03-10 13:57:19 +00:00
fix: adding filters validation Batch-Wise Balance History
This commit is contained in:
@@ -9,13 +9,15 @@ frappe.query_reports["Batch-Wise Balance History"] = {
|
||||
"fieldtype": "Date",
|
||||
"width": "80",
|
||||
"default": frappe.sys_defaults.year_start_date,
|
||||
"reqd": 1
|
||||
},
|
||||
{
|
||||
"fieldname":"to_date",
|
||||
"label": __("To Date"),
|
||||
"fieldtype": "Date",
|
||||
"width": "80",
|
||||
"default": frappe.datetime.get_today()
|
||||
"default": frappe.datetime.get_today(),
|
||||
"reqd": 1
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -9,6 +9,9 @@ from frappe.utils import flt, cint, getdate
|
||||
def execute(filters=None):
|
||||
if not filters: filters = {}
|
||||
|
||||
if filters.from_date > filters.to_date:
|
||||
frappe.throw(_("From Date must be before To Date"))
|
||||
|
||||
float_precision = cint(frappe.db.get_default("float_precision")) or 3
|
||||
|
||||
columns = get_columns(filters)
|
||||
|
||||
Reference in New Issue
Block a user