{% extends "core/base.html" %}{% block content %}

{{ title }}

← Inventaire
{% csrf_token %} {{ form.non_field_errors }}
Article
{% include "core/form_field.html" with field=form.name %} {% include "core/form_field.html" with field=form.reference %} {% include "core/form_field.html" with field=form.item_type %} {% include "core/form_field.html" with field=form.unit_code %} {% include "core/form_field.html" with field=form.description wide=True %} {% if item.image_path %}{{ item.name }}{% endif %}
Prix et TVA
{% include "core/form_field.html" with field=form.unit_price_excluding_tax %} {% include "core/form_field.html" with field=form.vat_rate %}
Suivi du stock
{% include "core/form_field.html" with field=form.stock_tracking %} {% include "core/form_field.html" with field=form.reorder_level %}
{% if item.stock_tracking %}

STOCK DISPONIBLE

{{ item.stock|floatformat:"-4" }} {{ item.unit_code }}

Seuil d'alerte : {{ item.reorder_level|default:0 }}

{% if item.stock <= item.reorder_level %}

Le stock a atteint le seuil d'alerte.

{% endif %}
{% if can_write %}
{% csrf_token %}

Mouvement de stock

{% endif %}

Historique du stock

{% for m in movements %}{% empty %}{% endfor %}
DateSensQuantitéMotif
{{ m.occurred_on }}{{ m.movement_type }}{{ m.quantity|floatformat:"-4" }}{{ m.reason }}
Aucun mouvement.
{% endif %}{% if item and can_write %}
{% csrf_token %}
{% endif %}{% endblock %}