Nº Recibo: #{{ movimento.id }}
Data/Hora: {{ movimento.data_hora.strftime('%d/%m/%Y %H:%M') }}
Operador: {{ movimento.usuario.username }}
{% if cliente_nome %}
Referente:
{{ movimento.descricao }}
{% if movimento.categoria == 'venda' and movimento.venda %}
DETALHES DO PEDIDO Nº {{ movimento.venda.numero_pedido }}
Data: {{ movimento.venda.data_venda.strftime('%d/%m/%Y') if movimento.venda.data_venda else 'N/A' }}
{% if movimento.venda.itens %}
| Produto |
Qtd |
Preço |
Total |
{% for item in movimento.venda.itens %}
| {{ item.produto.nome if item.produto else item.descricao }} |
{{ item.quantidade }} |
{{ "%.2f"|format(item.valor_unitario) }} |
{{ "%.2f"|format(item.valor_total) }} |
{% endfor %}
Subtotal: R$ {{ "%.2f"|format(movimento.venda.valor_total) }}
{% endif %}
{% elif movimento.categoria == 'servico' and movimento.ordem_servico %}
DETALHES DA OS Nº {{ movimento.ordem_servico.numero_os }}
Data Abertura: {{ movimento.ordem_servico.data_abertura.strftime('%d/%m/%Y') }}
{% if movimento.ordem_servico.equipamentos %}
Equipamento:
{{ movimento.ordem_servico.equipamentos[0].descricao or movimento.ordem_servico.equipamentos[0].equipamento.nome }}
{% if movimento.ordem_servico.equipamentos[0].numero_serie %}
S/N: {{ movimento.ordem_servico.equipamentos[0].numero_serie }}
{% endif %}
{% endif %}
{% if movimento.ordem_servico.defeito_relatado %}
Defeito Relatado:
{{ movimento.ordem_servico.defeito_relatado }}
{% endif %}
{% if movimento.ordem_servico.solucao %}
Solução Aplicada:
{{ movimento.ordem_servico.solucao }}
{% endif %}
{% if movimento.ordem_servico.valor_mao_obra %}
Mão de Obra: R$ {{ "%.2f"|format(movimento.ordem_servico.valor_mao_obra) }}
{% endif %}
{% if movimento.ordem_servico.valor_pecas %}
Peças: R$ {{ "%.2f"|format(movimento.ordem_servico.valor_pecas) }}
{% endif %}
{% if movimento.ordem_servico.valor_deslocamento %}
Deslocamento: R$ {{ "%.2f"|format(movimento.ordem_servico.valor_deslocamento) }}
{% endif %}
{% endif %}