{% extends 'AppBundle:Documents:v2\\standard_layout.html.twig' %} {% block header %} {% set editor = '' %} {% if seller is not null %} {% set editor = {'label': 'user.seller.title'|trans({}, 'DocumentTrans'), 'contactLabel': 'contact.title'|trans({}, 'DocumentTrans' )}|merge(seller) %} {% endif %} {% set editor = editor %} {% include 'AppBundle:Documents:v2\\Include\\Global\\header.html.twig' with {'editor': editor} %} {% endblock header %} {% set customerIndividual = false %} {% if customer.discr == constant('AppBundle\\Entity\\Contact\\Contact::CONTACT_DISCR_INDIVIDUAL') %} {% set customerIndividual = true %} {% endif %} {% set class = 'w-50 pad-t-10 pad-b-10 pad-l-25 fw-b' %} {% set classSpecif = 'w-50 pad-t-10 pad-b-10 pad-l-25' %} {% set data = { 'user.seller.title': { 'sellerInfo': { 'last_name': { 'label': 'name', 'value': seller.lastName, 'class': class }, 'first_name': { 'label': 'surname', 'value': seller.firstName, 'class': class }, 'address': { 'label': 'address', 'value': seller is not null ? groupData.addressSellingPoint.address : null, 'class': class }, 'postal_code_city': { 'label': 'postal_code_city', 'value': seller is not null ? groupData.addressSellingPoint.postalCode ~ ' ' ~ groupData.addressSellingPoint.city : null, 'class': class }, 'portable_number': { 'label': 'tel_complet', 'value': seller.phoneNumber, 'class': class } }, 'vehicleFields': { 'brand': { 'label': 'vehicle.brand', 'value': vehicleData.brand, 'class': class }, 'model': { 'label': 'vehicle.model', 'value': vehicleData.model, 'class': class }, 'license_number': { 'label': 'vehicle.license_number_complete_long', 'value': vehicleData.licenseNumber, 'class': class } }, }, 'user.buyer.title': { 'customerInfo': { 'last_name': { 'label': customerIndividual == true ? 'name' : 'social_reason' , 'value': customerIndividual == true ? customer.lastName : customer.corporateNameContact, 'class': class }, 'first_name': { 'label': 'surname', 'value': customer.firstName, 'class': class }, 'address': { 'label': 'address', 'value': customer.address, 'class': class }, 'postal_code_city': { 'label': 'postal_code_city', 'value': customer.postalCode is not null and customer.city is not null ? customer.postalCode ~ ' ' ~ customer.city : null, 'class': class }, 'portable_number': { 'label': 'tel_complet', 'value': customer.cellPhoneNumber, 'class': class } } }, 'engagement': { 'content_1': { 'title': 'delegation.engagement.title'|trans({}, 'DocumentTrans'), 'class': classSpecif } } } %} {% block main_title %}
{{ titleTemplate|upper }}
{% endblock main_title %} {% block content %} {% for key,items in data %}
{% include 'AppBundle:Documents:v2\\Include\\Global\\title_content.html.twig' with {'title' : key|trans({}, 'DocumentTrans' )} %}
{% for k,v in items %} {% set array = {} %} {% for i,j in v %} {% if j.value is not null %} {% if j is iterable %} {% set array = array|merge({0: j.label|trans({}, 'DocumentTrans' ) ~ ' : ' ~ j.value }) %} {% else %} {% set array = {0: v.title|trans({}, 'DocumentTrans' ) ~ ' : ' } %} {% endif %} {% endif %} {% endfor %} {% for i in 0..array|length %} {% set cptFirstTd = i+i %} {% set cptSecondTd = i+i +1 %} {% set classContent = v.class is defined and v.class is not null ? classSpecif : class %} {% if array[cptFirstTd] is defined %} {% endif %} {% if array[cptSecondTd] is defined %} {% endif %}
{{ array[cptFirstTd] }} {{ array[cptSecondTd] }}
{% endfor %} {% endfor %} {% endfor %}

1 . {{ groupData.parentGroup }} {% if groupData.parentGroup is empty %}    {% endif %} {{ 'delegation.engagement.content_1'|trans({}, 'DocumentTrans' ) }} {{ groupData.corporateName }} {{ 'delegation.engagement.content_2'|trans({}, 'DocumentTrans' ) }}
2 . {{ groupData.parentGroup }} {% if groupData.parentGroup is empty %}    {% endif %} {{ 'delegation.engagement.content_1'|trans({}, 'DocumentTrans' ) }} {{ groupData.corporateName }} {{ 'delegation.engagement.content_3'|trans({}, 'DocumentTrans' ) }}
3 . {{ 'delegation.engagement.content_4'|trans({}, 'DocumentTrans' ) }} {{ groupData.parentGroup }} {% if groupData.parentGroup is empty %}    {% endif %} {{ 'delegation.engagement.content_1'|trans({}, 'DocumentTrans' ) }} {{ groupData.corporateName }} {{ 'delegation.engagement.content_5'|trans({}, 'DocumentTrans' ) }} {{ groupData.parentGroup }} {% if groupData.parentGroup is empty %}    {% endif %} {{ 'delegation.engagement.content_1'|trans({}, 'DocumentTrans' ) }} {{ groupData.corporateName }} {{ 'delegation.engagement.content_6'|trans({}, 'DocumentTrans' ) }}

{% endblock content %} {% block signature %}
{% include "AppBundle:Documents:v2\\Include\\Administrative\\simple_signature.html.twig" with { 'signatureDate' : 'now'|date('d/m/Y'), 'titleBlock': true } %}
{% endblock signature %} {% block footer %} {% endblock footer %}