mirror of
https://github.com/frappe/erpnext.git
synced 2026-03-19 23:12:13 +00:00
fix: show zero stock items filter in the stock balance report (#42147)
(cherry picked from commit 1dae2156e3)
Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
This commit is contained in:
@@ -101,6 +101,12 @@ frappe.query_reports["Stock Balance"] = {
|
|||||||
fieldtype: "Check",
|
fieldtype: "Check",
|
||||||
default: 0,
|
default: 0,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
fieldname: "include_zero_stock_items",
|
||||||
|
label: __("Include Zero Stock Items"),
|
||||||
|
fieldtype: "Check",
|
||||||
|
default: 0,
|
||||||
|
},
|
||||||
],
|
],
|
||||||
|
|
||||||
formatter: function (value, row, column, data, default_formatter) {
|
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)}
|
{"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
|
continue
|
||||||
|
|
||||||
self.data.append(report_data)
|
self.data.append(report_data)
|
||||||
|
|||||||
Reference in New Issue
Block a user