diff --git a/accounting/templates/accounting/balance-sheet.html b/accounting/templates/accounting/balance-sheet.html index ab3a695..1330fcf 100644 --- a/accounting/templates/accounting/balance-sheet.html +++ b/accounting/templates/accounting/balance-sheet.html @@ -85,11 +85,11 @@ First written: 2020/7/20 - + - {% for group in section_1.groups %} + {% for group in assets.groups %} @@ -116,11 +116,11 @@ First written: 2020/7/20
{{ section_1.title|title }}{{ assets.title|title }}
{{ group.title|title }}
- + - {% for group in section_2.groups %} + {% for group in liabilities.groups %} @@ -143,8 +143,8 @@ First written: 2020/7/20 - @@ -153,11 +153,11 @@ First written: 2020/7/20
{{ section_2.title|title }}{{ liabilities.title|title }}
{{ group.title|title }}
{% trans "Total" context "Accounting|" as text %}{{ text|force_escape }} - {{ section_2.balance|accounting_amount }} + + {{ liabilities.balance|accounting_amount }}
- + - {% for group in section_3.groups %} + {% for group in owners_equity.groups %} @@ -180,8 +180,8 @@ First written: 2020/7/20 - @@ -195,8 +195,8 @@ First written: 2020/7/20 - @@ -208,8 +208,8 @@ First written: 2020/7/20 - @@ -228,9 +228,9 @@ First written: 2020/7/20
@@ -259,9 +259,9 @@ First written: 2020/7/20
@@ -319,8 +319,8 @@ First written: 2020/7/20 diff --git a/accounting/views/reports.py b/accounting/views/reports.py index 6e3ab76..13a010a 100644 --- a/accounting/views/reports.py +++ b/accounting/views/reports.py @@ -784,9 +784,9 @@ def balance_sheet(request, period_spec): section.balance = sum([x.balance for x in section.groups]) by_code = {x.code: x for x in sections} return render(request, "accounting/balance-sheet.html", { - "section_1": by_code["1"], - "section_2": by_code["2"], - "section_3": by_code["3"], + "assets": by_code["1"], + "liabilities": by_code["2"], + "owners_equity": by_code["3"], "reports": ReportUrl(period=period), "period": period, })
{{ section_3.title|title }}{{ owners_equity.title|title }}
{{ group.title|title }}
{% trans "Total" context "Accounting|" as text %}{{ text|force_escape }} - {{ section_3.balance|accounting_amount }} + + {{ owners_equity.balance|accounting_amount }}
{% trans "Total" context "Accounting|" as text %}{{ text|force_escape }} - {{ section_1.balance|accounting_amount }} + + {{ assets.balance|accounting_amount }}
{% trans "Total" context "Accounting|" as text %}{{ text|force_escape }} - {{ section_2.balance|add:section_3.balance|accounting_amount }} + + {{ liabilities.balance|add:owners_equity.balance|accounting_amount }}