121 lines
6.1 KiB
Twig
121 lines
6.1 KiB
Twig
{#- Prices only — travel dates and group size belong to _stay_details.html.twig and the
|
||
PDF's own data block. Mirrors groups/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;' %}
|
||
{% set note = 'display: block; font-size: 12px; color: #6b7280; margin: 0;' %}
|
||
|
||
<h2>Preise</h2>
|
||
|
||
<table style="width: 100%; border-collapse: collapse; font-size: 14px;">
|
||
{% for period in priceBreakdown.periods|filter(p => p.position == 'leading') %}
|
||
{% include 'email/_price_breakdown_period.html.twig' %}
|
||
{% endfor %}
|
||
{% if priceBreakdown.periods is not empty %}
|
||
<tr>
|
||
<td colspan="2" style="{{ cell }} border-top: 1px solid #d1d5db; font-weight: bold;">
|
||
Gruppe · {{ booking.mainDateFrom|date('d.m.Y') }} – {{ booking.mainDateTo|date('d.m.Y') }},
|
||
{{ priceBreakdown.nights }} {{ priceBreakdown.nights != 1 ? 'Nächte' : 'Nacht' }}
|
||
</td>
|
||
</tr>
|
||
{% endif %}
|
||
{% if priceBreakdown.basePrice > 0 %}
|
||
<tr>
|
||
<td style="{{ cell }}">
|
||
Basispreis
|
||
<span style="{{ note }}">für {{ priceBreakdown.includedPax }} Pers.</span>
|
||
</td>
|
||
<td style="{{ amount }}">{{ (priceBreakdown.basePrice / 100)|format_currency(currency) }}</td>
|
||
</tr>
|
||
{% endif %}
|
||
{% if priceBreakdown.additionalPersonsPrice > 0 %}
|
||
<tr>
|
||
<td style="{{ cell }}">
|
||
Aufpreis Personenzahl
|
||
<span style="{{ note }}">für {{ priceBreakdown.effectivePax - priceBreakdown.includedPax }} Pers.</span>
|
||
</td>
|
||
<td style="{{ amount }}">{{ (priceBreakdown.additionalPersonsPrice / 100)|format_currency(currency) }}</td>
|
||
</tr>
|
||
{% endif %}
|
||
{% if priceBreakdown.shortTermSurcharge > 0 %}
|
||
<tr>
|
||
<td style="{{ cell }}">Aufpreis Kurzzeit</td>
|
||
<td style="{{ amount }}">{{ (priceBreakdown.shortTermSurcharge / 100)|format_currency(currency) }}</td>
|
||
</tr>
|
||
{% endif %}
|
||
{% if priceBreakdown.boardPrice > 0 %}
|
||
<tr>
|
||
<td style="{{ cell }}">Verpflegung{% if booking.boardServiceLabel %} ({{ booking.boardServiceLabel }}){% endif %}</td>
|
||
<td style="{{ amount }}">{{ (priceBreakdown.boardPrice / 100)|format_currency(currency) }}</td>
|
||
</tr>
|
||
{% endif %}
|
||
{% if priceBreakdown.undersubscriptionSurcharge > 0 %}
|
||
<tr>
|
||
<td style="{{ cell }}">
|
||
Verpflegungs-Aufschlag
|
||
<span style="{{ note }}">für Gruppen unter {{ priceBreakdown.undersubscriptionThreshold }} Pers.</span>
|
||
</td>
|
||
<td style="{{ amount }}">{{ (priceBreakdown.undersubscriptionSurcharge / 100)|format_currency(currency) }}</td>
|
||
</tr>
|
||
{% endif %}
|
||
{% for service in priceBreakdown.serviceDetails %}
|
||
{% if service.price > 0 %}
|
||
<tr>
|
||
<td style="{{ cell }}">{{ service.label }}</td>
|
||
<td style="{{ amount }}">{{ (service.price / 100)|format_currency(currency) }}</td>
|
||
</tr>
|
||
{% endif %}
|
||
{% endfor %}
|
||
{% if priceBreakdown.runningCosts > 0 %}
|
||
<tr>
|
||
<td style="{{ cell }}">Strom- und Abfallgebühren</td>
|
||
<td style="{{ amount }}">{{ (priceBreakdown.runningCosts / 100)|format_currency(currency) }}</td>
|
||
</tr>
|
||
{% endif %}
|
||
{% for period in priceBreakdown.periods|filter(p => p.position == 'trailing') %}
|
||
{% include 'email/_price_breakdown_period.html.twig' %}
|
||
{% endfor %}
|
||
<tr>
|
||
<td style="{{ cell }} border-top: 1px solid #d1d5db; font-weight: bold;">
|
||
Gesamtpreis
|
||
<span style="{{ note }} font-weight: normal;">zzgl. ortsabhängiger Gebühren</span>
|
||
</td>
|
||
<td style="{{ amount }} border-top: 1px solid #d1d5db; font-weight: bold;">
|
||
{{ (priceBreakdown.total / 100)|format_currency(currency) }}
|
||
</td>
|
||
</tr>
|
||
{% for discount in priceBreakdown.discounts %}
|
||
<tr>
|
||
<td style="{{ cell }}">{{ discount.label }} {{ discount.percent }} %</td>
|
||
<td style="{{ amount }}">– {{ (discount.amount / 100)|format_currency(currency) }}</td>
|
||
</tr>
|
||
{% endfor %}
|
||
{% if priceBreakdown.discountSubtotal is not null %}
|
||
<tr>
|
||
<td style="{{ cell }} border-top: 1px solid #d1d5db;">Zwischensumme</td>
|
||
<td style="{{ amount }} border-top: 1px solid #d1d5db;">
|
||
{{ (priceBreakdown.discountSubtotal / 100)|format_currency(currency) }}
|
||
</td>
|
||
</tr>
|
||
{% endif %}
|
||
{% if priceBreakdown.totalDiscountDetails is not null %}
|
||
<tr>
|
||
<td style="{{ cell }}">{{ priceBreakdown.totalDiscountDetails.label }}</td>
|
||
<td style="{{ amount }}">– {{ (priceBreakdown.totalDiscountDetails.amount / 100)|format_currency(currency) }}</td>
|
||
</tr>
|
||
{% endif %}
|
||
{% if priceBreakdown.discounts is not empty or priceBreakdown.totalDiscountDetails is not null %}
|
||
<tr>
|
||
<td style="{{ cell }} border-top: 1px solid #d1d5db; font-weight: bold;">Gesamtpreis nach Rabatt</td>
|
||
<td style="{{ amount }} border-top: 1px solid #d1d5db; font-weight: bold;">
|
||
{{ (priceBreakdown.discountedTotal / 100)|format_currency(currency) }}
|
||
</td>
|
||
</tr>
|
||
{% endif %}
|
||
</table>
|
||
{% endif %}
|
||
|