{% extends 'mobile/mobile_base.html' %} {% load static %} {% load i18n %} {% block title %}{% translate "Bon de confection" %} {{ order.code }}{% endblock title %} {% block upleft %} {% endblock upleft %} {% block extra_head %} {% endblock extra_head %} {% block content %}
{{ order.code }} {% if order.destination == 'external' %} {% translate "Externe" %} {% endif %}
{{ order.created_at|date:"d/m/Y H:i" }}
{% if is_reopened %} {% translate "Réouvert" %} {% endif %} {{ order.get_status_display }}
{% if is_reopened %} {% endif %}
{% if order.product_design %}
{% translate "Conception" %} {{ order.product_design.name }}
{% endif %}
{% 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 %}
{% if order.preparation_order %}
{% translate "Bon de prép." %} #{{ order.preparation_order.order_number }}
{% endif %} {% if other_item_description %}
{% translate "Description" %} {% if order.preparation_order %}{% translate "Issu du bon de prép." %} #{{ order.preparation_order.order_number }}{% endif %} {{ other_item_description }}
{% endif %} {% if order.output_product %}
{% translate "Produit fini" %} {{ order.output_product.name }}
{% endif %} {% if order.notes %}
{% translate "Notes" %} {{ order.notes }}
{% endif %}
{% if components_status %}
{% translate "Composants" %}
{% for row in components_status %}
{{ row.component.product.name }}
{% translate "Requis" %}: {{ row.required }}  |  {% translate "Dispo" %}: {% if row.sufficient %} {{ row.available }} {% else %} {{ row.available }} {% endif %}
{% if row.sufficient %} {% else %} {% endif %}
{% endfor %}
{% endif %}
{% translate "Documents" %}
{% load stock_custom_filters %} {% for doc in order.documents.all %} {% private_file_url doc 'file' as mob_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 %}
{% if can_manage %}
{% if order.status == 'to_process' or order.status == 'draft' or order.status == 'in_production' %} {% translate "Modifier le bon" %} {% 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' %} {% endif %}
{% endif %} {% if can_manage and order.status in 'to_process,draft,in_production' %} {% endif %}
{% translate "Historique des modifications" %} {{ history_entries|length }}
{% if history_entries %} {% for entry in history_entries %}
{{ entry.get_action_display }} {{ entry.created_at|date:"d/m/Y H:i" }}
{{ entry.author_short_name }}
{{ entry.description }}
{% endfor %} {% else %}

{% translate "Aucun historique disponible." %}

{% endif %}
{% endblock content %} {% if can_manage %} {% block extra_scripts %} {% endblock extra_scripts %} {% endif %}