{% extends "base.html" %} {% set libelles = {"devis": "devis", "facture": "vente / facture", "avoir": "facture d'avoir"} %} {% set type_actuel = vente.type_document if vente else type_document %} {% block titre %}{{ "Modifier" if vente else "Nouveau" }} {{ libelles[type_actuel] }}{% endblock %} {% block contenu %}

{{ "Modifier le" if vente else "Nouveau" }} {{ libelles[type_actuel] }}

{% if erreur %}
{{ erreur }}
{% endif %} {% if origine %}
Avoir sur la facture {{ origine.numero_facture or ("#" ~ origine.id) }} ({{ origine.client.nom }}).
{% endif %} {% if not clients %}
Veuillez d'abord créer un client.
{% elif vente %}
{% if type_actuel == "facture" %}
{% endif %}
Résumé rapide. Le détail des lignes se gère ci-dessous, sur la fiche du document.
{% if vente.lignes %}
Calculé automatiquement à partir des lignes.
{% elif type_actuel == "avoir" %}
Montant crédité au client (saisir un nombre positif).
{% endif %}

Informations transport (optionnel, export)

{% if vente.facture_vente_path %}
Fichier actuel : voir
{% endif %}
Annuler
{% else %}
{% if origine %}{% endif %}
{% if origine %} Facture d'avoir {% else %}
{% for t, libelle in {"devis": "Devis", "facture": "Facture", "avoir": "Avoir"}.items() %} {% endfor %}
{% endif %}
{% if origine %}{% endif %}
{% if not vendeurs %}
Aucun vendeur configuré — en créer un.
{% endif %}

Lignes de produit

{% for p in produits %}
Produit *Nb/PalType EMB Nbr ColisKg/ColisP. BrutP. Net PrixMontant (MAD) *
Total : 0.00 MAD

Informations transport (optionnel, export)

Annuler
{% endif %} {% endblock %}