Files
Key-service-Server/Website/templates/my_invoices.html
T

65 lines
2.6 KiB
HTML

{% extends "base.html" %}
{% block title %}Meine Rechnungen{% endblock %}
{% block content %}
<section class="panel" style="display:flex; align-items:center; justify-content:space-between; gap:1rem;">
<div>
<h1>Rechnungseinsicht</h1>
<p style="margin:0">Alle Rechnungen im Überblick.</p>
</div>
<div class="no-print">
<button class="print-btn" type="button" onclick="printDocument()">Seite drucken</button>
</div>
</section>
<section class="table-wrap">
<table>
<thead>
<tr>
<th>Rechnungsnummer</th>
<th>Zeitraum</th>
<th>Betrag</th>
<th>Fälligkeit</th>
<th>Status</th>
<th>Rechnung PDF</th>
<th>Hauptvertrag</th>
</tr>
</thead>
<tbody>
{% for invoice in invoices %}
<tr>
<td>{{ invoice.invoice_number }}</td>
<td>{{ invoice.period }}</td>
<td>{{ '%.2f'|format(invoice.amount_eur) }} EUR</td>
<td>{{ invoice.due_date }}</td>
<td>{{ invoice.status }}</td>
<td>
{% if invoice.pdf_path %}
<a href="{{ url_for('static', filename=invoice.pdf_path) }}" target="_blank" rel="noopener">PDF ansehen</a>
{% else %}
-
{% endif %}
</td>
<td>
{% if invoice.has_hauptvertrag %}
<a href="{{ url_for('view_hauptvertrag', invoice_id=invoice.id) }}" target="_blank" rel="noopener">Hauptvertrag ansehen</a>
{% else %}
<form method="post" enctype="multipart/form-data" style="display:flex; gap:0.3rem; align-items:center;">
<input type="hidden" name="action" value="upload_hauptvertrag">
<input type="hidden" name="invoice_id" value="{{ invoice.id }}">
<input type="file" name="hauptvertrag_file" accept="image/*,application/pdf" required style="font-size:0.8rem;">
<button type="submit" style="padding: 0.2rem 0.6rem; font-size:0.8rem;">Hochladen</button>
</form>
{% endif %}
</td>
</tr>
{% else %}
<tr>
<td colspan="7">Noch keine Rechnungen vorhanden.</td>
</tr>
{% endfor %}
</tbody>
</table>
</section>
{% endblock %}