
{{ group.corporateName }}
{{ group.phoneNumber }}
{{ group.email }}
{{ group.vatNumber }}
{{ group.addressSellingPoint.address }}
{{ group.addressSellingPoint.address2 }}
{{ group.addressSellingPoint.postalCode }}
{{ group.addressSellingPoint.city }}
{% if vehicle.purchase.newSupplier is defined and vehicle.purchase.newSupplier is not empty %}
{% set supplier = vehicle.purchase.newSupplier %}
{% if supplier.contact is defined and supplier.contact is not empty %}
{% set customer = supplier.contact %}
{% if customer|instanceof('AppBundle\\Entity\\Contact\\ContactIndividual') %}
{% if (customer.lastname is defined and customer.lastname is not empty) or (customer.firstname is defined and customer.firstname is not empty) %}
{% if customer.lastname is defined and customer.lastname is not empty %}
{{ customer.lastname }}
{% endif %}
{% if customer.firstname is defined and customer.firstname is not empty %}
{{ customer.firstname }}
{% endif %}
{% endif %}
{% else %}
{% if customer.corporateNameContact is defined and customer.corporateNameContact is not empty %}
{{ customer.corporateNameContact }}
{% endif %}
{% endif %}
{% if customer|instanceof('AppBundle\\Entity\\Contact\\ContactProfessional') or customer|instanceof('AppBundle\\Entity\\Contact\\ContactGroup') %}
{% if customer.tvaIntracom is not empty %}
{{ customer.tvaIntracom }}
{% endif %}
{% endif %}
{% if customer.email is not empty %}
{{ customer.email }}
{% endif %}
{% if customer.cellPhoneNumber is not empty %}
{{ customer.cellPhoneNumber }}
{% elseif customer.cellPhoneNumber is empty and customer.phoneNumber is not empty %}
{{ customer.phoneNumber }}
{% endif %}
{% if supplier.addressHistory is defined and supplier.addressHistory is not empty %}
{% set address = supplier.addressHistory %}
{{ address.country }}
{{ address.address }}
{{ address.address2 }}
{{ address.postalCode }}
{{ address.city }}
{% endif %}
{% endif %}
{% endif %}

{{ vehicle.brand }}
{{ vehicle.certification.commercialName }}
{{ vehicle.distanceTraveled }}
{{ vehicle.licenseNumber }}
{{ vehicle.vin }}
{% if vehicle.dateOfDistribution is not null %}
{{ vehicle.dateOfDistribution|date('d/m/Y') }}
{% endif %}
{% if vehicle.follow.entryFleetDate is not null %}
{{ vehicle.follow.entryFleetDate|date('d/m/Y') }}
{% endif %}
{% if vehicle.dateOfDistribution is not empty and vehicle.follow.entryFleetDate is not empty %}
{% set diff = date(vehicle.dateOfDistribution).diff(date(vehicle.follow.entryFleetDate)) %}
{{ diff.days }}
{% endif %}
{% if vehicle.purchase.price is not empty %}
{{ vehicle.purchase.price|number_format(2, ',', ' ') }} {{ currencySymbol }}
{% endif %}
{% if vehicle.purchase.priceTtc is not empty %}
{{ vehicle.purchase.priceTtc|number_format(2, ',', ' ') }} {{ currencySymbol }}
{% endif %}
{% if vehicle.purchase.priceTtc > vehicle.purchase.price %}
{{ vehicle.purchase.priceTtc - vehicle.purchase.price }}
{% endif %}
{% set date = "now"|date %}
{% set previouslyMonth = date|date_modify('-1 month') %}
{{ previouslyMonth|date('d/m/Y') }}
{% set certificationDate = null %}
{% if vehicle.certification.isDateNow is defined %}
{% set certificationDate = date|date() %}
{% if vehicle.certification.isDateNow == false %}
{% set certificationDate = vehicle.certification.certificationDate %}
{% endif %}
{% endif %}
{{ certificationDate|localizeddate('none', 'none', null, timezone, 'dd/MM/YYYY') }}
{{ user.lastName }} {{ user.firstName }}
{% if group.idGroupParameter.stamp is not empty %}
{% include 'AppBundle:Documents:v2\\Include\\Global\\image.html.twig' with {
'image': group.idGroupParameter.stamp,
'imgWidth': 550,
'imgHeight': 200,
'containerImgWidth': 550,
'containerImgHeight': 200,
'fill': false
} %}
{% endif %}
