wip: refactored price overrides

This commit is contained in:
Björn Fromme committed 2026-07-16 17:13:15 +02:00
1 parent f8e4fe4d1e
commit eba1a901d6
13 files changed
+668 -118

No files matched your search

+14 -10
View File
@@ -62,13 +62,15 @@
<table class="data-table">
<thead>
<tr>
<th></th>
<th>
von
</th>
<th>
bis
</th>
<th>
Typ
</th>
<th>
Saison
</th>
@@ -90,13 +92,21 @@
<tbody>
{% for price in accommodation.accommodationPrices %}
<tr>
<td></td>
<td>
{{ price.dateFrom | date('d.m.Y') }}
</td>
<td>
{{ price.dateTo | date('d.m.Y') }}
</td>
<td>
{% if price.type is not null %}
{% if price.type.value == 'discount' %}
{{ icon('discount', 'w-5 h-5') }}
{% elseif price.type.value == 'override' %}
{{ icon('stack', 'w-5 h-5') }}
{% endif %}
{% endif %}
</td>
<td>
{{ price.season.token | trans }}
</td>
@@ -104,16 +114,10 @@
{{ price.includedPax }}
</td>
<td>
{{ (price.effectivePricePerNight / 100) | format_currency(accommodation.currency) }}
{% if price.pricePerNightOverride is not null %}
<span class="line-through text-xs">{{ (price.pricePerNight / 100) | format_currency(accommodation.currency) }}</span>
{% endif %}
{{ (price.pricePerNight / 100) | format_currency(accommodation.currency) }}
</td>
<td>
{{ (price.effectivePriceAdditionalPerson / 100) | format_currency(accommodation.currency) }}
{% if price.priceAdditionalPersonOverride is not null %}
<span class="line-through text-xs">{{ (price.priceAdditionalPerson / 100) | format_currency(accommodation.currency) }}</span>
{% endif %}
{{ (price.priceAdditionalPerson / 100) | format_currency(accommodation.currency) }}
</td>
<td>
{% if price.acceptUndersubscription %}