{% extends 'frontend.html.twig' %}
{% block content %}
{{ form_start(form) }}
<div class="rts-checkout-section" id="checkout-page">
<div class="container">
<h4 class="section-title mb-5">Vertragsdaten</h4>
<div class="row justify-content-between">
<div class="col-xl-8">
{% include 'frontend/checkout/form__sponsor.html.twig' with {'form': form} %}
</div>
<div class="col-xl-4">
<div class="action-item">
<div class="action-top">
<span class="action-title">{{ 'app.your cart selection'|trans }}</span>
</div>
{% set total = 0 %}
{% for area in areas %}
{% if area.customer.configuration.contributionAllow and area.customer.configuration.contributionActive %}
{% set price = (area.price + area.customer.configuration.contributionPrice) * area.minDuration %}
{% else %}
{% set price = area.price * area.minDuration %}
{% endif %}
{% if area.withinSetupPrice %}
{% set price = price + area.setupPriceUnit %}
{% endif %}
{% set total = total + price %}
<div class="category-item">
<div class="category-item-inner">
<div class="category-title-area">
<span class="category-title">
{{ area.name }}<br>
<small>
{{ area.settings.unitWidth }}x{{ area.settings.unitHeight }} mm<br>
{{ area.minDuration }} {{ 'app.months'|trans }}
{% if area.withinSetupPrice %}<br>inkl. Produktion & Montage {{ area.setupPriceUnit|number_format(2, ',', '.') }} {{ 'app.currency_sign'|trans }}{% endif %}
</small>
</span>
</div>
<div class="price">{{ price|number_format(2, ',', '.') }} {{ 'app.currency_sign'|trans }}</div>
</div>
</div>
{% endfor %}
<div class="action-bottom">
<span class="total">{{ 'app.in total'|trans|capitalize }}</span>
<span class="total-price">{{ total|number_format(2, ',', '.') }} {{ 'app.currency_sign'|trans }}</span>
</div>
</div>
<button type="submit" class="place-order-btn btn-customer">
{{ 'book_now'|trans }}
</button>
</div>
</div>
</div>
</div>
{{ form_end(form) }}
{% endblock %}