Skip to content

Commit

Permalink
Merge pull request #42352 from ljain112/balance-sheet
Browse files Browse the repository at this point in the history
fix: show total rows credit row in balance sheet
  • Loading branch information
vorasmit authored Jul 16, 2024
2 parents 001e5b6 + 327b19c commit ea03ce3
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 ea03ce3

Please sign in to comment.