{% extends 'base.html' %} {% block title %}{{ project.name }}{% endblock %} {% block content %}
Runs
{{ jobs|length }}
Pièces totales
{{ total_pieces }}
CA total commande
{{ "%.2f"|format(total_revenue) }} €
Prix moyen / pièce
{% if total_pieces > 0 %}{{ "%.2f"|format(total_revenue / total_pieces) }} €{% else %}—{% endif %}
{% if project.notes %}
{{ project.notes }}
{% endif %}
Runs d'impression
{% if jobs %}
{% set ns = namespace(total_plateaux=0) %} {% for j in jobs %} {% set qty = j.order_qty or 1 %} {% set ppp = j.pieces_per_plate or 1 %} {% set nb_p = ((qty + ppp - 1) // ppp) %} {% set ns.total_plateaux = ns.total_plateaux + nb_p %} {% endfor %}
Nom du run Matière Pièces/plateau Qté commandée Plateaux Prix/pièce Total run
{{ j.name }}
{{ j.created_at[:10] }}
{% if j.material_name %} {{ j.material_type }} {{ j.material_name }} {% else %}{% endif %} {{ ppp }} {{ qty }} {{ nb_p }} {{ "%.2f"|format(j.final_price) }} € {{ "%.2f"|format(j.final_price * qty) }} €
Total {{ total_pieces }} {{ ns.total_plateaux }} {% if total_pieces > 0 %}{{ "%.2f"|format(total_revenue / total_pieces) }} € moy.{% endif %} {{ "%.2f"|format(total_revenue) }} €
{% else %}
Aucun run encore. Créer un calcul et l'associer à ce projet.
{% endif %}
{% endblock %}