diff --git a/ledger_pyreport/jinja2/transactions.html b/ledger_pyreport/jinja2/transactions.html index 907570b..cecca86 100644 --- a/ledger_pyreport/jinja2/transactions.html +++ b/ledger_pyreport/jinja2/transactions.html @@ -65,13 +65,13 @@ {% for transaction in transactions %} {% for posting in transaction.postings if (posting.amount.amount >= 0.05 or posting.amount.amount < -0.05) and posting.account != account %} {% set amount = posting.exchange(report_currency, transaction.date) %} - {% set ns.balance = ns.balance - amount %} {% if loop.first %}{{ transaction.date.strftime('%Y-%m-%d') }}{% endif %} {% if loop.first %}{{ transaction.description }}{% endif %} {{ (posting.account.name|e).__str__().replace(':', ':')|safe }} {% if account %} {# Reverse Dr/Cr so it's from the "perspective" of this account #} + {% set ns.balance = ns.balance - amount %} {% if amount < 0 %}{{ -amount|b }}{% endif %} {% if amount > 0 %}{{ amount|b }}{% endif %}