Skip to content

Commit

Permalink
fix: show total rows credit row in balance sheet
Browse files Browse the repository at this point in the history
  • Loading branch information
ljain112 committed Jul 16, 2024
1 parent 6a50b40 commit 327b19c
Showing 1 changed file with 7 additions and 11 deletions.
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

0 comments on commit 327b19c

Please sign in to comment.