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

{% if(retours is not empty) %}
Liste des retours de {{ cb }}
{% set nbr = 0 %} {% set total_ht = 0 %} {% set total_ttc = 0 %} {% for retour in retours %} {% set nbr = nbr + 1 %} {% set total_ht = (total_ht + retour.totalHt) %} {% set total_ttc = (total_ttc + retour.totalTtc) %} {% endfor %}
FOURNISSEUR REFERENCE DESIGNATION DATE FACTURE MONTANT HT MONTANT TTC
{{ retour.achat.fournisseur }} {% for vp in retour.getRproduits() %} {% if vp.getAchatProduit().getProduit().taxable %}{{ vp.getAchatProduit().getProduit().reference }}
{% endif %} {% endfor %}
{% for vp in retour.getRproduits() %} {% if vp.getAchatProduit().getProduit().taxable %}{{ vp.getAchatProduit().getProduit().titre }}
{% endif %} {% endfor %}
{% if retour.dateRetour %}{{ retour.dateRetour|date('d-m-Y') }}{% endif %} {{ retour.achat.getNumFacture() }} -{{ retour.totalHt|number_format(2, ',', '') }} -{{ retour.totalTtc|number_format(2, ',', '') }}
TOTAUX {{ nbr }} -{{ total_ht|number_format(2, ',', '') }} -{{ total_ttc|number_format(2, ',', '') }}
{% endif %}
Liste des achats de {{ cb }}
{% set nbr = 0 %} {% set total_ht = 0 %} {% set total_ttc = 0 %} {% for vente in achats %} {% set nbr = nbr + 1 %} {% set total_ht = (total_ht + vente.totalHt) %} {% set total_ttc = (total_ttc + vente.totalTtc) %} {% endfor %}
FOURNISSEUR REFERENCE DESIGNATION DATE FACTURE MONTANT HT MONTANT TTC
{{ vente.fournisseur }} {% for vp in vente.getAproduits() %} {% if vp.getProduit().taxable %}{{ vp.getProduit().reference }}
{% endif %} {% endfor %}
{% for vp in vente.getAproduits() %} {% if vp.getProduit().taxable %}{{ vp.getProduit().titre }}
{% endif %} {% endfor %}
{% if vente.dateFacturation %}{{ vente.dateFacturation|date('d-m-Y') }}{% endif %} {{ vente.getNumFacture() }} {{ vente.totalHt|number_format(2, ',', '') }} {{ vente.totalTtc|number_format(2, ',', '') }}
TOTAUX {{ nbr }} {{ total_ht|number_format(2, ',', '') }} {{ total_ttc|number_format(2, ',', '') }}
{% endblock %} {% block javascripts %} {% endblock %}