{% extends 'mobile/mobile_base.html' %} {% load static %} {% load i18n %} {% block title %}{% translate "Entrées / Sorties" %}{% endblock title %} {% block upleft %} {% endblock upleft %} {% block extra_head %} {% endblock extra_head %} {% block content %}
{% translate "Entrée" %} {% translate "Sortie" %} {% translate "Transfert" %}
{% if batches %}
{% for batch in batches %}
# {{ batch.id }}
{% 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 %}
{{ batch.date|date:"d/m/Y H:i" }}
{% if batch.movement_type != 'transfer' %} {% if batch.person %}
{{ batch.person.name }}
{% elif batch.company %}
{{ batch.company.name }}
{% endif %} {% endif %} {% if batch.created_by %}
{{ batch.created_by.get_full_name|default:batch.created_by.username }}
{% endif %} {% if batch.reason %}
{{ batch.reason|truncatechars:60 }}
{% endif %}
{% with movements=batch.movements.all %} {% if movements %}
{% for movement in movements %}
{{ movement.product.name }}
{{ movement.source_location.name|default:"—" }} → {{ movement.destination_location.name|default:"—" }} {% if movement.source_location and movement.destination_location %} {{ movement.quantity }} {% elif movement.destination_location %} +{{ movement.quantity }} {% else %} -{{ movement.quantity }} {% endif %}
{% endfor %}
{% endif %} {% endwith %}
{% endfor %} {% else %}
{% translate "Aucun mouvement de stock." %}
{% endif %} {% endblock content %} {% block extra_scripts %} {% endblock extra_scripts %}