Allow editing transactions from account transactions view

This commit is contained in:
RunasSudo 2023-01-04 10:56:17 +11:00
parent a353beeb20
commit e93b37c0b0
Signed by: RunasSudo
GPG Key ID: 7234E476BF21C61A
2 changed files with 12 additions and 3 deletions

View File

@ -44,7 +44,10 @@
{% set _ = running_total.__setattr__('quantity', running_total.quantity + posting.amount().as_cost().quantity) %}
<tr>
<td>{{ transaction.dt.strftime('%Y-%m-%d') }}</td>
<td>{{ transaction.description }}</td>
<td>
{{ transaction.description }}
{% if transaction.id %}<a href="/journal/edit-transaction?id={{ transaction.id }}"><i class="bi bi-pencil text-muted"></i></a>{% endif %}
</td>
<td>{% for p in transaction.postings if p.account != account %}{{ p.account }}{% endfor %}</td>
<td class="text-end">{{ posting.amount().as_cost().format() if posting.quantity >= 0 else '' }}</td>
<td class="text-end">{{ (posting.amount()|abs).as_cost().format() if posting.quantity < 0 else '' }}</td>
@ -55,7 +58,10 @@
{% else %}
<tr>
<td>{{ transaction.dt.strftime('%Y-%m-%d') }}</td>
<td colspan="2">{{ transaction.description }}</td>
<td colspan="2">
{{ transaction.description }}
{% if transaction.id %}<a href="/journal/edit-transaction?id={{ transaction.id }}"><i class="bi bi-pencil text-muted"></i></a>{% endif %}
</td>
<td></td>
<td></td>
<td></td>

View File

@ -40,7 +40,10 @@
{% for transaction in transactions %}
<tr style="border-width:1px 0 0 0">
<td>{{ transaction.dt.strftime('%Y-%m-%d') }}</td>
<td>{{ transaction.description }}</td>
<td>
{{ transaction.description }}
{% if transaction.id %}<a href="/journal/edit-transaction?id={{ transaction.id }}"><i class="bi bi-pencil text-muted"></i></a>{% endif %}
</td>
<td></td>
<td></td>
<td></td>