2020-03-23 00:47:38 +11:00
|
|
|
{#
|
|
|
|
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 <https://www.gnu.org/licenses/>.
|
|
|
|
#}
|
|
|
|
|
|
|
|
{% extends 'base_report.html' %}
|
|
|
|
|
|
|
|
{% block title %}Account Transactions as at {{ date.strftime('%d %B %Y') }}{% endblock %}
|
|
|
|
|
|
|
|
{% block report %}
|
|
|
|
<h1>Account Transactions</h1>
|
|
|
|
<h2 style="margin-bottom: 0;">For {{ account.name }}</h2>
|
|
|
|
<h2>For the {{ period }}</h2>
|
|
|
|
|
|
|
|
<table class="ledger">
|
|
|
|
<tr>
|
|
|
|
<th style="width: 5em;">Date</th>
|
|
|
|
<th>Description</th>
|
|
|
|
<th style="max-width: 8em;">Account</th>
|
2020-03-29 22:01:52 +11:00
|
|
|
<th style="text-align: right; width: 5em;">Dr</th>
|
|
|
|
<th style="text-align: right; width: 5em;">Cr</th>
|
2020-03-23 00:47:38 +11:00
|
|
|
</tr>
|
|
|
|
|
|
|
|
{% for transaction in transactions %}
|
|
|
|
{% for posting in transaction.postings %}
|
|
|
|
{% set amount = posting.exchange(report_currency, transaction.date) %}
|
|
|
|
<tr>
|
|
|
|
<td>{% if loop.first %}{{ transaction.date.strftime('%Y-%m-%d') }}{% endif %}</td>
|
|
|
|
<td>{% if loop.first %}{{ transaction.description }}{% endif %}</td>
|
|
|
|
<td>{{ (posting.account.name|e).__str__().replace(':', ':<wbr>')|safe }}</td>
|
2020-03-30 20:02:09 +11:00
|
|
|
<td style="text-align: right;">{% if amount > 0 %}{{ amount|b }}{% endif %}</td>
|
|
|
|
<td style="text-align: right;">{% if amount < 0 %}{{ -amount|b }}{% endif %}</td>
|
2020-03-23 00:47:38 +11:00
|
|
|
</tr>
|
|
|
|
{% endfor %}
|
|
|
|
{% endfor %}
|
|
|
|
</table>
|
|
|
|
{% endblock %}
|