mirror of
https://github.com/frappe/erpnext.git
synced 2026-03-12 23:07:41 +00:00
fix: show zero stock items filter in the stock balance report (#42147)
This commit is contained in:
@@ -101,6 +101,12 @@ frappe.query_reports["Stock Balance"] = {
|
||||
fieldtype: "Check",
|
||||
default: 0,
|
||||
},
|
||||
{
|
||||
fieldname: "include_zero_stock_items",
|
||||
label: __("Include Zero Stock Items"),
|
||||
fieldtype: "Check",
|
||||
default: 0,
|
||||
},
|
||||
],
|
||||
|
||||
formatter: function (value, row, column, data, default_formatter) {
|
||||
|
||||
@@ -138,7 +138,12 @@ class StockBalanceReport:
|
||||
{"reserved_stock": sre_details.get((report_data.item_code, report_data.warehouse), 0.0)}
|
||||
)
|
||||
|
||||
if report_data and report_data.bal_qty == 0 and report_data.bal_val == 0:
|
||||
if (
|
||||
not self.filters.get("include_zero_stock_items")
|
||||
and report_data
|
||||
and report_data.bal_qty == 0
|
||||
and report_data.bal_val == 0
|
||||
):
|
||||
continue
|
||||
|
||||
self.data.append(report_data)
|
||||
|
||||
Reference in New Issue
Block a user