{% extends "base.html" %} {% block title %}{{ producto.nombre }}{% endblock %} {% block page_title %}{{ producto.nombre }}{% endblock %} {% block topbar_actions %} Editar ficha Volver {% endblock %} {% block content %}
{{ producto.descripcion }}
{{ "%.2f"|format(producto.precio_ref) }} €
{{ producto.notas }}
| Factura | Fecha | Proveedor | Cantidad | P. unit. | Dto. | Subtotal |
|---|---|---|---|---|---|---|
| {{ c.factura_numero }} | {{ c.fecha }} | {% if c.proveedor_id %} {{ c.proveedor_nombre }} {% else %}—{% endif %} | {{ "%.0f"|format(c.cantidad) if c.cantidad % 1 == 0 else "%.2f"|format(c.cantidad) }} | {{ "%.2f"|format(c.precio_unitario) }} € | {% if c.descuento_pct %}{{ c.descuento_pct }}%{% else %}—{% endif %} | {{ "%.2f"|format(c.subtotal) }} € |
| TOTAL | {{ "%.0f"|format(stats.total_unidades or 0) if not stats.total_unidades or stats.total_unidades % 1 == 0 else "%.2f"|format(stats.total_unidades) }} | avg {{ "%.2f"|format(stats.precio_medio or 0) }} € | {{ "%.2f"|format(stats.total_gastado or 0) }} € | |||