{% extends '@admin/base.html.twig' %} {% set totalPayments = 0 %} {% set totalChange = 0 %} {% for payment in payments %} {% set totalPayments = totalPayments + payment.amount %} {% set totalChange = totalChange + payment.changeAmount %} {% endfor %} {% set paymentLabels = { 'cash': 'Espèces', 'card': 'Carte', 'transfer': 'Virement', 'cheque': 'Chèque', 'deferred': 'Différé', 'draft': 'Traite', 'gift_ticket': 'Tickets cadeaux' } %} {% set lineTypeLabels = { 'product': 'Produit', 'pack': 'Pack', 'manual': 'Ligne libre' } %} {% block title %}Detail vente point de vente{% endblock %} {% block subheader %}

Vente point de vente {{ document.internalNbr ?: ('#' ~ document.id) }}

Ticket genere en caisse et enregistre dans le moteur Document du CRM.
Imprimer le ticket Retour a la caisse Retour historique
{% endblock %} {% block breadcrumb %}{% endblock %} {% block bodycontent %}
Reference{{ document.internalNbr ?: ('#' ~ document.id) }}
Date{{ document.createdAt ? document.createdAt|date('d/m/Y H:i') : '-' }}
Client{{ document.client and document.client.type == 'pos_guest' ? 'Client passager' : (document.client ? (document.client.fullName ?: document.client.username) : 'Client passager') }}
Caissier{{ document.user ? (document.user.fullName ?: document.user.username) : '-' }}

Lignes de vente

{% for line in document.documentProduits %} {% endfor %} {% for line in document.documentDeclinationProduits %} {% endfor %} {% if document.documentProduits|length == 0 and document.documentDeclinationProduits|length == 0 %} {% endif %}
TypeArticleReferenceQtPU TTCRemiseTotal TTC
{{ lineTypeLabels[line.type]|default(line.type|capitalize) }}
{{ line.name }}
{% if line.description %}
{{ line.description }}
{% endif %}
{{ line.reference ?: '-' }} {{ line.quantity ?: 0 }} {{ line.priceTtc ? line.priceTtc|number_format(3, '.', ' ') : '0.000' }} TND {% if line.discount %}{{ line.discount|number_format(3, '.', ' ') }} {{ line.discountType == 'percent' ? '%' : 'TND' }}{% else %}-{% endif %} {{ line.totalAmountTtc|number_format(3, '.', ' ') }} TND
Declinaison
{% if line.produitDeclinationValue and line.produitDeclinationValue.image %} {{ line.name }} {% elseif line.produitDeclinationValue and line.produitDeclinationValue.produit and line.produitDeclinationValue.produit.image %} {{ line.name }} {% else %} {% endif %}
{{ line.name }}
{% if line.description %}
{{ line.description }}
{% endif %}
{{ line.reference ?: '-' }} {{ line.quantity ?: 0 }} {{ line.priceTtc ? line.priceTtc|number_format(3, '.', ' ') : '0.000' }} TND {% if line.discount %}{{ line.discount|number_format(3, '.', ' ') }} {{ line.discountType == 'percent' ? '%' : 'TND' }}{% else %}-{% endif %} {{ line.totalAmountTtc|number_format(3, '.', ' ') }} TND
Aucune ligne enregistree.

Paiements

{% for payment in payments %} {% else %} {% endfor %}
ModeMontant
{{ paymentLabels[payment.method]|default(payment.method|capitalize) }}
{% if payment.reference %}
{{ payment.reference }}
{% endif %}
{{ payment.amount|number_format(3, '.', ' ') }} TND{% if payment.changeAmount > 0 %}
Monnaie : {{ payment.changeAmount|number_format(3, '.', ' ') }} TND
{% endif %}
Aucun paiement enregistre.

Totaux

Articles TTC{{ document.itemsAmountTtc ? document.itemsAmountTtc|number_format(3, '.', ' ') : '0.000' }} TND
Paiements{{ totalPayments|number_format(3, '.', ' ') }} TND
Monnaie rendue{{ totalChange|number_format(3, '.', ' ') }} TND
Total paye{{ document.totalPaid ? document.totalPaid|number_format(3, '.', ' ') : '0.000' }} TND
Total ticket{{ document.totalToPay|number_format(3, '.', ' ') }} TND
{% if document.note %}
Note interne
{{ document.note }}
{% endif %}
{% endblock %}