{% extends 'base.html.twig' %} {% block title %}Commande d'achat{% endblock %} {% block body %}

Commande {{ commande.numeroFacture ?: ('#' ~ commande.id) }}

{% if commande.statut == 'brouillon' %}Modifier
{% elseif commande.statut == 'validee' %}Règlement partiel{% if commande.creditRestant > 0 %}
{% endif %}
{% endif %}
Total{{ commande.montantTotal|montant_fr }}
Total payé{{ commande.totalPaiements|montant_fr }}
Crédit restant{{ commande.creditRestant|montant_fr }}{{ commande.statutPaiement }}
Fournisseur : {{ commande.fournisseur.nom }}
Facture : {{ commande.numeroFacture ?: '-' }}
Date : {{ commande.dateCommande|date('d/m/Y') }}
Statut : {{ commande.statut }}
{% for ligne in commande.lignes %}{% endfor %}
ProduitQuantitéPrix unitaireSous-total
{{ ligne.produit.nom }}{{ ligne.quantite }}{{ ligne.prixUnitaireAchat|montant_fr }}{{ ligne.sousTotal|montant_fr }}
Historique des règlements
{% for paiement in commande.paiements %}{% else %}{% endfor %}
DateMontantModeUtilisateurCommentaire
{{ paiement.datePaiement|date('d/m/Y H:i') }}{{ paiement.montant|montant_fr }}{{ paiement.modePaiement }}{{ paiement.utilisateur.nomComplet }}{{ paiement.commentaire ?: '-' }}
Aucun règlement enregistré.
{% endblock %}