{% extends "base.html" %} {% block title %}Curva ABC de Produtos - CapeSystem{% endblock %} {% block content %} {% set criterio_label = 'Faturamento' if criterio == 'faturamento' else 'Quantidade' %} {% set criterio_unidade = 'R$' if criterio == 'faturamento' else '' %} {% set base_total_abc = resumo.valor_base_abc or 0 %} {% set percentual_curva_a = ((resumo_curva['A']['valor'] / base_total_abc) * 100) if base_total_abc else 0 %} {% set percentual_curva_b = ((resumo_curva['B']['valor'] / base_total_abc) * 100) if base_total_abc else 0 %} {% set percentual_curva_c = ((resumo_curva['C']['valor'] / base_total_abc) * 100) if base_total_abc else 0 %}
| # | Código | Produto | Grupo | Quantidade | Faturamento | Base ABC | Participação | Acumulado | Curva |
|---|---|---|---|---|---|---|---|---|---|
| {{ loop.index }} | {{ item.codigo or '-' }} |
{{ item.nome[:45] }} {% if item.nome|length > 45 %}...{% endif %} | {{ item.grupo or '-' }} | {{ "%.2f"|format(item.quantidade) }} | R$ {{ "%.2f"|format(item.faturamento) }} | {% if criterio == 'faturamento' %} R$ {{ "%.2f"|format(item.valor_base_abc) }} {% else %} {{ "%.2f"|format(item.valor_base_abc) }} {% endif %} | {{ "%.2f"|format(item.participacao) }}% | {{ "%.2f"|format(item.acumulado) }}% | {{ item.curva }} |
| Nenhuma venda encontrada para os filtros informados | |||||||||