Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Consolidated Financial Report throws error for empty equity data list #28122

Conversation

nemesis189
Copy link
Contributor

Problem:
Consolidated Financial Report throws index out of range error, on my instance it was because the equity_data list was empty and that caused an issue in prepare_companywise_opening_balance method where it directly fetched for the first elements of asset_data, liability_data, equity_data

Solution:
If the list is empty, skip it in the prepare_companywise_opening_balance

@codecov
Copy link

codecov bot commented Oct 28, 2021

Codecov Report

Merging #28122 (d786855) into develop (9c17052) will increase coverage by 0.00%.
The diff coverage is 50.00%.

@@           Coverage Diff            @@
##           develop   #28122   +/-   ##
========================================
  Coverage    55.19%   55.20%           
========================================
  Files         1255     1255           
  Lines        67877    67936   +59     
========================================
+ Hits         37465    37501   +36     
- Misses       30412    30435   +23     
Impacted Files Coverage Δ
...cial_statement/consolidated_financial_statement.py 0.00% <0.00%> (ø)
...ype/pos_invoice_merge_log/pos_invoice_merge_log.py 74.90% <100.00%> (ø)
...work_order_stock_report/work_order_stock_report.py 51.42% <0.00%> (-48.58%) ⬇️
...ctype/woocommerce_settings/woocommerce_settings.py 80.39% <0.00%> (-3.93%) ⬇️
erpnext/controllers/status_updater.py 85.71% <0.00%> (-1.86%) ⬇️
erpnext/stock/stock_ledger.py 85.32% <0.00%> (-1.66%) ⬇️
.../hr/doctype/upload_attendance/upload_attendance.py 45.11% <0.00%> (-1.51%) ⬇️
...eport/production_analytics/production_analytics.py 69.87% <0.00%> (-1.21%) ⬇️
erpnext/accounts/deferred_revenue.py 75.22% <0.00%> (-0.89%) ⬇️
... and 30 more

@deepeshgarg007
Copy link
Member

@Mergifyio backport version-13-hotfix

@mergify
Copy link
Contributor

mergify bot commented Oct 29, 2021

backport version-13-hotfix

🟠 Waiting for conditions to match

  • merged [:pushpin: backport requirement]

@mergify
Copy link
Contributor

mergify bot commented Oct 29, 2021

backport version-13-hotfix

✅ Backports have been created

deepeshgarg007 added a commit that referenced this pull request Oct 29, 2021
…-28122

fix: Consolidated Financial Report throws error for empty equity data list (backport #28122)
asoral pushed a commit to asoral/erpnext that referenced this pull request Nov 12, 2021
…fix/pr-28122

fix: Consolidated Financial Report throws error for empty equity data list (backport frappe#28122)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants