mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-09 08:11:19 +00:00
* fix: incorrect stock balance for inventory dimension (#43284)
(cherry picked from commit 3e7a7a54bf)
# Conflicts:
# erpnext/stock/report/stock_balance/stock_balance.js
* chore: fix conflicts
---------
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: "show_dimension_wise_stock",
|
||||||
|
label: __("Show Dimension Wise Stock"),
|
||||||
|
fieldtype: "Check",
|
||||||
|
default: 0,
|
||||||
|
},
|
||||||
],
|
],
|
||||||
|
|
||||||
formatter: function (value, row, column, data, default_formatter) {
|
formatter: function (value, row, column, data, default_formatter) {
|
||||||
|
|||||||
@@ -226,7 +226,10 @@ class StockBalanceReport:
|
|||||||
group_by_key = [row.company, row.item_code, row.warehouse]
|
group_by_key = [row.company, row.item_code, row.warehouse]
|
||||||
|
|
||||||
for fieldname in self.inventory_dimensions:
|
for fieldname in self.inventory_dimensions:
|
||||||
if self.filters.get(fieldname):
|
if not row.get(fieldname):
|
||||||
|
continue
|
||||||
|
|
||||||
|
if self.filters.get(fieldname) or self.filters.get("show_dimension_wise_stock"):
|
||||||
group_by_key.append(row.get(fieldname))
|
group_by_key.append(row.get(fieldname))
|
||||||
|
|
||||||
return tuple(group_by_key)
|
return tuple(group_by_key)
|
||||||
|
|||||||
Reference in New Issue
Block a user