55 lines
1.5 KiB
HTML
55 lines
1.5 KiB
HTML
{% extends "base.html" %}
|
||
{% block title %}Übersicht – Finanzberatung{% endblock %}
|
||
{% block content %}
|
||
<h1>Übersicht</h1>
|
||
|
||
{% if projection and projection.below_threshold_date %}
|
||
<div class="warning">
|
||
Achtung: Prognostizierter Saldo unterschreitet den Schwellenwert am
|
||
<strong>{{ projection.below_threshold_date.strftime('%d.%m.%Y') }}</strong>.
|
||
</div>
|
||
{% endif %}
|
||
|
||
<div class="total-balance {{ 'neg' if total < 0 else '' }}">
|
||
Gesamtsaldo: {{ '%.2f'|format(total) }} €
|
||
</div>
|
||
|
||
<table>
|
||
<thead>
|
||
<tr><th>Konto</th><th>Bank</th><th>Saldo</th></tr>
|
||
</thead>
|
||
<tbody>
|
||
{% for account, balance in balances %}
|
||
<tr>
|
||
<td>{{ account.name }}</td>
|
||
<td>{{ account.bank }}</td>
|
||
<td class="{{ 'neg' if balance < 0 else '' }}">{{ '%.2f'|format(balance) }} €</td>
|
||
</tr>
|
||
{% else %}
|
||
<tr><td colspan="3">Keine Konten angelegt.</td></tr>
|
||
{% endfor %}
|
||
</tbody>
|
||
</table>
|
||
|
||
<h2>Nächste anstehende Posten (30 Tage)</h2>
|
||
<table>
|
||
<thead>
|
||
<tr><th>Datum</th><th>Bezeichnung</th><th>Betrag</th></tr>
|
||
</thead>
|
||
<tbody>
|
||
{% for item in upcoming %}
|
||
<tr>
|
||
<td>{{ item.date.strftime('%d.%m.%Y') }}</td>
|
||
<td>{{ item.name }}</td>
|
||
<td class="{{ 'neg' if item.amount < 0 else '' }}">{{ '%.2f'|format(item.amount) }} €</td>
|
||
</tr>
|
||
{% else %}
|
||
<tr><td colspan="3">Keine anstehenden Posten.</td></tr>
|
||
{% endfor %}
|
||
</tbody>
|
||
</table>
|
||
|
||
<h2>Grafana-Dashboard</h2>
|
||
<iframe class="grafana" src="http://{{ request.url.hostname or '127.0.0.1' }}:8097"></iframe>
|
||
{% endblock %}
|