From 270eb1db4df0d57f09910a37ab61b2037953262f 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 (cherry picked from commit 448712f719219806c9dbd75f6ec4cfd00ddd61b3) --- 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 35213121b32..c93d53fcb94 100644 --- a/erpnext/accounts/report/gross_profit/gross_profit.py +++ b/erpnext/accounts/report/gross_profit/gross_profit.py @@ -666,7 +666,7 @@ class GrossProfitGenerator(object): 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: