feat: replace custom discount with absolute value in favor of percentage
This commit is contained in:
@@ -81,7 +81,7 @@
|
||||
</div>
|
||||
<div class="lg:col-span-2 grid lg:grid-cols-2 gap-y-4 lg:gap-x-8">
|
||||
{{ form_row(form.totalDiscountLabel) }}
|
||||
{{ form_row(form.totalDiscount) }}
|
||||
{{ form_row(form.totalDiscountAmount) }}
|
||||
</div>
|
||||
<div class="lg:col-span-2">
|
||||
{{ form_row(form.remarks) }}
|
||||
|
||||
@@ -84,8 +84,8 @@
|
||||
{% if booking.additionalServicesDiscount is not null %}
|
||||
{% set discounts = discounts | merge(['Zusatzleistungen ' ~ booking.additionalServicesDiscount ~ '%']) %}
|
||||
{% endif %}
|
||||
{% if booking.totalDiscount is not null %}
|
||||
{% set discounts = discounts | merge([(booking.totalDiscountLabel ?: 'Gesamtpreis') ~ ' ' ~ booking.totalDiscount ~ '%']) %}
|
||||
{% if booking.totalDiscountAmount is not null %}
|
||||
{% set discounts = discounts | merge([(booking.totalDiscountLabel ?: 'Gesamtpreis') ~ ' ' ~ ((booking.totalDiscountAmount / 100) | format_currency(booking.pricingCurrency ?: 'EUR'))]) %}
|
||||
{% endif %}
|
||||
<a href="{{ edit_url }}">{{ discounts | length > 0 ? (discounts | join(', ')) : '–' }}</a>
|
||||
</td>
|
||||
|
||||
@@ -160,7 +160,7 @@
|
||||
{% endif %}
|
||||
{% if priceBreakdown.totalDiscountDetails is not null %}
|
||||
<tr class="text-green-700">
|
||||
<td class="pt-1">{{ priceBreakdown.totalDiscountDetails.label }} {{ priceBreakdown.totalDiscountDetails.percent }} %</td>
|
||||
<td class="pt-1">{{ priceBreakdown.totalDiscountDetails.label }}</td>
|
||||
<td class="pt-1 text-right whitespace-nowrap">– {{ (priceBreakdown.totalDiscountDetails.amount / 100) | format_currency(currency) }}</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
|
||||
Reference in New Issue
Block a user