diff --git a/ieducar/intranet/educar_matriculas_turma_cad.php b/ieducar/intranet/educar_matriculas_turma_cad.php index 3701e1f..6842764 100644 --- a/ieducar/intranet/educar_matriculas_turma_cad.php +++ b/ieducar/intranet/educar_matriculas_turma_cad.php @@ -205,7 +205,7 @@ class indice extends clsCadastro if (is_numeric($this->ref_cod_turma) && !$_POST) { $obj_matriculas_turma = new clsPmieducarMatriculaTurma(); - $obj_matriculas_turma->setOrderby('nome_aluno'); + $obj_matriculas_turma->setOrderby('sequencial_fechamento, nome_aluno'); $lst_matriculas_turma = $obj_matriculas_turma->lista(NULL, $this->ref_cod_turma, NULL, NULL, NULL, NULL, NULL, NULL, 1, NULL, NULL, NULL, NULL, NULL, NULL, array(1, 2, 3), NULL, NULL, $ano_letivo, NULL, TRUE, NULL, 1, TRUE); diff --git a/ieducar/intranet/include/pmieducar/clsPmieducarMatricula.inc.php b/ieducar/intranet/include/pmieducar/clsPmieducarMatricula.inc.php index 4380f3a..a749f3f 100644 --- a/ieducar/intranet/include/pmieducar/clsPmieducarMatricula.inc.php +++ b/ieducar/intranet/include/pmieducar/clsPmieducarMatricula.inc.php @@ -599,7 +599,7 @@ class clsPmieducarMatricula ) as data_nasc"; } - $sql = "SELECT {$this->_campos_lista}, c.ref_cod_instituicao, p.nome, a.cod_aluno, a.ref_idpes, c.cod_curso, m.observacao FROM {$this->_tabela} m, {$this->_schema}curso c, {$this->_schema}aluno a, cadastro.pessoa p "; + $sql = "SELECT {$this->_campos_lista}, c.ref_cod_instituicao, p.nome, a.cod_aluno, a.ref_idpes, c.cod_curso, m.observacao, (SELECT sequencial_fechamento FROM pmieducar.matricula_turma WHERE ref_cod_matricula = cod_matricula AND ativo = 1 LIMIT 1) as sequencial_fechamento FROM {$this->_tabela} m, {$this->_schema}curso c, {$this->_schema}aluno a, cadastro.pessoa p "; $whereAnd = " AND "; $filtros = " WHERE m.ref_cod_aluno = a.cod_aluno AND a.ativo = 1 AND m.ref_cod_curso = c.cod_curso AND p.idpes = a.ref_idpes "; diff --git a/ieducar/modules/Avaliacao/Views/DiarioApiController.php b/ieducar/modules/Avaliacao/Views/DiarioApiController.php index 6c0dd65..87e0948 100644 --- a/ieducar/modules/Avaliacao/Views/DiarioApiController.php +++ b/ieducar/modules/Avaliacao/Views/DiarioApiController.php @@ -536,7 +536,7 @@ class DiarioApiController extends ApiCoreController if ($this->canGetMatriculas()) { $alunos = new clsPmieducarMatriculaTurma(); - $alunos->setOrderby("translate(pessoa.nome,'".Portabilis_String_Utils::toLatin1(åáàãâäéèêëíìîïóòõôöúùüûçÿýñÅÁÀÃÂÄÉÈÊËÍÌÎÏÓÒÕÔÖÚÙÛÜÇÝÑ)."', '".Portabilis_String_Utils::toLatin1(aaaaaaeeeeiiiiooooouuuucyynAAAAAAEEEEIIIIOOOOOUUUUCYN)."')"); + $alunos->setOrderby("sequencial_fechamento , translate(pessoa.nome,'".Portabilis_String_Utils::toLatin1(åáàãâäéèêëíìîïóòõôöúùüûçÿýñÅÁÀÃÂÄÉÈÊËÍÌÎÏÓÒÕÔÖÚÙÛÜÇÝÑ)."', '".Portabilis_String_Utils::toLatin1(aaaaaaeeeeiiiiooooouuuucyynAAAAAAEEEEIIIIOOOOOUUUUCYN)."')"); $alunos = $alunos->lista( $this->getRequest()->matricula_id, diff --git a/ieducar/modules/DynamicInput/Views/MatriculaController.php b/ieducar/modules/DynamicInput/Views/MatriculaController.php index 3f77400..1e9df5d 100644 --- a/ieducar/modules/DynamicInput/Views/MatriculaController.php +++ b/ieducar/modules/DynamicInput/Views/MatriculaController.php @@ -57,7 +57,7 @@ class MatriculaController extends ApiCoreController protected function getMatriculas() { if ($this->canGetMatriculas()) { $matriculas = new clsPmieducarMatricula(); - $matriculas->setOrderby(" translate(nome,'".Portabilis_String_Utils::toLatin1(åáàãâäéèêëíìîïóòõôöúùüûçÿýñÅÁÀÃÂÄÉÈÊËÍÌÎÏÓÒÕÔÖÚÙÛÜÇÝÑ)."', '".Portabilis_String_Utils::toLatin1(aaaaaaeeeeiiiiooooouuuucyynAAAAAAEEEEIIIIOOOOOUUUUCYN)."') "); + $matriculas->setOrderby("sequencial_fechamento , translate(nome,'".Portabilis_String_Utils::toLatin1(åáàãâäéèêëíìîïóòõôöúùüûçÿýñÅÁÀÃÂÄÉÈÊËÍÌÎÏÓÒÕÔÖÚÙÛÜÇÝÑ)."', '".Portabilis_String_Utils::toLatin1(aaaaaaeeeeiiiiooooouuuucyynAAAAAAEEEEIIIIOOOOOUUUUCYN)."') "); $matriculas = $matriculas->lista(NULL, NULL, $this->getRequest()->escola_id, diff --git a/ieducar/modules/HistoricoEscolar/Views/ProcessamentoApiController.php b/ieducar/modules/HistoricoEscolar/Views/ProcessamentoApiController.php index b55b53c..ed5dbd3 100644 --- a/ieducar/modules/HistoricoEscolar/Views/ProcessamentoApiController.php +++ b/ieducar/modules/HistoricoEscolar/Views/ProcessamentoApiController.php @@ -808,7 +808,7 @@ class ProcessamentoApiController extends Core_Controller_Page_EditController $alunos = new clsPmieducarMatriculaTurma(); - $alunos->setOrderby('ref_cod_curso, ref_ref_cod_serie, ref_cod_turma, nome'); + $alunos->setOrderby('ref_cod_curso, ref_ref_cod_serie, ref_cod_turma, sequencial_fechamento, nome'); $alunos = $alunos->lista( $this->getRequest()->matricula_id, -- libgit2 0.21.2