mirror of
https://github.com/frappe/erpnext.git
synced 2026-03-22 11:44:11 +00:00
fix: filter validation for batch-wise balance history report (#41356)
fix: filter validation for batchwise balance history report
(cherry picked from commit 544fc60093)
Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
This commit is contained in:
@@ -30,8 +30,15 @@ def execute(filters=None):
|
|||||||
|
|
||||||
sle_count = _estimate_table_row_count("Stock Ledger Entry")
|
sle_count = _estimate_table_row_count("Stock Ledger Entry")
|
||||||
|
|
||||||
if sle_count > SLE_COUNT_LIMIT and not filters.get("item_code") and not filters.get("warehouse"):
|
if (
|
||||||
frappe.throw(_("Please select either the Item or Warehouse filter to generate the report."))
|
sle_count > SLE_COUNT_LIMIT
|
||||||
|
and not filters.get("item_code")
|
||||||
|
and not filters.get("warehouse")
|
||||||
|
and not filters.get("warehouse_type")
|
||||||
|
):
|
||||||
|
frappe.throw(
|
||||||
|
_("Please select either the Item or Warehouse or Warehouse Type filter to generate the report.")
|
||||||
|
)
|
||||||
|
|
||||||
if filters.from_date > filters.to_date:
|
if filters.from_date > filters.to_date:
|
||||||
frappe.throw(_("From Date must be before To Date"))
|
frappe.throw(_("From Date must be before To Date"))
|
||||||
|
|||||||
Reference in New Issue
Block a user