fix: date filter on quality inspection report (#31148)
* fix: date filter
fix from date to to date filter btw those days
* fix: remove unnecessary conditions
Co-authored-by: Ankush Menat <ankushmenat@gmail.com>
diff --git a/erpnext/manufacturing/report/quality_inspection_summary/quality_inspection_summary.py b/erpnext/manufacturing/report/quality_inspection_summary/quality_inspection_summary.py
index 0a79130..c324172 100644
--- a/erpnext/manufacturing/report/quality_inspection_summary/quality_inspection_summary.py
+++ b/erpnext/manufacturing/report/quality_inspection_summary/quality_inspection_summary.py
@@ -34,8 +34,8 @@
if filters.get(field):
query_filters[field] = ("in", filters.get(field))
- query_filters["report_date"] = (">=", filters.get("from_date"))
- query_filters["report_date"] = ("<=", filters.get("to_date"))
+
+ query_filters["report_date"] = ["between", [filters.get("from_date"), filters.get("to_date")]]
return frappe.get_all(
"Quality Inspection", fields=fields, filters=query_filters, order_by="report_date asc"