{% include INIT_VARIABLES %}
{% include FOOTER f 30 50 %}
{% import 'AppBundle:Documents:v2\\Import\\invoice.html.twig' as invoiceF %}
{# params include #}
{% set displaySeller = true %}
{% include TEMPLATE_HEADER_PORTRAIT %}
{{ invoiceF.getTitle(object, {'documentType': documentType}) }}
{% if without_reference is defined and without_reference == false %}
{{ invoiceF.getSubTitle(object, {}) }}
{% endif %}
{{ 'contact.customer.title'|trans({}, 'DocumentTrans' )}}
{# params include #}
{% set numbers = true %}
{% set showCountry = true %}
{% include TEMPLATE_CUSTOMER %}
{% if invoiceRentalStartPeriod is not empty or invoiceRentalEndPeriod is not empty %}
{{ 'rental.start_period'|trans({}, 'DocumentTrans' )}}
{% if invoiceRentalStartPeriod is not empty %}
{{ invoiceRentalStartPeriod|date('d/m/Y') }}
{% endif %}
{{ 'to_date'|trans({}, 'DocumentTrans' )}}
{% if invoiceRentalEndPeriod is not empty %}
{{ invoiceRentalEndPeriod|date('d/m/Y') }}
{% endif %}
{% endif %}
{{ 'date'|trans({}, 'DocumentTrans' )}} : {{ invoiceDate|date('d/m/Y H:i') }}
{% include TEMPLATE_VEHICLE_RENTAL %}
{{ 'rental.rate.prices'|trans({}, 'DocumentTrans' )}}
{% set hasTableParentTitle = true %}
{% include TEMPLATE_SELLING_TABLE %}
{{ 'vehicle.title'|trans({}, 'DocumentTrans' )}}
{% if invoiceRentalType == 'rental.type.short_term_rental' or invoiceRentalType == 'rental.type.long_term_rental' %}
{{ 'rental.is_rent'|trans({}, 'DocumentTrans' )}}
{% elseif invoiceRentalType == 'rental.type.loan' %}
{{ 'rental.is_loan'|trans({}, 'DocumentTrans' )}}
{% endif %}
{{ 'of_date'|trans({}, 'DocumentTrans' )}}
{% if invoiceRentalStartDate is not empty %}
{{ invoiceRentalStartDate|date('d/m/Y') }}
{% endif %}
{{ 'to_date'|trans({}, 'DocumentTrans' )}}
{% if invoiceRentalReturnDate is not empty %}
{{ invoiceRentalReturnDate|date('d/m/Y') }}
{% endif %}
{{ 'date'|trans({}, 'DocumentTrans' )}} : {{ invoiceDate|date('d/m/Y H:i') }}
{{ 'comments'|trans({}, 'DocumentTrans' )}} :
{% if invoiceRentalNote is not empty %}
{{ invoiceRentalNote }}
{% endif %}
{{ 'rental.clause.txt_1'|trans({}, 'DocumentTrans' )}}
{% if invoicePayments is not empty %}
{{ 'payment.title'|trans({}, 'DocumentTrans' )}}
{{ 'payment.type'|trans({}, 'DocumentTrans' )}}
{{ 'payment.amount'|trans({}, 'DocumentTrans' )}}
{{ 'payment.received'|trans({}, 'DocumentTrans' )}}
{{ 'payment.deadline'|trans({}, 'DocumentTrans' )}}
{{ 'payment.bill'|trans({}, 'DocumentTrans' )}}
{% set totalPayment = 0 %}
{% for payment in invoicePayments %}
{% set totalPayment = totalPayment + payment.amount %}
{% if payment.mode is not empty %}
{{ payment.mode }}
{% endif %}
{% if payment.checkNumber is not empty %}
{{ payment.bank }} {{ 'payment.number'|trans({}, 'DocumentTrans' )}} {{ payment.checkNumber }}
{% endif %}
{% if payment.amount is not empty %}
{{ payment.amount|number_format(2, ',', ' ') }} {{ currencySymbol }}
{% endif %}
{% if payment.receiveDate is not empty %}
{{ payment.receiveDate|date("d/m/Y") }}
{% endif %}
{% if payment.termDate is not empty %}
{{ payment.termDate|date("d/m/Y") }}
{% endif %}
{% if payment.condition is not empty %}
{{ payment.condition }}
{% endif %}
{% endfor %}
{{ 'payment.left_to_pay'|trans({}, 'DocumentTrans' )}}
{{ invoice.balance|number_format(2, ',', ' ') }} {{ currencySymbol }}
{% endif %}
{{ 'tax.header.table'|trans({}, 'DocumentTrans' )}}
{{ 'tax.header.base'|trans({}, 'DocumentTrans' )}}
{{ 'tax.header.amount'|trans({}, 'DocumentTrans' )}}
{% set taxTabList = sellingTaxData.groupByTaxName %}
{% set sumTax = 0 %}
{% for key, taxTab in taxTabList %}
{% set sumTax = sumTax + taxTab.taxValue %}
{{ key|trans({}, 'DocumentTrans') }}
{{ taxTab.priceWithoutTax|number_format(2, ',', ' ') }} {{ currencySymbol }}
{{ taxTab.taxValue|number_format(2, ',', ' ') }} {{ currencySymbol }}
{% endfor %}
{{ 'tax.total'|trans({}, 'DocumentTrans' )}}
{{ sumTax|number_format(2, ',', ' ') }} {{ currencySymbol }}
{% if groupData.swift is not empty or groupData.iban is not empty %}
{{ 'group.bank_details'|trans({}, 'DocumentTrans' )}}
{{ 'group.iban'|trans({}, 'DocumentTrans' )}}
{{ 'group.swift_bic'|trans({}, 'DocumentTrans' )}}
{{ 'group.domiciliation'|trans({}, 'DocumentTrans' )}}
{{ groupData.iban }}
{{ groupData.swift }}
{{ groupData.bankDomiciliation }}
{% endif %}