112 lines
2.7 KiB
HTML
112 lines
2.7 KiB
HTML
{% load humanize %}
|
|
<!doctype html>
|
|
<html lang="ja">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<title>月次レポートPDF</title>
|
|
<style>
|
|
body { font-family: sans-serif; }
|
|
h1, h2 { margin: 0 0 8px; }
|
|
table { width: 100%; border-collapse: collapse; }
|
|
th, td { border: 1px solid #333; padding: 6px; }
|
|
.amount { text-align: right; }
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<h1>月次レポート</h1>
|
|
<p>対象年月: {{ target_month }}</p>
|
|
<h2>合計</h2>
|
|
<p class="amount">{{ report.total_amount|intcomma }} 円</p>
|
|
<h2>店舗別合計</h2>
|
|
<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>
|
|
<h2>経費区分別合計</h2>
|
|
<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>
|
|
<h2>区分別合計</h2>
|
|
<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>
|
|
<h2>未分類件数</h2>
|
|
<table>
|
|
<tbody>
|
|
<tr>
|
|
<th>店舗未設定</th>
|
|
<td>{{ report.unclassified_counts.store_missing }}</td>
|
|
</tr>
|
|
<tr>
|
|
<th>経費区分未設定</th>
|
|
<td>{{ report.unclassified_counts.category_missing }}</td>
|
|
</tr>
|
|
<tr>
|
|
<th>区分未設定</th>
|
|
<td>{{ report.unclassified_counts.owner_pending }}</td>
|
|
</tr>
|
|
<tr>
|
|
<th>対象総件数</th>
|
|
<td>{{ report.unclassified_counts.total }}</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</body>
|
|
</html>
|