{% extends 'base.html.twig' %} {% block body %}

Liste des ventes par produit ({{ produit.reference }}) en {{ term }}
{% if app.user.aDroit('vente_consultation') %} {% endif %} {% set nbr = 0 %} {% set total_quantite = 0 %} {% set total_quantite_livre = 0 %} {% set total_ht = 0 %} {% set total_marge = 0 %} {% for vp in vproduits %} {% set nbr = nbr + 1 %} {% set total_quantite = (total_quantite + vp.quantite) %} {% set total_quantite_livre = (total_quantite_livre + vp.getQuantiteLivre()) %} {% set total_ht = (total_ht + vp.totalHt) %} {% set total_marge = (total_marge + vp.getBenefice()) %} {% if app.user.aDroit('vente_consultation') %} {% endif %} {% endfor %} {% if app.user.aDroit('vente_consultation') %} {% endif %}
REFERENCE CLIENT DATE FACTURE QUANTITEMONTANT HT
{{ vp.produit.reference }} {{ vp.vente.client }} {% if vp.vente.dateFacturation %}{{ vp.vente.dateFacturation|date('d-m-Y') }}{% endif %} {{ vp.vente.numFacture }} {{ vp.getQuantiteLivre() }} / {{ vp.quantite }}{{ vp.totalHt }}
TOTAUX {{ nbr }} {{ total_quantite_livre }} / {{ total_quantite }}{{ total_ht|number_format(2, '.', '') }}
{% endblock %} {% block javascripts %} {% endblock %}