From f958e8be0698723630db0c742cb6fe9428c2c8f4 Mon Sep 17 00:00:00 2001 From: Dany Robert Date: Sat, 30 Mar 2024 16:32:43 +0530 Subject: [PATCH] fix(gp): SLEs not fetched for correct warehouse --- erpnext/accounts/report/gross_profit/gross_profit.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/accounts/report/gross_profit/gross_profit.py b/erpnext/accounts/report/gross_profit/gross_profit.py index dd4546db5ab..374ecf318b5 100644 --- a/erpnext/accounts/report/gross_profit/gross_profit.py +++ b/erpnext/accounts/report/gross_profit/gross_profit.py @@ -661,7 +661,7 @@ class GrossProfitGenerator: 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 )