Link to ledger in transaction detail page

This commit is contained in:
RunasSudo 2020-04-15 11:09:53 +10:00
parent 66d5bb2fd3
commit e719aa293f
Signed by: RunasSudo
GPG Key ID: 7234E476BF21C61A
2 changed files with 2 additions and 2 deletions

View File

@ -55,7 +55,7 @@
{% set trn_url = '/transaction?' + {'tid': transaction.id, 'cash': 'on' if cash else ''}|urlencode %} {% set trn_url = '/transaction?' + {'tid': transaction.id, 'cash': 'on' if cash else ''}|urlencode %}
<tr> <tr>
<td>{{ posting.comment }}</td> <td>{{ posting.comment }}</td>
<td>{{ (posting.account.name|e).__str__().replace(':', ':<wbr>')|safe }}</td> <td><a href="/transactions?{{ {'date_end': transaction.date.strftime('%Y-%m-%d'), 'date_beg': transaction.date.strftime('%Y-%m-%d'), 'account': posting.account.name}|urlencode }}">{{ (posting.account.name|e).__str__().replace(':', ':<wbr>')|safe }}</a></td>
<td style="text-align: right;">{% if amount > 0 %}{{ amount|b }}{% endif %}</td> <td style="text-align: right;">{% if amount > 0 %}{{ amount|b }}{% endif %}</td>
<td style="text-align: right;">{% if amount < 0 %}{{ -amount|b }}{% endif %}</td> <td style="text-align: right;">{% if amount < 0 %}{{ -amount|b }}{% endif %}</td>
</tr> </tr>

View File

@ -53,7 +53,7 @@
{% set trn_url = '/transaction?' + {'tid': transaction.id, 'cash': 'on' if cash else ''}|urlencode %} {% set trn_url = '/transaction?' + {'tid': transaction.id, 'cash': 'on' if cash else ''}|urlencode %}
<tr> <tr>
<td>{{ posting.comment }}</td> <td>{{ posting.comment }}</td>
<td>{{ (posting.account.name|e).__str__().replace(':', ':<wbr>')|safe }}</td> <td><a href="/transactions?{{ {'date_end': transaction.date.strftime('%Y-%m-%d'), 'date_beg': transaction.date.strftime('%Y-%m-%d'), 'account': posting.account.name}|urlencode }}">{{ (posting.account.name|e).__str__().replace(':', ':<wbr>')|safe }}</a></td>
{% if posting.amount >= 0 %} {% if posting.amount >= 0 %}
{{ posting.amount|bt(True) }} {{ posting.amount|bt(True) }}
<td colspan="3"></td> <td colspan="3"></td>