diff --git a/erpnext/accounts/report/gross_profit/gross_profit.py b/erpnext/accounts/report/gross_profit/gross_profit.py index 9c5d56ee3c9..7dffd0a83e4 100644 --- a/erpnext/accounts/report/gross_profit/gross_profit.py +++ b/erpnext/accounts/report/gross_profit/gross_profit.py @@ -225,8 +225,10 @@ class GrossProfitGenerator(object): average_buying_rate = get_incoming_rate(row) if not average_buying_rate: average_buying_rate = get_valuation_rate(item_code, row.warehouse, - allow_zero_rate=True, currency=self.filters.currency) - self.average_buying_rate[item_code] = average_buying_rate + row.parenttype, row.parent, allow_zero_rate=True, + currency=self.filters.currency) + + self.average_buying_rate[item_code] = average_buying_rate return self.average_buying_rate[item_code]