From 5eb7209b95599235af64eb8eedb5f54329bdba85 Mon Sep 17 00:00:00 2001 From: RunasSudo Date: Sun, 24 Jan 2021 02:23:04 +1100 Subject: [PATCH] Show posting comment in "Transactions with Commodity Detail" report --- .../jinja2/transactions_commodity.html | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/ledger_pyreport/jinja2/transactions_commodity.html b/ledger_pyreport/jinja2/transactions_commodity.html index 1cae983..25e272e 100644 --- a/ledger_pyreport/jinja2/transactions_commodity.html +++ b/ledger_pyreport/jinja2/transactions_commodity.html @@ -86,6 +86,21 @@ {% endfor %} {% set ns.balance = ns.balance.clean() %} + + {# This account's comment #} + {% for posting in transaction.postings if posting.account == account and posting.comment %} + + + {{ posting.comment }} + + + + + + + + + {% endfor %} {% endfor %} {% set nextlink = '/transactions?' + {'date_beg': (date_end + timedelta(days=1)).strftime('%Y-%m-%d'), 'date_end': date_end.replace(year=date_end.year+1).strftime('%Y-%m-%d'), 'account': account.name, 'cash': 'on' if cash else ''}|urlencode %}