190 lines
5.5 KiB
HTML
190 lines
5.5 KiB
HTML
{% extends 'base.html' %}
|
|
{% load humanize %}
|
|
|
|
{% block title %}月次レポート{% endblock %}
|
|
|
|
{% block content %}
|
|
<section>
|
|
<h2>月次レポート</h2>
|
|
<form method="get">
|
|
<label>
|
|
年月
|
|
<input type="month" name="target_month" value="{{ target_month }}">
|
|
</label>
|
|
<button type="submit">表示</button>
|
|
</form>
|
|
{% if error_message %}
|
|
<p style="color: #b00020;">{{ error_message }}</p>
|
|
{% endif %}
|
|
<div>
|
|
<h3>合計</h3>
|
|
<p class="amount">{{ report.total_amount|intcomma }} 円</p>
|
|
</div>
|
|
<div>
|
|
<h3>店舗別合計</h3>
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th>店舗</th>
|
|
<th>件数</th>
|
|
<th class="amount">金額</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for row in report.store_totals %}
|
|
<tr>
|
|
<td>{{ row.store__name|default:"未設定" }}</td>
|
|
<td>{{ row.count }}</td>
|
|
<td class="amount">{{ row.total|intcomma }}</td>
|
|
</tr>
|
|
{% empty %}
|
|
<tr>
|
|
<td colspan="3">対象データがありません。</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
{% for row in report.store_totals %}
|
|
<h4>{{ row.store__name|default:"未設定" }} の明細</h4>
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th>日付</th>
|
|
<th>利用先</th>
|
|
<th class="amount">金額</th>
|
|
<th>備考</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for detail in row.details %}
|
|
<tr>
|
|
<td>{{ detail.use_date }}</td>
|
|
<td>{{ detail.description }}</td>
|
|
<td class="amount">{{ detail.amount|intcomma }}</td>
|
|
<td>{{ detail.note }}</td>
|
|
</tr>
|
|
{% empty %}
|
|
<tr>
|
|
<td colspan="4">対象データがありません。</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
{% endfor %}
|
|
</div>
|
|
<div>
|
|
<h3>経費区分別合計</h3>
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th>経費区分</th>
|
|
<th>件数</th>
|
|
<th class="amount">金額</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for row in report.category_totals %}
|
|
<tr>
|
|
<td>{{ row.expense_category__name|default:"未設定" }}</td>
|
|
<td>{{ row.count }}</td>
|
|
<td class="amount">{{ row.total|intcomma }}</td>
|
|
</tr>
|
|
{% empty %}
|
|
<tr>
|
|
<td colspan="3">対象データがありません。</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
{% for row in report.category_totals %}
|
|
<h4>{{ row.expense_category__name|default:"未設定" }} の明細</h4>
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th>日付</th>
|
|
<th>利用先</th>
|
|
<th class="amount">金額</th>
|
|
<th>備考</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for detail in row.details %}
|
|
<tr>
|
|
<td>{{ detail.use_date }}</td>
|
|
<td>{{ detail.description }}</td>
|
|
<td class="amount">{{ detail.amount|intcomma }}</td>
|
|
<td>{{ detail.note }}</td>
|
|
</tr>
|
|
{% empty %}
|
|
<tr>
|
|
<td colspan="4">対象データがありません。</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
{% endfor %}
|
|
</div>
|
|
<div>
|
|
<h3>区分別合計</h3>
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th>区分</th>
|
|
<th>件数</th>
|
|
<th class="amount">金額</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for row in report.owner_totals %}
|
|
<tr>
|
|
<td>{{ row.owner_type }}</td>
|
|
<td>{{ row.count }}</td>
|
|
<td class="amount">{{ row.total|intcomma }}</td>
|
|
</tr>
|
|
{% empty %}
|
|
<tr>
|
|
<td colspan="3">対象データがありません。</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
{% for row in report.owner_totals %}
|
|
<h4>{{ row.owner_type }} の明細</h4>
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th>日付</th>
|
|
<th>利用先</th>
|
|
<th class="amount">金額</th>
|
|
<th>備考</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for detail in row.details %}
|
|
<tr>
|
|
<td>{{ detail.use_date }}</td>
|
|
<td>{{ detail.description }}</td>
|
|
<td class="amount">{{ detail.amount|intcomma }}</td>
|
|
<td>{{ detail.note }}</td>
|
|
</tr>
|
|
{% empty %}
|
|
<tr>
|
|
<td colspan="4">対象データがありません。</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
{% endfor %}
|
|
</div>
|
|
<div>
|
|
<h3>未分類件数</h3>
|
|
<ul>
|
|
<li>店舗未設定: {{ report.unclassified_counts.store_missing }}</li>
|
|
<li>経費区分未設定: {{ report.unclassified_counts.category_missing }}</li>
|
|
<li>区分未設定: {{ report.unclassified_counts.owner_pending }}</li>
|
|
<li>対象総件数: {{ report.unclassified_counts.total }}</li>
|
|
</ul>
|
|
</div>
|
|
</section>
|
|
{% endblock %}
|