Dokumentenzusammenstellung und Vorlagensteuerung (Paket 3, Prozessarchitektur v0.10)
Deploy FeWo mit PipelineManager / deploy (push) Successful in 3m59s
Deploy FeWo mit PipelineManager / deploy (push) Successful in 3m59s
Eine Zusammenstellung vor jedem Dokument (Angebot, Bestaetigung, Buchungsunterlagen extern), Dokumentart je Vorgangsart, Freigaben fuer Vorlagen und Dokumentarten, Schutz vor unvereinbarten Bedingungen bei Portalbuchungen (E-004), kein doppelter Versand, Absicherung Hold 0 bis Paket 7, A6-Aufenthaltsbestaetigung vorbereitet. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
64248c09fa
commit
cf11c8a474
45 files changed
+2385
-144
No files matched your search
@@ -0,0 +1,75 @@
|
||||
{{-- The one composition shown before every document (UMSETZUNGSPLAN_v0.10 §4.5). --}}
|
||||
@php
|
||||
/** @var \App\Documents\DocumentComposition $composition */
|
||||
$c = $composition;
|
||||
$money = fn (?int $cents): string => $cents === null ? 'noch nicht bekannt' : \App\Support\Money::format($cents);
|
||||
$row = 'display:grid;grid-template-columns:11rem 1fr;gap:.75rem;padding:.55rem 0;border-bottom:1px solid rgba(128,128,128,.18)';
|
||||
$label = 'color:#6b7280';
|
||||
$box = fn (string $color): string => "border-left:4px solid {$color};background:rgba(128,128,128,.06);padding:.6rem .8rem;border-radius:.375rem;margin-bottom:.5rem";
|
||||
@endphp
|
||||
<div style="font-size:.95rem">
|
||||
@if ($c->blockers() !== [])
|
||||
<div style="{{ $box('#dc2626') }}">
|
||||
<strong>Fehlt noch – so kann nichts gesendet werden</strong>
|
||||
<ul style="margin:.3rem 0 0 1.1rem;list-style:disc">@foreach ($c->blockers() as $message)<li>{{ $message }}</li>@endforeach</ul>
|
||||
</div>
|
||||
@endif
|
||||
@if ($c->toConfirm() !== [])
|
||||
<div style="{{ $box('#d97706') }}">
|
||||
<strong>Bitte prüfen</strong> – automatisch wird so nichts versendet; von Hand erst nach Ihrer Bestätigung unten.
|
||||
<ul style="margin:.3rem 0 0 1.1rem;list-style:disc">@foreach ($c->toConfirm() as $message)<li>{{ $message }}</li>@endforeach</ul>
|
||||
</div>
|
||||
@endif
|
||||
@if ($c->information() !== [])
|
||||
<div style="{{ $box('#2563eb') }}">
|
||||
<ul style="margin:0 0 0 1.1rem;list-style:disc">@foreach ($c->information() as $message)<li>{{ $message }}</li>@endforeach</ul>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<div style="{{ $row }}"><div style="{{ $label }}">Dokument</div><div><strong>{{ $c->kind->getLabel() }}</strong></div></div>
|
||||
<div style="{{ $row }}"><div style="{{ $label }}">An</div><div>{{ $c->recipientName() ?? 'Gast noch nicht bekannt' }} · {{ $c->recipientEmail() ?? 'keine E-Mail-Adresse' }}</div></div>
|
||||
<div style="{{ $row }}"><div style="{{ $label }}">Eingang</div><div>{{ $c->intakeLabel }}@if ($c->draft->portal_reference) · Buchungsnummer {{ $c->draft->portal_reference }}@endif</div></div>
|
||||
<div style="{{ $row }}">
|
||||
<div style="{{ $label }}">Wohnung und Zeitraum</div>
|
||||
<div>{{ $c->draft->property->name }} · {{ $c->draft->arrival->format('d.m.Y') }} – {{ $c->draft->departure->format('d.m.Y') }} ({{ $c->draft->nights() }} Nächte) · {{ $c->draft->guests ? $c->draft->guests.' Personen' : 'Personen noch nicht bekannt' }}</div>
|
||||
</div>
|
||||
<div style="{{ $row }}">
|
||||
<div style="{{ $label }}">Preis</div>
|
||||
<div>
|
||||
@foreach ($c->priceLines as $line)
|
||||
<div style="display:flex;justify-content:space-between;gap:1rem"><span>{{ $line['label'] }}</span><span>{{ $money($line['amount']) }}</span></div>
|
||||
@endforeach
|
||||
<div style="display:flex;justify-content:space-between;gap:1rem;font-weight:700;margin-top:.2rem"><span>Gesamtpreis</span><span>{{ $money($c->draft->total) }}</span></div>
|
||||
<div style="{{ $label }};font-size:.85rem">Herkunft: {{ $c->priceSource }}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div style="{{ $row }}"><div style="{{ $label }}">Leistungen</div><div>{{ $c->services === [] ? 'keine Zusatzleistungen' : implode(', ', $c->services) }}</div></div>
|
||||
@if ($c->kind->isForGuests())
|
||||
<div style="{{ $row }}"><div style="{{ $label }}">Stornoregel</div><div>@foreach ($c->cancellation as $line)<div>{{ $line }}</div>@endforeach</div></div>
|
||||
<div style="{{ $row }}">
|
||||
<div style="{{ $label }}">Vorlage</div>
|
||||
<div>{{ $c->templateLabel() }} <span style="{{ $label }}">– {{ $c->templateSource }}</span>
|
||||
@if ($expert && $c->template)
|
||||
<div style="{{ $label }};font-size:.85rem">Freigegeben: {{ $c->template->isReleased() ? 'ja, '.$c->template->released_at->format('d.m.Y').' ('.$c->template->released_by.')' : 'nein' }} · Portalbedingungen bestätigt: {{ $c->template->confirmsPortalTerms() ? 'ja' : 'nein' }}</div>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
<div style="{{ $row }}"><div style="{{ $label }}">Anlagen</div><div>{{ $c->annexes === [] ? 'keine' : implode(', ', array_column($c->annexes, 'label')) }}</div></div>
|
||||
<div style="{{ $row }}">
|
||||
<div style="{{ $label }}">Annahme</div>
|
||||
<div>{{ $c->kind->hasAcceptanceLink() ? 'Mit Link zum Annehmen, gültig bis '.$c->draft->hold_expires_at?->format('d.m.Y, H:i').' Uhr' : 'Kein Annahmelink' }}</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@if ($c->kind->isAvailable() && $c->kind->isForGuests())
|
||||
<details style="margin-top:.8rem">
|
||||
<summary style="cursor:pointer;font-weight:600">Vorschau der E-Mail</summary>
|
||||
<iframe title="Vorschau der E-Mail" srcdoc="{{ $mailPreview }}" style="width:100%;height:28rem;border:1px solid rgba(128,128,128,.3);border-radius:.375rem;margin-top:.4rem;background:#fff"></iframe>
|
||||
</details>
|
||||
<details style="margin-top:.5rem">
|
||||
<summary style="cursor:pointer;font-weight:600">Vorschau des Dokuments</summary>
|
||||
<p style="margin:.4rem 0"><a href="{{ $pdfUrl }}" target="_blank" rel="noopener" style="text-decoration:underline">Als PDF öffnen</a> (zeigt den aktuellen Stand dieser Zusammenstellung)</p>
|
||||
<iframe title="Vorschau des Dokuments" srcdoc="{{ $documentPreview }}" style="width:100%;height:32rem;border:1px solid rgba(128,128,128,.3);border-radius:.375rem;background:#fff"></iframe>
|
||||
</details>
|
||||
@endif
|
||||
</div>
|
||||
@@ -0,0 +1,44 @@
|
||||
{{-- Working draft (package 3): released by the landlord under "So arbeite ich › Dokumente" before it goes out automatically. --}}
|
||||
@php($portal = $booking->processChannel()?->name ?? 'das Portal')
|
||||
<x-mail::message :site="$booking->website()" :message="$message ?? null">
|
||||
# Ihre Buchung der {{ $booking->property->name }}
|
||||
|
||||
Guten Tag {{ $booking->guest->full_name }},
|
||||
|
||||
vielen Dank für Ihre Buchung über {{ $portal }}. Ihre Buchung ist dort verbindlich zustande gekommen. Hier erhalten Sie Ihre Buchungsunterlagen von uns als Gastgeber.
|
||||
|
||||
**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<br>
|
||||
@if ($booking->guests)
|
||||
**Personen:** {{ $booking->guests }}<br>
|
||||
@endif
|
||||
@if ($booking->portal_reference)
|
||||
**Buchungsnummer bei {{ $portal }}:** {{ $booking->portal_reference }}<br>
|
||||
@endif
|
||||
**Unsere Nummer:** {{ $booking->reference }}
|
||||
|
||||
@if ($booking->total !== null)
|
||||
**Gesamtpreis laut {{ $portal }}:** {{ \App\Support\Money::format($booking->total) }}
|
||||
@endif
|
||||
|
||||
@if ($booking->wantsPaymentTasks())
|
||||
## Zahlung
|
||||
|
||||
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') }}**.
|
||||
|
||||
@include('mail.partials.bank')
|
||||
@else
|
||||
Die Zahlung läuft über {{ $portal }}.
|
||||
@endif
|
||||
|
||||
Ihre **Buchungsunterlagen** finden Sie als PDF im Anhang.
|
||||
|
||||
@if ($booking->process()->guestMessages() === \App\Enums\Responsibility::Landlord)
|
||||
Kurz vor Ihrer Anreise erhalten Sie von uns alle Informationen zu Schlüsselübergabe, Parken und WLAN.
|
||||
@endif
|
||||
|
||||
Bei Fragen antworten Sie einfach auf diese E-Mail.
|
||||
|
||||
Herzliche Grüße<br>
|
||||
{{ config('fewo.owner.name') }}
|
||||
</x-mail::message>
|
||||
@@ -3,7 +3,7 @@
|
||||
<html lang="de">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Mietvertrag {{ $booking->reference }}</title>
|
||||
<title>{{ ($kind ?? null) === \App\Enums\DocumentKind::ExternalRecord ? 'Buchungsunterlagen' : 'Mietvertrag' }} {{ $booking->reference }}</title>
|
||||
<style>
|
||||
@page { margin: 22mm 20mm 20mm 20mm; }
|
||||
body { font-family: 'DejaVu Serif', serif; font-size: 10pt; color: #111; line-height: 1.4; }
|
||||
@@ -23,8 +23,11 @@
|
||||
<img src="{{ $logo }}" alt="" style="max-height: 18mm; max-width: 60mm; margin-bottom: 4mm;">
|
||||
@endif
|
||||
|
||||
<h1>Mietvertrag</h1>
|
||||
@if ($draft ?? false)
|
||||
@php($external = ($kind ?? null) === \App\Enums\DocumentKind::ExternalRecord)
|
||||
<h1>{{ $external ? 'Buchungsunterlagen' : 'Mietvertrag' }}</h1>
|
||||
@if ($external)
|
||||
<p class="muted">Gebucht über {{ $booking->processChannel()?->name ?? 'ein Portal' }}@if ($booking->portal_reference) · Buchungsnummer {{ $booking->portal_reference }}@endif · unsere Nummer {{ $booking->reference }}<br>Die Buchung ist beim Portal verbindlich zustande gekommen; dieses Dokument hält die Buchung fest.</p>
|
||||
@elseif ($draft ?? false)
|
||||
<p class="muted">Angebot {{ $booking->reference }} · Version {{ $booking->offer_version }} · gültig bis {{ $booking->hold_expires_at?->format('d.m.Y, H:i') }} Uhr · Entwurf bis zur Annahme</p>
|
||||
@elseif ($booking->accepted_at)
|
||||
<p class="muted">Buchungsnummer {{ $booking->reference }} · Angebot angenommen am {{ $booking->accepted_at->format('d.m.Y, H:i') }} Uhr</p>
|
||||
|
||||
@@ -1,11 +1,13 @@
|
||||
@php($money = fn (int $cents): string => \App\Support\Money::format($cents))
|
||||
@php($owner = \App\Documents\OfferTerms::owner($booking))
|
||||
@php($bank = \App\Documents\OfferTerms::bank($booking))
|
||||
@php($external = ($kind ?? null) === \App\Enums\DocumentKind::ExternalRecord)
|
||||
@php($portal = $booking->processChannel()?->name ?? 'das Portal')
|
||||
<!DOCTYPE html>
|
||||
<html lang="de">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Mietvertrag {{ $booking->reference }}</title>
|
||||
<title>{{ $external ? 'Buchungsunterlagen' : '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; }
|
||||
@@ -35,6 +37,10 @@
|
||||
<h1>Angebot und Mietvertrag (Entwurf)</h1>
|
||||
<p class="muted">Angebot {{ $booking->reference }} · Version {{ $booking->offer_version }} · erstellt am {{ ($booking->offer_sent_at ?? now())->format('d.m.Y') }} · gültig bis {{ $booking->hold_expires_at?->format('d.m.Y, H:i') }} Uhr</p>
|
||||
<p><strong>{{ $booking->offerText('offer.contract_note') }}</strong></p>
|
||||
@elseif ($external)
|
||||
<h1>Buchungsunterlagen Ferienwohnung</h1>
|
||||
<p class="muted">Gebucht über {{ $portal }}@if ($booking->portal_reference) · Buchungsnummer {{ $booking->portal_reference }}@endif · unsere Nummer {{ $booking->reference }} · ausgestellt am {{ now()->format('d.m.Y') }}</p>
|
||||
<p>Die Buchung ist über {{ $portal }} verbindlich zustande gekommen. Dieses Dokument hält die Buchung fest.</p>
|
||||
@else
|
||||
<h1>Mietvertrag Ferienwohnung</h1>
|
||||
<p class="muted">Buchungsnummer {{ $booking->reference }} · ausgestellt am {{ ($booking->confirmed_at ?? now())->format('d.m.Y') }}@if ($booking->accepted_at) · Angebot angenommen am {{ $booking->accepted_at->format('d.m.Y, H:i') }} Uhr @endif</p>
|
||||
@@ -80,13 +86,15 @@
|
||||
<p class="muted">Die Kurtaxe ist nicht enthalten und wird vor Ort entrichtet.</p>
|
||||
|
||||
<h2>Zahlung</h2>
|
||||
@if ($booking->requiresFullPayment())
|
||||
@if ($external && ! $booking->wantsPaymentTasks())
|
||||
<p>Die Zahlung läuft über {{ $portal }}.</p>
|
||||
@elseif ($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 (($bank['iban'] ?? null))
|
||||
@if (($bank['iban'] ?? null) && ! ($external && ! $booking->wantsPaymentTasks()))
|
||||
<p>Bankverbindung: {{ ($bank['account_holder'] ?? null) }} · IBAN {{ ($bank['iban'] ?? null) }}@if (($bank['bic'] ?? null)) · BIC {{ ($bank['bic'] ?? null) }}@endif · Verwendungszweck: {{ $booking->reference }}</p>
|
||||
@endif
|
||||
|
||||
|
||||
@@ -0,0 +1,45 @@
|
||||
{{-- Working draft for package 6 (A6, private stays): a confirmation of the stay, explicitly not a rental contract. --}}
|
||||
@php($owner = \App\Documents\OfferTerms::owner($booking))
|
||||
<!DOCTYPE html>
|
||||
<html lang="de">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Aufenthaltsbestätigung {{ $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; }
|
||||
.muted { color: #5f6b73; }
|
||||
.facts td { padding: 0.8mm 0; }
|
||||
.facts td.label { width: 38%; color: #5f6b73; }
|
||||
.footer { position: fixed; bottom: -12mm; left: 0; right: 0; font-size: 7.5pt; color: #8a959c; text-align: center; }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="footer">{{ $owner['name'] ?? '' }} · {{ $owner['street'] ?? '' }} · {{ $owner['city'] ?? '' }}</div>
|
||||
|
||||
@if ($logo ?? null)
|
||||
<img src="{{ $logo }}" alt="" style="max-height: 18mm; max-width: 60mm; margin-bottom: 4mm;">
|
||||
@endif
|
||||
|
||||
<h1>Aufenthaltsbestätigung</h1>
|
||||
<p class="muted">Nummer {{ $booking->reference }} · ausgestellt am {{ now()->format('d.m.Y') }}</p>
|
||||
|
||||
<p>Hiermit bestätigen wir den folgenden Aufenthalt. Es handelt sich um eine private Überlassung, nicht um einen Mietvertrag.</p>
|
||||
|
||||
<table class="facts">
|
||||
<tr><td class="label">Gast</td><td>{{ $booking->guestName() }}</td></tr>
|
||||
<tr><td class="label">Wohnung</td><td>{{ $booking->property->name }}, {{ $booking->property->address }}</td></tr>
|
||||
<tr><td class="label">Anreise</td><td>{{ $booking->arrival->translatedFormat('l, d.m.Y') }}</td></tr>
|
||||
<tr><td class="label">Abreise</td><td>{{ $booking->departure->translatedFormat('l, d.m.Y') }}</td></tr>
|
||||
@if ($booking->guests)
|
||||
<tr><td class="label">Personen</td><td>{{ $booking->guests }}</td></tr>
|
||||
@endif
|
||||
@if ($booking->total)
|
||||
<tr><td class="label">Vereinbarter Betrag</td><td>{{ \App\Support\Money::format($booking->total) }}</td></tr>
|
||||
@endif
|
||||
</table>
|
||||
|
||||
<p style="margin-top: 8mm">{{ $owner['name'] ?? '' }}</p>
|
||||
</body>
|
||||
</html>
|
||||
Reference in new issue
Block a user