Minor tweaks
This commit is contained in:
parent
706ac8ae87
commit
be82615598
@ -38,9 +38,8 @@
|
||||
|
||||
{% macro do_accounts(root, label, invert, year_headers) %}
|
||||
{% for account_class in balance_sheets[0].get_account(root).children if account_class in accounts %}
|
||||
{% set isfirst = (loop.index0 == 0) %}
|
||||
<tr>
|
||||
{% if isfirst and year_headers %}
|
||||
{% if loop.first and year_headers %}
|
||||
<th class="h2">{{ account_class.bits[-1] }} {{ label }}</th>
|
||||
{% for balance_sheet in balance_sheets %}<th class="h2">{{ balance_sheet.date.strftime('%Y') }} </th>{% endfor %}
|
||||
{% else %}
|
||||
|
@ -53,18 +53,20 @@
|
||||
</td>
|
||||
</tr>
|
||||
{% for transaction in transactions %}
|
||||
{% for posting in transaction.postings %}
|
||||
{% for posting in transaction.postings if posting.amount >= 0.05 or posting.amount < -0.05 %}
|
||||
<tr>
|
||||
<td>{% if loop.index0 == 0 %}{{ transaction.date.strftime('%Y-%m-%d') }}{% endif %}</td>
|
||||
<td>{% if loop.index0 == 0 %}{{ transaction.payee }}{% endif %}</td>
|
||||
<td>{% if loop.first %}{{ transaction.date.strftime('%Y-%m-%d') }}{% endif %}</td>
|
||||
<td>{% if loop.first %}{{ transaction.payee }}{% endif %}</td>
|
||||
<td><a href="/transactions?{{ {'date': date.strftime('%Y-%m-%d'), 'pstart': pstart.strftime('%Y-%m-%d'), 'account': posting.account}|urlencode }}">{{ (posting.account|e).__str__().replace(':', ':<wbr>')|safe }}</a></td>
|
||||
<td style="text-align: right;">{% if posting.amount > 0 %}{{ posting.amount|b }}{% endif %}</td>
|
||||
<td style="text-align: right;">{% if posting.amount < 0 %}{{ -posting.amount|b }}{% endif %}</td>
|
||||
<td style="text-align: right;">
|
||||
{% if posting.balance >= 0 %}
|
||||
{{ posting.balance|b }} Dr
|
||||
{% else %}
|
||||
{{ -posting.balance|b }} Cr
|
||||
{% if loop.last %}
|
||||
{% if posting.balance >= 0 %}
|
||||
{{ posting.balance|b }} Dr
|
||||
{% else %}
|
||||
{{ -posting.balance|b }} Cr
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
|
Reference in New Issue
Block a user