{% extends "base.html" %} {% load static %} {% load i18n %} {% block head %} {% endblock %} {% block content %}
{% if selected_status or selected_priority or search_q %} {% 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 can_create_production_order %} {% endif %} {% for order in production_orders %}
{{ order.code }} {% 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 }} {% elif order.status == 'cancelled' %} {{ order.get_status_display }} {% endif %} {{ order.created_at|date:"d/m/Y" }}
{% translate "Entrepôt" %} {% translate "Quantité" %} {% translate "Bon de prép." %}
{{ order.warehouse.name }} {{ order.quantity }} {% if order.preparation_order %} #{{ order.preparation_order.order_number }} {% else %} - {% endif %}
{% empty %}
{% translate "Aucun bon de confection." %}
{% 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 %}