From 448712f719219806c9dbd75f6ec4cfd00ddd61b3 Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Thu, 25 May 2023 14:18:41 +0530 Subject: [PATCH] fix(Gross Profit): 'company' column is ambiguous in filter --- 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 81f592862887..a0099a9a82f8 100644 --- a/erpnext/accounts/report/gross_profit/gross_profit.py +++ b/erpnext/accounts/report/gross_profit/gross_profit.py @@ -736,7 +736,7 @@ def get_last_purchase_rate(self, item_code, row): def load_invoice_items(self): conditions = "" if self.filters.company: - conditions += " and company = %(company)s" + conditions += " and `tabSales Invoice`.company = %(company)s" if self.filters.from_date: conditions += " and posting_date >= %(from_date)s" if self.filters.to_date: