{% extends "base.html" %}{% block title %}Inventaire{% endblock %}{% block content %}<div class="container"><h1>Inventaire physique</h1><form method="get" class="mb-3"><select class="form-select" name="location_id" onchange="this.form.submit()"><option value="">Choisir un emplacement</option>{% for l in locations %}<option value="{{ l.id }}" {% if selected==l.id %}selected{% endif %}>{{ l.name }}</option>{% endfor %}</select></form>{% if selected %}<form method="post"><input type="hidden" name="csrf_token" value="{{ csrf_token() }}"><input type="hidden" name="location_id" value="{{ selected }}"><table class="table"><tr><th>Lot</th><th>Théorique</th><th>Compté</th></tr>{% for b in rows %}<tr><td>{{ b.lot.generic_product.name }} — {{ b.lot.lot_number }}<input type="hidden" name="line_lot_id" value="{{ b.lot_id }}"></td><td>{{ b.quantity }}</td><td><input class="form-control" name="counted_{{ b.lot_id }}" value="{{ b.quantity }}" step="0.000001" type="number"></td></tr>{% endfor %}</table><button class="btn btn-primary">Valider et tracer les écarts</button></form>{% endif %}</div>{% endblock %}
