{# ledger-pyreport Copyright © 2020 Lee Yingtong Li (RunasSudo) This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . #} {% extends 'base_report.html' %} {% block title %}{{ transaction.description }}{% endblock %} {% block report %}

Transaction

Date Code Description
{{ transaction.date.strftime('%Y-%m-%d') }} {{ transaction.code }} {{ transaction.description }}
{##} {% for posting in transaction.postings %} {% set trn_url = '/transaction?' + {'tid': transaction.id, 'cash': 'on' if cash else ''}|urlencode %} {% if posting.amount >= 0 %} {% else %} {% endif %} {% endfor %} {% for dr_amount, cr_amount in totals %} {% if dr_amount %} {% else %} {% endif %} {% if cr_amount %} {% else %} {% endif %} {% endfor %}
DateDescription Account Dr Cr
{{ posting.comment }} {{ (posting.account.name|e).__str__().replace(':', ':')|safe }}{{ posting.amount|abs|bc }} {% if posting.amount.currency.price %}{{ '{' + posting.amount.currency.price|bc + '}' }}{% endif %} {{ -posting.amount|abs|bc }} {% if posting.amount.currency.price %}{{ '{' + posting.amount.currency.price|bc + '}' }}{% endif %}
{% if loop.first %}Total{% endif %} {{ dr_amount|abs|bc }} {% if dr_amount.currency.price %}{{ '{' + dr_amount.currency.price|bc + '}' }}{% endif %} {{ -cr_amount|abs|bc }} {% if cr_amount.currency.price %}{{ '{' + cr_amount.currency.price|bc + '}' }}{% endif %}
{{ total_dr|abs|bc }} {{ -total_cr|abs|bc }}
{% endblock %}