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