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

Liste des achats par produit ({{ produit.reference }}) de {{ term }}
{% if app.user.aDroit('achat_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 aproduits %} {% 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.prixHt*vp.quantite)) %} {% if app.user.aDroit('achat_consultation') %} {% endif %} {% endfor %} {% if app.user.aDroit('achat_consultation') %} {% endif %}
REFERENCE FOURNISSEUR DATE FACTURE QUANTITEMONTANT HT
{% if app.user.aDroit('achat_consultation') %} {% endif %} {{ vp.produit.reference }} {{ vp.achat.fournisseur }} {% if vp.achat.dateFacturation %}{{ vp.achat.dateFacturation|date('d-m-Y') }}{% endif %} {{ vp.achat.numFacture }} {{ vp.getQuantiteLivre() }} / {{ vp.quantite }}{{ vp.prixHt*vp.quantite }}
TOTAUX {{ nbr }} {{ total_quantite_livre }} / {{ total_quantite }}{{ total_ht|number_format(2, '.', '') }}
{% endblock %} {% block javascripts %} {% endblock %}