feat: split nights off an accommodation booking as separate periods
addresses #869f6z36v
This commit is contained in:
1 parent
972839286c
commit
7001bc0cf2
35 files changed
+2221
-25
No files matched your search
@@ -11,6 +11,17 @@
|
||||
<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 }}">
|
||||
@@ -64,6 +75,9 @@
|
||||
<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
|
||||
@@ -103,3 +117,4 @@
|
||||
{% endif %}
|
||||
</table>
|
||||
{% endif %}
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
{#- One split-off period of _price_breakdown.html.twig: its range as a heading, then its lines.
|
||||
Context: period, cell, amount, currency. -#}
|
||||
<tr>
|
||||
<td colspan="2" style="{{ cell }} border-top: 1px solid #d1d5db; font-weight: bold;">
|
||||
{% if period.label ?? null %}{{ period.label }} · {% endif %}
|
||||
{{ period.dateFrom|date('d.m.Y') }} – {{ period.dateTo|date('d.m.Y') }},
|
||||
{{ period.nights }} {{ period.nights != 1 ? 'Nächte' : 'Nacht' }}
|
||||
</td>
|
||||
</tr>
|
||||
{% for line in period.lines %}
|
||||
<tr>
|
||||
<td style="{{ cell }}">{{ line.label }}</td>
|
||||
<td style="{{ amount }}">{{ (line.amount / 100)|format_currency(currency) }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
@@ -19,6 +19,12 @@
|
||||
<td><strong>Nächte</strong></td>
|
||||
<td>{{ booking.nights }}</td>
|
||||
</tr>
|
||||
{% if booking.periods is not empty %}
|
||||
<tr>
|
||||
<td><strong>Zeitraum Gruppe</strong></td>
|
||||
<td>{{ booking.mainDateFrom|date('d.m.Y') }} – {{ booking.mainDateTo|date('d.m.Y') }}</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
<tr>
|
||||
<td><strong>Anzahl Personen</strong></td>
|
||||
<td>{{ booking.paxCount }}</td>
|
||||
|
||||
Reference in new issue
Block a user