fix(gp): SLEs not fetched for correct warehouse
diff --git a/erpnext/accounts/report/gross_profit/gross_profit.py b/erpnext/accounts/report/gross_profit/gross_profit.py
index dd4546d..374ecf3 100644
--- a/erpnext/accounts/report/gross_profit/gross_profit.py
+++ b/erpnext/accounts/report/gross_profit/gross_profit.py
@@ -661,7 +661,7 @@
dn["item_row"],
dn["warehouse"],
)
- my_sle = self.get_stock_ledger_entries(item_code, row.warehouse)
+ my_sle = self.get_stock_ledger_entries(item_code, _warehouse)
return self.calculate_buying_amount_from_sle(
row, my_sle, parenttype, parent, item_row, item_code
)