From b428e4c49325623b1f0511c3bd3723141bbc66d7 Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Wed, 30 Sep 2020 17:44:35 +0530 Subject: [PATCH] fix: currency symbol in profit and loss report --- .../profit_and_loss_statement.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/erpnext/accounts/report/profit_and_loss_statement/profit_and_loss_statement.py b/erpnext/accounts/report/profit_and_loss_statement/profit_and_loss_statement.py index 7caa7648b1..c9ae0b0277 100644 --- a/erpnext/accounts/report/profit_and_loss_statement/profit_and_loss_statement.py +++ b/erpnext/accounts/report/profit_and_loss_statement/profit_and_loss_statement.py @@ -32,7 +32,7 @@ def execute(filters=None): chart = get_chart_data(filters, columns, income, expense, net_profit_loss) - default_currency = frappe.get_cached_value('Company', filters.company, "default_currency") + default_currency = filters.presentation_currency or frappe.get_cached_value('Company', filters.company, "default_currency") report_summary = get_report_summary(period_list, filters.periodicity, income, expense, net_profit_loss, default_currency) return columns, data, None, chart, report_summary @@ -64,19 +64,19 @@ def get_report_summary(period_list, periodicity, income, expense, net_profit_los "indicator": "Green" if net_profit > 0 else "Red", "label": profit_label, "datatype": "Currency", - "currency": net_profit_loss.get("currency") if net_profit_loss else default_currency + "currency": default_currency }, { "value": net_income, "label": income_label, "datatype": "Currency", - "currency": income[-1].get('currency') if income else default_currency + "currency": default_currency }, { "value": net_expense, "label": expense_label, "datatype": "Currency", - "currency": expense[-1].get('currency') if expense else default_currency + "currency": default_currency } ]