{% extends "base.html" %} {% load static %} {% load i18n %} {% block head %} {% endblock %} {% block content %}
{% if selected_status or selected_priority or search_q or prep_order == 'asc' %} {% translate "Effacer" %} {% endif %}
{% if can_create_preparation_order %} {% translate "Nouveau bon" %} {% endif %}
{% for order in preparation_orders %}
{{ order.order_number }} {% if order.intervention %} {% if order.intervention.code %}{{ order.intervention.code }}{% else %}#{{ order.intervention.id }}{% endif %}{% if order.intervention.title %} — {{ order.intervention.title }}{% endif %} {% endif %} {% if order.status == 'to_process' %} {{ order.get_status_display }} {% elif order.status == 'pending' %} {{ order.get_status_display }} {% elif order.status == 'processed' %} {{ order.get_status_display }} {% elif order.status == 'cancelled' %} {{ order.get_status_display }} {% endif %} {% if order.priority == '1' %} {{ order.get_priority_display }} {% elif order.priority == '2' %} {{ order.get_priority_display }} {% elif order.priority == '3' %} {{ order.get_priority_display }} {% else %} {{ order.get_priority_display }} {% endif %} {{ order.date|date:"d/m/Y H:i" }} {{ order.preparationorderitem_set.count }} {% translate "article(s)" %}
{% for item in order.preparationorderitem_set.all %} {% empty %} {% endfor %}
{% translate "Produit" %} {% translate "Quantité" %}
{{ item.product.name }} {{ item.quantity }}
{% translate "Aucun article." %}
{% empty %}
{% translate "Aucun bon de préparation." %}
{% endfor %}
{% if prod_status or prod_warehouse or prod_destination or prod_search_q or prod_order == 'asc' %} {% translate "Effacer" %} {% endif %} {% if can_create_production_order %} {% translate "Nouveau" %} {% endif %}
{% for order in production_orders %}
{{ order.code|default:order.pk }} {% if order.destination == 'external' %} {% translate "Externe" %} {% endif %} {{ order.get_status_display }} {% if order.destination == 'internal' %} {% translate "Interne" %} {% endif %} {% if order.preparation_order %} #{{ order.preparation_order.order_number }} {% if order.preparation_order.intervention %} {{ order.preparation_order.intervention.code|default:order.preparation_order.intervention.id }}{% if order.preparation_order.intervention.title %} — {{ order.preparation_order.intervention.title|truncatechars:30 }}{% endif %} {% endif %} {% endif %} {{ order.warehouse.name }} {% if order.documents.count %} {{ order.documents.count }} {% endif %} {{ order.created_at|date:"d/m/Y H:i" }}
{% translate "Produit confectionné" %}
{% if order.output_product %} {{ order.output_product.name }} {% if order.output_product.code %} {{ order.output_product.code }} {% endif %} {% elif order.output_product_name %} {{ order.output_product_name }} {% translate "Nouveau produit" %} {% elif order.preparation_order_other_item %} {{ order.preparation_order_other_item.description }} {% translate "Article sur mesure" %} {% else %} {% translate "Non spécifié" %} {% endif %}
{% if order.output_location %}
{% translate "Emplacement cible :" %} {{ order.output_location.name }}
{% endif %}
{% translate "Quantité à concevoir :" %} {{ order.quantity }}
{% translate "Entrepôt :" %} {{ order.warehouse.name }}
{% if order.completed_at %}
{% translate "Terminé le" %} {{ order.completed_at|date:"d/m/Y H:i" }}
{% elif order.status == 'in_production' %}
{% translate "En cours de confection" %}
{% elif order.status == 'to_process' %}
{% translate "En attente de confection" %}
{% endif %} {% if order.notes %}
{{ order.notes|truncatechars:90 }}
{% endif %}
{% if order.order_components.all %}
{% translate "Composants requis" %} ({{ order.order_components.count }}) :
{% for comp in order.order_components.all %} {{ comp.product.name }} x{{ comp.quantity }} {% endfor %}
{% endif %}
{% empty %}
{% translate "Aucun bon de confection trouvé." %}
{% if prod_status or prod_warehouse or prod_destination or prod_search_q %}

{% translate "Aucun résultat ne correspond aux filtres appliqués." %}

{% translate "Effacer les filtres" %} {% else %}

{% translate "Aucun bon de confection enregistré." %}

{% if can_create_production_order %} {% translate "Créer un bon de confection" %} {% endif %} {% endif %}
{% endfor %}
{% if can_create_movement %} {% endif %} {% for batch in batches_with_movements %}
#{{ batch.pk }} {% if batch.movement_type == 'in' %} {% translate "Entrée" %} {% elif batch.movement_type == 'out' %} {% translate "Sortie" %} {% elif batch.movement_type == 'transfer' %} {% translate "Transfert" %} {% else %} {{ batch.get_movement_type_display }} {% endif %} {% if batch.movement_subtype %} {{ batch.get_movement_subtype_display }} {% endif %} {{ batch.date|date:"d/m/Y H:i" }} {% if batch.created_by %} {{ batch.created_by.get_full_name|default:batch.created_by.username }} {% endif %} {% if batch.reason %} {{ batch.reason }} {% endif %} {% if batch.movement_type != 'transfer' %} {% if batch.person %} {{ batch.person.name }} {% elif batch.company %} {{ batch.company.name }} {% endif %} {% endif %}
{% for movement in batch.movements.all %} {% empty %} {% endfor %}
{% translate "Produit" %} {% translate "Quantité" %} {% translate "Source" %} {% translate "Destination" %}
{{ movement.product.name }} {% if movement.source_location and movement.destination_location %} {{ movement.quantity }} {% elif movement.destination_location %} +{{ movement.quantity }} {% else %} -{{ movement.quantity }} {% endif %} {% if movement.source_location %} {{ movement.source_location.name }} {% else %}—{% endif %} {% if movement.destination_location %} {{ movement.destination_location.name }} {% else %}—{% endif %}
{% translate "Aucun article." %}
{% empty %}
{% translate "Aucun mouvement de stock." %}
{% endfor %}
{% if can_create_inventory %} {% endif %} {% for inventory in inventories %}
#{{ inventory.id }} {% if inventory.status == 'validated' %}{% elif inventory.status == 'in_progress' %}{% endif %} {{ inventory.get_status_display }} {{ inventory.warehouse_location.name }} {{ inventory.warehouse_location.warehouse.name }} {{ inventory.updated_at|date:"d/m/Y H:i" }}
{% translate "Responsable" %} {% translate "Articles" %}
{{ inventory.performed_by|default:"-" }} {{ inventory.total_items }}
{% empty %}
{% translate "Aucun inventaire enregistré." %}
{% endfor %}
{% endblock content%} {% block script %} {% endblock script %}