{% extends 'base.html' %} {% block title %}Commandes{% endblock %} {% block content %}
Commandes
{{ jobs|length }}
Total HT commandes
--
Total prix final
--
Poids total
--
{% if jobs %}
{% for j in jobs %} {% set pieces = j.pieces_per_plate or 1 %} {% set qty = j.order_qty or 1 %} {% set prix_ht = j.prix_ht_piece or 0 %} {% set poids_piece = j.weight_g / pieces %} {% set prix_ttc = (j.final_price / (1 - j.discount_pct / 100)) if (j.discount_pct and j.discount_pct > 0 and j.discount_pct < 100) else (j.final_price or 0) %} {% endfor %}
Date Nom Client Matiere Poids Duree Prix HT Prix TTC
{{ j.created_at[:10] }} {{ j.name }} {% if j.plate_name %}
{{ j.plate_name }}{% endif %}
{{ j.client_name or '--' }} {% if j.material_name %}{{ j.material_name }}{% else %}--{% endif %} {{ j.weight_g }} g {% if pieces > 1 %}
{{ '%.1f'|format(poids_piece) }} g/pce x{{ pieces }} {% else %}
{{ '%.1f'|format(poids_piece) }} g/pce {% endif %}
{{ j.print_time_s | fmt_time }} {% if prix_ht > 0 %} {{ '%.2f'|format(prix_ht) }} € HT/pce {% if qty > 1 %}
{{ '%.2f'|format(prix_ht * qty) }} € x{{ qty }} {% endif %} {% else %}--{% endif %}
{{ '%.2f'|format(prix_ttc) }} € TTC {% if j.discount_pct and j.discount_pct > 0 %}
{{ '%.2f'|format(j.final_price or 0) }} € -{{ j.discount_pct }}% {% endif %} {% if qty > 1 %}
{{ '%.2f'|format(prix_ttc * qty) }} € TTC tot. {% if j.discount_pct and j.discount_pct > 0 %} → {{ '%.2f'|format((j.final_price or 0) * qty) }} € {% endif %} {% endif %}
{% if j.client_token %} {% endif %}

Aucune commande ne correspond aux filtres.

{% else %}

Aucune commande enregistree.

Creer le premier calcul
{% endif %}
{% endblock %}