{% extends 'manager/pos/exports/_pdf_base.html.twig' %} {% block title %}Facture {{ sale.saleNumber }}{% endblock %} {% block content %} {# Header #}
{{ settings.effectiveShopName }}
{% if company.address %}{{ company.address }}
{% endif %} {% if company.phone %}Tel: {{ company.phone }}
{% endif %} {% if company.ninea %}NINEA: {{ company.ninea }}{% endif %}
FACTURE
N° {{ sale.saleNumber }}
Date: {{ sale.createdAt|date('d/m/Y') }}
{# Client info #}
Informations vente

N° : {{ sale.saleNumber }}

Date : {{ sale.createdAt|date('d/m/Y H:i') }}

{% if sale.registerSession %}

Caisse : {{ sale.registerSession.register.name }}

{% endif %}

Vendeur : {{ sale.seller.fullName|default('') }}

Client
{% if sale.customer %}

{{ sale.customer.fullName }}

{% if sale.customer.phone %}

Tel: {{ sale.customer.phone }}

{% endif %} {% if sale.customer.email %}

{{ sale.customer.email }}

{% endif %} {% if sale.customer.address %}

{{ sale.customer.address }}

{% endif %} {% else %}

Client comptoir

{% endif %}
{# Lines table #} {% for line in sale.lines %} {% endfor %}
Designation Qte Prix unitaire Remise TVA Total HT
{{ line.productName }}
{{ line.productSku }}
{{ line.quantity }} {{ line.unitPrice|number_format(0, ',', ' ') }} {% if line.discountAmount > 0 %}-{{ line.discountAmount|number_format(0, ',', ' ') }}{% else %}-{% endif %} {{ line.taxAmount|number_format(0, ',', ' ') }} {{ line.total|number_format(0, ',', ' ') }}
{# Totals #}
Sous-total HT :
{{ sale.subtotal|number_format(0, ',', ' ') }} {{ settings.currencySymbol }}
{% if sale.discountAmount > 0 %}
Remise :
-{{ sale.discountAmount|number_format(0, ',', ' ') }} {{ settings.currencySymbol }}
{% endif %}
TVA ({{ settings.taxRate }}%) :
{{ sale.taxAmount|number_format(0, ',', ' ') }} {{ settings.currencySymbol }}
TOTAL TTC :
{{ sale.total|number_format(0, ',', ' ') }} {{ settings.currencySymbol }}
Paiement(s) : {% for payment in sale.payments %} {{ payment.methodLabel }} : {{ payment.amount|number_format(0, ',', ' ') }} {{ settings.currencySymbol }}{% if not loop.last %}, {% endif %} {% endfor %}
{% if sale.paymentStatus == 'credit' or sale.paymentStatus == 'partial' %}
Solde restant : {{ (sale.total - sale.amountPaid)|number_format(0, ',', ' ') }} {{ settings.currencySymbol }}
{% endif %}
{% if settings.receiptFooter %}
{{ settings.receiptFooter }}
{% endif %} {% endblock %}