2023-01-03 18:37:10 +11:00
|
|
|
{# 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 %}
|
2023-01-04 10:55:51 +11:00
|
|
|
<h1 class="h2 mt-4 mb-2">Chart of accounts</h1>
|
2023-01-03 18:37:10 +11:00
|
|
|
|
|
|
|
<form method="POST">
|
2023-01-04 10:55:51 +11:00
|
|
|
<div class="d-flex py-2 bg-white sticky-top">
|
2023-01-03 18:37:10 +11:00
|
|
|
<div class="me-2">
|
|
|
|
<select class="form-select" name="kind">
|
2023-01-07 01:09:17 +11:00
|
|
|
{% for plugin_name, plugin_account_kinds in account_kinds_by_plugin.items() %}
|
|
|
|
<optgroup label="{{ plugin_name }}">
|
|
|
|
{% for account_kind in plugin_account_kinds %}
|
|
|
|
<option value="{{ account_kind[0] }}">{{ account_kind[1] }}</option>
|
|
|
|
{% endfor %}
|
|
|
|
</optgroup>
|
2023-01-04 18:01:59 +11:00
|
|
|
{% endfor %}
|
2023-01-03 18:37:10 +11:00
|
|
|
</select>
|
|
|
|
</div>
|
|
|
|
<div>
|
2023-01-07 19:01:05 +11:00
|
|
|
<button type="submit" class="btn btn-primary" formaction="{{ url_for('account_add_kind') }}">Add kind</button>
|
2023-01-03 18:37:10 +11:00
|
|
|
</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] %}
|
2023-01-07 01:09:17 +11:00
|
|
|
<li>{{ account_kinds_map[account_configuration.kind] }}</li>
|
2023-01-03 18:37:10 +11:00
|
|
|
{% endfor %}
|
|
|
|
</ul>
|
|
|
|
{% endif %}
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
{% endfor %}
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
</form>
|
|
|
|
{% endblock %}
|