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: show total rows credit row in balance sheet #42352

Merged
merged 1 commit into from
Jul 16, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 7 additions & 11 deletions erpnext/accounts/report/balance_sheet/balance_sheet.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,19 +123,15 @@ def get_provisional_profit_loss(
for period in period_list:
key = period if consolidated else period.key
total_assets = flt(asset[0].get(key))
effective_liability = 0.00

if liability or equity:
effective_liability = 0.0
if liability:
effective_liability += flt(liability[0].get(key))
if equity:
effective_liability += flt(equity[0].get(key))
if liability:
effective_liability += flt(liability[0].get(key))
if equity:
effective_liability += flt(equity[0].get(key))

provisional_profit_loss[key] = total_assets - effective_liability
else:
provisional_profit_loss[key] = total_assets

total_row[key] = provisional_profit_loss[key]
provisional_profit_loss[key] = total_assets - effective_liability
total_row[key] = provisional_profit_loss[key] + effective_liability

if provisional_profit_loss[key]:
has_value = True
Expand Down
Loading