DrCr/drcr/templates/chart_of_accounts.html

68 lines
2.1 KiB
HTML

{# DrCr: Web-based double-entry bookkeeping framework
Copyright (C) 2022–2023 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' %}
{% block title %}Chart of accounts{% endblock %}
{% block content %}
<h1 class="h2 my-4">Chart of accounts</h1>
<form method="POST">
<div class="d-flex mb-2">
<div class="me-2">
<select class="form-select" name="kind">
<option value="drcr.asset">Asset</option>
<option value="drcr.liability">Liability</option>
<option value="drcr.income">Income</option>
<option value="drcr.expense">Expense</option>
<option value="drcr.equity">Equity</option>
</select>
</div>
<div>
<button type="submit" class="btn btn-primary" formaction="/chart-of-accounts/add-kind">Add kind</button>
</div>
</div>
<table class="table">
<thead>
<tr>
<th></th>
<th>Account</th>
<th>Associated types</th>
</tr>
</thead>
<tbody>
{% for account in accounts %}
<tr>
<td><input type="checkbox" name="sel-account" value="{{ account }}"></td>
<td>{{ account }}</td>
<td>
{% if account in account_configurations %}
<ul class="mb-0">
{% for account_configuration in account_configurations[account] %}
<li>{{ account_configuration.kind }}</li>
{% endfor %}
</ul>
{% endif %}
</td>
</tr>
{% endfor %}
</tbody>
</table>
</form>
{% endblock %}