diff --git a/backups/DoMiLi_Backup_2025-10.pdf b/backups/DoMiLi_Backup_2025-10.pdf index 168d891..fd4761a 100755 Binary files a/backups/DoMiLi_Backup_2025-10.pdf and b/backups/DoMiLi_Backup_2025-10.pdf differ diff --git a/export.php b/export.php index 0b394ca..b5363c8 100755 --- a/export.php +++ b/export.php @@ -36,7 +36,7 @@ $userIds = array_keys($alleBenutzer); $bisDatum = $berichtsMonatEnde->format('Y-m-d'); $stmt = mysqli_prepare($conn, " SELECT m.id AS meeting_id, m.meeting_date, - mt.user_id, mt.wore_color, mt.paid + mt.user_id, mt.wore_color, mt.paid, mt.birthday_pay FROM meetings m LEFT JOIN meeting_teilnehmer mt ON m.id = mt.meeting_id AND mt.attended = 1 WHERE m.meeting_date <= ? AND m.is_completed = 1 @@ -107,12 +107,15 @@ foreach ($berichtsMeetingsMeta as $meta) { $teilgenommen = false; $wore_color = null; $paid_this = false; + $paid_this_birthday = false; // NEU + // Finde Teilnahme-Daten für dieses Meeting foreach ($alleMeetingsMitTeilnehmern as $mt) { if ($mt['meeting_id'] == $mid && $mt['user_id'] == $uid) { $teilgenommen = true; $wore_color = !empty($mt['wore_color']); - $paid_this = !empty($mt['paid']); + $paid_this = ($mt['paid'] == 1); + $paid_this_birthday = ($mt['birthday_pay'] == 1); // Explizit prüfen break; } } @@ -135,14 +138,22 @@ foreach ($berichtsMeetingsMeta as $meta) { $offeneStrafen++; } } - if (!empty($mt['paid'])) { + + // 🔹 NUR normale Zahlungen zählen (birthday_pay = 0) + $is_paid = ($mt['paid'] == 1); + $is_birthday = ($mt['birthday_pay'] == 1); + if ($is_paid && !$is_birthday) { $rechnungenGesamt++; } } + // Name mit Symbolen $userNameAnzeige = htmlspecialchars($username); if ($paid_this) { $userNameAnzeige .= ' €'; + if ($paid_this_birthday) { + $userNameAnzeige .= ' (G)'; + } } if (!$teilgenommen) { @@ -196,6 +207,7 @@ $html = ' th, td { border: 1px solid #333; padding: 4pt 6pt; text-align: left; } th { background-color: #f0f0f0; font-weight: bold; } .paid-symbol { color: red; font-weight: bold; } + .birthday-symbol { color: #d63384; font-size: 0.85em; } .color-ok { color: green; } .color-fail { color: red; } .page-break { page-break-after: always; } @@ -260,6 +272,7 @@ $html .= '