{% extends "base.html" %}{% block title %}Prévision{% endblock %}{% block content %}<div class="container"><h1>Prévision — {{ product.name }}</h1><form class="row g-2 mb-3"><div class="col-auto"><input class="form-control" type="date" name="target_date" value="{{ result.target_date.isoformat() }}"></div><div class="col-auto"><button class="btn btn-primary">Recalculer</button></div></form><table class="table"><tr><th>Élément</th><th>Quantité</th></tr><tr><td>Jours scolaires</td><td>{{ result.school_days_consumption }}</td></tr><tr><td>Permanences</td><td>{{ result.permanence_consumption }}</td></tr><tr><td>Fermetures</td><td>{{ result.closed_consumption }}</td></tr><tr><td>Consommation totale</td><td>{{ result.consumption_total }}</td></tr><tr><td>Stock utilisable</td><td>{{ result.usable_stock }}</td></tr><tr><td>Stock risquant d'expirer</td><td>{{ result.expiring_stock }}</td></tr><tr><td>Stock de sécurité</td><td>{{ result.safety_stock }}</td></tr><tr class="table-primary"><th>Besoin net</th><th>{{ result.net_need }}</th></tr><tr class="table-success"><th>Commande proposée</th><th>{{ result.packages_to_order }} conditionnement(s), soit {{ result.proposed_quantity }}</th></tr></table></div>{% endblock %}
