Files
fewo-stommer/resources/views/pdf/contract.blade.php
T
LarsandClaude Sonnet 5.5 0c4187edaf
Deploy FeWo mit PipelineManager / deploy (push) Successful in 3m34s
Stornoregeln mit automatischer Kostenberechnung, Storno-Verwaltung, Vertragsanlagen
- Stornoregel (Stufen nach Tagen vor Anreise, Mietpreis oder Gesamtpreis, Ersatzmieter-Gebuehr), je Vertragsvorlage,
  beim Angebot eingefroren, als Platzhalter im Vertrag
- Stornierung (Gast-Link oder Verwaltung) berechnet die Kosten, legt einen Stornofall an; Verwaltung Stornierungen
  mit Vorschlag, Festlegung, Saldo, Abrechnung und Erlass; Gast sieht die Kosten vorab auf der Storno-Seite
- Vertragsanlagen als eigene versionierte Dokumente mit Bedingung (immer, Zusatzleistung, Portal, von Hand),
  je Angebot ausgewaehlt und eingefroren; Zusatzleistungen in der Buchung erfassbar
- FeWo-direkt-Installation legt die Stornoregel aus Paragraf 13 an

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-30 16:32:48 +01:00

115 lines
6.2 KiB
PHP

@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))
<!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">{{ ($owner['name'] ?? null) }} · {{ ($owner['street'] ?? null) }} · {{ ($owner['city'] ?? null) }} · {{ ($owner['phone'] ?? null) }} · {{ ($owner['email'] ?? null) }}</div>
@if ($logo ?? null)
<img src="{{ $logo }}" alt="" style="max-height: 18mm; max-width: 60mm; margin-bottom: 4mm;">
@endif
@if ($draft ?? false)
<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>
@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>
@endif
<p>{{ $booking->offerText('contract.intro') }}</p>
<table class="parties">
<tr>
<td>
<h2>Vermieter</h2>
{{ ($owner['name'] ?? null) }}<br>
{{ ($owner['street'] ?? null) }}<br>
{{ ($owner['city'] ?? null) }}<br>
Tel. {{ ($owner['phone'] ?? null) }} · {{ ($owner['email'] ?? null) }}
</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 (($bank['iban'] ?? null))
<p>Bankverbindung: {{ ($bank['account_holder'] ?? null) }} · IBAN {{ ($bank['iban'] ?? null) }}@if (($bank['bic'] ?? null)) · BIC {{ ($bank['bic'] ?? null) }}@endif · Verwendungszweck: {{ $booking->reference }}</p>
@endif
<h2>Mietbedingungen</h2>
<div class="rich">{{ $booking->offerHtml('contract.terms') }}</div>
@if ($booking->offerText('stay.cancellation'))
<h2>Rücktritt / Stornierung</h2>
<div class="rich">{{ $booking->offerHtml('stay.cancellation') }}</div>
@endif
@if ($booking->offerText('stay.house_rules'))
<h2>Hausordnung</h2>
<div class="rich">{{ $booking->offerHtml('stay.house_rules') }}</div>
@endif
@foreach (\App\Documents\OfferTerms::annexes($booking) as $extraAnnex)
<h2>Anlage: {{ $extraAnnex['title'] }}</h2>
<div class="rich">{!! $extraAnnex['html'] !!}</div>
@endforeach
<p style="margin-top: 8mm">{{ $booking->offerText('contract.closing') }}</p>
<p>{{ ($owner['name'] ?? null) }}</p>
</body>
</html>