{% extends 'base.html' %} {% block title %}Movimentos - Lote {{ lote.numero_lote }}{% endblock %} {% block content %}
Lote: {{ lote.numero_lote }} | Produto: {{ lote.produto.nome }}
{{ lote.codigo_barras_lote }}
{{ "%.2f"|format(lote.quantidade_entrada) }} {{ lote.unidade }}
{{ "%.2f"|format(lote.quantidade_atual) }} {{ lote.unidade }}
{% if lote.esta_vencido %} VENCIDO {% else %} {{ lote.data_validade.strftime('%d/%m/%Y') }} {% endif %}
{% if lote.quantidade_atual <= 0 %} Zerado {% elif lote.esta_vencido %} Vencido {% elif lote.esta_proximo_vencimento %} Vence em {{ lote.dias_para_vencer }}d {% else %} Disponível {% endif %}
| Data/Hora | Tipo | Quantidade | Anterior | Depois | Observação | Usuário | Referência |
|---|---|---|---|---|---|---|---|
| {{ mov.data_movimento.strftime('%d/%m/%Y %H:%M') }} | {% if mov.tipo == 'entrada' %} Entrada {% elif mov.tipo == 'saida' %} Saída {% elif mov.tipo == 'ajuste' %} Ajuste {% elif mov.tipo == 'perda' %} Perda {% elif mov.tipo == 'devolucao' %} Devolução {% else %} {{ mov.tipo }} {% endif %} | {{ "%.2f"|format(mov.quantidade) }} | {{ "%.2f"|format(mov.quantidade_anterior or 0) }} | {{ "%.2f"|format(mov.quantidade_depois or 0) }} | {{ mov.observacao or '-' }} | {% if mov.usuario %} {{ mov.usuario.username }} {% else %} Sistema {% endif %} | {% if mov.venda_id %} Venda #{{ mov.venda_id }} {% elif mov.entrada_mercadoria_id %} Entrada #{{ mov.entrada_mercadoria_id }} {% else %} - {% endif %} |