schmeckels/views/report.tpl
2020-05-23 13:55:21 +02:00

107 lines
2.4 KiB
Smarty

<!DOCTYPE html>
<html lang="d">
<head>
<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>
<style>
@page {
size: 21cm 29.7cm;
margin: 20mm;
/* change the margins as you want them to be. */
}
body {
width: 100%;
}
.content {
width: 80%;
margin: auto;
}
h4 {
margin-bottom: 5px;
}
table {
width: 90%;
margin: auto
}
td.amount {
text-align: right;
}
tr.sum-column>td {
padding-top: 5px;
border-top: 1pt solid black;
}
tr.sum-column-total>td {
padding-top: 20px;
border-top: double black;
}
.text-red {
font-weight: bold;
color: red;
}
.text-green {
font-weight: bold;
color: green;
}
</style>
</head>
<body>
<h2>Einnahmenüberschussrechnung {{ year }}</h2>
<hr />
<div class="content">
<h4>Einnahmen</h4>
<table>
% for c in einnahmen:
<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-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>
</body>
</html>