feat: additional custom discount applied to total price
This commit is contained in:
@@ -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 }} %</td>
|
||||
<td class="p-2">{{ discount.label }} {{ discount.percent }} %</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 }} %</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>
|
||||
|
||||
Reference in New Issue
Block a user