fix: key error on p/l and balance sheet reports on foreign currency

(cherry picked from commit a6794c3606)
This commit is contained in:
ruthra kumar
2022-12-06 13:44:54 +05:30
parent b3ccad8cf4
commit 0003e0cb5b

View File

@@ -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"]