fix(profit and loss statement): exclude non period columns

(cherry picked from commit 6180e5eb53)
This commit is contained in:
ravibharathi656
2026-02-02 12:04:44 +05:30
committed by Mergify
parent 660fc8f76a
commit 28e8c40bfc

View File

@@ -163,11 +163,11 @@ def get_net_profit_loss(income, expense, period_list, company, currency=None, co
def get_chart_data(filters, columns, income, expense, net_profit_loss, currency):
labels = [d.get("label") for d in columns[2:]]
labels = [d.get("label") for d in columns[4:]]
income_data, expense_data, net_profit = [], [], []
for p in columns[2:]:
for p in columns[4:]:
if income:
income_data.append(income[-2].get(p.get("fieldname")))
if expense: