| Código | Descrição do Produto | UN | NCM | Custo Unit. | Qtd Sistema | Qtd Contada | Diferença | Valor Sistema | Valor Dif. |
|---|---|---|---|---|---|---|---|---|---|
| {{ item.codigo_produto or '-' }} | {{ item.nome_produto[:50] }} | {{ un }} | {{ item.ncm or '-' }} | {{ "%.2f"|format(item.custo_unitario) }} | {{ formato_qtd|format(item.quantidade_sistema) }} | {% if item.contado %}{{ formato_qtd|format(item.quantidade_contada) }}{% else %}-{% endif %} | {% if item.contado and item.diferenca != 0 %} {% if item.diferenca > 0 %}+{% endif %}{{ formato_qtd|format(item.diferenca) }} {% else %} - {% endif %} | {{ "%.2f"|format(item.valor_sistema) }} | {% if item.contado and item.valor_diferenca != 0 %} {% if item.valor_diferenca > 0 %}+{% endif %}{{ "%.2f"|format(item.valor_diferenca) }} {% else %} - {% endif %} |
| TOTAIS | {{ "%.2f"|format(inventario.total_quantidade_sistema) }} | {{ "%.2f"|format(inventario.total_quantidade_contada) if algum_contado else '-' }} | {% if algum_contado and inventario.total_diferenca != 0 %}{% if inventario.total_diferenca > 0 %}+{% endif %}{{ "%.2f"|format(inventario.total_diferenca) }}{% else %}-{% endif %} | {{ "%.2f"|format(inventario.valor_total_sistema) }} | {% if algum_contado and inventario.valor_diferenca != 0 %}{% if inventario.valor_diferenca > 0 %}+{% endif %}{{ "%.2f"|format(inventario.valor_diferenca) }}{% else %}-{% endif %} | ||||