{% set taxValue = 0 %} {% set isVehicleCreditNote = object|instanceof('AppBundle\\Entity\\Administrative\\Invoice\\CreditNote\\InvoiceCreditNoteVehicle') or object|instanceof('AppBundle\\Entity\\Administrative\\Invoice\\CreditNote\\InvoiceCreditNoteVehicleBundle') %} {% set displayCreditNotePartialDatas = object.getCreditNoteType() == constant('AppBundle\\Entity\\Administrative\\Invoice\\CreditNote\\InvoiceCreditNoteBase::CREDIT_NOTE_TYPE_PARTIAL') and object.hasService is defined and object.hasService == false %} {% set displayRentalDatas = displayCreditNotePartialDatas == false and rentalData is not empty %} {% set discountValue = 0 %} {% set priceWithoutTax = 0 %} {% set priceWithoutTaxWithDiscount = 0 %} {% set priceWithTax = 0 %} {% set displayDiscount = serviceListData.articleServiceListHasDiscount == true or vehicleSellingData.hasDiscount == true %} {% set displayLicenseNumber = displayLicenseNumber is defined ? displayLicenseNumber : true %} {% set displayTaxHorsepower = displayTaxHorsepower is defined ? displayTaxHorsepower : true %} {% set displayExtraUrbanKmConsumption = displayExtraUrbanKmConsumption is defined ? displayExtraUrbanKmConsumption : true %} {# SERVICE DATA #} {% if serviceListData is not empty %} {% set discountValue = discountValue + serviceListData.discountValue %} {% set priceWithoutTax = priceWithoutTax + serviceListData.priceWithoutTax %} {% set priceWithoutTaxWithDiscount = priceWithoutTaxWithDiscount + serviceListData.priceWithoutTaxWithDiscount %} {% set priceWithTax = priceWithTax + serviceListData.priceWithTax %} {% endif %} {# VEHICLE DATA #} {% if vehicleSellingData is not empty %} {% set discountValue = discountValue + vehicleSellingData.discountValue %} {% set priceWithoutTax = priceWithoutTax + vehicleSellingData.priceWithoutTax %} {% set priceWithoutTaxWithDiscount = priceWithoutTaxWithDiscount + vehicleSellingData.priceWithoutTaxWithDiscount %} {% set priceWithTax = priceWithTax + vehicleSellingData.priceWithTax %} {% endif %} {# PART EXCHANGE DATA #} {% if vehiclePartExchangeData is not empty %} {% set priceWithoutTax = priceWithoutTax - vehiclePartExchangeData.priceWithoutTax %} {% set priceWithoutTaxWithDiscount = priceWithoutTaxWithDiscount - vehiclePartExchangeData.priceWithoutTax %} {% set priceWithTax = priceWithTax - vehiclePartExchangeData.priceWithTax %} {% endif %} {# RENTAL DATA #} {% if rentalData is not empty %} {% set rentalPricing = rentalData.rentalPricing %} {% set rentalInsurance = rentalData.rentalInsurance %} {% set priceWithoutTax = priceWithoutTax + rentalData.priceWithoutTax + rentalInsurance.assistancePriceWithoutTax + rentalPricing.totalPriceExtraKmWithoutTax + rentalPricing.totalPriceExtraLiterWithoutTax %} {% set priceWithTax = priceWithTax + rentalData.priceWithTax + rentalInsurance.assistancePriceWithTax + rentalPricing.totalPriceExtraKmWithTax + rentalPricing.totalPriceExtraLiterWithTax %} {% set priceWithoutTaxWithDiscount = priceWithoutTax - discountValue %} {% endif %} {# CREDIT NOTE DATA #} {% if displayCreditNotePartialDatas == true %} {% set priceWithTax = creditNotePartialData.sellPriceWithTax %} {% set priceWithoutTax = creditNotePartialData.sellPriceWithoutTax %} {% set priceWithoutTaxWithDiscount = creditNotePartialData.sellPriceWithoutTax %} {% endif %} {% set taxValue = priceWithTax - priceWithoutTaxWithDiscount %} {% if hasTableParentTitle is not defined and displaySpecialTitle is not defined %}
{{ 'service.benefits'|trans({}, 'DocumentTrans' )}}
{% elseif displaySpecialTitle is defined %}
{{ 'service.special_title'|trans({}, 'DocumentTrans' )}}
{% endif %} {% set displayTaxMention = {} %} {% set widthColumn = 120 %} {% if displayDiscount == true %} {% set widthColumn = 100 %} {% endif %} {% if displayDiscount == true %} {% endif %} {% if notShowColumnTaxAndTotalWithTax == false %} {% endif %} {# CASE 1 #} {% set isFirstCase = true %} {% if object.type != constant('AppBundle\\Entity\\Administrative\\Invoice\\InvoiceBase::INVOICE_TYPE_REPAIR_ORDER') %} {% for sellingVehData in vehicleSellingData.items if vehicleSellingData.items is not empty %} {% if displayDiscount == true %} {% endif %} {% if notShowColumnTaxAndTotalWithTax == false %} {% endif %} {% if vehiclePartExchangeData is not empty and vehiclePartExchangeData.vehicleData is not empty %} {% set partExchangeUnitPriceWithoutTax = - vehiclePartExchangeData.priceWithoutTax %} {% set partExchangeSellPriceWithoutTax = - vehiclePartExchangeData.priceWithoutTax %} {% set partExchangeSellPriceWithTax = - vehiclePartExchangeData.priceWithTax %} {% if displayDiscount == true %} {% endif %} {% if notShowColumnTaxAndTotalWithTax == false %} {% endif %} {% endif %} {% set isFirstCase = false %} {% endfor %} {% endif %} {# CASE 2 : Partial credit_note #} {% if displayCreditNotePartialDatas == true %} {% if displayDiscount == true %} {% endif %} {% if notShowColumnTaxAndTotalWithTax == false %} {% endif %} {% set isFirstCase = false %} {% endif %} {# CASE 3 : Rental proposition / Rental invoice / Rental credit_note #} {% if displayRentalDatas == true and rentalData.duration > 0 %} {% if displayDiscount == true %} {% endif %} {% if notShowColumnTaxAndTotalWithTax == false %} {% endif %} {% if rentalInsurance is not empty %} {% if displayDiscount == true %} {% endif %} {% if notShowColumnTaxAndTotalWithTax == false %} {% endif %} {% endif %} {% if rentalPricing.isIncludedKm == false and rentalPricing.quantityKm != 0 %} {% if displayDiscount == true %} {% endif %} {% if notShowColumnTaxAndTotalWithTax == false %} {% endif %} {% endif %} {% if rentalPricing.isIncludedFuel == false and rentalPricing.quantityLiter != 0 %} {% if displayDiscount == true %} {% endif %} {% if notShowColumnTaxAndTotalWithTax == false %} {% endif %} {% endif %} {% set isFirstCase = false %} {% endif %} {# CASE 4 #} {% set totalArticlePrice = 0 %} {% for articleServices in serviceListData.items if serviceListData.items is not empty %} {% set totalArticlePrice = totalArticlePrice + articleServices.sellPriceWithTax %} {% if displayDiscount == true %} {% endif %} {% if notShowColumnTaxAndTotalWithTax == false %} {% endif %} {% if articleServices.serviceArticleSellingList is not empty %} {% for serviceArticleFromFlate in articleServices.serviceArticleSellingList %} {% if serviceArticleFromFlate.serviceArticleName is not empty %} {% if displayDiscount == true %} {% endif %} {% if notShowColumnTaxAndTotalWithTax == false %} {% endif %} {% endif %} {% endfor %} {% endif %} {% endfor %} {% set totalColspan = 7 %} {% if displayDiscount == true %} {% set totalColspan = totalColspan + 2 %} {% endif %} {% if notShowColumnTaxAndTotalWithTax == false %} {% set totalColspan = totalColspan + 1 %} {% endif %} {% if displayDiscount == true %} {% endif %} {% if notShowColumnTaxAndTotalWithTax == false %} {% endif %}
{{ 'service.reference'|trans({}, 'DocumentTrans' )}} {{ 'service.name'|trans({}, 'DocumentTrans' )}} {{ 'administrative.quantity'|trans({}, 'DocumentTrans' )}} {{ 'administrative.unit_price'|trans({}, 'DocumentTrans' )}} {{ 'administrative.total.price_without_tax'|trans({}, 'DocumentTrans' )}} {{ 'administrative.price_without_tax_discount'|trans({}, 'DocumentTrans' )}} {{ 'administrative.total.price_without_tax_discount'|trans({}, 'DocumentTrans' )}} {{ 'administrative.tax'|trans({}, 'DocumentTrans' )}} {{ 'administrative.total.price_with_tax'|trans({}, 'DocumentTrans' )}}
{{ sellingVehData.vehicleData.voVnType }} {% set vehicleSellingType %} {% if sellingVehData.vehicleData.voVnType == "VN" %} {{ 'vehicle.selling.new'|trans({}, 'DocumentTrans' )}} {% else %} {% if isClassicAutostore is defined and isClassicAutostore == true %} {{ 'vehicle.selling.old'|trans({}, 'DocumentTrans' )}} {% else %} {{ 'vehicle.selling.used'|trans({}, 'DocumentTrans' )}} {% endif %} {% endif %} {% endset %} {{ 'vehicle.selling.title'|trans({ '%type%' : vehicleSellingType }, 'DocumentTrans' )}} {% if sellingVehData.vehicleData.internalReference is not empty %}  [ {{ sellingVehData.vehicleData.internalReference }} ] {% endif %} {# B2 specific condition #} {% if object|instanceof('AppBundle\\Entity\\Administrative\\Invoice\\Selling\\Vehicle\\InvoiceSellingVehicleBase') or documentType == 'B2' or isVehicleCreditNote %}
{% if vehicleData.vo is not empty %} {{ 'vehicle.vo'|trans({}, 'DocumentTrans' )}} : {{ vehicleData.vo }}
{% endif %} {{ 'vehicle.brand'|trans({}, 'DocumentTrans' )}} : {% if vehicleData.brand is not empty %} {{ vehicleData.brand }} {% endif %}
{{ 'vehicle.model'|trans({}, 'DocumentTrans' )}} : {% if vehicleData.model is not empty %} {{ vehicleData.model }} {% endif %}
{{ 'vehicle.version'|trans({}, 'DocumentTrans' )}} : {% if vehicleData.version is not empty %} {{ vehicleData.version }} {% endif %}
{% if vehicleData.dateOfDistribution is not empty %} {{ 'vehicle.date_of_distribution_complete'|trans({}, 'DocumentTrans' )}} : {{ vehicleData.dateOfDistribution|date('d/m/y') }}
{% endif %} {{ 'vehicle.serial_number'|trans({}, 'DocumentTrans' )}} : {% if vehicleData.vin is not empty %} {{ vehicleData.vin }} {% endif %}
{% if vehicleData.licenseNumber is not empty and displayLicenseNumber == true %} {{ 'vehicle.license_number_complete'|trans({}, 'DocumentTrans' )}} : {{ vehicleData.licenseNumber }}
{% endif %} {{ 'vehicle.mileage_complete'|trans({}, 'DocumentTrans' )}} : {% if vehicleData.distanceTraveled is not empty %} {{ vehicleData.distanceTraveled }} {{ 'vehicle.mileage'|trans({}, 'DocumentTrans' )}} {% endif %} {% if vehicleData.distanceTraveledWarranty is not empty and vehicleData.distanceTraveledWarranty == true %} {{ 'vehicle.warranty.yes'|trans({}, 'DocumentTrans' )}} {% else %} {{ 'vehicle.warranty.no'|trans({}, 'DocumentTrans' )}} {% endif %}
{% if vehicleData.energy is not empty %} {{ 'vehicle.energy'|trans({}, 'DocumentTrans' )}} : {{ vehicleData.energy }}
{% endif %} {% if vehicleData.taxHorsepower is not empty and displayTaxHorsepower == true %} {{ 'vehicle.tax_horsepower'|trans({}, 'DocumentTrans' )}} : {{ vehicleData.taxHorsepower }} {{ 'vehicle.tax_horsepower_suffix'|trans({}, 'DocumentTrans' )}}
{% endif %} {% if vehicleData.horsepower is not empty %} {{ 'vehicle.horsepower'|trans({}, 'DocumentTrans' )}} : {{ vehicleData.horsepower }} {{ 'vehicle.horsepower_suffix'|trans({}, 'DocumentTrans' )}}
{% endif %} {{ 'vehicle.color'|trans({}, 'DocumentTrans' )}} : {% if vehicleData.color is not empty %} {{ vehicleData.color }} {% endif %}
{% if vehicleData.extraUrbanKmConsumption is not empty and displayExtraUrbanKmConsumption == true %} {{ 'vehicle.extra_urban_km_consumption_rate'|trans({}, 'DocumentTrans' )}} : {{ vehicleData.extraUrbanKmConsumption }}
{% endif %} {% if displayRadioCode is defined and displayRadioCode == true and vehicleData.radioCode is not empty %} {{ 'vehicle.radio_code'|trans({}, 'DocumentTrans' )}} : {{ vehicleData.radioCode }}
{% endif %} {% if vehicleData.warrantyType is not empty %} {% if (showWarranty is not defined) or (showWarranty is defined and showWarranty == true) %} {{ 'vehicle.warranty.type.title'|trans({}, 'DocumentTrans' )}} : {% if vehicleData.warrantyType == 'vehicle.warranty.type.with' %} {{ vehicleData.warrantyLabel }} {% elseif vehicleData.warrantyType == 'vehicle.warranty.type.manufacturer' %} {{ 'vehicle.warranty.type.manufacturer'|trans({}, 'DocumentTrans' )}} {% elseif vehicleData.warrantyType == 'vehicle.warranty.type.without' %} {{ 'vehicle.warranty.type.without'|trans({}, 'DocumentTrans' )}} {% endif %}
{% if vehicleData.warrantyOrganization is not empty and vehicleData.warrantyType == 'vehicle.warranty.type.with' %} {{ 'vehicle.warranty.organization.title'|trans({}, 'DocumentTrans' )}} : {{ vehicleData.warrantyOrganization }} {% endif %}
{% if vehicleData.warrantyDuration is not empty and (vehicleData.warrantyType == 'vehicle.warranty.type.with' or vehicleData.warrantyType == 'vehicle.warranty.type.manufacturer') %} {{ 'vehicle.warranty.duration.title'|trans({}, 'DocumentTrans' )}} : {{ vehicleData.warrantyDuration }} {{ 'vehicle.warranty.duration.suffix'|trans({}, 'DocumentTrans' )}}
{% endif %} {% if vehicleData.warrantyEndDate is not empty %} {{ 'vehicle.warranty.end_date.title'|trans({}, 'DocumentTrans' )}} : {% if vehicleData.warrantyType == 'vehicle.warranty.type.with' %} {{ vehicleData.warrantyEndDate|date("d/m/y") }} {% elseif vehicleData.warrantyType == 'vehicle.warranty.type.manufacturer' %} {{ vehicleData.warrantyEndDate|date("d/m/y") }} {% endif %}
{% endif %} {% if vehicleData.warrantyKilometric is not empty and (vehicleData.warrantyType == 'vehicle.warranty.type.with' or vehicleData.warrantyType == 'vehicle.warranty.type.manufacturer') %} {{ 'vehicle.warranty.mileage.include'|trans({}, 'DocumentTrans' )}} : {{ vehicleData.warrantyKilometric }} {{ 'vehicle.warranty.mileage.suffix'|trans({}, 'DocumentTrans' )}} {% if notDisplayKilometricFinal is not defined or (notDisplayKilometricFinal is defined and notDisplayKilometricFinal == false) %}
{{ 'vehicle.warranty.mileage.complete'|trans({}, 'DocumentTrans' )}} : {% set kilometricFinal = vehicleData.distanceTraveled + vehicleData.warrantyKilometric %} {{ kilometricFinal }} {{ 'vehicle.warranty.mileage.suffix'|trans({}, 'DocumentTrans' )}} {% endif %} {% endif %} {% endif %} {% endif %} {% endif %}
1 {{ sellingVehData.sellPriceWithoutTaxWithoutDiscount|number_format(2, ',', ' ') }} {{ currencySymbol }} {{ sellingVehData.sellPriceWithoutTaxWithoutDiscount|number_format(2, ',', ' ') }} {{ currencySymbol }} {% if isVehicleCreditNote == false %} - {% endif %} {{ sellingVehData.priceDiscount|number_format(2, ',', ' ') }} {{ currencySymbol }} {% if displayPercent is defined and displayPercent == true %} ({{ sellingVehData.pourcentageDiscount|number_format(2, ',', ' ') }} %) {% endif %} {{ sellingVehData.sellPriceWithoutTax|number_format(2, ',', ' ') }} {{ currencySymbol }} {{ sellingVehData.taxName|trans({}, 'DocumentTrans') }} {% if sellingVehData.sellPriceWithTax is not empty %} {{ sellingVehData.sellPriceWithTax|number_format(2, ',', ' ') }} {{ currencySymbol }} {% endif %}
{% if vehiclePartExchangeData.vehicleData.voVnType is not empty %} {{ vehiclePartExchangeData.vehicleData.voVnType }} {% endif %} {{ 'vehicle.part_exchange.title'|trans({}, 'DocumentTrans') }} {% if object|instanceof('AppBundle\\Entity\\Administrative\\Invoice\\Selling\\Vehicle\\InvoiceSellingVehicleBase') or documentType == 'B2' %}  :  {% if vehiclePartExchangeData.vehicleData.brand is not empty %} {{ vehiclePartExchangeData.vehicleData.brand }}, {% endif %} {% if vehiclePartExchangeData.vehicleData.model is not empty %} {{ vehiclePartExchangeData.vehicleData.model }}, {% endif %} {% if vehiclePartExchangeData.vehicleData.version is not empty %} {{ vehiclePartExchangeData.vehicleData.version }}, {% endif %} {% if vehiclePartExchangeData.vehicleData.dateOfDistribution is not empty %} {{ vehiclePartExchangeData.vehicleData.dateOfDistribution|date('d/m/y') }}, {% endif %} {% if vehiclePartExchangeData.vehicleData.distanceTraveled is not empty %} {{ vehiclePartExchangeData.vehicleData.distanceTraveled }} Km, {% endif %} {% if vehiclePartExchangeData.vehicleData.licenseNumber is not empty %} {{ vehiclePartExchangeData.vehicleData.licenseNumber }}, {% endif %} {% if vehiclePartExchangeData.vehicleData.vin is not empty %} {{ vehiclePartExchangeData.vehicleData.vin }} {% endif %} {% endif %} 1 {{ partExchangeUnitPriceWithoutTax|number_format(2, ',', ' ') }} {{ currencySymbol }} {{ partExchangeSellPriceWithoutTax|number_format(2, ',', ' ') }} {{ currencySymbol }} {{ partExchangeSellPriceWithoutTax|number_format(2, ',', ' ') }} {{ currencySymbol }} {{ vehiclePartExchangeData.taxName|trans({}, 'DocumentTrans') }} {{ partExchangeSellPriceWithTax|number_format(2, ',', ' ') }} {{ currencySymbol }}
{{ 'service.items.credit_note'|trans({}, 'DocumentTrans' )}} {{ 'service.items.credit_note_partial'|trans({}, 'DocumentTrans' )}} 1 {{ creditNotePartialData.sellPriceWithoutTax|number_format(2, ',', ' ') }} {{ currencySymbol }} {{ creditNotePartialData.sellPriceWithoutTax|number_format(2, ',', ' ') }} {{ currencySymbol }} {{ creditNotePartialData.taxName|trans({}, 'CommonTrans') }} {{ creditNotePartialData.sellPriceWithTax|number_format(2, ',', ' ') }} {{ currencySymbol }}
{{ 'rental.short_title'|trans({}, 'DocumentTrans' )}} {{ rentalData.rate }} {{ rentalData.duration }} {{ rentalPricing.priceWithoutTax|number_format(2, ',', ' ') }} {{ currencySymbol }} {{ rentalData.priceWithoutTax|number_format(2, ',', ' ') }} {{ currencySymbol }} {{ rentalPricing.priceTaxName|trans({}, 'DocumentTrans') }} {{ rentalData.priceWithTax|number_format(2, ',', ' ') }} {{ currencySymbol }}
{{ 'rental.insurance.amount'|trans({}, 'DocumentTrans' )}} 1 {% if rentalInsurance.assistancePriceWithoutTax is not empty %} {{ rentalInsurance.assistancePriceWithoutTax|number_format(2, ',', ' ') }} {{ currencySymbol }} {% endif %} {% if rentalInsurance.assistancePriceWithoutTax is not empty %} {{ rentalInsurance.assistancePriceWithoutTax|number_format(2, ',', ' ') }} {{ currencySymbol }} {% endif %} {{ rentalInsurance.assistanceTax|trans({}, 'DocumentTrans') }} {% if rentalInsurance.assistancePriceWithTax is not empty %} {{ rentalInsurance.assistancePriceWithTax|number_format(2, ',', ' ') }} {{ currencySymbol }} {% endif %}
{{ 'rental.is_included_km.additional_km'|trans({}, 'DocumentTrans' )}} {% if rentalPricing.quantityKm is not empty %} {{ rentalPricing.quantityKm }} {% endif %} {% if rentalPricing.priceExtraKmWithoutTax is not empty %} {{ rentalPricing.priceExtraKmWithoutTax|number_format(2, ',', ' ') }} {{ currencySymbol }} {% endif %} {% if rentalPricing.priceExtraKmWithoutTax is not empty and rentalPricing.quantityKm is not empty %} {{ rentalPricing.totalPriceExtraKmWithoutTax|number_format(2, ',', ' ') }} {{ currencySymbol }} {% endif %} {% if rentalPricing.taxExtraKm is not empty %} {{ rentalPricing.taxExtraKm|trans({}, 'DocumentTrans') }} {% endif %} {% if rentalPricing.totalPriceExtraKmWithTax is not empty %} {{ rentalPricing.totalPriceExtraKmWithTax|number_format(2, ',', ' ') }} {{ currencySymbol }} {% endif %}
{% if rentalPricing.isIncludedFuel == false %} {{ 'rental.is_included_fuel.additional_fuel'|trans({}, 'DocumentTrans' )}} {% endif %} {% if rentalPricing.quantityLiter is not empty %} {{ rentalPricing.quantityLiter }} {% endif %} {% if rentalPricing.priceExtraLiterWithoutTax is not empty %} {{ rentalPricing.priceExtraLiterWithoutTax|number_format(2, ',', ' ') }} {{ currencySymbol }} {% endif %} {% if rentalPricing.priceExtraLiterWithoutTax is not empty and rentalPricing.quantityLiter is not empty %} {{ rentalPricing.totalPriceExtraLiterWithoutTax|number_format(2, ',', ' ') }} {{ currencySymbol }} {% endif %} {% if rentalPricing.taxExtraLiter is not empty %} {{ rentalPricing.taxExtraLiter|trans({}, 'DocumentTrans') }} {% endif %} {% if rentalPricing.totalPriceExtraLiterWithTax is not empty %} {{ rentalPricing.totalPriceExtraLiterWithTax|number_format(2, ',', ' ') }} {{ currencySymbol }} {% endif %}
{% if articleServices.reference is not empty %} {{ articleServices.reference }} {% endif %} {% if articleServices.name is not empty %} {{ articleServices.name }} {% endif %} {% if articleServices.quantity is not empty %} {{ articleServices.quantity }} {% endif %} {% if articleServices.sellUnitPriceWithoutTax is not empty %} {{ articleServices.sellUnitPriceWithoutTax|number_format(2, ',', ' ') }} {{ currencySymbol }} {% endif %} {{ articleServices.sellPriceWithoutTaxWithoutDiscount|number_format(2, ',', ' ') }} {{ currencySymbol }} {% if isVehicleCreditNote == false %} - {% endif %} {{ articleServices.priceDiscount|number_format(2, ',', ' ') }} {{ currencySymbol }} {{ articleServices.sellPriceWithoutTax|number_format(2, ',', ' ') }} {{ currencySymbol }} {{ articleServices.sellTaxName|trans({}, 'DocumentTrans') }} {{ articleServices.sellPriceWithTax|number_format(2, ',', ' ') }} {{ currencySymbol }}
{{ serviceArticleFromFlate.serviceArticleName }}
{{ 'administrative.total.title'|trans({}, 'DocumentTrans' )}} {{ priceWithoutTax|number_format(2, ',', ' ') }} {{ currencySymbol }} {% if isVehicleCreditNote == false %} - {% endif %} {{ discountValue|number_format(2, ',', ' ') }} {{ currencySymbol }} {{ priceWithoutTaxWithDiscount|number_format(2, ',', ' ') }} {{ currencySymbol }} {{ taxValue|number_format(2, ',', ' ') }} {{ currencySymbol }} {{ priceWithTax|number_format(2, ',', ' ') }} {{ currencySymbol }}