{% extends 'mobile/mobile_base.html' %} {% load static %} {% load i18n %} {% load stock_custom_filters %} {% block title %}{% translate "Lot" %} #{{ batch.pk }}{% endblock title %} {% block upleft %} {% endblock upleft %} {% block extra_head %} {% endblock extra_head %} {% block content %}
{% translate "Lot" %} #{{ batch.pk }}
{% if batch.movement_type == 'in' %} {% translate "Entrée" %} {% elif batch.movement_type == 'out' %} {% translate "Sortie" %} {% else %} {% translate "Transfert" %} {% 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.is_loan %}
{% translate "Suivi du prêt de matériel" %}
{% translate "Statut" %} {% if batch.loan_returned %} {% translate "Retourné" %} {% else %} {% if batch.is_overdue %} {% translate "En retard" %} {% else %} {% translate "En cours" %} {% endif %} {% endif %}
{% translate "Retour attendu" %} {{ batch.estimated_return_date|date:"d/m/Y"|default:"-" }}
{% if can_add_signature %}
{% csrf_token %} {% if batch.loan_returned %} {% else %} {% endif %}
{% endif %}
{% elif can_add_signature and batch.movement_type == 'out' %}
{% translate "Pas un prêt actuellement." %}
{% endif %} {% if batch.reason %}
{% translate "Raison" %}
{{ batch.reason }}
{% endif %} {% if batch.movement_type != 'transfer' %}{% if batch.person or batch.company or batch.requester %}
{% if batch.person %}
{% translate "Personne" %}
{{ batch.person.name }}
{% if batch.person.teams.exists %}
{{ batch.person.teams_display }}
{% endif %}
{% endif %} {% if batch.company %}
{% translate "Entreprise / Organisation" %}
{{ batch.company.name }}
{% endif %} {% if batch.requester %}
{% translate "Demandeur" %}
{{ batch.requester }}
{% endif %} {% comment %}{% if batch.contract %}
{% translate "Contrat" %}
{{ batch.contract.contract_number }}
{% if batch.contract.company %}
{{ batch.contract.company.name }}
{% endif %}
{% endif %}{% endcomment %}
{% endif %} {% endif %} {% if batch.preparation_order or batch.purchase_order %}
{% if batch.preparation_order %}
{% translate "Bon de préparation" %}
#{{ batch.preparation_order.order_number }} {{ batch.preparation_order.get_status_display }}
{% endif %} {% if batch.purchase_order %}
{% translate "Commande d'achat" %}
{{ batch.purchase_order.code }} {% if batch.purchase_order.supplier %}
{{ batch.purchase_order.supplier.name }}
{% endif %}
{% endif %}
{% endif %}
{% translate "Lignes" %} {{ batch.movements.count }}
{% for mv in batch.movements.all %}
{{ mv.product.name }}
{% if mv.product.code %}
{{ mv.product.code }}
{% endif %}
{% if mv.source_location %} {{ mv.source_location.name }} ({{ mv.source_location.warehouse.name }}) {% endif %} {% if mv.source_location and mv.destination_location %} → {% endif %} {% if mv.destination_location %} {{ mv.destination_location.name }} ({{ mv.destination_location.warehouse.name }}) {% endif %}
{% if mv.destination_location and not mv.source_location %}+{% endif %}{% if mv.source_location and not mv.destination_location %}-{% endif %}{{ mv.quantity }} {{ mv.product.unit }}
{% empty %}
{% translate "Aucune ligne." %}
{% endfor %}
{% translate "Signatures" %}
{% for sig in batch.signatures.all %}
{% translate 'Signature' %}
{{ sig.signature_name|default:sig.signed_by.get_full_name|default:sig.signed_by.username|default:"—" }}  ·  {{ sig.signed_at|date:"d/m/Y H:i" }}  {% translate "Verrouillée" %}
{% empty %}

{% translate "Aucune signature enregistrée." %}

{% endfor %}
{% if can_add_signature %}
{% translate "Ajouter une signature" %}
{% csrf_token %}
{% endif %} {% if batch.documents.all %}
{% translate "Documents joints" %}
{% for doc in batch.documents.all %} {% private_file_url doc 'file' as doc_url %}
{% if doc.is_image %} {% else %}{% endif %} {{ doc.filename }}
{% endfor %}
{% endif %} {% endblock content %} {% block extra_scripts %} {% if can_add_signature %} {% endif %} {% endblock extra_scripts %}