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

{% translate "Bon de confection" %} {{ order.code }}

{{ order.created_at|date:"d/m/Y H:i" }}

{% if is_reopened %} {% translate "Réouvert" %} {% endif %} {{ order.get_status_display }}
{% if is_reopened %} {% endif %}
{% translate "Retour à la liste" %} {% if can_manage %} {% if order.status == 'to_process' or order.status == 'draft' or order.status == 'in_production' %} {% translate "Modifier" %} {% endif %} {% if order.status == 'to_process' or order.status == 'draft' %}
{% csrf_token %}
{% endif %} {% if order.status == 'in_production' %}
{% csrf_token %}
{% endif %} {% if order.status == 'completed' %}
{% csrf_token %}
{% endif %} {% if order.status == 'to_process' or order.status == 'draft' or order.status == 'in_production' %}
{% csrf_token %}
{% endif %} {% endif %}
{% translate "Informations" %}
{% if order.preparation_order %} {% endif %} {% if other_item_description %} {% endif %} {% if order.completed_at %} {% endif %}
{% translate "Code" %} {{ order.code }}
{% translate "Entrepôt" %} {{ order.warehouse.name }}
{% translate "Quantité" %} {{ order.quantity }} {% translate "unité(s)" %}
{% translate "Destination" %} {% if order.destination == 'internal' %} {% translate "Interne" %} {% else %} {% translate "Externe" %} {% endif %}
{% translate "Bon de prép." %} #{{ order.preparation_order.order_number }}
{% translate "Description" %} {% if order.preparation_order %}{% translate "Issu du bon de préparation" %} #{{ order.preparation_order.order_number }}{% endif %} {{ other_item_description }}
{% translate "Créé le" %} {{ order.created_at|date:"d/m/Y H:i" }}
{% translate "Terminé le" %} {{ order.completed_at|date:"d/m/Y H:i" }}
{% translate "Produit fini à stocker" %}
{% if order.output_product %}

{{ order.output_product.name }} ({{ order.output_product.code }})

{% blocktranslate with qty=order.quantity %}{{ qty }} unité(s) seront ajoutées au stock à la fin de la confection.{% endblocktranslate %} {% elif order.output_product_name %}

{{ order.output_product_name }}

{% translate "Un nouveau produit sera créé à la fin de la confection." %} {% else %}

{% translate "Aucun produit fini défini. Le stock ne sera pas mis à jour." %}

{% endif %} {% if order.output_location %}

{% translate "Emplacement" %} : {{ order.output_location }}

{% endif %}
{% if order.notes and not other_item_description %}
{% translate "Notes" %}

{{ order.notes }}

{% endif %} {% if order.qr_code %}
{% translate "QR Code" %}
QR Code {{ order.code }}

{{ order.code }}

{% endif %}
{% translate "Documents" %}
{% for doc in order.documents.all %} {% private_file_url doc 'file' as doc_url %}
{{ doc.filename }} {{ doc.uploaded_at|date:"d/m/Y" }} {% if can_manage %} {% endif %}
{% empty %}

{% translate "Aucun document joint." %}

{% endfor %}
{% if can_manage %}
{% endif %}
{% translate "Composants requis" %} (x{{ order.quantity }} {% translate "unité(s)" %})
{% for cs in components_status %} {% endfor %}
{% translate "Produit" %} {% translate "Qté/unité" %} {% translate "Total requis" %} {% translate "Disponible" %} {% translate "Statut" %}
{{ cs.component.product.name }}
{{ cs.component.product.code }}
{{ cs.component.quantity }} {{ cs.required }} {{ cs.available }} {% if cs.sufficient %} {% translate "OK" %} {% else %} {% translate "Manque" %} {{ cs.required|add:"-"|add:cs.available }} {% endif %}
{% if order.status == 'draft' or order.status == 'to_process' %} {% if not can_start %} {% endif %} {% endif %}
{% translate "Historique des modifications" %}
{{ history_entries|length }} {% translate "événement(s)" %}
{% if history_entries %}
{% for entry in history_entries %} {% endfor %}
{% translate "Date / Heure" %} {% translate "Utilisateur" %} {% translate "Action" %} {% translate "Détails" %}
{{ entry.created_at|date:"d/m/Y H:i:s" }} {{ entry.author_short_name }} {{ entry.get_action_display }} {{ entry.description }}
{% else %}
{% translate "Aucun historique disponible pour ce bon." %}
{% endif %}
{% if can_manage %} {% endif %} {% endblock content %}