fix: sum stock_value and group by warehouse
(cherry picked from commit 1e20358c28)
This commit is contained in:
committed by
Mergify
parent
c9443123f9
commit
18d93f8398
@@ -33,8 +33,9 @@ def get(
|
||||
|
||||
warehouses = frappe.get_list(
|
||||
"Bin",
|
||||
fields=["warehouse", "stock_value"],
|
||||
fields=["warehouse", "sum(stock_value) stock_value"],
|
||||
filters={"warehouse": ["IN", warehouses], "stock_value": [">", 0]},
|
||||
group_by="warehouse",
|
||||
order_by="stock_value DESC",
|
||||
limit_page_length=10,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user