月次レポート機能を実装し、経費の取り消し・復帰機能を追加。CSV取込画面にドラッグ&ドロップエリアを実装し、エラーメッセージ表示を追加。金額のカンマ区切り表示を全体に適用。faviconとapple-touch-iconを追加し、404エラーを回避。作業ログをdiary.mdに追記。
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
{% load humanize %}
|
||||
<!doctype html>
|
||||
<html lang="ja">
|
||||
<head>
|
||||
@@ -8,10 +9,103 @@
|
||||
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>PDF出力用テンプレートです。</p>
|
||||
<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>
|
||||
|
||||
Reference in New Issue
Block a user