[Fix] Invoices not showing in the gross profit report against which sales return entry has created (#14914)

diff --git a/erpnext/accounts/report/gross_profit/gross_profit.py b/erpnext/accounts/report/gross_profit/gross_profit.py
index fe3bb8c..3aa237d 100644
--- a/erpnext/accounts/report/gross_profit/gross_profit.py
+++ b/erpnext/accounts/report/gross_profit/gross_profit.py
@@ -171,7 +171,7 @@
 							row.qty += returned_item_row.qty
 							row.base_amount += returned_item_row.base_amount
 						row.buying_amount = row.qty * row.buying_rate
-					if row.qty:
+					if row.qty or row.base_amount:
 						row = self.set_average_rate(row)
 						self.grouped_data.append(row)