{% block stylesheets %} {% endblock %}
{% if sale.shop.nameCommercialForTickets != "" %} {{ sale.shop.nameCommercialForTickets | upper }} {% else %} {{ sale.group.name | upper }} {% endif %}

{{ sale.shop.company.name | upper }}
NIF: {{ sale.shop.company.cif | upper }}
{{ sale.shop.company.address | upper }}
{{ sale.shop.company.zip }} {{ sale.shop.company.city | upper }}
FACTURA RECTIFICATIVA
Número: {{ sale.invoiceNumberRectifier }}
CLIENTE
{% if sale.customer.razonSocialCompany is not empty %} {{ sale.customer.razonSocialCompany | upper }}
{% else %} {{ sale.customer.name | upper }}
{% endif %} NIF: {{ sale.customer.cif | upper }}
{{ sale.customer.address | upper }}
{{ sale.customer.zip }} {{ sale.customer.city | upper }}
{{ sale.shop.address | upper }}
{{ sale.shop.city | upper }}
TFNO: {{ sale.shop.telephone | upper }}

OPERACION: {{ sale.alias }}
Corresponde a: {{ sale.invoiceNumberAuto }}
Factura nominativa: {{ sale.invoiceNumber }}
VENDEDOR: {{ sale.user.name | upper }}
FECHA: {{ sale.dateInvoice | date('d/m/Y') }} {{ sale.dateInvoice | date('H:i') }} HORAS
{% for article in elementsIntoSale %} {% if article.stock.pvpFinal != article.stock.pvpFinalForSale %} {% if article.typeSaleElementStatus.id == constant('CoreBundle\\Entity\\TypeSaleElementStatus::ID_STATUS_RETURNED') %} {% elseif article.typeSaleElementStatus.id == constant('CoreBundle\\Entity\\TypeSaleElementStatus::ID_STATUS_SELL') %} {% endif %} {% endif %} {% endfor %} {% for bag in sale.bagOnSale %} {% endfor %} {% if sale.totalDiscount + sale.roundAmount > 0 %} {% endif %}
ARTICULO TALLA UDS. IMPORTE
{% if sale.shop.ticketItem == "model" or sale.shop.ticketItem == "" %} {{ article.stock.article.articleModel | upper | truncate(10, false, '...') }} {% endif %} {% if sale.shop.ticketItem == "reference" %} {{ article.stock.article.ref }} {% endif %} {% if sale.shop.ticketItem == "label" %} {{ article.stock.article.descriptionLabel }} {% endif %} {{ article.stock.typeSize.description }} 1 {% if article.typeSaleElementStatus.id == constant('CoreBundle\\Entity\\TypeSaleElementStatus::ID_STATUS_RETURNED') %} - {{ ( (-1) * article.stock.pvpFinalForSale ) | number_format(2, ',', '.') }} € {% else %} {{ ( (-1) * article.stock.pvpFinalForSale ) | number_format(2, ',', '.') }}€ {% endif %}
Dto: {{ ( (-1) * render(controller('CoreBundle:SalesPoint:getPercentage', {'stockId' : article.stock.id })) ) | number_format(2, ',', '.') }}%{{ (-1) * (article.stock.pvpFinalForSale -article.stock.pvpFinal) | number_format(2, ',', '.') }}€{{ (-1) * (article.stock.pvpFinal - article.stock.pvpFinalForSale) | number_format(2, ',', '.') }}€
TOTAL {{ ( (-1) * render(controller('CoreBundle:SalesPoint:getTotalBase', { 'saleId' : sale.id })) ) | number_format(2, ',', '.') }}€
Bolsa - {{ bag.amount | number_format(2, ',', '.') }}€
DTO TOTAL - {{ ( (-1) * render(controller('CoreBundle:SalesPoint:getDiscountBase', { 'saleId' : sale.id })) ) | number_format(2, ',', '.') }}€

TOTAL FACTURA
{{ ( (-1) * sale.totalFinal) | number_format(2, ',', '.') }}€

{% for salePayment in sale.salePayment %} {% if salePayment.typeSsalePaymentWhoPay.id == constant('CoreBundle\\Entity\\TypeSalePaymentWhoPay::ID_COMPANY_PAY') %} CLIENTE ABONA: {% elseif salePayment.typeSsalePaymentWhoPay.id == constant('CoreBundle\\Entity\\TypeSalePaymentWhoPay::ID_CLIENT_PAY') %} DEPENDIENTE DEVUELVE: - {% endif %} {{ ( salePayment.ammount )| number_format(2, ',', '.') }} € {{ salePayment.typeSsalePayment.description }} {% if salePayment.id in extraPaymentData|keys %} {{ extraPaymentData[salePayment.id].title }} {% endif %}
{% endfor %}
Nº TOTAL DE ARTICULOS: {{ sale.saleElement | length }}
IMPUESTOS INCLUIDOS
DESGLOSE TIPO DE IMPUESTO
{% for tax in taxesTicket %} IMPUESTO: {{ tax["name"] }} ({{ tax["percentage"] }}%) CUOTA: {{ tax["quota"] | number_format(2, ',', '.') }}€ - BASE: {{ tax["amount"] | number_format(2, ',', '.') }}€
{% endfor %}
{% if bankAccount is not null %}
Nº CUENTA BANCARIA
{{ bankAccount.name }} - {{ bankAccount.accountNumber }}
{% endif %}
GRACIAS POR SU VISITA
{{ sale.shop.textForTicket | upper }}