{% extends "base.html" %} {% load static %} {% load i18n %} {% block content %}

{{ design.name }}

{{ design.code }} {% if design.category %} | {{ design.category.name_fr }} {% endif %}

{% if design.status == 'active' %} {% translate "Actif" %} {% elif design.status == 'draft' %} {% translate "Brouillon" %} {% else %} {% translate "Archivé" %} {% endif %}
{% translate "Retour à la liste" %} {% if can_manage %} {% translate "Modifier" %} {% if design.status == 'active' %} {% translate "Créer un bon de confection" %} {% endif %} {% endif %}
{% if design.image %}
{{ design.name }}
{% endif %}
{% translate "Informations" %}
{% translate "Code" %} {{ design.code }}
{% translate "Catégorie" %} {{ design.category.name_fr|default:"-" }}
{% translate "Composants" %} {{ design.total_components }}
{% translate "Coût estimé" %} {% with cost=design.estimated_cost %} {% if cost %}{{ cost|floatformat:2 }} €{% else %}-{% endif %} {% endwith %}
{% translate "Créé le" %} {{ design.created_at|date:"d/m/Y H:i" }}
{% translate "Modifié le" %} {{ design.updated_at|date:"d/m/Y H:i" }}
{% translate "Produit fini" %} {% if design.output_product %} {{ design.output_product.name }} {% else %} — {% endif %}
{% if design.description %}
{% translate "Description" %}

{{ design.description }}

{% endif %}
{% translate "Composants nécessaires" %}
{% for info in components_info %} {% empty %} {% endfor %}
{% translate "Produit" %} {% translate "Catégorie" %} {% translate "Qté requise" %} {% translate "Stock total" %} {% translate "Disponibilité" %} {% translate "Notes" %}
{{ info.component.product.name }}
{{ info.component.product.code }}
{{ info.component.product.category.name_fr|default:"-" }} {{ info.component.quantity }} {{ info.total_stock }} {% if info.sufficient %} {% translate "OK" %} {% else %} {% translate "Insuffisant" %} {% endif %} {{ info.component.notes|default:"-" }}
{% translate "Aucun composant défini." %}
{% translate "Bons de confection" %}
{% if design.status == 'active' and can_manage %} {% translate "Nouveau" %} {% endif %}
{% for order in production_orders %} {% empty %} {% endfor %}
{% translate "Code" %} {% translate "Entrepôt" %} {% translate "Quantité" %} {% translate "Statut" %} {% translate "Date" %}
{{ order.code }} {{ order.warehouse.name }} {{ order.quantity }} {% if order.status == 'draft' %} {{ order.get_status_display }} {% elif order.status == 'in_production' %} {{ order.get_status_display }} {% elif order.status == 'completed' %} {{ order.get_status_display }} {% else %} {{ order.get_status_display }} {% endif %} {{ order.created_at|date:"d/m/Y" }}
{% translate "Aucun bon de production." %}
{% endblock content %}