From 18afcf0c01f8a849a0419506b45c42fb5f1bace1 Mon Sep 17 00:00:00 2001 From: Ahmed Reda Abukhatwa Date: Thu, 14 May 2026 14:40:03 +0300 Subject: [PATCH] fix: skip empty spacer rows in compute_growth_view_data (P&L growth view) (cherry picked from commit 3592c3086d6cc87df997518cedae62624bc09b58) --- erpnext/accounts/report/financial_statements.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/erpnext/accounts/report/financial_statements.py b/erpnext/accounts/report/financial_statements.py index a628febd2c1..478c603dbf5 100644 --- a/erpnext/accounts/report/financial_statements.py +++ b/erpnext/accounts/report/financial_statements.py @@ -737,6 +737,9 @@ def compute_growth_view_data(data, columns): data_copy = copy.deepcopy(data) for row_idx in range(len(data_copy)): + if not data_copy[row_idx]: + continue + for column_idx in range(1, len(columns)): previous_period_key = columns[column_idx - 1].get("key") current_period_key = columns[column_idx].get("key")