{% extends "base.html" %} {% import 'macros/empresa.html' as empresa_ui %} {% block title %}Auditoria de Estoque - CapeServer{% endblock %} {% block content %}

Auditoria de Estoque

Histórico completo de movimentações de estoque

Movimentações
{{ movimentos|length }} registros
{% if movimentos %} {% for mov in movimentos %} {% endfor %} {% else %} {% endif %}
Data/Hora Produto Depósito Tipo Origem Quantidade Est. Anterior Est. Resultante Usuário Observações
{{ mov.data_movimento.strftime('%d/%m/%Y') }}
{{ mov.data_movimento.strftime('%H:%M:%S') }}
{% if mov.produto_id %} {% set produto = namespace(nome='Produto #' ~ mov.produto_id) %} {% for p in produtos if p.id == mov.produto_id %} {% set produto.nome = p.nome %} {% endfor %} {{ produto.nome[:30] }}{% if produto.nome|length > 30 %}...{% endif %} {% else %} - {% endif %} {% if mov.deposito_origem %} {{ mov.deposito_origem.nome }} {% if mov.tipo == 'transferencia' and mov.deposito_destino %} {{ mov.deposito_destino.nome }} {% endif %} {% else %} Geral {% endif %} {% if mov.tipo == 'entrada' %} Entrada {% elif mov.tipo == 'saida' %} Saída {% elif mov.tipo == 'ajuste' %} Ajuste {% elif mov.tipo == 'transferencia' %} Transferência {% else %} {{ mov.tipo }} {% endif %} {{ mov.origem or '-' }} {% if mov.quantidade > 0 %} +{{ "%.3f"|format(mov.quantidade) }} {% elif mov.quantidade < 0 %} {{ "%.3f"|format(mov.quantidade) }} {% else %} 0 {% endif %} {% if mov.estoque_anterior is not none %} {{ "%.3f"|format(mov.estoque_anterior) }} {% else %} - {% endif %} {% if mov.estoque_resultante is not none %} {{ "%.3f"|format(mov.estoque_resultante) }} {% else %} - {% endif %} {% if mov.usuario %} {% set nome_usuario = mov.usuario.username if mov.usuario.username is defined and mov.usuario.username else (mov.usuario.email if mov.usuario.email is defined and mov.usuario.email else '-') %} {{ nome_usuario[:15] }} {% else %} - {% endif %} {% if mov.observacoes %} {{ mov.observacoes[:30] }}{% if mov.observacoes|length > 30 %}...{% endif %} {% elif mov.referencia %} Ref: {{ mov.referencia }} {% else %} - {% endif %}

Nenhuma movimentação encontrada

{% if filtros.produto_id or filtros.empresa_id or filtros.tipo or filtros.origem or filtros.data_inicio %} Limpar Filtros {% endif %}
{% if movimentos|length >= 500 %} {% endif %}
{% endblock %}