diff --git a/templates/admin/accommodation_booking/_price_breakdown.html.twig b/templates/admin/accommodation_booking/_price_breakdown.html.twig new file mode 100644 index 00000000..bfa4945c --- /dev/null +++ b/templates/admin/accommodation_booking/_price_breakdown.html.twig @@ -0,0 +1,98 @@ +{#- Itemised price table, the same lines the customer sees in the offer. Context: booking, priceBreakdown, currency. -#} + + {% for period in priceBreakdown.periods | filter(p => p.position == 'leading') %} + {% include 'admin/accommodation_booking/_price_period.html.twig' %} + {% endfor %} + {% if priceBreakdown.periods is not empty %} + + + + {% endif %} + {% if priceBreakdown.basePrice > 0 %} + + + + + {% endif %} + {% if priceBreakdown.additionalPersonsPrice > 0 %} + + + + + {% endif %} + {% if priceBreakdown.shortTermSurcharge > 0 %} + + + + + {% endif %} + {% if priceBreakdown.boardPrice > 0 %} + + + + + {% endif %} + {% if priceBreakdown.undersubscriptionSurcharge > 0 %} + + + + + {% endif %} + {% for service in priceBreakdown.serviceDetails %} + {% if service.price > 0 %} + + + + + {% endif %} + {% endfor %} + {% if priceBreakdown.runningCosts > 0 %} + + + + + {% endif %} + {% for period in priceBreakdown.periods | filter(p => p.position == 'trailing') %} + {% include 'admin/accommodation_booking/_price_period.html.twig' %} + {% endfor %} + + + + + {% for discount in priceBreakdown.discounts %} + + + + + {% endfor %} + {% if priceBreakdown.discountSubtotal is not null %} + + + + + {% endif %} + {% if priceBreakdown.totalDiscountDetails is not null %} + + + + + {% endif %} + {% if priceBreakdown.discounts is not empty or priceBreakdown.totalDiscountDetails is not null %} + + + + + {% endif %} +
+ Gruppe · {{ booking.mainDateFrom | date('d.m.Y') }} – {{ booking.mainDateTo | date('d.m.Y') }}, + {{ priceBreakdown.nights }} {{ priceBreakdown.nights != 1 ? 'Nächte' : 'Nacht' }} +
+ Basispreis + für {{ priceBreakdown.includedPax }} Pers. + {{ (priceBreakdown.basePrice / 100) | format_currency(currency) }}
+ Aufpreis Personenzahl + für {{ priceBreakdown.effectivePax - priceBreakdown.includedPax }} Pers. + {{ (priceBreakdown.additionalPersonsPrice / 100) | format_currency(currency) }}
Aufpreis Kurzzeit{{ (priceBreakdown.shortTermSurcharge / 100) | format_currency(currency) }}
Verpflegung{{ (priceBreakdown.boardPrice / 100) | format_currency(currency) }}
Verpflegungs-Aufschlag für Gruppen unter {{ priceBreakdown.undersubscriptionThreshold }} Personen{{ (priceBreakdown.undersubscriptionSurcharge / 100) | format_currency(currency) }}
{{ service.label }}{{ (service.price / 100) | format_currency(currency) }}
Strom- und Abfallgebühren{{ (priceBreakdown.runningCosts / 100) | format_currency(currency) }}
+ Gesamtpreis + zzgl. ortsabhängiger Gebühren + {{ (priceBreakdown.total / 100) | format_currency(currency) }}
{{ discount.label }} {{ discount.percent }} %– {{ (discount.amount / 100) | format_currency(currency) }}
Zwischensumme{{ (priceBreakdown.discountSubtotal / 100) | format_currency(currency) }}
{{ priceBreakdown.totalDiscountDetails.label }}– {{ (priceBreakdown.totalDiscountDetails.amount / 100) | format_currency(currency) }}
Gesamtpreis nach Rabatt{{ (priceBreakdown.discountedTotal / 100) | format_currency(currency) }}
diff --git a/templates/admin/accommodation_booking/_price_period.html.twig b/templates/admin/accommodation_booking/_price_period.html.twig index b0ee7d82..21025fc4 100644 --- a/templates/admin/accommodation_booking/_price_period.html.twig +++ b/templates/admin/accommodation_booking/_price_period.html.twig @@ -1,4 +1,4 @@ -{#- One split-off period of the price table on the detail page. Context: period, currency. -#} +{#- One split-off period of the admin price table. Context: period, currency. -#} {% if period.label ?? null %}{{ period.label }} · {% endif %} diff --git a/templates/admin/accommodation_booking/edit.html.twig b/templates/admin/accommodation_booking/edit.html.twig index 3751a735..40807a1f 100644 --- a/templates/admin/accommodation_booking/edit.html.twig +++ b/templates/admin/accommodation_booking/edit.html.twig @@ -172,34 +172,7 @@ {% if priceBreakdown is not null %} {% set currency = booking.pricingCurrency ?? priceBreakdown.currency %} - - {% if priceBreakdown.periods is not empty %} - - - - - - - - - {% endif %} - {% if priceBreakdown.discountedTotal != priceBreakdown.total %} - {% if priceBreakdown.periods is empty %} - - - - - {% endif %} - - - - - {% endif %} - - - - -
Gruppe{{ ((priceBreakdown.total - priceBreakdown.periodsTotal) / 100) | format_currency(currency) }}
Zeiträume{{ (priceBreakdown.periodsTotal / 100) | format_currency(currency) }}
Preis{{ (priceBreakdown.total / 100) | format_currency(currency) }}
Rabatte– {{ ((priceBreakdown.total - priceBreakdown.discountedTotal) / 100) | format_currency(currency) }}
Gesamtpreis{{ (priceBreakdown.discountedTotal / 100) | format_currency(currency) }}
+ {% include 'admin/accommodation_booking/_price_breakdown.html.twig' %}

Stand der letzten Speicherung. Änderungen oben werden erst beim Speichern neu berechnet.

diff --git a/templates/admin/accommodation_booking/show.html.twig b/templates/admin/accommodation_booking/show.html.twig index df4d0b0e..829de065 100644 --- a/templates/admin/accommodation_booking/show.html.twig +++ b/templates/admin/accommodation_booking/show.html.twig @@ -64,103 +64,7 @@ {% if priceBreakdown is not null %} {% set currency = booking.pricingCurrency ?? priceBreakdown.currency %} - - {% for period in priceBreakdown.periods | filter(p => p.position == 'leading') %} - {% include 'admin/accommodation_booking/_price_period.html.twig' %} - {% endfor %} - {% if priceBreakdown.periods is not empty %} - - - - {% endif %} - {% if priceBreakdown.basePrice > 0 %} - - - - - {% endif %} - {% if priceBreakdown.additionalPersonsPrice > 0 %} - - - - - {% endif %} - {% if priceBreakdown.shortTermSurcharge > 0 %} - - - - - {% endif %} - {% if priceBreakdown.boardPrice > 0 %} - - - - - {% endif %} - {% if priceBreakdown.undersubscriptionSurcharge > 0 %} - - - - - {% endif %} - {% for service in priceBreakdown.serviceDetails %} - {% if service.price > 0 %} - - - - - {% endif %} - {% endfor %} - {% if priceBreakdown.runningCosts > 0 %} - - - - - {% endif %} - {% for period in priceBreakdown.periods | filter(p => p.position == 'trailing') %} - {% include 'admin/accommodation_booking/_price_period.html.twig' %} - {% endfor %} - - - - - {% for discount in priceBreakdown.discounts %} - - - - - {% endfor %} - {% if priceBreakdown.discountSubtotal is not null %} - - - - - {% endif %} - {% if priceBreakdown.totalDiscountDetails is not null %} - - - - - {% endif %} - {% if priceBreakdown.discounts is not empty or priceBreakdown.totalDiscountDetails is not null %} - - - - - {% endif %} -
- Gruppe · {{ booking.mainDateFrom | date('d.m.Y') }} – {{ booking.mainDateTo | date('d.m.Y') }}, - {{ priceBreakdown.nights }} {{ priceBreakdown.nights != 1 ? 'Nächte' : 'Nacht' }} -
- Basispreis - für {{ priceBreakdown.includedPax }} Pers. - {{ (priceBreakdown.basePrice / 100) | format_currency(currency) }}
- Aufpreis Personenzahl - für {{ priceBreakdown.effectivePax - priceBreakdown.includedPax }} Pers. - {{ (priceBreakdown.additionalPersonsPrice / 100) | format_currency(currency) }}
Aufpreis Kurzzeit{{ (priceBreakdown.shortTermSurcharge / 100) | format_currency(currency) }}
Verpflegung{{ (priceBreakdown.boardPrice / 100) | format_currency(currency) }}
Verpflegungs-Aufschlag für Gruppen unter {{ priceBreakdown.undersubscriptionThreshold }} Personen{{ (priceBreakdown.undersubscriptionSurcharge / 100) | format_currency(currency) }}
{{ service.label }}{{ (service.price / 100) | format_currency(currency) }}
Strom- und Abfallgebühren{{ (priceBreakdown.runningCosts / 100) | format_currency(currency) }}
- Gesamtpreis - zzgl. ortsabhängiger Gebühren - {{ (priceBreakdown.total / 100) | format_currency(currency) }}
{{ discount.label }} {{ discount.percent }} %– {{ (discount.amount / 100) | format_currency(currency) }}
Zwischensumme{{ (priceBreakdown.discountSubtotal / 100) | format_currency(currency) }}
{{ priceBreakdown.totalDiscountDetails.label }}– {{ (priceBreakdown.totalDiscountDetails.amount / 100) | format_currency(currency) }}
Gesamtpreis nach Rabatt{{ (priceBreakdown.discountedTotal / 100) | format_currency(currency) }}
+ {% include 'admin/accommodation_booking/_price_breakdown.html.twig' %}
{% endif %}