diff --git a/erpnext/accounts/report/gross_profit/gross_profit.py b/erpnext/accounts/report/gross_profit/gross_profit.py index add7a90b74b..5081c450151 100644 --- a/erpnext/accounts/report/gross_profit/gross_profit.py +++ b/erpnext/accounts/report/gross_profit/gross_profit.py @@ -677,7 +677,9 @@ class GrossProfitGenerator: si.name = si_item.parent and si.docstatus = 1 and si.is_return = 1 + and si.posting_date between %(from_date)s and %(to_date)s """, + {"from_date": self.filters.from_date, "to_date": self.filters.to_date}, as_dict=1, )