Phase 3: Zahlungen, Mietvertrag, Erinnerungen, Anreiseinformationen

- Zahlungen erfassen (inkl. Erstattungen), Status automatisch: Bestätigt → Anzahlung erhalten → Bezahlt → Abgeschlossen
- Anzahlungsfrist bei Bestätigung; kurzfristige Buchungen: Gesamtbetrag sofort
- Mietvertrag als PDF (dompdf, Font-Subsetting), bei Bestätigung gespeichert und angehängt; Texte im Admin (Muster)
- Täglich: Zahlungserinnerungen (Anzahlung/Rest überfällig, Kopie an Vermieter), Zahlungsaufforderung Rest 7 Tage vorher, Anreiseinfos 7 Tage vorher, Abschluss nach Abreise
- Admin: Zahlungen je Buchung, offene Beträge, Vertrag herunterladen/neu erzeugen

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Lars StommerandClaude Opus 5.5 committed 2026-10-22 13:29:41 +02:00
1 parent e5f9e0762f
commit 0bf302fcf9
29 files changed
+1248 -18

No files matched your search

@@ -0,0 +1,34 @@
<x-mail::message>
# Bald sind Sie an der Ostsee!
Guten Tag {{ $booking->guest->full_name }},
in wenigen Tagen beginnt Ihr Aufenthalt in der **{{ $booking->property->name }}**. Hier die wichtigsten Informationen:
**Adresse:** {{ $booking->property->address }}<br>
**Anreise:** {{ $booking->arrival->translatedFormat('l, d.m.Y') }}@if ($booking->property->check_in_time) ab {{ substr($booking->property->check_in_time, 0, 5) }} Uhr @endif<br>
**Abreise:** {{ $booking->departure->translatedFormat('l, d.m.Y') }}@if ($booking->property->check_out_time) bis {{ substr($booking->property->check_out_time, 0, 5) }} Uhr @endif
@if (\App\Support\Content::get('stay.arrival_info'))
{{ \App\Support\Content::html('stay.arrival_info') }}
@else
Zur Schlüsselübergabe melden wir uns noch persönlich bei Ihnen.
@endif
@if (\App\Support\Content::get('stay.house_rules'))
## Hausregeln
{{ \App\Support\Content::html('stay.house_rules') }}
@endif
@if ($booking->openAmount() > 0)
<x-mail::panel>
Noch offen: **{{ \App\Support\Money::format($booking->openAmount()) }}** – bitte überweisen Sie den Betrag vor Ihrer Anreise.
</x-mail::panel>
@endif
Bei Fragen erreichen Sie uns unter {{ config('fewo.owner.phone') }}. Gute Anreise!
Herzliche Grüße<br>
{{ config('fewo.owner.name') }}
</x-mail::message>
@@ -14,20 +14,17 @@
## Zahlung
Bitte überweisen Sie die Anzahlung von **{{ \App\Support\Money::format($booking->deposit) }}** innerhalb von {{ config('fewo.deposit_due_days') }} Tagen und den Restbetrag von **{{ \App\Support\Money::format($booking->total - $booking->deposit) }}** bis zum {{ $booking->balance_due_on->format('d.m.Y') }}.
@if (config('fewo.bank.iban'))
<x-mail::panel>
Kontoinhaber: {{ config('fewo.bank.account_holder') }}<br>
IBAN: {{ config('fewo.bank.iban') }}<br>
@if (config('fewo.bank.bic'))
BIC: {{ config('fewo.bank.bic') }}<br>
@endif
Verwendungszweck: {{ $booking->reference }}
</x-mail::panel>
@if ($booking->requiresFullPayment())
Da Ihre Anreise kurz bevorsteht, überweisen Sie bitte den **Gesamtbetrag von {{ \App\Support\Money::format($booking->total) }}** bis zum **{{ $booking->deposit_due_on->format('d.m.Y') }}**.
@else
Bitte überweisen Sie die **Anzahlung von {{ \App\Support\Money::format($booking->deposit) }}** bis zum **{{ $booking->deposit_due_on?->format('d.m.Y') }}** und den **Restbetrag von {{ \App\Support\Money::format($booking->total - $booking->deposit) }}** bis zum **{{ $booking->balance_due_on->format('d.m.Y') }}**. An die Restzahlung erinnern wir Sie rechtzeitig.
@endif
Rechtzeitig vor Ihrer Anreise erhalten Sie von uns alle Informationen zu Schlüsselübergabe, Parken und WLAN.
@include('mail.partials.bank')
Ihren **Mietvertrag** finden Sie als PDF im Anhang.
Eine Woche vor Ihrer Anreise erhalten Sie von uns alle Informationen zu Schlüsselübergabe, Parken und WLAN.
Herzliche Grüße<br>
{{ config('fewo.owner.name') }}
@@ -0,0 +1,10 @@
@if (config('fewo.bank.iban'))
<x-mail::panel>
Kontoinhaber: {{ config('fewo.bank.account_holder') }}<br>
IBAN: {{ config('fewo.bank.iban') }}<br>
@if (config('fewo.bank.bic'))
BIC: {{ config('fewo.bank.bic') }}<br>
@endif
Verwendungszweck: {{ $booking->reference }}
</x-mail::panel>
@endif
@@ -1,7 +1,7 @@
<x-mail::table>
| Leistung | Betrag |
|:---------|-------:|
@foreach ($booking->quote['lines'] as $line)
@foreach ($booking->quote['lines'] ?? [] as $line)
| {{ $line['label'] }} | {{ \App\Support\Money::format($line['amount']) }} |
@endforeach
| **Gesamtpreis** | **{{ \App\Support\Money::format($booking->total) }}** |
@@ -0,0 +1,26 @@
<x-mail::message>
@if ($kind === \App\Mail\PaymentReminder::BALANCE_REQUEST)
# Ihre Restzahlung
Guten Tag {{ $booking->guest->full_name }},
Ihr Aufenthalt in der **{{ $booking->property->name }}** vom {{ $booking->arrival->format('d.m.Y') }} bis {{ $booking->departure->format('d.m.Y') }} rückt näher – wir freuen uns schon auf Sie!
Bitte überweisen Sie den **Restbetrag von {{ \App\Support\Money::format($amount) }}** bis zum **{{ $dueOn->format('d.m.Y') }}**.
@else
# Zahlungserinnerung
Guten Tag {{ $booking->guest->full_name }},
zu Ihrer Buchung **{{ $booking->reference }}** ({{ $booking->arrival->format('d.m.Y') }} – {{ $booking->departure->format('d.m.Y') }}) konnten wir bis heute keinen Zahlungseingang über **{{ \App\Support\Money::format($amount) }}** feststellen (fällig am {{ $dueOn->format('d.m.Y') }}).
Sicher ist das nur ein Versehen. Bitte holen Sie die Überweisung in den nächsten Tagen nach. Sollten Sie bereits gezahlt haben, betrachten Sie diese Nachricht bitte als gegenstandslos.
@endif
@include('mail.partials.bank')
Bei Fragen antworten Sie einfach auf diese E-Mail.
Herzliche Grüße<br>
{{ config('fewo.owner.name') }}
</x-mail::message>
+97
View File
@@ -0,0 +1,97 @@
@php($money = fn (int $cents): string => \App\Support\Money::format($cents))
<!DOCTYPE html>
<html lang="de">
<head>
<meta charset="utf-8">
<title>Mietvertrag {{ $booking->reference }}</title>
<style>
@page { margin: 22mm 20mm 20mm 20mm; }
body { font-family: 'DejaVu Sans', sans-serif; font-size: 9.5pt; color: #1f2933; line-height: 1.45; }
h1 { font-size: 17pt; margin: 0 0 2mm; color: #1d3a4d; }
h2 { font-size: 11pt; margin: 7mm 0 2mm; color: #1d3a4d; border-bottom: 0.3mm solid #c9d2d8; padding-bottom: 1mm; }
.muted { color: #5f6b73; }
table { width: 100%; border-collapse: collapse; }
.parties td { width: 50%; vertical-align: top; padding-right: 6mm; }
.lines td { padding: 1.2mm 0; border-bottom: 0.2mm solid #e4e8eb; }
.lines td.amount { text-align: right; white-space: nowrap; }
.lines tr.total td { font-weight: bold; border-bottom: 0; border-top: 0.4mm solid #1d3a4d; }
.facts td { padding: 0.8mm 0; }
.facts td.label { width: 38%; color: #5f6b73; }
.rich p { margin: 0 0 2mm; }
.rich ol, .rich ul { margin: 0 0 2mm 5mm; padding: 0; }
.footer { position: fixed; bottom: -12mm; left: 0; right: 0; font-size: 7.5pt; color: #8a959c; text-align: center; }
</style>
</head>
<body>
<div class="footer">{{ config('fewo.owner.name') }} · {{ config('fewo.owner.street') }} · {{ config('fewo.owner.city') }} · {{ config('fewo.owner.phone') }} · {{ config('fewo.owner.email') }}</div>
<h1>Mietvertrag Ferienwohnung</h1>
<p class="muted">Buchungsnummer {{ $booking->reference }} · ausgestellt am {{ ($booking->confirmed_at ?? now())->format('d.m.Y') }}</p>
<p>{{ \App\Support\Content::get('contract.intro') }}</p>
<table class="parties">
<tr>
<td>
<h2>Vermieter</h2>
{{ config('fewo.owner.name') }}<br>
{{ config('fewo.owner.street') }}<br>
{{ config('fewo.owner.city') }}<br>
Tel. {{ config('fewo.owner.phone') }} · {{ config('fewo.owner.email') }}
</td>
<td>
<h2>Mieter</h2>
{{ $booking->guest->full_name }}<br>
@if ($booking->guest->street){{ $booking->guest->street }}<br>@endif
@if ($booking->guest->city){{ $booking->guest->postal_code }} {{ $booking->guest->city }}<br>@endif
{{ $booking->guest->email }}@if ($booking->guest->phone) · {{ $booking->guest->phone }}@endif
</td>
</tr>
</table>
<h2>Mietobjekt und Mietzeit</h2>
<table class="facts">
<tr><td class="label">Objekt</td><td>{{ $booking->property->name }}, {{ $booking->property->address }}@if ($booking->property->size_sqm), {{ $booking->property->size_sqm }} m²@endif</td></tr>
<tr><td class="label">Anreise</td><td>{{ $booking->arrival->translatedFormat('l, d.m.Y') }}@if ($booking->property->check_in_time) ab {{ substr($booking->property->check_in_time, 0, 5) }} Uhr @endif</td></tr>
<tr><td class="label">Abreise</td><td>{{ $booking->departure->translatedFormat('l, d.m.Y') }}@if ($booking->property->check_out_time) bis {{ substr($booking->property->check_out_time, 0, 5) }} Uhr @endif</td></tr>
<tr><td class="label">Übernachtungen</td><td>{{ $booking->nights() }}</td></tr>
<tr><td class="label">Personen</td><td>{{ $booking->guests }}</td></tr>
</table>
<h2>Mietpreis</h2>
<table class="lines">
@foreach ($booking->quote['lines'] ?? [] as $line)
<tr><td>{{ $line['label'] }}</td><td class="amount">{{ $money($line['amount']) }}</td></tr>
@endforeach
<tr class="total"><td>Gesamtpreis</td><td class="amount">{{ $money($booking->total) }}</td></tr>
</table>
<p class="muted">Die Kurtaxe ist nicht enthalten und wird vor Ort entrichtet.</p>
<h2>Zahlung</h2>
@if ($booking->requiresFullPayment())
<p>Der Gesamtbetrag von <strong>{{ $money($booking->total) }}</strong> ist bis zum <strong>{{ $booking->deposit_due_on->format('d.m.Y') }}</strong> zu überweisen.</p>
@else
<p>Anzahlung <strong>{{ $money($booking->deposit) }}</strong> bis zum <strong>{{ $booking->deposit_due_on?->format('d.m.Y') }}</strong>,
Restbetrag <strong>{{ $money($booking->total - $booking->deposit) }}</strong> bis zum <strong>{{ $booking->balance_due_on->format('d.m.Y') }}</strong>.</p>
@endif
@if (config('fewo.bank.iban'))
<p>Bankverbindung: {{ config('fewo.bank.account_holder') }} · IBAN {{ config('fewo.bank.iban') }}@if (config('fewo.bank.bic')) · BIC {{ config('fewo.bank.bic') }}@endif · Verwendungszweck: {{ $booking->reference }}</p>
@endif
<h2>Mietbedingungen</h2>
<div class="rich">{{ \App\Support\Content::html('contract.terms') }}</div>
@if (\App\Support\Content::get('stay.cancellation'))
<h2>Rücktritt / Stornierung</h2>
<div class="rich">{{ \App\Support\Content::html('stay.cancellation') }}</div>
@endif
@if (\App\Support\Content::get('stay.house_rules'))
<h2>Hausordnung</h2>
<div class="rich">{{ \App\Support\Content::html('stay.house_rules') }}</div>
@endif
<p style="margin-top: 8mm">{{ \App\Support\Content::get('contract.closing') }}</p>
<p>{{ config('fewo.owner.name') }}</p>
</body>
</html>