Merge pull request #39187 from ruthra-kumar/backport_37613

fix: possible key error in Financial Ratio's report
This commit is contained in:
ruthra kumar 2024-01-08 12:08:13 +05:30 committed by GitHub
commit 83288fedf1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -177,8 +177,8 @@ def add_solvency_ratios(
return_on_equity_ratio = {"ratio": "Return on Equity Ratio"}
for year in years:
profit_after_tax = total_income[year] + total_expense[year]
share_holder_fund = total_asset[year] - total_liability[year]
profit_after_tax = flt(total_income.get(year)) + flt(total_expense.get(year))
share_holder_fund = flt(total_asset.get(year)) - flt(total_liability.get(year))
debt_equity_ratio[year] = calculate_ratio(
total_liability.get(year), share_holder_fund, precision