[Fix] Error in Balance Sheet Report
diff --git a/erpnext/accounts/report/balance_sheet/balance_sheet.py b/erpnext/accounts/report/balance_sheet/balance_sheet.py
index 5547b49..fbfaa41 100644
--- a/erpnext/accounts/report/balance_sheet/balance_sheet.py
+++ b/erpnext/accounts/report/balance_sheet/balance_sheet.py
@@ -38,7 +38,8 @@
if provisional_profit_loss:
data.append(provisional_profit_loss)
- data.append(total_credit)
+ if total_credit:
+ data.append(total_credit)
columns = get_columns(filters.periodicity, period_list, company=filters.company)
@@ -86,6 +87,7 @@
if has_value:
return provisional_profit_loss, total_row
return None,total_row
+ return None, None
def check_opening_balance(asset, liability, equity):
# Check if previous year balance sheet closed