365 lines
13 KiB
HTML
365 lines
13 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="pt-br">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<title>Comprovante - Solicitação {{ solicitacao.id }}</title>
|
|
<style>
|
|
@page {
|
|
size: A4;
|
|
margin: 1cm;
|
|
}
|
|
body {
|
|
font-family: Arial, Helvetica, sans-serif;
|
|
font-size: 12px;
|
|
color: #111827;
|
|
}
|
|
h1 {
|
|
font-size: 18px;
|
|
margin: 0 0 10px 0;
|
|
}
|
|
h2 {
|
|
font-size: 14px;
|
|
margin: 18px 0 8px 0;
|
|
border-top: 1px solid #e5e7eb;
|
|
padding-top: 8px;
|
|
}
|
|
.meta {
|
|
margin-bottom: 10px;
|
|
}
|
|
.meta-row {
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
gap: 12px;
|
|
}
|
|
.kv {
|
|
margin: 0 0 6px 0;
|
|
}
|
|
.label {
|
|
font-weight: bold;
|
|
color: #374151;
|
|
}
|
|
table {
|
|
width: 100%;
|
|
border-collapse: collapse;
|
|
margin-top: 6px;
|
|
}
|
|
td, th {
|
|
border: 1px solid #e5e7eb;
|
|
padding: 6px;
|
|
vertical-align: top;
|
|
}
|
|
.section-note {
|
|
margin-top: 6px;
|
|
color: #6b7280;
|
|
font-size: 11px;
|
|
}
|
|
.muted {
|
|
color: #6b7280;
|
|
}
|
|
.box {
|
|
border: 1px solid #e5e7eb;
|
|
border-radius: 6px;
|
|
padding: 10px;
|
|
margin-top: 8px;
|
|
}
|
|
.parecer {
|
|
margin-top: 8px;
|
|
padding-top: 8px;
|
|
border-top: 1px dashed #e5e7eb;
|
|
}
|
|
.page-break {
|
|
page-break-after: always;
|
|
}
|
|
.nowrap {
|
|
white-space: nowrap;
|
|
}
|
|
pre {
|
|
white-space: pre-wrap;
|
|
font-family: inherit;
|
|
margin: 0;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<h1>Comprovante da Solicitação</h1>
|
|
|
|
<div class="meta">
|
|
<div class="kv"><span class="label">ID:</span> {{ solicitacao.id }}</div>
|
|
<div class="kv"><span class="label">Tipo de Processo:</span> {{ solicitacao.get_tipo_display }}</div>
|
|
<div class="kv"><span class="label">Solicitante:</span> {{ solicitacao.solicitante.nome }} ({{ solicitacao.solicitante.matricula }})</div>
|
|
<div class="kv"><span class="label">Status:</span> {{ solicitacao.get_status_display }}</div>
|
|
<div class="kv"><span class="label">Enviada em:</span> {{ solicitacao.enviada_em|date:"d/m/Y H:i"|default:"-" }}</div>
|
|
<div class="kv"><span class="label">Finalizada em:</span> {{ solicitacao.finalizada_em|date:"d/m/Y H:i"|default:"-" }}</div>
|
|
<div class="kv muted"><span class="label">Gerado em:</span> {{ gerado_em|date:"d/m/Y H:i" }}</div>
|
|
</div>
|
|
|
|
{% if solicitacao.funcionario %}
|
|
<h2>Dados do Colaborador (Snapshot RM)</h2>
|
|
<div class="section-note">Os dados abaixo representam um snapshot no momento da criação.</div>
|
|
<table>
|
|
<tr>
|
|
<th style="width: 25%;">Matrícula</th>
|
|
<td>{{ solicitacao.funcionario.matricula }}</td>
|
|
</tr>
|
|
<tr>
|
|
<th>Nome</th>
|
|
<td>{{ solicitacao.funcionario.nome }}</td>
|
|
</tr>
|
|
<tr>
|
|
<th>CPF</th>
|
|
<td>{{ solicitacao.funcionario.cpf|default:"-" }}</td>
|
|
</tr>
|
|
<tr>
|
|
<th>Data de Admissão</th>
|
|
<td>{{ solicitacao.funcionario.data_admissao|date:"d/m/Y"|default:"-" }}</td>
|
|
</tr>
|
|
<tr>
|
|
<th>Cargo/Função</th>
|
|
<td>{{ solicitacao.funcionario.cargo|default:"-" }}</td>
|
|
</tr>
|
|
<tr>
|
|
<th>Cód. Função</th>
|
|
<td>{{ solicitacao.funcionario.cod_funcao|default:"N/A" }}</td>
|
|
</tr>
|
|
<tr>
|
|
<th>Setor/Seção</th>
|
|
<td>{{ solicitacao.funcionario.setor|default:"-" }}</td>
|
|
</tr>
|
|
<tr>
|
|
<th>Centro de Custo</th>
|
|
<td>{{ solicitacao.funcionario.centro_custo|default:"-" }}</td>
|
|
</tr>
|
|
{% if solicitacao.funcionario.salario %}
|
|
<tr>
|
|
<th>Salário Atual</th>
|
|
<td>R$ {{ solicitacao.funcionario.salario|floatformat:2 }}</td>
|
|
</tr>
|
|
{% endif %}
|
|
{% if horas_banco_horas is not none %}
|
|
<tr>
|
|
<th>Banco de Horas (horas)</th>
|
|
<td>{{ horas_banco_horas|floatformat:2 }}</td>
|
|
</tr>
|
|
{% endif %}
|
|
</table>
|
|
{% endif %}
|
|
|
|
{% if dados_winthor_organizados %}
|
|
<h2>Dados do Colaborador (Winthor)</h2>
|
|
<table>
|
|
<tr>
|
|
<th style="width: 25%;">Matrícula</th>
|
|
<td>{{ dados_winthor_organizados.basicos.matricula|default:"-" }}</td>
|
|
</tr>
|
|
<tr>
|
|
<th>Nome</th>
|
|
<td>{{ dados_winthor_organizados.basicos.nome|default:"-" }}</td>
|
|
</tr>
|
|
<tr>
|
|
<th>CPF</th>
|
|
<td>{{ dados_winthor_organizados.basicos.cpf|default:"-" }}</td>
|
|
</tr>
|
|
{% if dados_winthor_organizados.admissao %}
|
|
<tr>
|
|
<th>Data de Admissão</th>
|
|
<td>
|
|
{% if dados_winthor_organizados.admissao.admissao %}
|
|
{% if dados_winthor_organizados.admissao.admissao|date:"d/m/Y" %}
|
|
{{ dados_winthor_organizados.admissao.admissao|date:"d/m/Y" }}
|
|
{% else %}
|
|
{{ dados_winthor_organizados.admissao.admissao }}
|
|
{% endif %}
|
|
{% else %}-{% endif %}
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<th>Situação</th>
|
|
<td>{{ dados_winthor_organizados.admissao.situacao|default:"-" }}</td>
|
|
</tr>
|
|
{% endif %}
|
|
</table>
|
|
{% endif %}
|
|
|
|
<h2>Detalhes do Processo</h2>
|
|
{% if solicitacao.tipo == 'DESLIGAMENTO' and solicitacao.desligamento %}
|
|
<table>
|
|
<tr>
|
|
<th style="width: 30%;">Tipo de Desligamento</th>
|
|
<td>{{ solicitacao.desligamento.get_tipo_desligamento_display|default:"-" }}</td>
|
|
</tr>
|
|
<tr>
|
|
<th>Aviso Prévio</th>
|
|
<td>{{ solicitacao.desligamento.get_aviso_previo_display|default:"-" }}</td>
|
|
</tr>
|
|
<tr>
|
|
<th>Data Prevista de Saída</th>
|
|
<td>{{ solicitacao.desligamento.data_prevista_desligamento|date:"d/m/Y"|default:"-" }}</td>
|
|
</tr>
|
|
<tr>
|
|
<th>Detalhamento / Justificativa</th>
|
|
<td><pre>{{ solicitacao.desligamento.motivo|default:"-" }}</pre></td>
|
|
</tr>
|
|
{% if solicitacao.desligamento.arquivo_pedido %}
|
|
<tr>
|
|
<th>Carta de Pedido</th>
|
|
<td>{{ solicitacao.desligamento.arquivo_pedido.name }}</td>
|
|
</tr>
|
|
{% endif %}
|
|
{% if solicitacao.desligamento.observacoes %}
|
|
<tr>
|
|
<th>Observações</th>
|
|
<td><pre>{{ solicitacao.desligamento.observacoes }}</pre></td>
|
|
</tr>
|
|
{% endif %}
|
|
</table>
|
|
{% elif solicitacao.tipo == 'MOVIMENTACAO' and solicitacao.movimentacao %}
|
|
<table>
|
|
<tr>
|
|
<th style="width: 30%;">Data Efetivação</th>
|
|
<td>{{ solicitacao.movimentacao.data_efetivacao|date:"d/m/Y"|default:"-" }}</td>
|
|
</tr>
|
|
<tr>
|
|
<th>Nova Função</th>
|
|
<td>
|
|
{% if solicitacao.movimentacao.altera_funcao %}
|
|
{{ solicitacao.movimentacao.novo_cod_funcao|default:"-" }}
|
|
{% else %}-{% endif %}
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<th>Nova Seção</th>
|
|
<td>
|
|
{% if solicitacao.movimentacao.altera_centro_custo %}
|
|
{{ solicitacao.movimentacao.novo_cod_secao|default:"-" }}
|
|
{% else %}-{% endif %}
|
|
</td>
|
|
</tr>
|
|
{% if solicitacao.movimentacao.novo_salario %}
|
|
<tr>
|
|
<th>Novo Salário</th>
|
|
<td>R$ {{ solicitacao.movimentacao.novo_salario }}</td>
|
|
</tr>
|
|
{% endif %}
|
|
<tr>
|
|
<th>Justificativa</th>
|
|
<td><pre>{{ solicitacao.movimentacao.justificativa|default:"-" }}</pre></td>
|
|
</tr>
|
|
</table>
|
|
{% elif solicitacao.tipo == 'ADM_SUBSTITUICAO' and solicitacao.admissao_substituicao %}
|
|
<table>
|
|
<tr>
|
|
<th style="width: 30%;">Data Prevista</th>
|
|
<td>{{ solicitacao.admissao_substituicao.data_previsao_contratacao|date:"d/m/Y"|default:"-" }}</td>
|
|
</tr>
|
|
<tr>
|
|
<th>Coligada/Filial Destino</th>
|
|
<td>{{ solicitacao.admissao_substituicao.cod_coligada_destino }} / {{ solicitacao.admissao_substituicao.cod_filial_destino }}</td>
|
|
</tr>
|
|
<tr>
|
|
<th>Seção Destino</th>
|
|
<td>{{ solicitacao.admissao_substituicao.cod_secao_destino|default:"-" }}</td>
|
|
</tr>
|
|
<tr>
|
|
<th>Função Destino</th>
|
|
<td>{{ solicitacao.admissao_substituicao.cod_funcao_destino|default:"-" }}</td>
|
|
</tr>
|
|
<tr>
|
|
<th>Justificativa</th>
|
|
<td><pre>{{ solicitacao.admissao_substituicao.justificativa|default:"-" }}</pre></td>
|
|
</tr>
|
|
</table>
|
|
{% elif solicitacao.tipo == 'ADM_AUMENTO' and solicitacao.admissao_aumento %}
|
|
<table>
|
|
<tr>
|
|
<th style="width: 30%;">Data Prevista</th>
|
|
<td>{{ solicitacao.admissao_aumento.data_previsao_contratacao|date:"d/m/Y"|default:"-" }}</td>
|
|
</tr>
|
|
<tr>
|
|
<th>Local Destino</th>
|
|
<td>Col: {{ solicitacao.admissao_aumento.cod_coligada_destino }} | Fil: {{ solicitacao.admissao_aumento.cod_filial_destino }}</td>
|
|
</tr>
|
|
<tr>
|
|
<th>Seção Destino</th>
|
|
<td>{{ solicitacao.admissao_aumento.cod_secao_destino|default:"-" }}</td>
|
|
</tr>
|
|
<tr>
|
|
<th>Função Destino</th>
|
|
<td>{{ solicitacao.admissao_aumento.cod_funcao_destino|default:"-" }}</td>
|
|
</tr>
|
|
<tr>
|
|
<th>Justificativa Estratégica</th>
|
|
<td><pre>{{ solicitacao.admissao_aumento.justificativa_estrategica|default:"-" }}</pre></td>
|
|
</tr>
|
|
</table>
|
|
{% else %}
|
|
<div class="box">Detalhes não disponíveis para este tipo de solicitação.</div>
|
|
{% endif %}
|
|
|
|
<h2>Pareceres Técnicos</h2>
|
|
<div class="box">
|
|
<div class="label">Gente e Gestão</div>
|
|
{% if pareceres_gg %}
|
|
{% for parecer in pareceres_gg %}
|
|
<div class="parecer">
|
|
<div><strong>{{ parecer.usuario.nome }}</strong> <span class="muted">({{ parecer.criado_em|date:"d/m/Y H:i" }})</span></div>
|
|
<div style="margin-top:6px;"><pre>{{ parecer.texto|default:"" }}</pre></div>
|
|
{% if parecer.anexo %}
|
|
<div class="section-note">Anexo: {{ parecer.anexo.name }}</div>
|
|
{% endif %}
|
|
</div>
|
|
{% endfor %}
|
|
{% else %}
|
|
<div class="section-note">Aguardando parecer de GG...</div>
|
|
{% endif %}
|
|
</div>
|
|
|
|
<div class="box">
|
|
<div class="label">Controladoria</div>
|
|
{% if pareceres_controladoria %}
|
|
{% for parecer in pareceres_controladoria %}
|
|
<div class="parecer">
|
|
<div><strong>{{ parecer.usuario.nome }}</strong> <span class="muted">({{ parecer.criado_em|date:"d/m/Y H:i" }})</span></div>
|
|
<div style="margin-top:6px;"><pre>{{ parecer.texto|default:"" }}</pre></div>
|
|
{% if parecer.anexo %}
|
|
<div class="section-note">Anexo: {{ parecer.anexo.name }}</div>
|
|
{% endif %}
|
|
</div>
|
|
{% endfor %}
|
|
{% else %}
|
|
<div class="section-note">Aguardando parecer da Controladoria...</div>
|
|
{% endif %}
|
|
</div>
|
|
|
|
<h2>Histórico de Aprovações</h2>
|
|
<table>
|
|
<tr>
|
|
<th style="width: 20%;">Etapa</th>
|
|
<th style="width: 20%;">Decisão</th>
|
|
<th style="width: 30%;">Aprovador</th>
|
|
<th style="width: 15%;">Data</th>
|
|
<th>Justificativa</th>
|
|
</tr>
|
|
{% for aprovacao in solicitacao.aprovacoes.all %}
|
|
<tr>
|
|
<td>{{ aprovacao.get_etapa_display|default:aprovacao.etapa }}</td>
|
|
<td>
|
|
{% if aprovacao.decisao == 'APROVADO' %}
|
|
APROVADO
|
|
{% else %}
|
|
REPROVADO
|
|
{% endif %}
|
|
</td>
|
|
<td>{{ aprovacao.usuario.nome }}</td>
|
|
<td>{{ aprovacao.decidido_em|date:"d/m/Y H:i" }}</td>
|
|
<td><pre>{{ aprovacao.justificativa|default:"-" }}</pre></td>
|
|
</tr>
|
|
{% empty %}
|
|
<tr>
|
|
<td colspan="5" class="muted">Nenhuma decisão registrada ainda.</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</table>
|
|
</body>
|
|
</html>
|
|
|