From a6794c36062acb7963a387271e2f4b4800643a68 Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Tue, 6 Dec 2022 13:44:54 +0530 Subject: [PATCH] fix: key error on p/l and balance sheet reports on foreign currency --- erpnext/accounts/report/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/accounts/report/utils.py b/erpnext/accounts/report/utils.py index 81fea28515..d3cd29013f 100644 --- a/erpnext/accounts/report/utils.py +++ b/erpnext/accounts/report/utils.py @@ -28,7 +28,7 @@ def get_currency(filters): filters["presentation_currency"] if filters.get("presentation_currency") else company_currency ) - report_date = filters.get("period_end_date") + report_date = filters.get("to_date") or filters.get("period_end_date") if not report_date: fiscal_year_to_date = get_from_and_to_date(filters.get("to_fiscal_year"))["to_date"]