月次レポート機能の改善として、開始日・終了日によるフィルタリング機能を追加し、店舗区分および経費区分の選択肢を実装。経費区分と店舗マスタの管理画面を新規作成し、関連するマイグレーションを追加。CSV取込画面における経費区分の表示を改善。作業ログをdiary.mdに追記。
This commit is contained in:
74
templates/expenses/store_master.html
Normal file
74
templates/expenses/store_master.html
Normal file
@@ -0,0 +1,74 @@
|
||||
{% extends 'base.html' %}
|
||||
|
||||
{% block title %}店舗マスタ管理{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<section>
|
||||
<h2>店舗マスタ管理</h2>
|
||||
{% if error_message %}
|
||||
<p>{{ error_message }}</p>
|
||||
{% endif %}
|
||||
<h3>店舗を追加</h3>
|
||||
<form method="post">
|
||||
{% csrf_token %}
|
||||
<label>
|
||||
店舗名
|
||||
<input type="text" name="name" required>
|
||||
</label>
|
||||
<label>
|
||||
<input type="checkbox" name="is_active" value="1" checked>
|
||||
有効
|
||||
</label>
|
||||
<button type="submit">追加</button>
|
||||
</form>
|
||||
<h3>一覧</h3>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>店舗名</th>
|
||||
<th>有効</th>
|
||||
<th>更新</th>
|
||||
<th>削除</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for store in stores %}
|
||||
<tr>
|
||||
<form method="post">
|
||||
{% csrf_token %}
|
||||
<input type="hidden" name="store_id" value="{{ store.id }}">
|
||||
<td>
|
||||
<input type="text" name="name" value="{{ store.name }}" required>
|
||||
</td>
|
||||
<td>
|
||||
<input
|
||||
type="checkbox"
|
||||
name="is_active"
|
||||
value="1"
|
||||
{% if store.is_active %}checked{% endif %}
|
||||
>
|
||||
</td>
|
||||
<td>
|
||||
<button type="submit">保存</button>
|
||||
</td>
|
||||
</form>
|
||||
<td>
|
||||
<form method="post">
|
||||
{% csrf_token %}
|
||||
<input type="hidden" name="store_id" value="{{ store.id }}">
|
||||
<input type="hidden" name="action" value="deactivate">
|
||||
<button type="submit" {% if not store.is_active %}disabled{% endif %}>
|
||||
無効化
|
||||
</button>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
{% empty %}
|
||||
<tr>
|
||||
<td colspan="4">店舗がありません。</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</section>
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user