Skip to content

Instantly share code, notes, and snippets.

@linikerunk
Created February 1, 2021 19:02
Show Gist options
  • Select an option

  • Save linikerunk/cc9bf5ff733110568e24e89f19f16a92 to your computer and use it in GitHub Desktop.

Select an option

Save linikerunk/cc9bf5ff733110568e24e89f19f16a92 to your computer and use it in GitHub Desktop.
<script type="text/javascript">
$(function(){
<? if($_REQUEST["M2"]){?>
$("#divMsg").parent().removeClass().addClass("notification").addClass('success').show();
<? }else{ ?>
$("#divMsg").parent().removeClass().hide();
<? } ?>
$('#tabelaPlanosPagamentoSerie tbody tr:even').addClass("alt-row");
$('#tabelaDocumentosEntregues tbody tr:even').addClass("alt-row");
$('#tabelaPeriodosLetivos tbody tr:even').addClass("alt-row");
$("a[rel='address']").address();
$("a[rel='fancybox']").fancybox({
showNavArrows: false
});
$(".window-open").click(function(){
window.open($(this).attr('href'));
return false;
});
$('.check-all').click(function(){
$(this).parent().parent().parent().parent().find("input[type='checkbox']").attr('checked', $(this).is(':checked'));
});
$('#formDocumentosEntregues').validate({
submitHandler: function()
{
var dados = $("#formDocumentosEntregues").serialize();
$.post('Controle.php?Controlador=Matriculas&Acao=Ver', dados, function(resposta){});
}
});
$("#tabelaPlanosPagamentoSerie a[title='Excluir']").click(function(){
alert("Atençao!\nOperação Perigosa!");
if (confirm("Confirma exclusão do plano de pagamento?"))
{
var Codigo = $(this).attr("id");
var CodigoAluno = $(this).attr("aluno");
var dados = 'Controlador=PlanoPagamentoMatricula&Acao=Excluir&Codigo='+Codigo+'&Matricula='+CodigoAluno;
$.ajax({
url: 'Controle.php',
data: dados,
type: 'post',
dataType: 'json',
success: function(resposta){
if (!resposta)
{
document.location.reload();
}
else
{
if (resposta.erro)
{
//alert(resposta.msg);
$("#divMsg").html(resposta.msg).parent().removeClass().addClass("notification").addClass('error').show();
}
else
{
$.address.value('Matriculas/Ver/?M2=1&Codigo='+CodigoAluno+'&rand='+Math.random() );
}
}
}
});
}
return false;
});
<? if($_REQUEST["M3"]){?>
$("#divMsg").parent().removeClass().addClass("notification").addClass('success').show();
<? }else{ ?>
$("#divMsg").parent().removeClass().hide();
<? } ?>
$("#tabelaBoletimObservacoes a[title='Excluir']").click(function(){
alert("Atençao!\nOperação Perigosa!");
if (confirm("Confirma exclusão da observação?"))
{
var Codigo = $(this).attr("id");
var CodigoAluno = $(this).attr("aluno");
var dados = 'Controlador=BoletimObservacoes&Acao=Excluir&Codigo='+Codigo;
$.get('Controle.php', dados, function(resposta){
if (!resposta) document.location.reload();
else $("#divMsgPL").html(resposta).parent().show();
});
}
return false;
});
$("#formPeriodosLetivos a[title='Excluir']").click(function()
{
alert("Atençao!\nOperação Perigosa!");
if (confirm("Confirma exclusão da disciplina deste currículo?"))
{
var Codigo = $(this).attr("id");
var dados = 'Controlador=MatriculaPeriodosLetivos&Acao=Excluir&Codigo=' + Codigo;
$.get('Controle.php', dados, function(resposta)
{
if (!resposta)
document.location.reload();
else
$("#divMsgPL").html(resposta).parent().show();
});
}
return false;
});
$("#tabelaDependencias a[title='Excluir']").click(function(){
alert("Atençao!\nOperação Perigosa!");
if (confirm("Confirma exclusão desta dependencia?"))
{
var Codigo = $(this).attr("id");
var dados = 'Controlador=Dependencias&Acao=Excluir&Codigo=' + Codigo;
$.get('Controle.php', dados, function(resposta){
if (!resposta) document.location.reload();
else $("#divMsg").html(resposta).parent().show();
});
}
return false;
});
$("a[title='Dependencia']").fancybox();
});
</script>
<div class="clear"></div>
{% button_set() %}
<?php if (!$is_isaac_white_label): ?>
{% button_set_item() %}
{% if feature_is_enabled('NovoAcademicoFeature') %}
{% link_to_edit({'href': '#/!/academico/aluno_serie/<?=$Matricula->Codigo?>/edit/'|safe, 'icon': 'img/icons/pencil_48.png'}) %}
{% else %}
{% link_to_edit({'href': '#/Matriculas/Editar/?Codigo=<?=$Matricula->Codigo?>'|safe, 'icon': 'img/icons/pencil_48.png'}) %}
{% endif %}
{% endbutton_set_item %}
<? if (!Configuracao::singleton()->isInstituicaoPublica()) { ?>
{% button_set_item() %}
{% link_to_add({'href': '#/PlanoPagamentoMatricula/Cadastrar/?CodMatricula=<?=$Matricula->Codigo?>'|safe, 'name': 'Plano Pagamento'}) %}
{% endbutton_set_item %}
<? } ?>
{% if feature_is_enabled('RecorrenciaFeature') %}
{% button_set_item() %}
{% link_to_add({'href': '#/!/financeiro/plano-pagamento-recorrente/<?=$Matricula->Codigo?>'|safe, 'icon': static('images/icons/svg/wpay_card.svg') , 'name': 'Plano Recorrente'}) %}
{% endbutton_set_item %}
{% endif %}
{% button_set_item() %}
{% link_to_add({'href': '#/BoletimObservacoes/Cadastrar/?CodMatricula=<?=$Matricula->Codigo?>'|safe, 'name': 'Boletim Observações'}) %}
{% endbutton_set_item %}
{% button_set_item() %}
{% link_to_add({'href': '#/MatriculaPeriodosLetivos/Cadastrar/?CodMatricula=<?=$Matricula->Codigo?>'|safe, 'name': 'Currículo'}) %}
{% endbutton_set_item %}
{% button_set_item() %}
{% link_to_add({'href': '/Controle.php?Controlador=Dependencias&Acao=Cadastrar&CodMatricula=<?=$Matricula->Codigo?>'|safe, 'name': 'Dependência'}) %}
{% endbutton_set_item %}
{% button_set_item() %}
{% link_to_print({'href': 'Controle.php?Controlador=Matriculas&Acao=Ver&Tipo=Impressao&Codigo=<?=$Matricula->Codigo?>'|safe}) %}
{% endbutton_set_item %}
<?php else: ?>
<? if (!Configuracao::singleton()->isInstituicaoPublica()) { ?>
{% button_set_item() %}
{% link_to_add({'href': '#/PlanoPagamentoMatricula/Cadastrar/?CodMatricula=<?=$Matricula->Codigo?>'|safe, 'name': 'Plano Pagamento'}) %}
{% endbutton_set_item %}
<? } ?>
<?php endif ?>
{% endbutton_set %}
<div class="clear"></div>
{% error_message({ 'message': '' }) %}
<?=FlashMessage::get()?>
{% container_box(section, { 'name': 'Ficha de Matrícula'}) %}
{% if section == 'content' %}
<?if (Configuracao::singleton()->MatriculaPersonalizadaCampo == 0 ) {?>
<p style="float: left; margin-right: 40px;">
<strong>Nº Matrícula</strong><br />
<span><?=$Matricula->NumMatricula?></span>
</p>
<?}?>
<?if (Configuracao::singleton()->MatriculaPersonalizadaCampo == 1 ) {?>
<p style="float: left; margin-right: 40px;">
<strong>Nº Matrícula</strong><br />
<span><?=$Matricula->MatriculaPersonalizada?></span>
</p>
<?}?>
<p style="float: left; margin-right: 40px;">
<strong>Período Letivo</strong><br />
<span><?=$Matricula->Turma->AnoLetivo;?></span>
</p>
<p style="float: left; margin-right: 40px;">
<strong>Unidade</strong><br />
<span><?=$Matricula->Turma->Unidade->Nome;?></span>
</p>
<p style="float: left; margin-right: 40px;">
<strong>Nível</strong><br />
<span><?=$Matricula->Turma->Serie->Curso->Nome?></span>
</p>
<p style="float: left; margin-right: 40px;">
<strong>Curso</strong><br />
<?php if (!$is_isaac_white_label): ?>
<a href="#/!/academico/cursos/<?=$Matricula->Turma->Serie->Codigo?>/" rel="address">
<?php endif; ?>
<span><?=$Matricula->Turma->Serie->Nome?></span>
<?php if (!$is_isaac_white_label): ?>
</a>
<?php endif; ?>
</p>
<p style="float: left; margin-right: 40px;">
<strong>Turma</strong><br />
<?php if (!$is_isaac_white_label): ?>
<a href="#/Turmas/Ver/?Codigo=<?=$Matricula->Turma->Codigo?>" rel="address">
<?php endif; ?>
<span><?=$Matricula->Turma->Nome;?></span>
<?php if (!$is_isaac_white_label): ?>
</a>
<?php endif; ?>
</p>
<div style="clear:both"></div>
<?
date_default_timezone_get();
$DataCadastro = $Matricula->DataCadastro->getData('d/m/Y H:i:s');
?>
<p style="float: left; margin-right: 40px;">
<strong>Data de Cadastro</strong><br />
<span>
<?/*=$Matricula->DataCadastro->getData('d/m/Y H:i:s')*/?>
<?=$DataCadastro?>
</span>
</p>
<p style="float: left; margin-right: 40px;">
<strong>Data Última Atualização</strong><br />
<span><?=$Matricula->DataAtualizacao->getData('d/m/Y H:i:s')?></span>
</p>
<p style="float: left; margin-right: 40px;">
<strong>Data da Matr&iacute;cula</strong><br />
<span><?=$Matricula->DataMatricula->getData();?></span>
</p>
<? if (!Configuracao::singleton()->isInstituicaoPublica()) { ?>
<p style="float: left; margin-right: 40px;">
<strong>Data de Contrato</strong><br />
<span><?=$Matricula->DataDeContrato->getData();?></span>
</p>
<? } ?>
<p style="float: left; margin-right: 40px;">
<strong>Situação</strong><br />
<span><?=$Matricula->Situacao->Nome;?></span>
</p>
<? if ($Matricula->Situacao->Nome == 'Cancelado') { ?>
<p style="float: left; margin-right: 40px;">
<strong>Data de Cancelamento</strong><br />
<span><?=$Matricula->DataInativacao->getData('d/m/Y H:i:s')?></span>
</p>
<p style="float: left; margin-right: 40px;">
<strong>Motivo de Cancelamento</strong><br />
<span><?=$Matricula->MotivoInativacao->Nome?></span>
</p>
<? } ?>
<p style="float: left; margin-right: 40px;">
<strong>Horario de Entrada</strong><br />
<span><?=$Matricula->HorarioEntrada?></span>
</p>
<p style="float: left; margin-right: 40px;">
<strong>Horario de Saída</strong><br />
<span><?=$Matricula->HorarioSaida?></span>
</p>
<div style="clear:both"></div>
<p style="float: left; margin-right: 40px;">
<strong>Nº Aluno</strong><br />
<span><?=$Matricula->Aluno->Matricula?></span>
</p>
<p style="float: left; margin-right: 40px;">
<strong>Nome</strong><br />
<?php if (!$is_isaac_white_label): ?>
<a href="#/Alunos/Ver/?Matricula=<?=$Matricula->Aluno->Matricula?>" rel="address">
<?php endif; ?>
<span><?=$Matricula->Aluno->Nome;?></span>
<?php if (!$is_isaac_white_label): ?>
</a>
<?php endif; ?>
</p>
<? if (!Configuracao::singleton()->isInstituicaoPublica()) { ?>
<p style="float: left; margin-right: 40px;">
<strong>Contratante</strong><br />
<span>
<? if($Matricula->Sacado->Nome == $Matricula->Aluno->Nome) { ?>
Próprio Aluno
<? } else { ?>
<?php if (!$is_isaac_white_label): ?>
<a href="#/Responsaveis/Ver/?Codigo=<?=$Matricula->Sacado->Codigo?>" rel="address">
<?php endif; ?>
<?=$Matricula->Sacado->Nome?>
<?php if (!$is_isaac_white_label): ?>
</a>
<?php endif; ?>
<? } ?>
</span>
</p>
<p style="float: left; margin-right: 40px;">
<strong>Contratada</strong><br />
<span><?=$Matricula->Cedente->RazaoSocial.' - CNPJ: '.$Matricula->Cedente->CNPJ?></span>
</p>
<? } ?>
<p style="float: left; margin-right: 40px;">
<strong>Funcionário que fez o Cadastro</strong><br />
<span><?=$Matricula->Funcionario->Nome?></span>
</p>
<? if ($Matricula->Observacoes) { ?>
<div style="clear:both"></div>
<p style="float: left; margin-right:40px;">
<strong>Observações</strong><br />
<span><?=$Matricula->Observacoes?></span>
</p>
<? } ?>
<? if ($Matricula->Turma->Serie->Curso->Nivel == 'Superior' || $Matricula->Turma->Serie->Curso->Nivel == 'Técnico') { ?>
<p style="float: left; margin-right: 40px;">
<strong>CR</strong><br />
<span><?=$Matricula->getCR()?></span>
</p>
<div style="clear:both"><br/><br/></div>
<h3>Inscrições em Currículo</h3>
<? if (count($MatriculaPeriodosLetivos) <= 0) { ?>
<div class="notification information png_bg">
<div>Nenhum período letivo associado.</div>
</div>
<? } else { ?>
<div class="notification error png_bg" style="display:none">
<div id="divMsgPL">
<? if ($_GET["M2"] == 1) { ?>
Matrícula em Período Letivo excluída com sucesso!
<? } ?>
</div>
</div>
<form id="formPeriodosLetivos">
{% form_hidden({ 'name': 'Codigo', 'value': '<?=$Matricula->Codigo?>'|safe }) %}
<table id="tabelaPeriodosLetivos" class="tabelaListagem">
<thead>
<tr>
<th style="text-align:left;width:1px;white-space:nowrap">Período Letivo</th>
<th style="text-align:left;width:1px;white-space:nowrap">Currículo</th>
<th style="text-align:left;width:1px;white-space:nowrap">Início</th>
<th style="text-align:left;width:1px;white-space:nowrap">Término</th>
<th></th>
</tr>
</thead>
<tbody>
<? foreach ($MatriculaPeriodosLetivos as $MatriculaPeriodoLetivo) { ?>
<tr>
<td nowrap="nowrap">
<a href="#/MatriculaPeriodosLetivos/Ver/?Codigo=<?=$MatriculaPeriodoLetivo->Codigo?>" rel="address" title="Detalhe">
<?=$MatriculaPeriodoLetivo->PeriodoLetivo->Codigo?>
</a>
</td>
<td nowrap="nowrap"><?=$MatriculaPeriodoLetivo->Curriculo->Titulo?></td>
<td nowrap="nowrap"><?=$MatriculaPeriodoLetivo->PeriodoLetivo->DataInicial->getData('d/m/Y')?></td>
<td nowrap="nowrap"><?=$MatriculaPeriodoLetivo->PeriodoLetivo->DataFinal->getData('d/m/Y')?></td>
<td style="text-align:right">
<a href="#/MatriculaPeriodosLetivos/Ver/?Codigo=<?=$MatriculaPeriodoLetivo->Codigo?>" rel="address" title="Detalhe">
<img src="img/icons/zoom.png" />
</a>
<a href="#/Controle.php?Controlador=MatriculaPeriodosLetivos&Acao=Editar&Codigo=<?=$MatriculaPeriodoLetivo->Codigo?>" title="Editar" rel="address">
<img src="img/btn/editar.png" alt="Editar" />
</a>
<a href="Excluir" title="Excluir" id="<?=$MatriculaPeriodoLetivo->Codigo?>">
<img src="img/btn/apagar.png" alt="Apagar" />
</a>
</td>
</tr>
<? } ?>
</tbody>
</table>
<div style="clear:both"><br/><br/></div>
</form>
<? } ?>
<? } ?>
<? if (!Configuracao::singleton()->isInstituicaoPublica()) { ?>
<div style="clear:both"><br /><br /></div>
<h3>Planos de Pagamento</h3>
<? if (count($PlanosPagamentoMatricula) <= 0) { ?>
<div class="notification information png_bg">
<div>Esta matrícula não tem planos de pagamento cadastrados.</div>
</div>
<? } else { ?>
<div class="notification error png_bg" style="display:none">
<div id="divMsg">
<? if ($_GET["M2"] == 1) { ?>
Plano de pagamento excluido com sucesso!
<? } ?>
</div>
</div>
<table class="tabelaListagem" id="tabelaPlanosPagamentoSerie">
<thead>
<tr>
<th style="width:1px; white-space:nowrap">Financeiro</th>
<th style="width:1px; white-space:nowrap">Plano</th>
<th style="width:1px; white-space:nowrap">Bolsa</th>
<th style="width:1px; white-space:nowrap">Valor Parcela</th>
<th style="width:1px; white-space:nowrap">Valor Total</th>
<th style="width:1px; white-space:nowrap">Principal</th>
<?php if (!$is_isaac_white_label): ?>
<th></th>
<?php endif; ?>
</tr>
</thead>
<tbody>
<? foreach ($PlanosPagamentoMatricula as $PlanoPagamentoMatricula) { ?>
<tr>
<td style="white-space:nowrap;text-align:left">
<?=$PlanoPagamentoMatricula->planoserie->eventofinanceiro->nome?>
</td>
<td style="white-space:nowrap;text-align:left">
<?=$PlanoPagamentoMatricula->planoserie->plano->nome?>
</td>
<td style="white-space:nowrap;text-align:left">
<?=$PlanoPagamentoMatricula->bolsa->nome?>
</td>
<td style="white-space:nowrap;text-align:right">
R$ <?=$PlanoPagamentoMatricula->valor?>
</td>
<td style="white-space:nowrap;text-align:right">
R$ <?=$PlanoPagamentoMatricula->valortotal?>
</td>
<td style="white-space:nowrap;text-align:center">
<? if ($PlanoPagamentoMatricula->codigo == $Matricula->PlanoPagamentoMatricula->Codigo){ ?>
<img src="img/icons/tick_circle.png" />
<? } ?>
</td>
<?php if (!$is_isaac_white_label): ?>
<td style="white-space:nowrap;text-align:right">
<a href="#/PlanoPagamentoMatricula/Ver/?Codigo=<?=$PlanoPagamentoMatricula->codigo?>" rel="address" title="Detalhe">
<img src="img/icons/zoom.png" />
</a>
<a href="#/PlanoPagamentoMatricula/Editar/?Codigo=<?=$PlanoPagamentoMatricula->codigo?>" title="Editar" rel="address">
<img src="img/btn/editar.png" alt="Editar" />
</a>
<? if ($PlanoPagamentoMatricula->is_recorrencia == False) {?>
<a href="" title="Excluir" id="<?=$PlanoPagamentoMatricula->codigo?>" aluno="<?=$Matricula->Codigo?>">
<img src="img/btn/apagar.png" alt="Apagar" />
</a>
<?} elseif ($PlanoPagamentoMatricula->is_recorrencia == True && $PlanoPagamentoMatricula->pode_deletar_recorrencia == True) { ?>
{% link_to_modal_styleguide({
'id': 'deletemodal-<?=$PlanoPagamentoMatricula->codigo?>'|safe,
'label': None,
'img': 'apagar.png',
'img_folder': 'btn',
'classes': '',
'data': {
'href': 'api/financeiro/plano-pagamento-recorrente/<?=$PlanoPagamentoMatricula->codigo?>/'|safe,
'return-to': '/Matriculas/Ver/?Codigo=<?=$Matricula->Codigo?>'|safe,
'method': 'delete',
'title': ' Excluindo um plano recorrente ',
'message': 'Você está excluindo o plano recorrente.<br><br>Ao confirmar, o plano e as cobranças relacionadas serão excluídas e não poderão ser recuperadas.',
'confirmation-message': 'Tem certeza que deseja excluir?',
'button-confirm-label': 'Sim, desejo excluir',
'button-confirm-class': 'mod-danger excluir',
'button-cancel-label': 'Cancelar',
'confirmation-message-class': 'u-weight-bold',
},
'success_message': 'Plano de pagamento excluído com sucesso.',
}) %}
<? } ?>
</td>
<?php endif; ?>
</tr>
<? } ?>
</tbody>
</table>
<? } ?>
<? } ?>
<div style="clear:both"><br/><br/></div>
<?php if (!$is_isaac_white_label): ?>
<h3>Observa&ccedil;&otilde;es do Boletim</h3>
<div class="notification error png_bg" style="display:none">
<div>
<? if ($_GET["M3"] == 1) { ?>
Observa&ccedil;&atilde;o excluida com sucesso!
<? } ?>
</div>
</div>
<? if (count($BoletimObservacoes) <= 0) { ?>
<div class="notification information png_bg">
<div>Nenhuma observa&ccedil;&atilde;o cadastrada.</div>
</div>
<? } else { ?>
<table class="tabelaListagem" id="tabelaBoletimObservacoes">
<thead>
<tr>
<th style="width:1px; white-space:nowrap">Período</th>
<th></th>
</tr>
</thead>
<tbody>
<? foreach ($BoletimObservacoes as $BoletimObservacao) { ?>
<tr>
<td style="white-space:nowrap;text-align:left">
<?=($BoletimObservacao->Periodo->Codigo) ? $BoletimObservacao->Periodo->Nome : 'Todos'?>
</td>
<td style="white-space:nowrap;text-align:right">
<a href="#/BoletimObservacoes/Editar/?Codigo=<?=$BoletimObservacao->Codigo?>" title="Editar" rel="address">
<img src="img/btn/editar.png" alt="Editar" />
</a>
<a href="" title="Excluir" id="<?=$BoletimObservacao->Codigo?>" aluno="<?=$Matricula->Codigo?>">
<img src="img/btn/apagar.png" alt="Apagar" />
</a>
</td>
</tr>
<? } ?>
</tbody>
</table>
<? } ?>
<div style="clear:both"><br/><br/></div>
<h3>Documentos Entregues</h3>
<? if (count($DocumentosEntregues) <= 0) { ?>
<div class="notification information png_bg">
<div id="divMsg3">Nenhum documento entregue</div>
</div>
<? } else { ?>
<? require_once PadraoApi::getStaticView('DocumentosEntregueForm.html') ?>
<?}?>
<div style="clear:both"><br/><br/></div>
<h3>Dependências</h3>
<? if (count($Dependencias) <= 0) { ?>
<div class="notification information png_bg">
<div id="divMsg3">Nenhuma depend&ecirc;ncia encontrada</div>
</div>
<? } else { ?>
<table id="tabelaDependencias" class="tabelaListagem">
<thead>
<tr>
<th width="1px">Ano</th>
<th width="1px">Unidade</th>
<th width="1px">Curso</th>
<th width="1px">Turma</th>
<th width="1px" nowrap="nowrap">Disciplina</th>
<th></th>
</tr>
</thead>
<tbody>
<? foreach ($Dependencias as $Dependencia) { ?>
<tr id='<?=$Dependencia->Codigo?>'>
<td nowrap="nowrap"><?=$Dependencia->Matricula->Turma->AnoLetivo?></td>
<td nowrap="nowrap"><?=$Dependencia->Matricula->Turma->Unidade->Nome?></td>
<td nowrap="nowrap"><?=$Dependencia->Matricula->Turma->Serie->getNome()?></td>
<td nowrap="nowrap">
<a href="#/Turmas/Ver/?Codigo=<?=$Dependencia->Matricula->Turma->Codigo?>" rel="address">
<?=$Dependencia->Matricula->Turma->Nome?>
</a>
</td>
<td nowrap="nowrap"><?=$Dependencia->TurmaDisciplina->Disciplina->Nome?></td>
<td style="text-align:right">
<a href="/Controle.php?Controlador=Dependencias&Acao=Editar&Matricula=<?=$Matricula->Codigo?>&Codigo=<?=$Dependencia->Codigo?>" rel="address" title="Dependencia">
<img src="img/btn/editar.png" alt="Editar" />
</a>
<a class="ExcluirDependencias" href="Excluir" title="Excluir" id="<?=$Dependencia->Codigo?>">
<img src="img/btn/apagar.png" alt="Apagar" />
</a>
</td>
</tr>
<? } ?>
</tbody>
</table>
<? } ?>
<?php endif; ?>
{% endif %}
{% endcontainer_box %}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment