{% spaceless %}
{% if total is not defined %}
{% set total = 0 %}
{% endif %}
{% if priceSubTotal is not defined %}
{% set priceSubTotal = total %}
{% endif %}
{% if vatPercentTotal is not defined %}
{% set vatPercentTotal = 0 %}
{% endif %}
{% if vatPercent is not defined %}
{% set vatPercent = 0 %}
{% endif %}
{% if priceTotal is not defined %}
{% set priceTotal = 0 %}
{% endif %}
{% if surcharges is defined %}
{% if surcharges is not empty %}
{% for sr in surcharges %}
{% set priceSubTotal = priceSubTotal + sr.total %}
{% endfor %}
{% endif %}
{% endif %}
{% if wicamheader is defined %}
{% set deliveryCost = wicamheader.deliveryCost %}
{% endif %}
{% if deliveryCost is defined %}
{% set priceSubTotal = priceSubTotal + deliveryCost %}
{% endif %}
{% set minimun_vl = 0.0 %}
{% if wicamheader is defined %}
{% if wicamheader.CountActiveWicamFiles > 0 %}
{% if minimun is defined %}
{% if priceSubTotal < minimun %}
{% set minimun_vl = minimun - priceSubTotal %}
{% set priceSubTotal = minimun %}
{% endif %}
{% endif %}
{% endif %}
{% endif %}
{% set vatPercentTotal = priceSubTotal * (vatPercent/100) %}
{% set priceTotal = priceSubTotal + vatPercentTotal %}
{% if newTotal is not defined %}
{% set newTotal = false %}
{% endif %}
{% if purchaseLimit is not defined %}
{% set purchaseLimit = false %}
{% endif %}
{% endspaceless %}
<div class="buybox">
<div class="buybox-header">
<div class="grid-x row">
<div class="cell auto font-bold-title">
{{ "Gesamtsumme" | trans }}
</div>
<div class="cell auto price-total text-right" id="main_price_total">
{{ priceTotal|price(2, ',', '.', true)|raw }}
</div>
</div>
</div>
<div class="buybox-body">
{% if wicamheader is defined %}
<div class="grid-x row">
<div class="cell auto">
{{ "MwSt." | trans }} {{ vatPercent }}%
</div>
<div class="cell auto text-right">
<div class="total-price-value font-bold">
{{ vatPercentTotal|price|raw(2, ',', '.', true) }}
</div>
</div>
</div>
{% endif %}
<div class="grid-x row">
<div class="cell auto">
{{"Netto gesamt" | trans}}
</div>
<div class="cell auto text-right">
<div class="total-price-value font-bold">
{{ priceSubTotal|price|raw(2, ',', '.', true) }}
</div>
</div>
</div>
{% if wicamheader is defined %}
{% if wicamheader.CountActiveWicamFiles > 0 %}
{% if surcharges is defined %}
{% if surcharges is not empty %}
{% for sr in surcharges %}
<div class="grid-x row">
<div class="cell auto">
{{ sr.surcharge.descriptions[app.request.locale]|default("")| trans}}
</div>
<div class="cell auto text-right">
<div class="total-price-value font-bold">
{{ sr.total|price|raw(2, ',', '.', true) }}
</div>
</div>
</div>
{% endfor %}
{% endif %}
{% endif %}
{% if deliveryCost is defined %}
<div class="grid-x row">
<div class="cell auto">
{{"Lieferkosten" | trans}}
</div>
<div class="cell auto text-right">
<div class="delivery-cost-value font-bold">
{{ deliveryCost|price|raw(2, ',', '.', true) }}
</div>
</div>
</div>
{% endif %}
<div class="grid-x row">
<div class="cell auto">
{{"Nettowarenwert" | trans}}
</div>
<div class="cell auto text-right">
<div class="total-price-value font-bold">
{{ total|price|raw(2, ',', '.', true) }}
</div>
</div>
</div>
{% if minimun_vl > 0.0 %}
<div class="grid-x row">
<div class="cell auto">
{{"Preisdifferenz bis zum Mindestbestellwert" | trans}}
</div>
<div class="cell auto text-right">
<div class="delivery-cost-value font-bold">
{{ minimun_vl|price|raw(2, ',', '.', true) }}
</div>
</div>
</div>
{% endif %}
{% endif %}
{% endif %}
{% if wicamheader is defined %}
{% if wicamheader.plz is empty and wicamheader.CountActiveWicamFiles > 0 %}
<span class="label alert plz-required-message" style="white-space: break-spaces;">
{{ "Der angezeigte Gesamtpreis enthält keine Lieferkosten. Bitte geben Sie Ihre Postleitzahl an."|trans }}
</span>
{% endif %}
{% endif %}
{% if newTotal is defined and purchaseLimit is defined%}
{% if newTotal and purchaseLimit %}
<span class="label alert" style="white-space: break-spaces;">{{ "Ihr Bestell-Limit wurde überschritten. Ihre Bestellung muss zunächst von Ihrem Vertreter freigegeben werden. Ihr Angebot wurde aktualisiert."|trans }}</span>
{% endif %}
{% endif %}
</div>
</div>