From bc77704462d2d8090094ceb0fbfb0a63a8df576c Mon Sep 17 00:00:00 2001 From: Navin-S-R Date: Thu, 18 Sep 2025 16:32:44 +0530 Subject: [PATCH] fix: add date filter for getting return invoice items (cherry picked from commit 2abb0118168eb29c4d87fe60de21f6263c136fb4) --- erpnext/accounts/report/gross_profit/gross_profit.py | 2 ++ 1 file changed, 2 insertions(+) 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, )