94 lines
2.7 KiB
Plaintext
94 lines
2.7 KiB
Plaintext
<!DOCTYPE html>
|
|
<html lang="de">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<title>Offene Leistungen</title>
|
|
<link rel="stylesheet" href="/css/bootstrap.min.css">
|
|
</head>
|
|
<body>
|
|
|
|
<div class="container mt-4">
|
|
<div class="position-relative mb-3">
|
|
|
|
<!-- 🟢 ZENTRIERTER TITEL -->
|
|
<div class="position-absolute top-50 start-50 translate-middle
|
|
d-flex align-items-center gap-2">
|
|
<span style="font-size:1.4rem;">📄</span>
|
|
<h3 class="mb-0">Offene Rechnungen</h3>
|
|
</div>
|
|
|
|
<!-- 🔵 RECHTS: DASHBOARD -->
|
|
<div class="text-end">
|
|
<a href="/dashboard" class="btn btn-outline-primary btn-sm">
|
|
⬅️ Dashboard
|
|
</a>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
<% let currentPatient = null; %>
|
|
|
|
<% rows.forEach(r => { %>
|
|
|
|
<% if (!currentPatient || currentPatient !== r.patient_id) { %>
|
|
<% currentPatient = r.patient_id; %>
|
|
|
|
<hr>
|
|
<h5>
|
|
👤 <%= r.firstname %> <%= r.lastname %>
|
|
<form method="POST"
|
|
action="/patients/<%= r.patient_id %>/create-invoice"
|
|
target="_blank"
|
|
class="d-inline float-end">
|
|
<button class="btn btn-sm btn-success">
|
|
🧾 Rechnung erstellen
|
|
</button>
|
|
</form>
|
|
<a href="/services/open"
|
|
class="btn btn-sm btn-outline-secondary ms-1">
|
|
🔄 Aktualisieren
|
|
</a>
|
|
|
|
</h5>
|
|
<% } %>
|
|
|
|
<div class="border rounded p-2 mb-2 d-flex align-items-center gap-2">
|
|
|
|
<strong class="flex-grow-1">
|
|
<%= r.name %>
|
|
</strong>
|
|
|
|
<form method="POST"
|
|
action="/patients/services/update-price/<%= r.patient_service_id %>"
|
|
class="d-flex gap-1">
|
|
|
|
<input type="number"
|
|
step="0.01"
|
|
name="price"
|
|
value="<%= Number(r.price).toFixed(2) %>"
|
|
class="form-control form-control-sm"
|
|
style="width:100px">
|
|
|
|
<button class="btn btn-sm btn-outline-primary">
|
|
💾
|
|
</button>
|
|
</form>
|
|
|
|
<form method="POST"
|
|
action="/patients/services/delete/<%= r.patient_service_id %>"
|
|
onsubmit="return confirm('Leistung entfernen?')">
|
|
<button class="btn btn-sm btn-outline-danger">
|
|
❌
|
|
</button>
|
|
</form>
|
|
|
|
</div>
|
|
|
|
<% }) %>
|
|
|
|
</div>
|
|
<script src="/js/open-services.js"></script>
|
|
</body>
|
|
</html>
|