fix: update add_total_row_account to control blank row addition

(cherry picked from commit f7c744350c)
This commit is contained in:
Abdeali Chharchhoda
2026-05-20 17:15:44 +05:30
committed by Mergify
parent d8afc00ab5
commit e8a6933ff3

View File

@@ -132,7 +132,14 @@ def execute(filters=None):
)
net_change_in_cash = add_total_row_account(
data, data, _("Net Change in Cash"), period_list, company_currency, summary_data, filters
data,
data,
_("Net Change in Cash"),
period_list,
company_currency,
summary_data,
filters,
add_blank_row=False,
)
if filters.show_opening_and_closing_balance:
@@ -250,7 +257,17 @@ def get_start_date(period, accumulated_values, company):
return start_date
def add_total_row_account(out, data, label, period_list, currency, summary_data, filters, consolidated=False):
def add_total_row_account(
out,
data,
label,
period_list,
currency,
summary_data,
filters,
consolidated=False,
add_blank_row=True,
):
total_row = {
"section_name": "'" + _("{0}").format(label) + "'",
"section": "'" + _("{0}").format(label) + "'",
@@ -275,7 +292,9 @@ def add_total_row_account(out, data, label, period_list, currency, summary_data,
total_row["total"] += row["total"]
out.append(total_row)
out.append({})
if add_blank_row:
out.append({})
return total_row