2022-12-24 12:31:45 +11:00
|
|
|
{# DrCr: Web-based double-entry bookkeeping framework
|
|
|
|
Copyright (C) 2022 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.html' %}
|
2022-12-24 17:39:18 +11:00
|
|
|
{% block title %}Balance assertions{% endblock %}
|
2022-12-24 12:31:45 +11:00
|
|
|
|
2022-12-24 16:57:53 +11:00
|
|
|
{% block content %}
|
2022-12-24 17:39:18 +11:00
|
|
|
<h1 class="h2 my-4">Balance assertions</h1>
|
|
|
|
|
|
|
|
<div class="mb-2">
|
|
|
|
<a href="/balance-assertions/new" class="btn btn-primary"><i class="bi bi-plus-lg"></i> New assertion</a>
|
|
|
|
</div>
|
2022-12-24 16:57:53 +11:00
|
|
|
|
|
|
|
<table class="table">
|
|
|
|
<thead>
|
|
|
|
<tr>
|
|
|
|
<th>Date</th>
|
2022-12-24 17:39:18 +11:00
|
|
|
<th>Description</th>
|
|
|
|
<th>Account</th>
|
|
|
|
<th class="text-end">Balance</th>
|
|
|
|
<th></th>
|
|
|
|
<th>Status</th>
|
|
|
|
<th></th>
|
2022-12-24 16:57:53 +11:00
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
2022-12-24 17:39:18 +11:00
|
|
|
{% for assertion in assertions %}
|
2022-12-24 12:31:45 +11:00
|
|
|
<tr>
|
2022-12-24 17:39:18 +11:00
|
|
|
<td>{{ assertion.dt.strftime('%Y-%m-%d') }}</td>
|
|
|
|
<td>{{ assertion.description }}</td>
|
|
|
|
<td>{{ assertion.account }}</td>
|
|
|
|
<td class="text-end">{{ (assertion.balance()|abs).format() }}</td>
|
|
|
|
<td>{{ 'Dr' if assertion.quantity >= 0 else 'Cr' }}</td>
|
|
|
|
<td>{% if assertion_status[assertion] %}<i class="bi bi-check-lg"></i>{% else %}<i class="bi bi-x-circle-fill text-danger"></i>{% endif %}</td>
|
|
|
|
<td><a href="/balance-assertions/edit?id={{ assertion.id }}"><i class="bi bi-pencil"></i></a></td>
|
2022-12-24 12:31:45 +11:00
|
|
|
</tr>
|
2022-12-24 16:57:53 +11:00
|
|
|
{% endfor %}
|
|
|
|
</tbody>
|
|
|
|
</table>
|
2022-12-24 12:31:45 +11:00
|
|
|
{% endblock %}
|