{% extends "base.html" %} {% set titres = {"devis": t.titre_devis, "facture": t.titre_facture, "avoir": t.titre_avoir} %} {% block titre %}{{ titres[vente.type_document] }} {{ vente.numero_facture or vente.id }}{% endblock %} {% block contenu %}
FR EN ES
{% if entreprise and entreprise.logo_path %} Logo {% endif %}

{{ titres[vente.type_document] }} {{ t.numero }} : {{ vente.numero_facture or vente.id }}

{{ t.date }} : {{ vente.date_vente.strftime('%d/%m/%Y') }}
{% if vente.date_echeance %}
{{ t.echeance }} : {{ vente.date_echeance.strftime('%d/%m/%Y') }}
{% endif %} {% if vente.mode_reglement %}
{{ t.reglement }} : {{ vente.mode_reglement }}
{% endif %} {% if vente.facture_origine %}
{{ t.avoir_sur }} {{ vente.facture_origine.numero_facture or vente.facture_origine.id }}
{% endif %}
{% if entreprise and entreprise.nom_societe %}{{ entreprise.nom_societe }}
{% endif %} {% if entreprise and entreprise.adresse_ligne1 %}{{ entreprise.adresse_ligne1 }}
{% endif %} {% if entreprise and entreprise.adresse_ligne2 %}{{ entreprise.adresse_ligne2 }}
{% endif %} {% if entreprise and entreprise.telephone %}{{ t.tel }} : {{ entreprise.telephone }}
{% endif %} {% if entreprise and entreprise.email %}{{ entreprise.email }}{% endif %}
{{ t.client }} :
{{ vente.client.nom }}
{% set ligne_rue = [vente.client.numero_rue, vente.client.adresse] | select | join(' ') %} {% if ligne_rue %}{{ ligne_rue }}
{% endif %} {% set ligne_ville = [vente.client.code_postal, vente.client.pays] | select | join(' ') %} {% if ligne_ville %}{{ ligne_ville }}
{% endif %} {% if vente.client.afficher_telephone_bureau and vente.client.telephone %}{{ t.tel }} : {{ vente.client.telephone }}
{% endif %} {% if vente.client.afficher_telephone_portable and vente.client.telephone_portable %}{{ t.portable }} : {{ vente.client.telephone_portable }}
{% endif %} {% if vente.client.afficher_email and vente.client.email %}{{ vente.client.email }}
{% endif %} {% if vente.client.afficher_registre_commerce and vente.client.registre_commerce %}{{ t.rc }} : {{ vente.client.registre_commerce }}
{% endif %} {% if vente.client.afficher_autres_infos and vente.client.autres_infos_legales %}{{ vente.client.autres_infos_legales }}{% endif %}
{% if vente.transporteur or vente.matricule_camion or vente.incoterm %}
{% if vente.transporteur %}{{ t.transporteur }} : {{ vente.transporteur }}{% endif %}
{% if vente.matricule_camion %}{{ t.matricule_camion }} : {{ vente.matricule_camion }}{% endif %}
{% if vente.incoterm %}{{ t.incoterm }} : {{ vente.incoterm }}{% endif %}
{% endif %} {% if vente.lignes %} {% for l in vente.lignes %} {% endfor %} {% else %} {% endif %}
{{ t.produit }}{{ t.nb_pal }}{{ t.type_emb }}{{ t.nbr_colis }} {{ t.poids_brut }}{{ t.poids_net }}{{ t.prix }}{{ t.montant }} ({{ vente.client.devise }})
{{ l.produit }} {{ l.nb_palettes or "" }} {{ l.type_emballage or "" }} {{ l.nombre_colis or "" }} {{ l.poids_brut_kg or "" }} {{ l.poids_net_kg or "" }} {{ l.prix_unitaire or "" }} {{ "%.2f"|format(l.montant) }}
{{ t.total }} {{ totaux.nb_palettes or "" }} {{ totaux.nombre_colis or "" }} {{ totaux.poids_brut_kg or "" }} {{ totaux.poids_net_kg or "" }} {{ "%.2f"|format(vente.montant) }}
{{ vente.produit }} {{ "%.2f"|format(vente.montant) }}
{% if entreprise and (entreprise.banque_nom or entreprise.banque_iban) %}
{% if entreprise.banque_nom %}{{ t.banque }} : {{ entreprise.banque_nom }}
{% endif %} {% if entreprise.banque_iban %}{{ t.iban }} : {{ entreprise.banque_iban }}
{% endif %} {% if entreprise.banque_swift %}{{ t.swift }} : {{ entreprise.banque_swift }}{% endif %}
{% endif %} {% if entreprise and (entreprise.adresse_ligne1 or entreprise.telephone or entreprise.rc) %}
{{ [entreprise.adresse_ligne1, entreprise.adresse_ligne2] | select | join(' ') }}
{%- if entreprise.telephone %} {{ t.tel }}: {{ entreprise.telephone }}{% endif -%} {%- if entreprise.telephone and entreprise.email %} - {% endif -%} {%- if entreprise.email %}{{ t.email }}: {{ entreprise.email }}{% endif %}
{%- if entreprise.rc %}R.C : {{ entreprise.rc }}{% endif -%} {%- if entreprise.rc and entreprise.ice %} - {% endif -%} {%- if entreprise.ice %}ICE : {{ entreprise.ice }}{% endif %}
{% endif %}
{% endblock %}