{% extends "base.html" %} {% load static %} {% load i18n %} {% block content %}

{% translate "Mouvement de stock" %} #{{ movement.pk }} {% if movement.source_location and movement.destination_location %} {% translate "Transfert" %} {% elif movement.destination_location %} {% translate "Entrée" %} {% else %} {% translate "Sortie" %} {% endif %}

{% translate "Retour" %}

{% translate "Produit" %}

{{ movement.product.name }}

{% if movement.product.code %} {{ movement.product.code }} {% endif %} {% if movement.product.category %}
{{ movement.product.category.name_fr }} {% endif %}
{% translate "Quantité" %}

{% if movement.source_location and movement.destination_location %} {{ movement.quantity }} {% elif movement.destination_location %} +{{ movement.quantity }} {% else %} {% if movement.quantity >= 0 %}-{% endif %}{{ movement.quantity }} {% endif %}

{% translate "Date" %}

{{ movement.date|date:"d/m/Y" }}

{{ movement.date|date:"H:i" }}
{% translate "Raison" %}
{% if movement.reason %}

{{ movement.reason }}

{% else %}

{% translate "Aucune raison indiquée" %}

{% endif %}
{% if movement.batch and movement.batch.person or movement.batch and movement.batch.company %}{# or movement.batch and movement.batch.contract #}
{% if movement.batch.person %}
{% translate "Personne" %}

{{ movement.batch.person.name }}

{{ movement.batch.person.teams_display }}
{% endif %} {% if movement.batch.company %}
{% translate "Entreprise / Organisation" %}

{{ movement.batch.company.name }}

{% endif %} {% comment %}{% if movement.batch.contract %}
{% translate "Contrat" %}

{{ movement.batch.contract.contract_number }}

{% if movement.batch.contract.company %} {{ movement.batch.contract.company.name }} {% endif %}
{% endif %}{% endcomment %}
{% endif %} {% if movement.batch %} {% endif %}
{% translate "Emplacement source" %}
{% if movement.source_location %}

{{ movement.source_location.name }}

{{ movement.source_location.warehouse.name }} {% else %}

{% translate "Aucun emplacement source (entrée directe)" %}

{% endif %}
{% translate "Emplacement destination" %}
{% if movement.destination_location %}

{{ movement.destination_location.name }}

{{ movement.destination_location.warehouse.name }} {% else %}

{% translate "Aucun emplacement destination (sortie directe)" %}

{% endif %}
{% endblock content %}