Revised the ledger not to show the accumulated balance of the nominal accounts. The accumulated balance does not make sense for nominal accounts.
This commit is contained in:
parent
5f7fc0b8e8
commit
8c10f1e96a
@ -178,6 +178,8 @@ class EntryCollector:
|
||||
|
||||
:return: None.
|
||||
"""
|
||||
if self.__account.is_nominal:
|
||||
return None
|
||||
balance: Decimal = 0 if self.brought_forward is None \
|
||||
else self.brought_forward.balance
|
||||
for entry in self.entries:
|
||||
|
@ -221,12 +221,18 @@ a.accounting-report-table-row {
|
||||
.accounting-journal-table .accounting-report-table-row {
|
||||
grid-template-columns: 1fr 1fr 2fr 4fr 1fr 1fr;
|
||||
}
|
||||
.accounting-ledger-table .accounting-report-table-row {
|
||||
.accounting-ledger-real-table .accounting-report-table-row {
|
||||
grid-template-columns: 1fr 4fr 1fr 1fr 1fr;
|
||||
}
|
||||
.accounting-ledger-table .accounting-report-table-footer .accounting-report-table-row {
|
||||
.accounting-ledger-real-table .accounting-report-table-footer .accounting-report-table-row {
|
||||
grid-template-columns: 5fr 1fr 1fr 1fr;
|
||||
}
|
||||
.accounting-ledger-nominal-table .accounting-report-table-row {
|
||||
grid-template-columns: 1fr 4fr 1fr 1fr;
|
||||
}
|
||||
.accounting-ledger-nominal-table .accounting-report-table-footer .accounting-report-table-row {
|
||||
grid-template-columns: 5fr 1fr 1fr;
|
||||
}
|
||||
.accounting-income-expenses-table .accounting-report-table-row {
|
||||
grid-template-columns: 1fr 2fr 4fr 1fr 1fr 1fr;
|
||||
}
|
||||
|
@ -23,4 +23,6 @@ First written: 2023/3/8
|
||||
<div>{{ entry.summary|accounting_default }}</div>
|
||||
<div class="accounting-amount">{{ entry.debit|accounting_format_amount|accounting_default }}</div>
|
||||
<div class="accounting-amount">{{ entry.credit|accounting_format_amount|accounting_default }}</div>
|
||||
<div class="accounting-amount {% if entry.balance < 0 %} text-danger {% endif %}">{{ entry.balance|accounting_report_format_amount }}</div>
|
||||
{% if report.account.is_real %}
|
||||
<div class="accounting-amount {% if entry.balance < 0 %} text-danger {% endif %}">{{ entry.balance|accounting_report_format_amount }}</div>
|
||||
{% endif %}
|
||||
|
@ -37,5 +37,7 @@ First written: 2023/3/5
|
||||
{% if entry.credit %}
|
||||
<span class="badge rounded-pill bg-warning">-{{ entry.credit|accounting_format_amount }}</span>
|
||||
{% endif %}
|
||||
{% if report.account.is_real %}
|
||||
<span class="badge rounded-pill bg-primary">{{ entry.balance|accounting_format_amount }}</span>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
@ -49,14 +49,16 @@ First written: 2023/3/5
|
||||
{% include "accounting/include/pagination.html" %}
|
||||
{% endwith %}
|
||||
|
||||
<div class="d-none d-md-block accounting-report-table accounting-ledger-table">
|
||||
<div class="d-none d-md-block accounting-report-table {% if report.account.is_real %} accounting-ledger-real-table {% else %} accounting-ledger-nominal-table {% endif %}">
|
||||
<div class="accounting-report-table-header">
|
||||
<div class="accounting-report-table-row">
|
||||
<div>{{ A_("Date") }}</div>
|
||||
<div>{{ A_("Summary") }}</div>
|
||||
<div class="accounting-amount">{{ A_("Debit") }}</div>
|
||||
<div class="accounting-amount">{{ A_("Credit") }}</div>
|
||||
{% if report.account.is_real %}
|
||||
<div class="accounting-amount">{{ A_("Balance") }}</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="accounting-report-table-body">
|
||||
@ -80,7 +82,9 @@ First written: 2023/3/5
|
||||
<div>{{ A_("Total") }}</div>
|
||||
<div class="accounting-amount">{{ entry.debit|accounting_format_amount|accounting_default }}</div>
|
||||
<div class="accounting-amount">{{ entry.credit|accounting_format_amount|accounting_default }}</div>
|
||||
{% if report.account.is_real %}
|
||||
<div class="accounting-amount {% if entry.balance < 0 %} text-danger {% endif %}">{{ entry.balance|accounting_report_format_amount }}</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
{% endwith %}
|
||||
|
Loading…
Reference in New Issue
Block a user