feat: additional custom discount applied to total price

This commit is contained in:
2026-09-08 15:29:00 +02:00
parent dea7a3dc97
commit 8443dae5ad
14 changed files with 287 additions and 23 deletions
+14 -2
View File
@@ -152,11 +152,23 @@
</tr>
{% for discount in ctx.priceBreakdown.discounts %}
<tr class="text-green-700">
<td class="p-2">Rabatt {{ discount.label }} {{ discount.percent }}&nbsp;%</td>
<td class="p-2">{{ discount.label }} {{ discount.percent }}&nbsp;%</td>
<td class="p-2 text-right whitespace-nowrap"> {{ (discount.amount / 100)|format_currency(currency) }}</td>
</tr>
{% endfor %}
{% if ctx.priceBreakdown.discounts is not empty %}
{% if ctx.priceBreakdown.discountSubtotal is not null %}
<tr class="border-t border-primary-bg">
<td class="p-2">Zwischensumme</td>
<td class="p-2 text-right whitespace-nowrap">{{ (ctx.priceBreakdown.discountSubtotal / 100)|format_currency(currency) }}</td>
</tr>
{% endif %}
{% if ctx.priceBreakdown.totalDiscountDetails is not null %}
<tr class="text-green-700">
<td class="p-2">{{ ctx.priceBreakdown.totalDiscountDetails.label }} {{ ctx.priceBreakdown.totalDiscountDetails.percent }}&nbsp;%</td>
<td class="p-2 text-right whitespace-nowrap"> {{ (ctx.priceBreakdown.totalDiscountDetails.amount / 100)|format_currency(currency) }}</td>
</tr>
{% endif %}
{% if ctx.priceBreakdown.discounts is not empty or ctx.priceBreakdown.totalDiscountDetails is not null %}
<tr class="border-t border-primary-bg font-bold text-base text-green-700">
<td class="p-2">Gesamtpreis nach Rabatt</td>
<td class="p-2 text-right whitespace-nowrap">{{ (ctx.priceBreakdown.discountedTotal / 100)|format_currency(currency) }}</td>