feat: booking details pdf
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
{#- Price breakdown for booking emails. Mirrors groups/booking/_offer_summary.html.twig, but
|
||||
with inline styles: the email layout ships no table styling and no Tailwind.
|
||||
Context: booking, priceBreakdown, currency (set in AccommodationBookingService). -#}
|
||||
{#- Prices only — travel dates and group size belong to _stay_details.html.twig and the
|
||||
PDF's own data block. Mirrors groups/booking/_offer_summary.html.twig, but with inline
|
||||
styles: neither the email layout nor dompdf ships table styling or Tailwind.
|
||||
Context: booking, priceBreakdown, currency (set in AccommodationBookingService and
|
||||
AccommodationBookingPdfGenerator). -#}
|
||||
{% if priceBreakdown is not null and currency is not null %}
|
||||
{% set cell = 'padding: 4px 0; text-align: left; vertical-align: top;' %}
|
||||
{% set amount = 'padding: 4px 0; text-align: right; vertical-align: top; white-space: nowrap;' %}
|
||||
@@ -9,29 +11,6 @@
|
||||
<h2>Preise</h2>
|
||||
|
||||
<table style="width: 100%; border-collapse: collapse; font-size: 14px;">
|
||||
<tr>
|
||||
<td style="{{ cell }}">Zeitraum</td>
|
||||
<td style="{{ amount }}">
|
||||
{{ booking.dateFrom|date('d.m.Y') }} – {{ booking.dateTo|date('d.m.Y') }},
|
||||
{{ booking.nights }} {{ booking.nights != 1 ? 'Nächte' : 'Nacht' }}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="{{ cell }}">Anzahl Personen</td>
|
||||
<td style="{{ amount }}">{{ booking.paxCount }}</td>
|
||||
</tr>
|
||||
{% if booking.minorsCount > 0 %}
|
||||
<tr>
|
||||
<td style="{{ cell }}">davon Kinder (0–3 J.)</td>
|
||||
<td style="{{ amount }}">{{ booking.minorsCount }}</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
{% if booking.childrenCount > 0 %}
|
||||
<tr>
|
||||
<td style="{{ cell }}">davon Kinder (4–{{ booking.accommodation.maxAdolescentAge }} J.)</td>
|
||||
<td style="{{ amount }}">{{ booking.childrenCount }}</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
{% if priceBreakdown.basePrice > 0 %}
|
||||
<tr>
|
||||
<td style="{{ cell }}">
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
{#- Accommodation and group facts for booking emails, kept out of _price_breakdown.html.twig
|
||||
so that partial holds prices only. Context: booking. -#}
|
||||
<h2>Unterkunft</h2>
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<td><strong>Name</strong></td>
|
||||
<td>{{ booking.accommodation.name }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>Anreise</strong></td>
|
||||
<td>{{ booking.dateFrom|date('d.m.Y') }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>Abreise</strong></td>
|
||||
<td>{{ booking.dateTo|date('d.m.Y') }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>Nächte</strong></td>
|
||||
<td>{{ booking.nights }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>Anzahl Personen</strong></td>
|
||||
<td>{{ booking.paxCount }}</td>
|
||||
</tr>
|
||||
{% if booking.minorsCount > 0 %}
|
||||
<tr>
|
||||
<td><strong>davon Kinder (0–3 J.)</strong></td>
|
||||
<td>{{ booking.minorsCount }}</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
{% if booking.childrenCount > 0 %}
|
||||
<tr>
|
||||
<td><strong>davon Kinder (4–{{ booking.accommodation.maxAdolescentAge }} J.)</strong></td>
|
||||
<td>{{ booking.childrenCount }}</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
</table>
|
||||
@@ -11,21 +11,7 @@
|
||||
</p>
|
||||
{% endif %}
|
||||
|
||||
<h2>Unterkunft</h2>
|
||||
<table>
|
||||
<tr>
|
||||
<td><strong>Name</strong></td>
|
||||
<td>{{ booking.accommodation.name }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>Anreise</strong></td>
|
||||
<td>{{ booking.dateFrom|date('d.m.Y') }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>Abreise</strong></td>
|
||||
<td>{{ booking.dateTo|date('d.m.Y') }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
{% include 'email/_stay_details.html.twig' %}
|
||||
|
||||
{% include 'email/_price_breakdown.html.twig' %}
|
||||
{% endblock %}
|
||||
|
||||
@@ -36,21 +36,7 @@
|
||||
</p>
|
||||
{% endif %}
|
||||
|
||||
<h2>Unterkunft</h2>
|
||||
<table>
|
||||
<tr>
|
||||
<td><strong>Name</strong></td>
|
||||
<td>{{ booking.accommodation.name }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>Anreise</strong></td>
|
||||
<td>{{ booking.dateFrom|date('d.m.Y') }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>Abreise</strong></td>
|
||||
<td>{{ booking.dateTo|date('d.m.Y') }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
{% include 'email/_stay_details.html.twig' %}
|
||||
|
||||
{% include 'email/_price_breakdown.html.twig' %}
|
||||
|
||||
|
||||
@@ -27,24 +27,7 @@
|
||||
</p>
|
||||
{% endif %}
|
||||
|
||||
<h2>
|
||||
Unterkunft
|
||||
</h2>
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<td><strong>Name</strong></td>
|
||||
<td>{{ booking.accommodation.name }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>Anreise</strong></td>
|
||||
<td>{{ booking.dateFrom|date('d.m.Y') }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>Abreise</strong></td>
|
||||
<td>{{ booking.dateTo|date('d.m.Y') }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
{% include 'email/_stay_details.html.twig' %}
|
||||
|
||||
{% include 'email/_price_breakdown.html.twig' %}
|
||||
|
||||
|
||||
@@ -9,21 +9,7 @@
|
||||
</p>
|
||||
{% endif %}
|
||||
|
||||
<h2>Unterkunft</h2>
|
||||
<table>
|
||||
<tr>
|
||||
<td><strong>Name</strong></td>
|
||||
<td>{{ booking.accommodation.name }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>Anreise</strong></td>
|
||||
<td>{{ booking.dateFrom|date('d.m.Y') }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>Abreise</strong></td>
|
||||
<td>{{ booking.dateTo|date('d.m.Y') }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
{% include 'email/_stay_details.html.twig' %}
|
||||
|
||||
{% include 'email/_price_breakdown.html.twig' %}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user