From e93b37c0b0a1d28dcdb7a3a0034b4949ab1520c2 Mon Sep 17 00:00:00 2001 From: RunasSudo Date: Wed, 4 Jan 2023 10:56:17 +1100 Subject: [PATCH] Allow editing transactions from account transactions view --- drcr/templates/transactions.html | 10 ++++++++-- drcr/templates/transactions_commodity_detail.html | 5 ++++- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/drcr/templates/transactions.html b/drcr/templates/transactions.html index 7201448..6291d72 100644 --- a/drcr/templates/transactions.html +++ b/drcr/templates/transactions.html @@ -44,7 +44,10 @@ {% set _ = running_total.__setattr__('quantity', running_total.quantity + posting.amount().as_cost().quantity) %} {{ transaction.dt.strftime('%Y-%m-%d') }} - {{ transaction.description }} + + {{ transaction.description }} + {% if transaction.id %}{% endif %} + {% for p in transaction.postings if p.account != account %}{{ p.account }}{% endfor %} {{ posting.amount().as_cost().format() if posting.quantity >= 0 else '' }} {{ (posting.amount()|abs).as_cost().format() if posting.quantity < 0 else '' }} @@ -55,7 +58,10 @@ {% else %} {{ transaction.dt.strftime('%Y-%m-%d') }} - {{ transaction.description }} + + {{ transaction.description }} + {% if transaction.id %}{% endif %} + diff --git a/drcr/templates/transactions_commodity_detail.html b/drcr/templates/transactions_commodity_detail.html index 19220a2..988c42d 100644 --- a/drcr/templates/transactions_commodity_detail.html +++ b/drcr/templates/transactions_commodity_detail.html @@ -40,7 +40,10 @@ {% for transaction in transactions %} {{ transaction.dt.strftime('%Y-%m-%d') }} - {{ transaction.description }} + + {{ transaction.description }} + {% if transaction.id %}{% endif %} +