better report generation

This commit is contained in:
Felix Breidenstein 2020-06-17 22:01:21 +02:00
parent 72fba9facd
commit dc3c2b309c
2 changed files with 19 additions and 71 deletions

View file

@ -5,7 +5,7 @@
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>EUR {{ year }}</title>
<title>Report {{ year }}</title>
<style>
@page {
size: 21cm 29.7cm;
@ -60,47 +60,21 @@
<body>
<h2>Einnahmenüberschussrechnung {{ year }}</h2>
<h2>Kontoübersicht {{ year }}</h2>
<hr />
<div class="content">
<h4>Einnahmen</h4>
% for name, entries in data.items():
<h4>{{ name }}</h4>
<table>
% for c in einnahmen:
% for sc, amount in entries.items():
<tr>
<td class="category-name">{{ c["name"] }}</td>
<td class="amount"> {{ c["total_formatted"] }} €</td>
<td class="category-name">{{ sc }}</td>
<td class="amount"> {{ amount }} €</td>
</tr>
% end
<tr class="sum-column">
<td class="category-name">Summe</td>
<td class="amount text-green"> {{ total["einnahmen"] }} €</td>
</tr>
</table>
<h4>Ausgaben</h4>
<table>
% for c in ausgaben:
<tr>
<td class="category-name">{{ c["name"] }}</td>
<td class="amount"> {{ c["total_formatted"] }} €</td>
</tr>
% end
<tr class="sum-column">
<td class="category-name">Summe</td>
<td class="amount text-red"> {{ total["ausgaben"] }} €</td>
</tr>
</table>
<br>
<table>
<tr class="sum-column-total">
<td class="category-name"><b>Summe</b></td>
<td class="amount text-green"> {{ total["total"] }} €</td>
</tr>
</table>
</div>
% end
</body>