Files
fewo-stommer/resources/views/pdf/contract-document.blade.php
T
LarsandClaude Opus 5.5 cf11c8a474
Deploy FeWo mit PipelineManager / deploy (push) Successful in 3m59s
Dokumentenzusammenstellung und Vorlagensteuerung (Paket 3, Prozessarchitektur v0.10)
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>
2026-11-01 19:44:52 +01:00

56 lines
2.7 KiB
PHP

@php($owner = \App\Documents\OfferTerms::owner($booking))
<!DOCTYPE html>
<html lang="de">
<head>
<meta charset="utf-8">
<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; }
h1 { font-size: 17pt; margin: 0 0 4mm; text-align: center; }
h2, h3 { font-size: 10.5pt; margin: 5mm 0 1mm; }
p { margin: 0 0 2mm; }
ul, ol { margin: 0 0 2mm 5mm; padding: 0; }
.muted { color: #5f6b73; font-size: 8.5pt; text-align: center; }
.annex { page-break-before: always; }
.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'] ?? '' }} · {{ $owner['phone'] ?? '' }} · {{ $owner['email'] ?? '' }}</div>
@if ($logo ?? null)
<img src="{{ $logo }}" alt="" style="max-height: 18mm; max-width: 60mm; margin-bottom: 4mm;">
@endif
@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>
@else
<p class="muted">Buchungsnummer {{ $booking->reference }}</p>
@endif
<div>{!! $document['body'] !!}</div>
@if ($document['annex'])
<div class="annex">
@if ($document['annex_title'])
<h1>{{ $document['annex_title'] }}</h1>
@endif
{!! $document['annex'] !!}
</div>
@endif
@foreach (\App\Documents\OfferTerms::annexes($booking) as $extraAnnex)
<div class="annex">
<h1>{{ $extraAnnex['title'] }}</h1>
{!! $extraAnnex['html'] !!}
</div>
@endforeach
</body>
</html>