{% set hasDistributionDate = vehicle.dateOfDistribution is not empty ? true : false %} {% set hasPurchaseDate = vehicle.purchase.purchaseDate is not empty ? true : false %} {% set hasCertificationActualCertificateDate = vehicle.certification.dateCertificationActualCertificate is not empty ? true : false %} {% set hasCertificationSaleDate = vehicle.certification.saleDate is not empty ? true : false %}
{% if vehicle.licenseNumber is not empty %} {{ vehicle.licenseNumber[:9] }} {% endif %}
{% if vinList is not null %} {% set u = vinList|length %} {% for i in 0..u %}
{{ vinList[i] }}
{% endfor %} {% endif %}
{% if hasDistributionDate == true %} {{ vehicle.dateOfDistribution|localizeddate('none', 'none', null, timezone, 'dd') }} {% endif %}
{% if hasDistributionDate == true %} {{ vehicle.dateOfDistribution|localizeddate('none', 'none', null, timezone, 'MM') }} {% endif %}
{% if hasDistributionDate == true %} {{ vehicle.dateOfDistribution|localizeddate('none', 'none', null, timezone, 'y') }} {% endif %}
{% if vehicle.brand is not empty %} {{ vehicle.brand }}{% endif %}
{% if vehicle.certification.type is not empty %} {{ vehicle.certification.type }} {% endif %}
{% if vehicle.gender is not empty %} {{ vehicle.gender }} {% endif %}
{% if vehicle.certification is defined and vehicle.certification.commercialName is not empty %} {{ vehicle.certification.commercialName }} {% endif %}
{% if vehicle.distanceTraveled is not empty %} {{ vehicle.distanceTraveled[:6] }} {% endif %}
{% if vehicle.certification.hasRegistrationCertificate == true and vehicle.certification.certificationNumber is not empty %} {{ vehicle.certification.certificationNumber[0:11] }} {% endif %}
{% if hasCertificationActualCertificateDate == true %} {{vehicle.certification.dateCertificationActualCertificate|localizeddate('none', 'none', null, timezone, 'dd')}} {% endif %}
{% if hasCertificationActualCertificateDate == true %} {{ vehicle.certification.dateCertificationActualCertificate|localizeddate('none', 'none', null, timezone, 'MM') }} {% endif %}
{% if hasCertificationActualCertificateDate == true %} {{ vehicle.certification.dateCertificationActualCertificate|localizeddate('none', 'none', null, timezone, 'y') }} {% endif %}
{% if C4 is defined and C4 == true %} {% set isPhysicalPerson = false %} {% set supplier = vehicle.purchase.newSupplier.contact %} {% set supplierAddress = vehicle.purchase.newSupplier.addressHistory %} {% if supplier|instanceof('AppBundle\\Entity\\Contact\\ContactIndividual') %} {% set isPhysicalPerson = true %} {% endif %} {% if isPhysicalPerson %}
{% else %}
{% endif %}
{% if supplier|instanceof('AppBundle\\Entity\\Contact\\ContactIndividual') %} {% if supplier.driver.birthName is defined and supplier.driver.birthName is not empty %} {{ supplier.driver.birthName }}, {% endif %} {% if supplier.lastname is defined %} {{ supplier.lastname }} {% endif %} {% if supplier.firstname is defined %} {{ supplier.firstname }} {% endif %} {% else %} {% if supplier.corporateNameContact is defined %} {{ supplier.corporateNameContact }} {% endif %} {% endif %}
{{ supplier.siret[:4] }}
{{ supplier.siret[4:6] }}
{{ supplier.siret[10:14] }}
{{ supplierAddress.address }}
{{ supplierAddress.postalCode|replace({' ': ''}) }}
{{ supplierAddress.city }}
{% if hasPurchaseDate == true %} {{vehicle.purchase.purchaseDate|localizeddate('none', 'none', null, timezone, 'dd')}} {% endif %}
{% if hasPurchaseDate == true %} {{vehicle.purchase.purchaseDate|localizeddate('none', 'none', null, timezone, 'MM')}} {% endif %}
{% if hasPurchaseDate == true %} {{vehicle.purchase.purchaseDate|localizeddate('none', 'none', null, timezone, 'y')}} {% endif %}
{% if hasPurchaseDate == true %} {{vehicle.purchase.purchaseDate|localizeddate('none', 'none', null, timezone, 'HH')}} {% endif %}
{% if hasPurchaseDate == true %} {{vehicle.purchase.purchaseDate|localizeddate('none', 'none', null, timezone, 'mm')}} {% endif %}
{{ certificationPlace }}
{% if certificationDate %} {{ certificationDate|localizeddate('none', 'none', null, timezone, 'dd/MM/yyyy') }} {% else %} {% endif %}
{% if vehicle.purchase.isDepositSale == false and group.idGroupParameter.stamp is not empty and vehicle.certification.isBetweenIndividuals == false %} {% 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 %}
{#
#} {#
#} {#
#}
{% if group.corporateName is not empty %} {{ group.corporateName }} {% endif %}
{% if group.siretNumber is not empty %}
{{ group.siretNumber[:4] }}
{{ group.siretNumber[4:6] }}
{{ group.siretNumber[10:14] }}
{% endif %} {#
{% if showBirthInfo %}{{ owner.driver.birthDate|localizeddate('none', 'none', null, timezone, 'dd') }}{% endif %}
#} {#
{% if showBirthInfo %}{{ owner.driver.birthDate|localizeddate('none', 'none', null, timezone, 'MM') }}{% endif %}
#} {#
{% if showBirthInfo %}{{ owner.driver.birthDate|localizeddate('none', 'none', null, timezone, 'y')}}{% endif %}
#}
{% if isPhysicalPerson and owner.driver.birthPlace is not empty %} {{ owner.driver.birthPlace }} {% endif %}
{{ group.addressSellingPoint.address }}
{{ group.addressSellingPoint.postalCode|replace({' ': ''}) }}
{{ group.addressSellingPoint.city }}
{{ certificationPlace }}
{% if certificationDate %} {{ certificationDate|localizeddate('none', 'none', null, timezone, 'dd/MM/yyyy') }} {% else %} {% endif %}
{% else %} {% if isOldOwnerPhysic == true or (supplier.isOldOwnerPhysic is not empty and supplier.isOldOwnerPhysic == true) %}
{% else %}
{% endif %}
{{ supplier.contactName }}
{{ supplier.siretNumber[:4] }}
{{ supplier.siretNumber[4:6] }}
{{ supplier.siretNumber[10:14] }}
{{ supplier.address }}
{{ supplier.postalCode }}
{{ supplier.city }}
{% if hasCertificationSaleDate == true %} {{ vehicle.certification.saleDate|localizeddate('none', 'none', null, timezone, 'dd')}} {% endif %}
{% if hasCertificationSaleDate == true %} {{ vehicle.certification.saleDate|localizeddate('none', 'none', null, timezone, 'MM')}} {% endif %}
{% if hasCertificationSaleDate == true %} {{ vehicle.certification.saleDate|localizeddate('none', 'none', null, timezone, 'y')}} {% endif %}
{% if hasCertificationSaleDate == true %} {{ vehicle.certification.saleDate|localizeddate('none', 'none', null, timezone, 'HH')}} {% endif %}
{% if hasCertificationSaleDate == true %} {{ vehicle.certification.saleDate|localizeddate('none', 'none', null, timezone, 'mm')}} {% endif %}
{{ certificationPlace }}
{% if certificationDate %} {{ certificationDate|localizeddate('none', 'none', null, timezone, 'dd/MM/yyyy') }} {% else %} {% endif %}
{% if vehicle.purchase.isDepositSale == false and group.idGroupParameter.stamp is not empty and vehicle.certification.isBetweenIndividuals == false %} {% set image = group.idGroupParameter.stamp %} {% 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 %}
{% set isPhysicalPerson = false %} {% set owner = vehicle.certification.newOwner.contact %} {% set ownerAddress = vehicle.certification.newOwner.addressHistory %} {% if owner|instanceof('AppBundle\\Entity\\Contact\\ContactIndividual') %} {% set isPhysicalPerson = true %} {% endif %}
{% if owner|instanceof('AppBundle\\Entity\\Contact\\ContactIndividual') %} {% if owner.driver.birthName is defined and owner.driver.birthName is not empty %} {{ owner.driver.birthName }}, {% endif %} {% if owner.lastname is defined %} {{ owner.lastname }} {% endif %} {% if owner.firstname is defined %} {{ owner.firstname }} {% endif %} {% if vehicle.certification.coholderQuick is not empty %} {% set coHolderQuick = vehicle.certification.coholderQuick %} {% if coHolderQuick.lastname is defined or coHolderQuick.corporateNameContact is defined %} ET {% endif %} {% if coHolderQuick|instanceof('AppBundle\\Entity\\Contact\\ContactQuick\\ContactQuickIndividual') %} {% if coHolderQuick.lastname is defined %} {{ coHolderQuick.lastname }} {% endif %} {% if coHolderQuick.firstname is defined %} {{ coHolderQuick.firstname }} {% endif %} {% else %} {% if coHolderQuick.corporateNameContact is defined %} {{ coHolderQuick.corporateNameContact }} {% endif %} {% endif %} {% else %} {% set coHolder = vehicle.certification.newCoHolder.contact %} {% if coHolder.lastname is defined or coHolder.corporateNameContact is defined %} ET {% endif %} {% if coHolder|instanceof('AppBundle\\Entity\\Contact\\ContactIndividual') %} {% if coHolder.driver.birthName is defined and coHolder.driver.birthName is not empty %}{{ coHolder.driver.birthName }}{% else %}{% if coHolder.lastname is defined %}{{ coHolder.lastname }}{% endif %}{% endif %} {% if coHolder.firstname is defined %}{{ coHolder.firstname }}{% endif %} {% else %} {% if coHolder.corporateNameContact is defined %} {{ coHolder.corporateNameContact }} {% endif %} {% endif %} {% endif %} {% else %} {% if owner.corporateNameContact is defined %} {{ owner.corporateNameContact }} {% endif %} {% endif %}
{% if owner is not empty and (not owner|instanceof('AppBundle\\Entity\\Contact\\ContactIndividual')) and owner.siret is not empty %} {{ owner.siret[:4] }} {% endif %}
{% if owner is not empty and (not owner|instanceof('AppBundle\\Entity\\Contact\\ContactIndividual')) and owner.siret is not empty %} {{ owner.siret[4:6] }} {% endif %}
{% if owner is not empty and (not owner|instanceof('AppBundle\\Entity\\Contact\\ContactIndividual')) and owner.siret is not empty %} {{ owner.siret[10:14] }} {% endif %}
{% set showBirthInfo = false %} {% if isPhysicalPerson and owner.driver.birthDate is not empty %} {% set showBirthInfo = true %} {% endif %}
{% if showBirthInfo %} {{ owner.driver.birthDate|localizeddate('none', 'none', null, timezone, 'dd') }} {% endif %}
{% if showBirthInfo %} {{ owner.driver.birthDate|localizeddate('none', 'none', null, timezone, 'MM') }} {% endif %}
{% if showBirthInfo %} {{ owner.driver.birthDate|localizeddate('none', 'none', null, timezone, 'y')}} {% endif %}
{% if isPhysicalPerson and owner.driver.birthPlace is not empty %} {{ owner.driver.birthPlace }} {% endif %}
{% if owner is not empty and ownerAddress is not empty %} {{ ownerAddress.address }} {% endif %}
{% if owner is not empty and ownerAddress.postalCode is not empty %} {{ ownerAddress.postalCode|replace({' ': ''}) }} {% endif %}
{% if owner is not empty and ownerAddress.city is not empty %} {{ ownerAddress.city }} {% endif %}
{{ certificationPlace }}
{% if certificationDate %} {{ certificationDate|localizeddate('none', 'none', null, timezone, 'dd/MM/yyyy') }} {% else %} {% endif %}
{% endif %}