{% extends 'AppBundle:Documents:v2\\Administrative\\B1_invoice.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 %} {% block content %} {% set isDiscount = true %} {% if sellingData.prices.priceDiscount|number_format == 0 %} {% set isDiscount = false %} {% endif %} {% block vehicle %} {% set data = { "header_table": [ { 'label': 'vehicle.brand'|trans({}, 'DocumentTrans')~' - '~'vehicle.model'|trans({}, 'DocumentTrans')~' - '~'vehicle.version'|trans({}, 'DocumentTrans') , 'class': '', 'display': true }, { 'label': 'vehicle.date_of_distribution'|trans({}, 'DocumentTrans'), 'class': 'w-10', 'display': true }, { 'label': 'vehicle.color'|trans({}, 'DocumentTrans'), 'class': 'w-10', 'display': true }, { 'label': 'vehicle.serial_number'|trans({}, 'DocumentTrans'), 'class': 'w-20', 'display': true }, { 'label': 'vehicle.license_number_complete'|trans({}, 'DocumentTrans'), 'class': 'w-20', 'display': true }, { 'label': 'vehicle.energy'|trans({}, 'DocumentTrans'), 'class': 'w-10', 'display': true } ], "content_table": [ {'value': rentalVehicle.brand ~" - "~ rentalVehicle.model ~" - "~ rentalVehicle.version}, {'value': rentalVehicle.dateOfDistribution|date('d/m/Y')}, {'value': rentalVehicle.color}, {'value': rentalVehicle.vin}, {'value': rentalVehicle.licenseNumber}, {'value': rentalVehicle.energy}, ] } %} {% block vehicle_title %} {% endblock vehicle_title %} {% block vehicle_data %} {% endblock vehicle_data %}
{% include 'AppBundle:Documents:v2\\Include\\Global\\title_content.html.twig' with { 'title' : 'vehicle.title'|trans({}, 'DocumentTrans' ) } %}
{% for item in data['header_table'] %} {% if item.display == true %} {% endif %} {% endfor %} {% for item in data['content_table'] %} {% endfor %}
{{ item.label }}
{{ item.value }}
{% endblock vehicle %} {% block service %} {% if rentalData is not empty %} {% set rentalPricing = rentalData.rentalPricing %} {% set rentalInsurance = rentalData.rentalInsurance %} {% endif %} {% set notPourcentTaxName = ['tax.name.exo','tax.name.marge','tax.name.neutral','tax.name.exemption'] %} {% set afterTaxnamePricing = rentalPricing.priceTaxName in notPourcentTaxName ? null : '%' %} {% set afterTaxnameInsurance = rentalInsurance.assistanceTax in notPourcentTaxName ? null : '%' %} {% set rentalDatas = { "header_table": [ { 'label': 'vehicle.internal_reference_short', 'class': 'w-6', 'display': true }, { 'label': 'service.name', 'class': '', 'display': true }, { 'label': 'service.qte', 'class': 'w-5', 'display': true }, { 'label': 'administrative.unit_price', 'class': 'w-12', 'display': true }, { 'label': 'service.total_ht', 'class': 'w-12', 'display': true }, { 'label': 'administrative.price_without_tax_discount', 'class': 'w-12', 'display': isDiscount ? true : false }, { 'label': 'administrative.total.price_without_tax_discount', 'class': 'w-12', 'display': isDiscount ? true : false }, { 'label': 'administrative.tax', 'class': 'w-9', 'display': true }, { 'label': 'administrative.total.price_with_tax', 'class': 'w-12', 'display': true }, ], "content_table": { 'rental': rentalData.duration > 0 ? [ {'value': 'rental.short_title'|trans({}, 'DocumentTrans')|upper}, {'value': rentalData.rate, 'class': 'ta-left'}, {'value': rentalData.duration}, {'value': rentalPricing.priceWithoutTax|number_format(2, ',', ' ') ~ ' ' ~ currencySymbol}, {'value': rentalData.priceWithoutTax|number_format(2, ',', ' ') ~ ' ' ~ currencySymbol}, {'value': isDiscount ? " " : null} , {'value': isDiscount ? " " : null} , {'value': rentalPricing.priceTaxName|trans({}, 'DocumentTrans') ~ afterTaxnamePricing}, {'value': rentalData.priceWithTax|number_format(2, ',', ' ') ~ ' ' ~ currencySymbol}, ] : null, 'rentalInsurance': rentalInsurance is not empty ? [ {'value': ''}, {'value': 'rental.insurance.amount'|trans({}, 'DocumentTrans'), 'class': 'ta-left'}, {'value': 1}, {'value': rentalInsurance.assistancePriceWithoutTax|number_format(2, ',', ' ') ~ ' ' ~ currencySymbol}, {'value': rentalInsurance.assistancePriceWithoutTax|number_format(2, ',', ' ') ~ ' ' ~ currencySymbol}, {'value': isDiscount ? " " : null} , {'value': isDiscount ? " " : null} , {'value': rentalInsurance.assistanceTax|trans({}, 'DocumentTrans') ~ afterTaxnameInsurance}, {'value': rentalInsurance.assistancePriceWithTax|number_format(2, ',', ' ') ~ ' ' ~ currencySymbol}, ] : null, 'rentalExtraKm': (rentalPricing.isIncludedKm == false and rentalPricing.quantityKm > 0) ? [ {'value': ''}, {'value': 'rental.is_included_km.additional_km'|trans({}, 'DocumentTrans'), 'class': 'ta-left'}, {'value': rentalPricing.quantityKm}, {'value': rentalPricing.priceExtraKmWithoutTax|number_format(2, ',', ' ') ~ ' ' ~ currencySymbol}, {'value': rentalPricing.totalPriceExtraKmWithoutTax|number_format(2, ',', ' ') ~ ' ' ~ currencySymbol}, {'value': isDiscount ? " " : null}, {'value': isDiscount ? " " : null}, {'value': rentalPricing.taxExtraKm|trans({}, 'DocumentTrans') ~ afterTaxnamePricing}, {'value': rentalPricing.totalPriceExtraKmWithTax|number_format(2, ',', ' ') ~ ' ' ~ currencySymbol}, ] : null, 'rentalExtraLiter': (rentalPricing.isIncludedFuel == false and rentalPricing.quantityLiter > 0) ? [ {'value': ''}, {'value': 'rental.is_included_fuel.additional_fuel'|trans({}, 'DocumentTrans'), 'class': 'ta-left'}, {'value': rentalPricing.quantityLiter}, {'value': rentalPricing.priceExtraLiterWithoutTax|number_format(2, ',', ' ') ~ ' ' ~ currencySymbol}, {'value': rentalPricing.totalPriceExtraLiterWithoutTax|number_format(2, ',', ' ') ~ ' ' ~ currencySymbol}, {'value': isDiscount ? " " : null}, {'value': isDiscount ? " " : null}, {'value': rentalPricing.taxExtraLiter|trans({}, 'DocumentTrans') ~ afterTaxnamePricing}, {'value': rentalPricing.totalPriceExtraLiterWithTax|number_format(2, ',', ' ') ~ ' ' ~ currencySymbol}, ] : null } } %}
{% include 'AppBundle:Documents:v2\\Include\\Global\\title_content.html.twig' with { 'title' : 'service.benefits_short'|trans({}, 'DocumentTrans' ) } %}
{% for item in rentalDatas['header_table'] %} {% if item.display == true %} {% endif %} {% endfor %} {% for rentals in rentalDatas.content_table %} {% for item in rentals %} {% if item.value is not null %} {% endif %} {% endfor %} {% endfor %} {% if sellingData.serviceSellings is not empty %} {% for serviceList in sellingData.serviceSellings %} {% set afterTaxname = serviceList.sellTaxName in notPourcentTaxName ? null : '%' %} {% if isDiscount %} {% endif %} {% endfor %} {% endif %} {% if sellingData.prices.priceDiscount %} {% endif %}
{{ item.label|trans({}, 'DocumentTrans') }}
{{ item.value }}
{{ serviceList.reference }}

{{ serviceList.name }}

{% if serviceList.serviceArticleSellingList|length > 0 %} {% for serviceFlatRateSelling in serviceList.serviceArticleSellingList %}

{{ serviceFlatRateSelling.serviceArticleName }}

{% endfor %} {% endif %}
{{ serviceList.quantity }} {{ serviceList.sellUnitPriceWithoutTax|number_format(2, ',', ' ') }} {{ currencySymbol }} {{ serviceList.sellPriceWithoutTaxWithoutDiscount|number_format(2, ',', ' ') }} {{ currencySymbol }} - {{ serviceList.priceDiscount|number_format(2, ',', ' ') }} {{ currencySymbol }} {{ serviceList.sellPriceWithoutTax|number_format(2, ',', ' ') }} {{ currencySymbol }} {{ serviceList.sellTaxName|trans({}, 'DocumentTrans') ~ afterTaxname }} {{ serviceList.sellPriceWithTax|number_format(2, ',', ' ') }} {{ currencySymbol }}
{{ 'administrative.total.title'|trans({}, 'DocumentTrans') }} {{ sellingData.totalSellPriceWithoutTaxWithoutDiscount|replace(',', '.')|number_format(2, ',', ' ') ~ ' ' ~ currencySymbol}} - {{ sellingData.prices.priceDiscount|number_format(2, ',', ' ') ~ ' ' ~ currencySymbol}} {{ sellingData.sellPriceWithoutTax|replace(',', '.')|number_format(2, ',', ' ') ~ ' ' ~ currencySymbol}} {{ sellingTaxData.totalTax|number_format(2, ',', ' ') ~ ' ' ~ currencySymbol}} {{ sellingData.sellPriceWithTax|replace(',', '.')|number_format(2, ',', ' ') ~ ' ' ~ currencySymbol}}
{% include "AppBundle:Documents:v2\\Include\\Administrative\\mentions.html.twig" %}

{{ 'rental.vehicle_rental'|trans({'%start_date%': invoiceRentalStartDate|date('d/m/Y'), '%end_date%': invoiceRentalReturnDate|date('d/m/Y')}, 'DocumentTrans') }}

{% include 'AppBundle:Documents:v2\\Include\\Global\\title_content.html.twig' with {'heightSpace':false}%}
{% endblock service %} {% block note %} {% if invoiceRentalNote is not empty and invoiceRentalNote|length > 0 %} {% include 'AppBundle:Documents:v2\\Include\\Global\\title_content.html.twig' with { 'title' : 'comments'|trans({}, 'DocumentTrans' )} %}

{{ invoiceRentalNote }}

{% endif %} {% endblock note %} {% block payment %} {% include 'AppBundle:Documents:v2\\Include\\Administrative\\payments.html.twig' with { 'block_title' : 'subtitle.payment_invoice', 'isRental': true } %} {% endblock payment %} {% include 'AppBundle:Documents:v2\\Include\\Administrative\\collectedTax.html.twig' %} {% endblock content %}