{% extends 'mobile/mobile_base.html' %} {% load static %} {% load i18n %} {% block title %}{{ product.name }}{% endblock title %} {% block upleft %} {% endblock upleft %} {% block extra_head %} {% endblock extra_head %} {% block content %}
{% translate "Code" %} / SKU
{{ product.code }}{% if product.sku %} · {{ product.sku }}{% endif %}
{{ product.name }}
{% if product.category %} {{ product.category.name_fr }} {% endif %}
{% if product.total_stock <= product.threshold %} {{ product.total_stock }} {{ product.unit }} {% else %} {{ product.total_stock }} {{ product.unit }} {% endif %}
{% translate "Stock total" %}
{{ product.total_stock }}{{ product.unit }}
{% translate "Seuil d'alerte" %}
{{ product.threshold }}{{ product.unit }}
{% if product.price %}
{% translate "Prix unitaire" %}
{{ product.price|floatformat:2 }} €
{% endif %}
{% translate "Unité" %}
{{ product.get_unit_display }}
{% if product.description %}
{% translate "Description" %}
{{ product.description }}
{% endif %}
{% translate "Stocks par emplacement" %}
{% for stock in stocks %}
{{ stock.location.warehouse.name }}
{{ stock.location.name }}
{{ stock.quantity }} {{ product.unit }} {% if is_stock_manager %} {% if stock.can_administer %} {% endif %} {% endif %}
{% empty %}
{% translate "Aucun stock enregistré." %}
{% endfor %}
{% if is_stock_manager %} {% endif %} {% if product.is_serialized and serialized_items is not None %}
{% translate "Articles tracés" %} {{ serialized_items|length }}
{% for si in serialized_items %}
{{ si.serial_number }}
{% if si.current_holder %} {{ si.current_holder.name }} {% elif si.current_location %} {{ si.current_location.warehouse.name }} — {{ si.current_location.name }} {% else %} {% translate "Non assigné" %} {% endif %}
{% if si.status == 'available' %} {{ si.get_status_display }} {% elif si.status == 'assigned' %} {{ si.get_status_display }} {% elif si.status == 'lost' %} {{ si.get_status_display }} {% else %} {{ si.get_status_display }} {% endif %}
{% empty %}
{% translate "Aucun article tracé enregistré." %}
{% endfor %}
{% endif %}
{% for mv in recent_movements %}
{% if mv.source_location and mv.destination_location %} {% translate "Transfert" %} {{ mv.source_location.warehouse.name }} → {{ mv.destination_location.warehouse.name }} {% elif mv.destination_location %} {% translate "Entrée" %} {{ mv.destination_location.warehouse.name }} {% else %} {% translate "Sortie" %} {% if mv.source_location %}{{ mv.source_location.warehouse.name }}{% endif %} {% endif %}
{{ mv.date|date:"d/m/Y H:i" }} {% if mv.reason %} · {{ mv.reason }}{% endif %}
{% if mv.batch %}
Lot #{{ mv.batch.pk }} {% if mv.batch.preparation_order %} · BP #{{ mv.batch.preparation_order.order_number }}{% endif %} {% if mv.batch.purchase_order %} · {{ mv.batch.purchase_order.code }}{% endif %}
{% endif %}
{% if mv.destination_location %}+{% else %}-{% endif %}{{ mv.quantity|floatformat:0 }} {{ product.unit }}
{% empty %}
{% translate "Aucun mouvement enregistré." %}
{% endfor %}

{% for item in pending_orders %}
{{ item.purchase_order.supplier.name }}
{{ item.purchase_order.date_ordered|date:"d/m/Y" }} · {{ item.purchase_order.warehouse.name }} {{ item.purchase_order.get_status_display }}
{{ item.quantity }} {{ product.unit }}
{% empty %}
{% translate "Aucune commande en cours." %}
{% endfor %}

{% for item in order_history %}
{{ item.purchase_order.supplier.name }}
{{ item.purchase_order.date_ordered|date:"d/m/Y" }} · {{ item.purchase_order.warehouse.name }} {% if item.purchase_order.status == 'received' %} {% translate "Reçue" %} {% else %} {{ item.purchase_order.get_status_display }} {% endif %}
{{ item.quantity }} {{ product.unit }}
{% empty %}
{% translate "Aucun historique de commande." %}
{% endfor %}

{% if product.qr_code %}
{% translate "QR Code" %}
QR Code {{ product.code }}
{{ product.code }}
{% endif %} {% endblock content %} {% if is_stock_manager %} {% block extra_scripts %} {% endblock extra_scripts %} {% endif %}